---
title: "Get report data by id"
method: GET
path: "/datainsights/v1.1/reports/{report_id}/data"
tags: ["Reports"]
---

# Get report data by id

`GET /datainsights/v1.1/reports/{report_id}/data`

## Request

- The document declares no server URL.
- Auth: HTTP bearer

Based on the report `type` generated while creating a report the data structure returned may have multiple formats.

## Types
#### List
```
{
    ...
    "columns": ...
    "settings": {
        ...
        "totals": false,
        "transpose": false,
    }
}
```

#### List (Totals)
```
{
    ...
    "columns": ...
    "settings": {
        ...
        "totals": true,
        "transpose": false,

    }
}
```
#### PeriodList
```
{
    ...
    "columns": ...
    "periods": ...
    "settings": {
        ...
        "totals": false,
        "transpose": true|false,
    }
}
```


#### Summary
```
{
    ...
    "columns": ...
    "group_rows": ...
    "settings": {
        ...
        "totals": false,
        "transpose": true|false,

    }
}
```

#### Summary (Totals)
```
{
    ...
    "columns": ...
    "group_rows": ...
    "settings": {
        ...
        "totals": true
        "transpose: true|false,
    }
}
```
#### PeriodSummary
```
{
    ...
    "columns": ...
    "group_rows": ...
    "periods": ...
    "settings": {
        ...
        "totals": false,
        "transpose": true|false,
    }
}
```


#### Pivot
```
{
    ...
    "columns": ...
    "group_rows": ...
    "group_columns": ...
    "settings": {
        ...
        "totals": false,
        "transpose": true|false
    }
}
```

#### Pivot (Totals)
```
{
    ...
    "columns": ...
    "group_rows": ...
    "group_columns": ...
    "settings": {
        ...
        "totals": true,
        "transpose": true|false,
    }
}
```

## Data

| Type                  | Headers | Index  | Records | Group Rows | Group Columns | Totals | Periods | Transpose |
| --------------------  | ------- | ------ | ------- | ---------- | ------------- | ------ | ------- | --------- |
| **List**              | Yes     | No     | Yes     | No         | No            | No     | No      | No        |
| **List (Totals)**     | Yes     | No     | Yes     | No         | No            | Yes    | No      | No        |
| **PeriodList**        | Yes     | Yes    | Yes     | No         | No            | No     | Yes     | Yes       |
| **Summary**           | Yes     | Yes    | Yes     | Yes        | No            | No     | No      | Yes       |
| **Summary (Details)** | Yes     | Yes    | Yes     | Yes        | No            | Yes    | No      | No        |
| **Summary (Totals)**  | Yes     | Yes    | Yes     | Yes        | No            | Yes    | No      | Yes       |
| **PeriodSummary**     | Yes     | Yes    | Yes     | Yes        | No            | No     | Yes     | Yes       |
| **Pivot**             | Yes     | Yes    | Yes     | Yes        | Yes           | No     | No      | Yes       |
| **Pivot (Totals)**    | Yes     | Yes    | Yes     | Yes        | Yes           | Yes    | No      | Yes       |

## Path parameters

- `report_id` integer, required

## Query parameters

- `format` 'raw' | 'formatted'

## Headers

- `X-PROPERTY-ID` integer, required

## Response `200`

OK

- ReportData
  - `headers` unknown[], required: Column headers that list columns names. The order of headers is the same as those specified in the request through the columns property. The number of headers is the number of columns.
    - unknown
  - `index` array[], required: List of index distinct names
    - string[]
  - `group_rows` string[], required: List of CDF names of group rows
  - `group_columns` string[], required: List of CDF names of group columns
  - `periods` string[]: List of names of the periods being compared
  - `records` object, required: Dictionary of records of column value combinations and metric values in the report
  - `subtotals` object, required: Dictionary of subtotals in the report
  - `totals` object, required: Dictionary of totals in the report
  - `type` string, required: Type of the report generated
  - `comparisons` string[]: List of names of the comparisons being made
  - `aggregated_count` integer: Number of rows included in aggregations in the report

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `500`: Internal Server Error

---

[API](https://skmtc.dev/cloudbeds/apis/data-insights-api.md) - [All operations](https://skmtc.dev/cloudbeds/apis/data-insights-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cloudbeds/apis/data-insights-api/revisions/0a16807149c2?raw)
