Skip to navigation

Retrieve rows from a single analytics report

The purpose of this API is to provide the ability for Pixalate Analytics subscribers to ingest analytics data into their own internal systems. The response is a JSON formatted object containing a list of report items.

Authentication

x-api-keystring

Authentication and authorization is achieved by supplying your Pixalate provided API key in the header of the request. An API key may be obtained by signing up for an account on the Pixalate developer website.

As of April 2023, Pixalate supports an API-key based authentication method for the Analytics Report API. If you have been provided with username and password credentials during your onboarding to access the Report API, please visit our documentation here to get started. If you have been provided with an API key, the documentation on this page will guide you on how to integrate.

Path parameters

reportIdstringRequired

The report’s unique identifier. To request the default analytics report, use the term default as the report identifier.

Query parameters

timeZoneintegerOptional
The time zone in which to sync the report data. The timezone is the number of minutes from GMT. Default is 0.
startintegerOptional
Which item in the results from which to start.
limitintegerOptional
The total number of items to return. Default is 20.
qstringOptional

A URL encoded query to run to retrieve data. It uses a simplified SQL SELECT syntax as follows: <p> [ column [ <code>,</code>column… ] ] [ <code>WHERE</code> expression ] [ <code>GROUP BY</code> column [ ,column… ] ] [ <code>ORDER BY</code> column [ <code>DESC</code> ] ] </p> <p> Note: All characters and their values are case sensitive. </p> <table> <tbody> <tr> <td><em>column</em></td> <td><em>dimension</em> or <em>metric</em></td> </tr> <tr> <td><em>dimension</em></td> <td>One of the set of dimension identifiers available for the specified report. See Dimensions schema below.</td> </tr> <tr> <td><em>metric</em></td> <td>One of the set of metric identifiers available for the specified report. See Metrics schema below.</td> </tr> <tr> <td><em>expression</em></td> <td>One of the following: <em>dimension operator literal</em>, or <em>metric comparator literal</em>, or <code>(</code><em>expression</em><code>)</code>, or <em>expression</em> <code>AND</code> <em>expression</em>, or <em>expression</em> <code>OR</code> <em>expression</em>, or <code>CONTAINS</code> <code>(</code><em>dimension</em>, or <em>literal</em><code>)</code></td> </tr> <tr> <td><em>operator</em></td> <td><code>=</code>, or <code>!=</code></td> </tr> <tr> <td><em>comparator</em></td> <td><code>=</code>, or <code>></code>, or <code><</code></td> </tr> <tr> <td><em>literal</em></td> <td><em>number</em>, or</em> <em>string</em>, or <em>date</em></td> </tr> <tr> <td><em>number</em></td> <td>An integer or decimal number.</td> </tr> <tr> <td><em>string</em></td> <td>A text string surrounded by single quotes.</td> </tr> <tr> <td><em>date</em></td> <td>A date as <em>yyyy</em>-<em>mm</em>-<em>dd</em> format surrounded by single quotes.</td> </tr> </tbody> </table>

exportUribooleanOptional
Setting this flag to true indicates that the API returns a URI to the CSV data as an Internet resource rather than the data itself. While the resulting resource is public, the URI contains a randomly generated identifier that ensures the data is relatively secure unless the URI itself is made public by the user.
isAsyncbooleanOptional

If set to true, a CSV URI response is returned immediately. However, this will return a 404 Not Found HTTP status code until the service completes processing the report. Note that this parameter is only recognized when the exportUri parameter is also supplied as true. Note also that the limit parameter is ignored when this parameter is set to true.

isLargeResultSetbooleanOptional

If set to true, then processing is handled identically as if the isAsync parameter is set to true. However, the returned CSV file contains a single column with each row being a URL to a CSV file that contains part of the data. Large results that set ORDER BY may cause an 400 Bad Request HTTP status code. To resolve, try removing the ORDER BY clause. Note that this parameter is only recognized when the exportUri parameter is also supplied as true. Note also that the limit parameter is ignored when this parameter is set to true.

prettybooleanOptional
If true, return pretty JSON. Default is false.

Response

OK
numFoundintegerOptional
The total number of report items.
docslist of objectsOptional
A list of report items.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
5XX
Server Error