Skip to main content

Lineage API

Query and manage data lineage relationships.

Endpoints Overview

MethodEndpointDescription
GET/catalog/spaces/{slug}/products/{id}/lineageProduct lineage
PUT/catalog/spaces/{slug}/products/{id}/lineageUpdate lineage
GET/lineage/graphGlobal lineage graph

Get Product Lineage

GET /catalog/spaces/{slug}/products/{id}/lineage

Query Parameters

ParameterTypeDescription
depthintegerHow many levels (default: 1)
directionstringupstream, downstream, both

Response

{
"product": {
"id": "...",
"name": "Order Metrics"
},
"upstream": [
{
"id": "...",
"name": "Raw Orders",
"product_type": "table",
"depth": 1,
"relationship": "transforms"
},
{
"id": "...",
"name": "Customer Dim",
"product_type": "table",
"depth": 1,
"relationship": "joins"
}
],
"downstream": [
{
"id": "...",
"name": "Executive Dashboard",
"product_type": "dashboard",
"depth": 1,
"relationship": "consumes"
}
]
}

Update Lineage

PUT /catalog/spaces/{slug}/products/{id}/lineage

Request Body

{
"upstream_ids": ["product-uuid-1", "product-uuid-2"],
"downstream_ids": ["product-uuid-3"]
}

This replaces existing lineage relationships.

Add Single Upstream

POST /catalog/spaces/{slug}/products/{id}/lineage/upstream
{
"product_id": "upstream-product-uuid",
"relationship": "transforms"
}

Remove Upstream

DELETE /catalog/spaces/{slug}/products/{id}/lineage/upstream/{upstream_id}

Global Lineage Graph

Query lineage across the entire space.

GET /lineage/graph

Query Parameters

ParameterTypeDescription
space_iduuidRequired
selectorstringdbt-style selector
root_iduuidStart from specific product

Selector Syntax

Qarion supports dbt-style selectors:

SelectorMeaning
product_nameSingle product
product_name+Product and all downstream
+product_nameAll upstream and product
+product_name+Full lineage chain
product_name+2Product and 2 levels downstream

Example

curl -X GET "https://api.qarion.com/lineage/graph?space_id=...&selector=order_metrics+3" \
-H "Authorization: Bearer YOUR_API_KEY"

Response

{
"nodes": [
{
"id": "...",
"name": "Order Metrics",
"product_type": "table",
"layer": 0
},
{
"id": "...",
"name": "Executive Dashboard",
"product_type": "dashboard",
"layer": 1
}
],
"edges": [
{
"source": "order-metrics-uuid",
"target": "dashboard-uuid",
"relationship": "consumes"
}
]
}

Lineage Impact Analysis

Analyze what would be affected by changes.

GET /lineage/impact

Query Parameters

ParameterTypeDescription
product_iduuidProduct to analyze
depthintegerHow deep to analyze

Response

{
"affected_products": 5,
"affected_dashboards": 2,
"affected_contracts": 1,
"products": [
{
"id": "...",
"name": "...",
"owner": {"id": "...", "name": "..."}
}
],
"stakeholders": [
{"id": "...", "name": "...", "email": "..."}
]
}