[Tenjin API Reference](https://api-docs.tenjin.com/llms.txt) › [Reporting Metrics API](https://api-docs.tenjin.com/reporting-metrics-api.md) › Pull data from a saved report

- Reporting Metrics API OpenAPI spec: https://api-docs.tenjin.com/openapi/reporting-metrics-api.json

# Pull data from a saved report

- **Method:** `GET`
- **Path:** `/v2/reports/{id}`
- **Operation ID:** `get_reports_id`
- **Tags:** Reporting Metrics

## Effective servers

- `https://api.tenjin.com`

## Authentication

- **Bearer**: HTTP bearer (`JWT`)

  Generate an access token on the [Access Tokens](https://dashboard.tenjin.com/dashboard/access_tokens) page of the Tenjin dashboard and send it as `Authorization: Bearer <access token>`. [API access tokens](https://tenjin.com/docs/api-access-tokens/) explains them.

## Path parameters

- **`id` (required)**: `string`, format: `uuid`

  Id of the saved report

## Query parameters

- **`page`**: `integer`, default: `1`

  Page of results to fetch.
- **`per_page`**: `integer`, default: `100`, minimum: `0`, maximum: `1000`

  Number of results to return per page.

## Responses

### 200 The report: a spend report or an ad revenue report, by the saved report type

**Headers:**

- **`Link`**

  URLs of the first, previous, next and last pages (RFC 8288); sent only when the list has more than one page

  `string`
- **`Total`**

  Number of items on all pages

  `integer`
- **`Per-Page`**

  Number of items per page

  `integer`

**Content type:** `application/json`

**One of:**

- `object`, schema: `SpendReportDocument`
  - **`data` (required)**: `array`

    **Items:**

    schema: `SpendReportResource`
    - **`attributes` (required)**: `object`

      The dimension columns of the group_by, and the requested metrics: any of the [Metric Definitions](https://api-docs.tenjin.com/metric_definitions#spend) and the organization's z\_ custom metrics. Unknown metric names are left out.
      - **`ad_network_custom`**: `boolean`

        Whether the channel is a custom one. A group_by that includes channel and country or site, without campaign or creative, except channel,app,country
      - **`ad_network_icon_url`**: `string | null`

        Icon URL of the channel. A group_by that includes channel, campaign or creative, except channel alone
      - **`ad_network_id`**: `integer | null`

        Id of the channel. A group_by that includes channel, campaign or creative
      - **`ad_network_name`**: `string | null`

        Name of the channel. A group_by that includes channel, campaign or creative, except channel alone
      - **`ad_network_short_id`**: `string | null`

        URL-safe id of the channel. A group_by that includes channel and country or site, without campaign or creative, except channel,app,country
      - **`app_icon_url`**: `string | null`

        Icon URL of the app. A group_by that includes app, campaign or creative, except app alone
      - **`app_id`**: `string | null`, format: `uuid`

        Id of the app. A group_by that includes app, campaign or creative
      - **`app_name`**: `string | null`

        Name of the app. A group_by that includes app, campaign or creative, except app alone
      - **`bundle_id`**: `string | null`

        Bundle id of the app in its store. A group_by that includes app, campaign or creative
      - **`campaign_icon_url`**: `string | null`

        Icon URL of the campaign. A group_by that includes campaign and site or creative
      - **`campaign_id`**: `string`, format: `uuid`

        Id of the campaign. A group_by that includes campaign
      - **`campaign_name`**: `string | null`

        Name of the campaign. A group_by that includes campaign and site or creative
      - **`country`**: `string`

        ISO country code. A group_by that includes country
      - **`creative_id`**: `string`, format: `uuid`

        Id of the creative. A group_by that includes creative
      - **`creative_name`**: `string | null`

        Name of the creative. A group_by that includes creative and campaign, country or site
      - **`custom`**: `boolean | null`

        Whether the channel is a custom one. Group by channel
      - **`date`**: `string`, format: `date`

        First day of the period; absent with granularity=totals-daily
      - **`icon_url`**: `string | null`

        Icon URL of the app, channel or campaign. Group by app or channel alone, or a group_by that includes campaign, without site or creative
      - **`name`**: `string | null`

        Name of the app, channel, campaign or creative; the country code or site id. Group by app, channel, campaign, creative, country or site, and the campaign name for campaign,country. Absent for channel,app and channel,app,country. A group_by with campaign or creative ignores channel and app. For any other combination, the ids joined with `-`, such as `3-US`
      - **`platform`**: `string | null`, possible values: `"amazon", "android", "android_other", "ios", "windows", "unspecified", null`

        Platform of the app. A group_by that includes app, campaign or creative
      - **`remote_creative_id`**: `string | null`

        Id of the creative on the ad network. A group_by that includes creative
      - **`short_id`**: `string | null`

        URL-safe id of the channel. Group by channel
      - **`site_id`**: `string`

        Id of the site. A group_by that includes site
      - **`store_id`**: `string | null`

        Id of the app in its store. A group_by that includes app, campaign or creative

      **Additional properties:**

      `number | null`, format: `double`
    - **`id` (required)**: `string`
    - **`type` (required)**: `string`, possible values: `"report"`
  - **`links` (required)**: `object`, schema: `Links`
    - **`self` (required)**: `string`, format: `uri`

      URL of this request
    - **`first`**: `string`, format: `uri`

      URL of the first page of a list
    - **`last`**: `string`, format: `uri`

      URL of the last page of a list
    - **`next`**: `string`, format: `uri`

      URL of the next page of a list
    - **`prev`**: `string`, format: `uri`

      URL of the previous page of a list
  - **`meta` (required)**: `object`, schema: `SpendReportMeta`
    - **`ad_network_ids` (required)**: `(array of integer) | string | (array of string)`

      The channel_ids param, or the deprecated ad_network_ids param as sent: a string or an array of strings
    - **`app_ids` (required)**: `array of string`

      The app_ids param
    - **`campaign_ids` (required)**: `string | (array of string)`

      The deprecated campaign_ids param as sent; empty when not sent
    - **`count` (required)**: `integer`

      Number of rows on all pages
    - **`countries` (required)**: `array of string`

      The countries param
    - **`end_date` (required)**: `string`, format: `date`

      The end_date param, or its default
    - **`granularity` (required)**: `string`, possible values: `"daily", "weekly", "monthly", "totals-daily"`

      The granularity param, or its default
    - **`group_by` (required)**: `string | null`, possible values: `"ad_network_id", "app_id", "campaign_id", "country", "site_id", "creative_id", "ad_network_app", "ad_network_app_country", "channel_country", "app_country", "campaign_country", "campaign_creative", "campaign_site", "creative_country", "creative_site", null`

      Internal dimension name for one dimension, a name for some combinations, or null for any other combination
    - **`metrics` (required)**: `array of string`

      The requested metrics
    - **`organization_id` (required)**: `string`, format: `uuid`

      Id of your organization
    - **`per_page` (required)**: `integer`

      Number of rows per page
    - **`platforms` (required)**: `string | (array of string)`

      The deprecated platforms param as sent; empty when not sent
    - **`start_date` (required)**: `string`, format: `date`

      The start_date param, or its default
- `object`, schema: `AdRevenueReportDocument`
  - **`data` (required)**: `array`

    **Items:**

    schema: `AdRevenueReportResource`
    - **`attributes` (required)**: `object`

      The dimension columns of the group_by, and the requested metrics; see the [Metric Definitions](https://api-docs.tenjin.com/metric_definitions#ad_revenue)
      - **`ad_network_custom`**: `boolean`

        Whether the channel is a custom one. Group by channel or ad_placement
      - **`ad_network_icon_url`**: `string | null`

        Icon URL of the channel. Group by channel or ad_placement
      - **`ad_network_id`**: `integer | null`

        Id of the channel. Group by channel or ad_placement
      - **`ad_network_name`**: `string | null`

        Name of the channel. Group by channel or ad_placement
      - **`ad_network_short_id`**: `string | null`

        URL-safe id of the channel. Group by channel or ad_placement
      - **`ad_placement_id`**: `string`, format: `uuid`

        Id of the ad placement. Group by ad_placement
      - **`ad_placement_name`**: `string | null`

        Name of the ad placement. Group by ad_placement
      - **`ad_revenue`**: `number | null`, format: `double`

        Ad Revenue. When requested
      - **`app_icon_url`**: `string | null`

        Icon URL of the app. Group by app or ad_placement
      - **`app_id`**: `string | null`, format: `uuid`

        Id of the app. Group by app or ad_placement
      - **`app_name`**: `string | null`

        Name of the app. Group by app or ad_placement
      - **`bundle_id`**: `string | null`

        Bundle id of the app in its store. Group by app or ad_placement
      - **`clicks`**: `number | null`, format: `double`

        Clicks. When requested
      - **`country_name`**: `string`

        ISO country code, despite the name. Group by country
      - **`date`**: `string`, format: `date`

        First day of the period; absent with granularity=totals-daily
      - **`ecpc`**: `number | null`, format: `double`

        eCPC. When requested
      - **`ecpm`**: `number | null`, format: `double`

        eCPM. When requested
      - **`impressions`**: `number | null`, format: `double`

        Impressions. When requested
      - **`platform`**: `string | null`, possible values: `"amazon", "android", "android_other", "ios", "windows", "unspecified", null`

        Platform of the app. Group by app or ad_placement
      - **`store_id`**: `string | null`

        Id of the app in its store. Group by app or ad_placement
    - **`id` (required)**: `string`
    - **`type` (required)**: `string`, possible values: `"report"`
  - **`links` (required)**: `object`, schema: `Links`

    *Schema `Links` is shown above.*
  - **`meta` (required)**: `object`, schema: `AdRevenueReportMeta`
    - **`ad_network_ids` (required)**: `(array of integer) | (array of string)`

      The channel_ids param, or the deprecated ad_network_ids param as an array of strings
    - **`app_ids` (required)**: `array of string`

      The app_ids param
    - **`count` (required)**: `integer`

      Number of rows on all pages
    - **`countries` (required)**: `array of string`

      The countries param
    - **`end_date` (required)**: `string`, format: `date`

      The end_date param, or its default
    - **`granularity` (required)**: `string`, possible values: `"daily", "weekly", "monthly", "totals-daily"`

      The granularity param, or its default
    - **`group_by` (required)**: `array`

      Internal dimension names

      **Items:**

      `string`, possible values: `"ad_network_id", "app_id", "country", "ad_placement_id"`
    - **`metrics` (required)**: `array of string`

      The requested metrics
    - **`organization_id` (required)**: `string`, format: `uuid`

      Id of your organization
    - **`per_page` (required)**: `integer`

      Number of rows per page
    - **`platforms` (required)**: `array of string`

      The deprecated platforms param as sent; empty when not sent
    - **`start_date` (required)**: `string`, format: `date`

      The start_date param, or its default

**Example: A spend report**

```json
{
  "data": [
    {
      "id": "2026-08-29,900011,8448c238-d62f-4283-b08c-18b87eebb702,BR",
      "type": "report",
      "attributes": {
        "date": "2026-08-29",
        "ad_network_id": 900011,
        "app_id": "8448c238-d62f-4283-b08c-18b87eebb702",
        "country": "BR",
        "spend": 128.9,
        "installs": 66,
        "app_name": "Alpha",
        "app_icon_url": "/default_app_icon.png",
        "bundle_id": "com.example.alpha",
        "store_id": "2000000001",
        "platform": "ios",
        "ad_network_name": "Network One",
        "ad_network_icon_url": ""
      }
    },
    {
      "id": "2026-08-29,900012,8448c238-d62f-4283-b08c-18b87eebb702,BR",
      "type": "report",
      "attributes": {
        "date": "2026-08-29",
        "ad_network_id": 900012,
        "app_id": "8448c238-d62f-4283-b08c-18b87eebb702",
        "country": "BR",
        "spend": 12.8,
        "installs": 252,
        "app_name": "Alpha",
        "app_icon_url": "/default_app_icon.png",
        "bundle_id": "com.example.alpha",
        "store_id": "2000000001",
        "platform": "ios",
        "ad_network_name": "Network Two Account",
        "ad_network_icon_url": ""
      }
    }
  ],
  "links": {
    "self": "https://api.tenjin.com/v2/reports/c0bd3ef9-8475-4754-b46f-7b2af56781b3?per_page=60&page=2",
    "first": "https://api.tenjin.com/v2/reports/c0bd3ef9-8475-4754-b46f-7b2af56781b3?page=1&per_page=60",
    "prev": "https://api.tenjin.com/v2/reports/c0bd3ef9-8475-4754-b46f-7b2af56781b3?page=1&per_page=60"
  },
  "meta": {
    "count": 105,
    "per_page": 60,
    "start_date": "2026-08-25",
    "end_date": "2026-09-01",
    "granularity": "daily",
    "metrics": [
      "spend",
      "installs"
    ],
    "organization_id": "2f221e03-4283-44be-ba37-f3598bb9a478",
    "app_ids": [],
    "ad_network_ids": [],
    "group_by": "ad_network_app_country",
    "countries": [],
    "campaign_ids": [],
    "platforms": []
  }
}
```

**Example: An ad revenue report**

```json
{
  "data": [
    {
      "id": "2026-08-24,4f0c68f8-5cdb-44bf-a8c9-e543cfdfb1dd",
      "type": "report",
      "attributes": {
        "date": "2026-08-24",
        "ad_network_id": 900011,
        "app_id": "7224f3fd-afd9-4d39-964e-6ba9fe98e78f",
        "ad_placement_id": "4f0c68f8-5cdb-44bf-a8c9-e543cfdfb1dd",
        "ad_revenue": 731.27,
        "impressions": 869141,
        "app_name": "Alpha",
        "app_icon_url": "/default_app_icon.png",
        "bundle_id": "com.example.alpha",
        "store_id": "2000000001",
        "platform": "ios",
        "ad_network_name": "Network One",
        "ad_network_icon_url": "",
        "ad_network_short_id": "network_one",
        "ad_network_custom": false,
        "ad_placement_name": "Placement Alpha One"
      }
    },
    {
      "id": "2026-08-31,4f0c68f8-5cdb-44bf-a8c9-e543cfdfb1dd",
      "type": "report",
      "attributes": {
        "date": "2026-08-31",
        "ad_network_id": 900011,
        "app_id": "7224f3fd-afd9-4d39-964e-6ba9fe98e78f",
        "ad_placement_id": "4f0c68f8-5cdb-44bf-a8c9-e543cfdfb1dd",
        "ad_revenue": 144,
        "impressions": 134967,
        "app_name": "Alpha",
        "app_icon_url": "/default_app_icon.png",
        "bundle_id": "com.example.alpha",
        "store_id": "2000000001",
        "platform": "ios",
        "ad_network_name": "Network One",
        "ad_network_icon_url": "",
        "ad_network_short_id": "network_one",
        "ad_network_custom": false,
        "ad_placement_name": "Placement Alpha One"
      }
    }
  ],
  "links": {
    "self": "https://api.tenjin.com/v2/reports/16143d3f-7344-4143-b9ee-7561f22ee3aa"
  },
  "meta": {
    "count": 2,
    "per_page": 100,
    "start_date": "2026-08-25",
    "end_date": "2026-09-01",
    "granularity": "weekly",
    "metrics": [
      "ad_revenue",
      "impressions"
    ],
    "organization_id": "0559c5d9-4076-4c48-b6da-7b1fb7a7cced",
    "app_ids": [],
    "ad_network_ids": [],
    "group_by": [
      "ad_placement_id"
    ],
    "countries": [],
    "platforms": []
  }
}
```

### 400, 401, 403, 498

- `400` A param is missing or invalid, a record is not found, or the request cannot be served
- `401` Missing or invalid credentials, or no access to the requested data
- `403` Invalid token, or the user's role does not allow the request
- `498` Expired token, or a token with an invalid signature

**Content type:** `application/json`

schema: `Error`

- **`error` (required)**: `string`

  What went wrong

**Example:**

```json
{
  "error": ""
}
```

### 429 More than 100 report requests in a minute with one access token

**Headers:**

- **`X-Retry-After`**

  Length of the rate limit period, in seconds

  `integer`

**Content type:** `application/json`

*Schema `Error` is shown above.*

**Example:**

```json
{
  "error": ""
}
```

## Schemas

- `Error` — shown above.
- `SpendReportDocument` — shown above.
- `AdRevenueReportDocument` — shown above.
- `Links` — shown above.
- `SpendReportMeta` — shown above.
- `SpendReportResource` — shown above.
- `AdRevenueReportMeta` — shown above.
- `AdRevenueReportResource` — shown above.
