Skip to content

Push lineage with the API

A workspace admin opens API keys, clicks New API key, ticks the lineage:write scope and clicks Create key. Copy the key (dl_live_…): it is shown once. Store it as a secret in your CI or orchestrator, for example as DATALORIS_API_KEY. See API keys.

The key belongs to one workspace, so requests need no workspace header.

A push describes jobs: what each job reads (inputs), writes (outputs) and, optionally, which columns feed which (column_lineage). This job builds analytics.orders_daily in PostgreSQL from public.orders:

lineage.json
{
"version": 2,
"namespace": "postgres://db.example.com:5432",
"jobs": [
{
"namespace": "etl://nightly",
"name": "build_orders_daily",
"type": "SQL",
"run": { "state": "SUCCESS", "at": "2026-11-28T02:15:00Z" },
"inputs": [{ "name": "shop.public.orders" }],
"outputs": [
{
"name": "shop.analytics.orders_daily",
"columns": [
{ "name": "order_date", "type": "date" },
{ "name": "revenue", "type": "numeric" }
]
}
],
"column_lineage": [
{
"target": { "dataset": "shop.analytics.orders_daily", "column": "order_date" },
"sources": [
{ "dataset": "shop.public.orders", "column": "created_at", "transform": "DIRECT_TRANSFORM" }
]
},
{
"target": { "dataset": "shop.analytics.orders_daily", "column": "revenue" },
"sources": [
{ "dataset": "shop.public.orders", "column": "amount", "transform": "DIRECT_AGGREGATION" }
]
}
]
}
]
}
  • The top-level namespace applies to datasets without their own. postgres://db.example.com:5432 and database.schema.table names match a PostgreSQL connection to db.example.com, database shop, so these datasets link to your monitored tables. For BigQuery use namespace bigquery and project.dataset.table. See naming.
  • Every job needs its own namespace, a name and a type.
  • columns on an output is the dataset’s full schema; leave it out if you don’t know it.
  • Every column mapping needs a transform. Without explicit edges, every input flows into every output.
Terminal window
curl -sS -X POST https://api.dataloris.com/api/v1/lineage/ingestions \
-H "Authorization: Bearer $DATALORIS_API_KEY" \
-H "Content-Type: application/json" \
--data @lineage.json

A successful push returns 200 with the ingestion record (counts of jobs, datasets, edges and versions). It appears under Recent submissions on the Lineage page, and the graph updates right away.

Compress with gzip and set Content-Encoding: gzip. A request may be up to 64 MiB after decompression, with up to 5,000 jobs, 20,000 datasets and 200,000 column mappings.

Terminal window
gzip -k lineage.json
curl -sS -X POST https://api.dataloris.com/api/v1/lineage/ingestions \
-H "Authorization: Bearer $DATALORIS_API_KEY" \
-H "Content-Type: application/json" \
-H "Content-Encoding: gzip" \
--data-binary @lineage.json.gz

Push after each pipeline run, or whenever a job changes. A job’s new push replaces its inputs, outputs, edges and column mappings; what disappeared is closed and kept as history, and datasets that really changed get a new version in their change history. Pushing the same lineage again changes nothing.

Batch many jobs into one request: each request counts as one submission against your daily quota, whatever it contains.

When a dbt model or Airflow task is deleted, it simply stops appearing in your pushes. To remove it from the graph, send a complete scope: every job in the scope’s namespace and name prefix that the request neither lists nor references (as a parent or in upstream_jobs) is retired.

{
"version": 2,
"namespace": "bigquery",
"scope": { "namespace": "airflow://prod", "prefix": "sales_dag.", "complete": true },
"jobs": [
{
"namespace": "airflow://prod",
"name": "sales_dag.task_1",
"type": "AIRFLOW_TASK",
"parent": "sales_dag",
"inputs": [{ "name": "acme.raw.orders" }],
"outputs": [{ "name": "acme.staging.orders" }]
},
{
"namespace": "airflow://prod",
"name": "sales_dag.task_2",
"type": "AIRFLOW_TASK",
"parent": "sales_dag",
"upstream_jobs": ["sales_dag.task_1"],
"inputs": [{ "name": "acme.staging.orders" }],
"outputs": [{ "name": "acme.analytics.sale_daily" }]
}
]
}

Retired jobs keep their history and come back if you push them again. You can also retire one job with DELETE /api/v1/lineage/jobs/{id}.

A streaming job (Kafka consumer, CDC connector) may not change for weeks. Send a heartbeat so it isn’t marked stale; once a job has sent one, it becomes stale after one day without heartbeats. Heartbeats are free (not counted as submissions).

Terminal window
curl -sS -X POST https://api.dataloris.com/api/v1/lineage/jobs/heartbeat \
-H "Authorization: Bearer $DATALORIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"jobs":[{"namespace":"kafka-connect://prod","name":"orders-cdc"}]}'

Each request to /lineage/ingestions is one submission, counted per organization per UTC day:

Plan Submissions per day
Free 20
Hobby 100
Startup 1,000
Growth 10,000

Over the limit, the API answers 429 with QUOTA_EXCEEDED. Invalid payloads are refused before they are counted. Heartbeats, retirements and reads are free.

Status Meaning
401 Missing, revoked or expired API key.
403 The key lacks the lineage:write scope.
415 Content-Encoding other than gzip.
422 Invalid payload. The error says which job or field. A job with sql returns managed_lineage_unavailable: managed parsing is coming soon.
429 Daily submission quota reached.