Data Export API

This entry provides detailed information on the Data Export processes of the DMP.

Contents of the Table

API Service

The data export API is meant to analyze millions of data points with latencies between a few seconds up to 15 minutes. The expected result set is in the range of 1 to 1.000.000 rows since even the raw data events can be exported.

Template

https://platform.flxone.com/api/viz/data?x=[JSON_encoded]

Service/api/viz/data
MethodPOST
Parameters
KeyExplanationRequired
xContains a JSON query object array with the outline of the report parametersYes
csrfTokenYes
Object Parameters
KeyExplanation
dimensions

See the list of available identifiers.

measures

See the list of available identifiers.

filters

Filter on date dimension is required. It looks like this:

[{
        "dimension": "date",
        "date_start": "2014-03-20",
        "date_end": "2014-03-27",
        "date_dynamic": null
}]

To use a dynamic date the JSON would look like this:

[{
        "dimension": "date",
        "date_dynamic": "yesterday"
}]

The available options are:

  • today
  • yesterday
  • last_7_days
  • last_30_days

You can also add additional filters, such as an advertiser filter:
{
        "dimension": "advertiser_id",
        "include": ["7971"]
 }
limitHow many items to return. 5000 is the max.
orderOn which measure(s) should the data be sorted.
batch_export

false or true (default = false) Allows to export large volumes of data through the API in a tab separated format.

callback_idThis can be anything and it will be returned as is. It is used to keep track of queries when sending requests in parallel.

Example

Below a configuration example of a JSON query object array for the "x" parameter.

[{
	"dimensions": [
		"advertiser_id"
	],
	"measures": [
		"impressions_sum"
	],
	"filters": [{
		"dimension": "date",
		"date_start": "2014-03-20",
		"date_end": "2014-03-27",
		"date_dynamic": null
	}],
	"limit": "5000",
	"order": [{
		"key": "impressions_sum",
		"order": "desc"
	}],
	"callback_id": "b02de879-4205-969a-582a-8c1587b77b34"
}]

Batch Export

The DMP also offers a batch export service in case you want to:

  1. Get the results consolidated in a (downloadable) file rather then having them included in the JSON response.
  2. Get the results for a large data set. Please note that even the raw logs are accessible via the batch export service.

By making a request to the batch export service the query will run in the background and as a result the API response will provide you of a batch export ID in case the "status" was "OK".

Endpoint/api/viz/batch-export

Once the batch export is completed you can either:

  1. Download the file from the "Exports" feature in the UI: https://platform.flxone.com/batch-export.
  2. Download the file by making a GET request to the following API endpoint: "/viz/export?id=<id>".
Endpoint/api/viz/export?id=<id>

Also see a more detailed batch export example