Data

Submit a Bulk Scores Request

Submit a request to asynchronously generate timeseries score data for one or more named scores and audiences from the specified data source. The max date range for a single request is 10 years. Returns a request_id that can be used to poll the status of the report via the /scores/bulk/{request_id} endpoint. When the report is complete, a download URL will be provided to retrieve the data.

post/scores/bulk

Request

Request body

data_source_idstring uuid required

The unique identifier for a data source.

countrystring required

Two letter ISO 3166-1 alpha-2 country code. This can be used in the country_code query parameter of multiple endpoints to limit results to the specific country.

scoresobject required

A map of caller-defined score names to score selections. Each named score will appear as a separate series in the report output. Score names must be unique within a request.

audiencesobject

A map of audience names to audience definitions. Each named audience will produce a separate series in the report output. An empty audience object {} represents all respondents. If omitted, the report defaults to a single all-respondents series.

min_datestring date

Minimum date of data returned in YYYY-MM-DD format. The date provided is inclusive. Omitting this field will return the earliest available trend data.

max_datestring date

Maximum date of data returned in YYYY-MM-DD format. The date provided is inclusive. Omitting this field will return the most recent available trend data.

aggregation'day' | 'week' | 'month' | 'quarter' | 'year' required

Options for aggregating data. For calendar durations, sample for that duration will be aggregated into a single data point. For example, requesting data between "2018-01-01" and "2018-12-31" with the month interval will return a data point for each month. Each data point representing an interval will be timestamped with the start date of that interval. The "week" interval starts on Monday, and the "all" option will return a single data point aggregating all trend data.

Example request

{
  "data_source_id": "00de2081-e013-411d-823c-cd483283e38d",
  "country": "us",
  "min_date": "2018-01-31",
  "max_date": "2018-01-31",
  "aggregation": "month"
}

Response

Bulk Scores Request Submitted

request_idstring uuid

The unique identifier for the bulk scores request. Use this ID to poll the status of the report via the /scores/bulk/{request_id} endpoint.

Example response

{
  "request_id": "b1a2c3d4-e5f6-7890-abcd-ef1234567890"
}

Changes

No recorded changes to this operation across all 1 revision of this API.