Skip to main content
POST

OpenLineage Events

Send OpenLineage RunEvent payloads to create lineage between the events’ input and output datasets. Paths in this reference are relative to the API base URL. For a server at https://your-company.open-metadata.org, the single-event URL is https://your-company.open-metadata.org/api/v1/openlineage/lineage.

Prerequisites

Both endpoints require an OpenMetadata JWT in the Authorization: Bearer header and EditLineage permission on the table resource. The server’s OpenLineage API must be enabled. Datasets must resolve to existing catalog assets or satisfy the server’s entity creation settings. Both inputs and outputs must contain at least one dataset to create an edge. By default, the server processes only COMPLETE events. For more information, see OpenLineage Compatibility.

Single Event Request

The following fields describe the RunEvent request body.
string
required
Time the event occurred, as an ISO 8601 timestamp in UTC.
string
required
URI identifying the event producer.
string
required
URI identifying the OpenLineage event schema.
string
One of START, RUNNING, COMPLETE, ABORT, FAIL, or OTHER. Send COMPLETE for the default server filter. An omitted value is processed when the filter allows COMPLETE.
object
required
Contains the required runId, a UUID string, and optional run facets.
object
required
Contains the required namespace and name strings, and optional job facets.
array
Input datasets. Each dataset requires namespace and name strings. Dataset facets and inputFacets are optional.
array
Output datasets. Each dataset requires namespace and name strings. Dataset facets and outputFacets are optional.

Example RunEvent

Save the following payload as event.json. This example assumes the namespace maps to prod-postgres and both tables already exist with an id column. The output column maps to prod-postgres.analytics.public.raw_orders.id.
Set the OPENMETADATA_JWT environment variable to your token, then send the saved event:
The following response indicates that the server wrote one lineage edge:

Batch Request

POST /v1/openlineage/lineage/batch accepts an object containing a required events array with at least one RunEvent. A bare JSON array is not a batch request. Save this example as batch.json:
Send the batch to the batch endpoint:
The following response represents one event that wrote one edge:

Response Fields

Both endpoints return a JSON object. Batch responses also include processing counts. In OpenMetadata 2.0, a single event can return 200 and status: success with lineageEdgesCreated: 0. Filtered events, empty input or output lists, unresolved datasets, and failed edge writes can all produce zero edges. The response does not list unresolved datasets. A processed batch returns 200 even when its body reports partial_success or failure. Individual edge-write failures are logged and do not necessarily produce a failed event. Check the counts and server logs, then verify the graph with Get Lineage.

HTTP Status Codes

Inspect the response body as well as the HTTP status.