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

# List lineage for a workbook

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

## Request

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

This endpoint lists the elements, data sources, and upstream lineage for those data sources in a workbook, providing a detailed view of how data is interconnected within a workbook.

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

  ### Usage scenarios
  - **Data governance:** Allows data managers to track how information is used and propagated through different workbook elements.
  - **Debugging and optimization:** Helps with identifying and resolving issues in data processing or workbook structure.
  - **Data source management**: Identify the dependencies of data sources in use in a specific workbook.

  ### Best practices
  - Integrate this information into documentation or data dictionaries to enhance transparency and understanding across teams.
  - Use this endpoint to regularly audit workbook structures, ensuring that all data connections and transformations are correct and optimized.

## Path parameters

- `workbookId` string, required

## Query parameters

- `page` string
- `limit` number, double

## Response `200`

The response body.

- WorkbooksListLineageTreeResponse200
  - `entries` V2WorkbooksWorkbookIdLineageGetResponsesContentApplicationJsonSchemaEntriesItems[], required
    - union
      - V2WorkbooksWorkbookIdLineageGetResponsesContentApplicationJsonSchemaEntriesItems0
        - `type` 'table' | 'dataset' | 'data-model' | 'element' | 'customSQL' | 'csv-upload' | 'semantic-view' | 'sql-document' | 'worksheet', required
        - `sourceIds` string[], nullable, required: List of direct sources for the element. Either element IDs or data source IDs.
        - `elementId` string, required: Unique identifier of the element
        - `dataSourceIds` string[], nullable, required: List of root sources for the element as data source IDs.
      - V2WorkbooksWorkbookIdLineageGetResponsesContentApplicationJsonSchemaEntriesItems1
        - `type` 'table' | 'dataset' | 'data-model' | 'element' | 'customSQL' | 'csv-upload' | 'semantic-view' | 'sql-document' | 'worksheet', required
        - `connectionId` string, nullable, required
        - `name` string, nullable, required
        - `dataModelId` string, required
      - V2WorkbooksWorkbookIdLineageGetResponsesContentApplicationJsonSchemaEntriesItems2
        - `type` 'table' | 'dataset' | 'data-model' | 'element' | 'customSQL' | 'csv-upload' | 'semantic-view' | 'sql-document' | 'worksheet', required
        - `connectionId` string, nullable, required
        - `name` string, nullable, required
        - `inodeId` string, required
      - V2WorkbooksWorkbookIdLineageGetResponsesContentApplicationJsonSchemaEntriesItems3
        - `type` 'table' | 'dataset' | 'data-model' | 'element' | 'customSQL' | 'csv-upload' | 'semantic-view' | 'sql-document' | 'worksheet', required
        - `connectionId` string, nullable, required
        - `name` string, nullable, required
        - `definition` string, required
      - V2WorkbooksWorkbookIdLineageGetResponsesContentApplicationJsonSchemaEntriesItems4
        - `type` 'table' | 'dataset' | 'data-model' | 'element' | 'customSQL' | 'csv-upload' | 'semantic-view' | 'sql-document' | 'worksheet', required
        - `connectionId` string, nullable, required
        - `name` string, nullable, required
        - `csvId` string, required: Unique identifier of the uploaded CSV file
      - V2WorkbooksWorkbookIdLineageGetResponsesContentApplicationJsonSchemaEntriesItems5
        - `type` 'table' | 'dataset' | 'data-model' | 'element' | 'customSQL' | 'csv-upload' | 'semantic-view' | 'sql-document' | 'worksheet', required
        - `connectionId` string, nullable, required
        - `name` string, nullable, required
        - `semanticViewId` string, required: Unique identifier of the semantic view
        - `semanticViewTable` string, required: Name of the table within the semantic view
      - V2WorkbooksWorkbookIdLineageGetResponsesContentApplicationJsonSchemaEntriesItems6
        - `type` 'table' | 'dataset' | 'data-model' | 'element' | 'customSQL' | 'csv-upload' | 'semantic-view' | 'sql-document' | 'worksheet', required
        - `connectionId` string, nullable, required
        - `name` string, nullable, required
        - `sqlDocumentId` string, required
      - V2WorkbooksWorkbookIdLineageGetResponsesContentApplicationJsonSchemaEntriesItems7
        - `type` 'table' | 'dataset' | 'data-model' | 'element' | 'customSQL' | 'csv-upload' | 'semantic-view' | 'sql-document' | 'worksheet', required
        - `connectionId` string, nullable, required
        - `name` string, nullable, required
        - `worksheetId` string, required: Unique identifier of the worksheet
  - `nextPage` string, nullable, required
  - `total` number, double

---

[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)
