Requesting Reports

Prev Next

You can use the Analytics API to retrieve report data in two ways:

  1. Request by ID (recommended for most use cases)

  2. Request by JSON Configuration (advanced customization)

Both methods use the same endpoint:

POST /report-query

Which Method Should I Use?

Method

Best for

Request by ID

Fast, simple, always reflects the latest UI configuration

Request by JSON Configuration

Full control and customization


Method 1: Request by ID

This method retrieves a report based on its Report ID. It always reflects the latest configuration in the UI.

Limited customization is possible. For advanced filtering (e.g. dynamic time filters or segments), use the JSON configuration method.

Important: Use either id or configuration, not both.

This request starts an asynchronous report calculation.

Minimal Request Example

{
  "id": 841
}

This returns the entire report with all elements.

For full details on all available request parameters, see the Create report calculation query API documentation.

Request with Specific Elements

{
  "id": 841,
  "elementIds": [240439, 240465, 240441]
}

This returns only the specified elements of the report.

Where to Find the IDs

Report ID

  • Go to Report Overview

  • Enable the ID column via Table Configuration

Example:

Showing report IDs_GIF_Final.gif

Element IDs

You have two options:

  • Enable “Always display Element IDs” in the report

  • Use:  > Copy as JSON > Element IDs    

Example:

Showing Element IDs_GIF_Final.gifThe id field corresponds to the Report ID from the UI.


Method 2: Request by JSON Configuration

Use this method when you need full control over the report.

Instead of referencing a report by ID, you send the entire configuration.

How to Get a Base Configuration

  1. Open a report in the UI

  2. Click the three-dot menu

  3. Select Copy as JSON → Report Configuration

Example:

Method 2 report configuration_GIF_Final.gif

Configuration Example

{
  "configuration": {
    "id": 841,
    "reportElements": [
      ...
    ],
    "timeFilter": {
      ...
    },
    "quickFilters": [
      ...
    ]
  }
}

Behavior:

  • Independent from UI changes

  • Fully customizable

  • Requires manual maintenance


After Sending the Request

  1. Call Create report calculation query

  2. Check the status via get report query status

  3. Retrieve the result via the provided URL