Authorization

Authorization in V2 API is same as in V1 API, i.e. authorization token is used. For more information refer to Authorization.

In addition, the V1 API current_user endpoint is replaced by token validation endpoint.

Audiences

Work with Audiences in V2 API is similar to V1 API. However, there are several changes between V1 and V2 API:

  • The V1 API shared attribute is discontinued.

  • The V1 API created_at attribute is discontinued.

  • The V1 API type attribute is discontinued.

  • The V1 API curated attribute is discontinued. However, this information is present in the flags attribute in V2 API.

  • The V1 API folder attribute is renamed to folder_id in V2 API.

  • The V1 API options attribute in expression attribute is renamed to datapoints in V2 API.

Please, for more details on V2 API Audience endpoints refer to the Audiences chapter

Audience Folders

The V1 Audience Folders endpoint is discontinued. In case you are missing this endpoint, please contact your account manager with the use case.

Questions

The way how questions are retrieved in V1 API is now discontinued. In V2 API questions must be retrieved in a step by step way by traversing Categories tree as described in section Basic Calculation Query.

In addition, list of datapoints and suffixes for an individual question is retrieved separately using one of the below endpoints:

Note: the available_options attribute from V1 API was renamed to datapoints in V2 API.

Categories

The way how categories are retrieved in V1 API is now discontinued. In V2 API categories must be retrieved in a step by step way by traversing Categories tree as described in section Basic Calculation Query.

Waves

The legacy V1 API was designed at the time when GWI was offering only 1 syndicated study: GWI Core. Because of that V1 API Waves endpoint returns all waves that an API user has access to.

However, now GWI offers several syndicated studies and also custom studies. That’s why the V2 API Waves endpoint is based on namespaces.

In general each namespace can have its own unique set of waves. That’s why the V2 API Waves endpoint request contains a list of namespaces an API user wants to receive waves for. In case the list of namespaces in the request filter is empty, all combinations of namespaces and waves will be returned.

For detailed information refer to the v2 Waves Filter section.

Locations

The legacy V1 API was designed at the time when GWI was offering only 1 syndicated study: GWI Core. Because of that V1 API Locations endpoint returns all locations that an API user has access to.

However, now GWI offers several syndicated studies and also custom studies. That’s why the V2 API Locations endpoint is based on namespaces and waves.

In general each namespace and wave couple can have its own unique set of locations. That’s why the V2 API Locations endpoint request contains a list of namespace(s) and wave(s) an API user wants to receive locations for. Both the list of waves and list of namespaces are optional parameters. In case the list of waves is empty, all waves and locations combinations will be returned for the provided list of namespaces. In case both the list of namespaces and waves are empty, all combinations of namespaces, waves and locations will be returned.

For detailed information refer to the v2 Locations Filter section.

Multipliers a.k.a. Splitters

V1 API multipliers are renamed to splitters in V2 API.

The legacy V1 API was designed at the time when GWI was offering only 1 syndicated study: GWI Core. Because of that V1 API Multipliers endpoint returns all multipliers that an API user has access to.

However, now GWI offers several syndicated studies and also custom studies. That’s why the V2 API Splitters endpoint is based on namespaces.

In general each namespace can have its own unique set of splitters. That’s why the V2 API Splitters endpoint request contains a list of namespaces an API user wants to receive splitters for. In case the list of namespaces is empty, all combinations of namespaces and splitters will be returned.

For detailed information refer to the v2 Splitters Filter section.

Bookmarks

The V1 Bookmarks endpoint is discontinued. In case you are missing this endpoint, please contact your account manager with the use case.

Saved Queries

The V1 Saved Queries endpoint is discontinued. In case you are missing this endpoint, please contact your account manager with the use case.

Query

V1 API Query is renamed to Stats Query in V2 API.

V1 API Query accepts id of a Saved Query. This feature is discontinued. V2 API Stats Query does not accept id of Saved Query.

Audiences in V1 API Query are represented by audience ID, however, audiences in V2 API Stats Query are represented by audience expression.

Some of the V1 API Query attributes are renamed or discontinued in V2 API Stats Query as described below:

Some of the V1 API Query Response attributes are renamed or moved in V2 API Stats Query Response as described below:

  • The data.by_audience, data.by_multiplier_segment and data.by_audience_and_multiplier_segment attributes are expressed as the value of the meta.type attribute in V2 API Stats Query Response. The meta.type attribute can have value: "DATAPOINTS", "DATAPOINTS-AUDIENCES", "DATAPOINTS-SEGMENTS" or "DATAPOINTS-SEGMENTS-AUDIENCES".

  • All calculation results for V2 API are located in data array attribute in metrics attribute. In data array attribute the audience, datapoint, segment, suffixes and waves attributes specify the particular audience/datapoint/segment/suffixes/waves combination for the calculation results in the metrics attribute.

  • The calculation results count attribute was renamed to positive_sample.

  • The calculation results responses_count attribute was renamed to positive_sample.

  • The calculation results horizontal_percentage attribute was renamed to datapoint_percentage.

  • The calculation results percentage attribute was renamed to audience_percentage.

  • The calculation results index attribute was renamed to audience_index.

  • The calculation results weighted_universe_count attribute was renamed to positive_size.

For detailed information refer to the v2 Stats Query section.

Note: V2 API introduced the below calculation queries:

Fulltext

The V1 Fulltext endpoint is discontinued. In case you are missing this endpoint, please contact your account manager with the use case.