📘
The /data endpoint allows you to find and retrieve Attribution report metrics for one or more reports.
If you request data for a single report, the result will be returned to you synchronously. If you request data for multiple reports, the result will be made available at our /data/{requestId} endpoint. These results will be available for 30 days. More information about these workflows can be found in Examples & Templates.
The default responses are provided in JSON format. For a CSV formatted response, add ".csv" to the URL:
JSON (default):
CSV:
| Endpoint | Verb | Body | Accepts |
|---|
/data | POST | Request | JSON |
| key | type | description |
|---|
reportIds | Array | Array of Placement or Custom Report IDs. If a single reportId is specified, the result will be returned synchronously. If multiple reportIds are specified, the result will be returned asynchronously. |
metrics | Array | Array of metric |
dimensions | Array | Array of dimensions |
filters | Array | Array of filter Currently one filter is supported at a time. A filter may have more than one Predicate |
options | Object | requestOptions |
| key | type | description |
|---|
predicates | Array | Array of Predicate. The data returned by this request will satisfy all of the given Predicates. |
| key | type | description |
|---|
dimension | Object | Dimensions |
operator | Object | Operator |
values | Array | Array of values to be used by the operator function. |
| key | type | description |
|---|
name | String | IN, NOT_IN, BETWEEN, LIKE, GREATER_THAN, LESS_THAN |
| key | type | description |
|---|
includeQueryInResponse | Boolean | Set to true if you would like your request/query included in your response. |
| key | type | description |
|---|
result | Object | Result A Result is returned if the request is complete. (This object has the same structure as the Result returned from the /data endpoint) |
status | Object | Status |
| key | type | description |
|---|
data | Object | Data |
query | Object | Request Included if original request's includeQueryInRepsonse option is set to true |
| key | type | description |
|---|
columns | Array | Array of Column |
rows | Array | Array of Row |
| key | type | description |
|---|
name | String | Report ID, Dimension or Metric Name |
type | String | REPORT_ID, DIMENSION, METRIC |
| key | type | description |
|---|
values | Array | Values corresponding, in order, to the Data columns |
overview | Boolean | Represents whether or not the row is a summary or rollup of the other rows |
| key | type | description |
|---|
requestId | String | Multi-report request ID. This ID can be used to access the multi-report request status and result which is available at the /data/{requestId} endpoint |
resultUrl | Boolean | URL at which the multi-report request status and result are made available |
state | String | State of the request, should be set to "PENDING" for all pending requests |
query | Object | Request. The original report query will be included if the includeQueryInResponse key is included in the request's request options |
This endpoint is used when accessing data from multi-report queries.
| Endpoint | Verb | Body | Accepts |
|---|
/data/{requestId} | GET or POST | Request. Request is optional and can be included in a POST request | JSON |
| key | type | description |
|---|
result | Object | Result. A Result is returned if the request is complete. (This object has the same structure as the Result returned from the /data endpoint) |
status | Object | Status. A Status is returned if the request is incomplete. (This object has the shape as the Status returned from the /data endpoint, but only includes the status and optional query keys) |