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.
Create a key
Section titled “Create a key”Workspace admins open API keys and click New API key:
-
Enter a Name that says where the key is used, for example
airflow-prod. -
Tick one or more scopes:
Scope Allows lineage:writePush lineage, send heartbeats, retire lineage jobs and edit lineage. runs:triggerStart a suite run ( POST /api/v1/suites/{id}/runs). -
Optionally set Expires: the key stops working at the end of that day, in your time zone.
-
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.
Use a key
Section titled “Use a key”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.
Trigger a run from CI
Section titled “Trigger a run from CI”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>).
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 requestsfrom airflow.decorators import task
@taskdef 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()Revoke a key
Section titled “Revoke a key”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.