Push lineage with the API
1. Create an API key
Section titled “1. Create an API key”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.
2. Describe a job
Section titled “2. Describe a job”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:
{ "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
namespaceapplies to datasets without their own.postgres://db.example.com:5432anddatabase.schema.tablenames match a PostgreSQL connection todb.example.com, databaseshop, so these datasets link to your monitored tables. For BigQuery use namespacebigqueryandproject.dataset.table. See naming. - Every job needs its own
namespace, anameand atype. columnson an output is the dataset’s full schema; leave it out if you don’t know it.- Every column mapping needs a
transform. Without explicitedges, every input flows into every output.
3. Send it
Section titled “3. Send it”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.jsonimport jsonimport os
import requests
with open("lineage.json") as f: payload = json.load(f)
resp = requests.post( "https://api.dataloris.com/api/v1/lineage/ingestions", headers={"Authorization": f"Bearer {os.environ['DATALORIS_API_KEY']}"}, json=payload, timeout=30,)resp.raise_for_status()print(resp.json()["data"])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.
Large payloads
Section titled “Large payloads”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.
gzip -k lineage.jsoncurl -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.gzPushing again
Section titled “Pushing again”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.
Retire deleted jobs
Section titled “Retire deleted jobs”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}.
Heartbeats for streaming jobs
Section titled “Heartbeats for streaming jobs”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).
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"}]}'Quotas
Section titled “Quotas”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.
Errors
Section titled “Errors”| 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. |