---
title: "List workbook sources"
method: GET
path: "/v2/workbooks/{workbookId}/sources"
tags: ["Workbooks"]
---

# List workbook sources

`GET /v2/workbooks/{workbookId}/sources`

## Request

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

Get the data sources of a workbook given the workbookId. 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 **workbookId** by calling the [/v2/workbooks](https://help.sigmacomputing.com/reference/list-workbooks) endpoint.

## Path parameters

- `workbookId` string, required

## Response `200`

The response body.

- V2WorkbooksWorkbookIdSourcesGetResponsesContentApplicationJsonSchemaItems[]
  - union
    - V2WorkbooksWorkbookIdSourcesGetResponsesContentApplicationJsonSchemaItems0
      - `type` 'data-model', required
      - `dataModelId` string, required
      - `elementIds` string[], required
      - `versionTagId` string
    - V2WorkbooksWorkbookIdSourcesGetResponsesContentApplicationJsonSchemaItems1
      - `type` 'dataset', required: Dataset (deprecated)
      - `inodeId` string, required
      - `url` string, required: URL to open this dataset in Sigma.
    - V2WorkbooksWorkbookIdSourcesGetResponsesContentApplicationJsonSchemaItems2
      - `type` 'table', required
      - `inodeId` string, required
    - V2WorkbooksWorkbookIdSourcesGetResponsesContentApplicationJsonSchemaItems3
      - `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)
