---
title: "List report sources"
method: GET
path: "/v2/reports/{reportId}/sources"
tags: ["Reports"]
---

# List report sources

`GET /v2/reports/{reportId}/sources`

## Request

- Base URL: `https://api.sigmacomputing.com`
- URL: `https://api.sigmacomputing.com/v2/reports/{reportId}/sources`
- Auth: HTTP bearer

Get the data sources of a report given the reportId. The response can be a dataset (deprecated), table, custom SQL element, or the data model document and specific elements used as a source.

### Usage notes
- Retrieve the **reportId** by calling the [/v2/reports](https://help.sigmacomputing.com/reference/list-reports) endpoint.

### Best practices
- Validate the **reportId** on the client side before making a request to avoid unnecessary server load caused by invalid requests.

## Path parameters

- `reportId` string, required

## Response `200`

The response body.

- V2ReportsReportIdSourcesGetResponsesContentApplicationJsonSchemaItems[]
  - union
    - V2ReportsReportIdSourcesGetResponsesContentApplicationJsonSchemaItems0
      - `type` 'data-model', required
      - `dataModelId` string, required
      - `elementIds` string[], required
      - `versionTagId` string
    - V2ReportsReportIdSourcesGetResponsesContentApplicationJsonSchemaItems1
      - `type` 'dataset', required: Dataset (deprecated)
      - `inodeId` string, required
    - V2ReportsReportIdSourcesGetResponsesContentApplicationJsonSchemaItems2
      - `type` 'table', required
      - `inodeId` string, required
    - V2ReportsReportIdSourcesGetResponsesContentApplicationJsonSchemaItems3
      - `type` 'custom-sql', required
      - `connectionId` string, required: ID of the connection where the custom SQL element is run.
      - `definition` string, required: Raw SQL definition for the custom SQL element.
      - `customSqlId` string, required: Element ID of the custom SQL.
      - `customSqlSourceId` string, required: ID of the custom SQL source. (Beta)

---

[API](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api.md) - [All operations](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api/revisions/fb6036208c49?raw)
