| Entity | Endpoint | Purpose |
|---|---|---|
| Folders | GET /v1/folders | Lists all top-level and nested folders. |
| Documents | GET /v1/documents | Lists dashboards and workbooks within a folder. |
| Queries | GET /v1/documents/:id/queries | Retrieves the underlying queries (tiles) for a document. |
| Model YAML | GET /v1/models/:id/yaml | Retrieves the view definitions and SQL mappings. |
| Topics | GET /v1/models/:id/topics | Lists the available entry points for exploration. |
Requirements
To follow the steps in this guide, you’ll need:- Modeler or Connection Admin permissions on the Omni model you want to work with
- A Personal Access Token for the Omni API
Steps
Retrieve a list of folders
Folders serve as the top-level nodes of your lineage graph. Use the List folders endpoint to retrieve all folders in your organization.The response from this endpoint uses cursor-based pagination. Loop until
GET /api/v1/folders
pageInfo.hasNextPage is false.Then, store the following fields:id- Used to filter documents in the next stepname- The human-readable folder nameurl- A direct link to the folder in Omni
List documents per folder
Next, you’ll retrieve the documents in each folder.For every folder Then, store the following fields from the response - you’ll use them to identify content items in a later step:
id you retrieved in the previous step, call the List documents endpoint. Replace {folder_id} with the id of a folder: GET /api/v1/documents?folderId={folder_id}
identifier- The document ID used in subsequent callsname- The human-readable document nameurl- A direct deep-link to the dashboard or workbookhasDashboard- Indicates if the document contains tilestype- Usuallydocumentfor workbooks and dashboards
List queries per document
Next, you’ll retrieve the queries in each document. Each tile on a dashboard corresponds to a workbook query.For every document The response will include a top-level The full
identifier you retrieved in the previous step, call the Get document queries endpoint. Replace {documentId} with the identifier of a document:GET /api/v1/documents/{documentId}/queries
queries object, which will contain a list of queries. For example:Example response from the List document queries endpoint
query object isn’t included here due to length, but you’ll need to store the following fields from the response:url- A direct deep-link to the specific tile/queryquery.table- The Omni view reference inschema__viewnameformat (e.g.,ecomm__order_items)query.fields- Array of field references (e.g.,schema__viewname.field_name)query.join_paths_from_topic_name- The topic label (e.g., “Orders”). Identifies which topic the tile belongs to.query.modelId- Use this ID when calling the Get model YAML endpoint in the next step
Resolve topics and views from model YAML
In this step, you’ll map Omni objects to raw database tables using the model’s underlying configuration.
- Topics define the join graph and are the entry point for exploration
- Views map to a database table or query.
join_paths_from_topic_name field identifies the topic, which usually shares the name of the base view.Because model logic is often split across multiple files, you’ll start by finding the correct file path for a specific view.-
Retrieve the view map. Use the
modelIdfrom the previous step to call the Get model YAML endpoint as follows:The response will contain aGET /api/v1/models/{modelId}/yamlviewNamesmap that indexes every view file path by its internalschema__viewnamereference. -
Locate the file in the map. Search the map for the view name provided in the query (e.g.,
ecomm__order_items).Omni supports two types of views. Standard views map to physical tables, while query views are promoted from saved queries. Check theviewNamesmap to determine if you need to request a.viewor.query.viewfile. -
Fetch the YAML for the file. After you find the file name, use it in the
fileNameparameter to retrieve the file’s YAML:GET /api/v1/models/{modelId}/yaml?fileName={schema_name}/{view_name}.viewThefileNameparameter is case-sensitive and requires the schema portion to be uppercase to resolve correctly (e.g.,ECOMM/order_items.view).
table_name- The physical table name in your databaseschema- The database schema where the table residesdimensionsandmeasures- These blocks contain asqlproperty that defines which database columns are used for that field
Assemble the lineage graph
Once all data is collected, you can assemble the lineage graph:
-
Add deep links to the catalog. Use the
urlfields returned directly in the response payloads to provide deep-links in your catalog:- Folders -
https://{your-omni-instance}.omniapp.co/f/{folder_id} - Documents -
https://{your-omni-instance}.omniapp.co/dashboards/{document_id} - Tiles/Queries -
https://{your-omni-instance}.omniapp.co/w/{document_id}?key={tile_key}
While URLs can be constructed manually, it’s best practice to use theurlproperty returned by the API as it handles the correct routing for different document types. - Folders -
-
Create the graph. Use the following diagram to assemble your graph. Each arrow represents a foreign-key relationship established through the API traversal you completed in previous steps.
By parsing the
query.fieldsarray and comparing it to thedimensionsandmeasuresin your YAML, you can identify exactly which database columns drive each dashboard tile.
Troubleshooting
Can't access model / missing folders in API response
Can't access model / missing folders in API response
Personal Access Tokens have the same permissions as the user that created the token.If you can’t access a model or you see folders missing in API responses, the user making the requests may not have permissions to those objects in Omni. Verify that the owner of the token has the correct permissions.
'Too many requests' error from API
'Too many requests' error from API
If you receive a
429 too many requests error from the API, you’ll need to implement exponential backoff to avoid hitting the rate limit.Folder or document responses are incomplete
Folder or document responses are incomplete
The List folders and List documents endpoints use pagination in their responses, which means only a specific number of folders or documents are included per ‘page’.If it seems like the response is incomplete, check the value of
pageInfo.hasNextPage in the response. If true, you’ll need to make subsequent requests and pass the nextCursor value as the cursor parameter to retrieve the next page of results.Next steps
- Explore the API reference - Review the full API reference for endpoints used in this guide
- Drafts and publishing - Learn how to use drafts to stage model changes before deploying