Skip to content

API keys

API keys let your pipelines talk to DataLoris without a person signing in: to push lineage, or to start a suite run when a load finishes.

Workspace admins open API keys and click New API key:

  1. Enter a Name that says where the key is used, for example airflow-prod.

  2. Tick one or more scopes:

    Scope Allows
    lineage:write Push lineage, send heartbeats, retire lineage jobs and edit lineage.
    runs:trigger Start a suite run (POST /api/v1/suites/{id}/runs).
  3. Optionally set Expires: the key stops working at the end of that day, in your time zone.

  4. Click Create key and copy the key (dl_live_…). It is shown once; DataLoris only keeps a hash.

Keys can never manage members, billing, connections or alert channels.

Send it in the Authorization header:

Authorization: Bearer dl_live_0123456789abcdef…

A key belongs to one workspace, so you don’t need an X-Workspace-ID header; if you send one for another workspace, the request is refused with 403. The API base URL is https://api.dataloris.com/api/v1.

With a runs:trigger key, start a suite run as the last step of your pipeline instead of waiting for the schedule. Copy the suite id from the suite page URL in the console (/suites/<id>).

Terminal window
curl -sS -X POST "https://api.dataloris.com/api/v1/suites/$SUITE_ID/runs" \
-H "Authorization: Bearer $DATALORIS_API_KEY"

The API answers 202 Accepted with the run. Results arrive as usual: alerts on failure, and the run page in the console. A run is refused with 409 while another run of the suite is in progress or when nothing in the suite has an active rule, and manual runs are limited to one per suite every 5 minutes.

Example for Airflow, as the last task of a DAG:

import os
import requests
from airflow.decorators import task
@task
def check_with_dataloris():
resp = requests.post(
f"https://api.dataloris.com/api/v1/suites/{os.environ['DATALORIS_SUITE_ID']}/runs",
headers={"Authorization": f"Bearer {os.environ['DATALORIS_API_KEY']}"},
timeout=30,
)
resp.raise_for_status()

Click Revoke next to a key on the API keys page. It stops working immediately; requests with a revoked or expired key get 401. The list shows when each key was last used, which helps find unused keys.