> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oleander.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Record event

> Submit an OpenLineage compliant event to record lineage metadata. This is the primary endpoint for ingesting lineage data from your pipelines and integrations.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/lineage
openapi: 3.0.1
info:
  title: Oleander API
  description: >-
    Oleander implements the api spec as defined by OpenLineage to ingest data.
    We also provide a RESTful API to extract data within our system.
  version: 1.0.0
servers:
  - url: https://oleander.dev
security:
  - bearerAuth: []
paths:
  /api/v1/lineage:
    post:
      summary: Record event
      description: >-
        Submit an OpenLineage compliant event to record lineage metadata. This
        is the primary endpoint for ingesting lineage data from your pipelines
        and integrations.
      operationId: recordLineageEvent
      requestBody:
        description: This is an OpenLineage compliant payload
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OpenLineageEvent'
        required: true
      responses:
        '200':
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
        '401':
          description: Unauthorized – request either lacks a valid Bearer token.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Unauthorized
        '500':
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    OpenLineageEvent:
      type: object
      oneOf:
        - $ref: '#/components/schemas/RunEvent'
          title: Run Event
          description: A RunEvent is an event that describes the lifecycle of a run.
    Success:
      required:
        - status
      type: object
      properties:
        status:
          type: integer
          format: int32
          default: 200
    Error:
      required:
        - status
      type: object
      properties:
        status:
          type: integer
          format: int32
          default: 500
    RunEvent:
      allOf:
        - $ref: '#/components/schemas/BaseEvent'
        - type: object
          properties:
            eventType:
              description: >-
                the current transition of the run state. It is required to issue
                1 START event and 1 of [ COMPLETE, ABORT, FAIL ] event per run.
                Additional events with OTHER eventType can be added to the same
                run. For example to send additional metadata after the run is
                complete
              type: string
              enum:
                - START
                - RUNNING
                - COMPLETE
                - ABORT
                - FAIL
                - OTHER
              example: START|RUNNING|COMPLETE|ABORT|FAIL|OTHER
            run:
              $ref: '#/components/schemas/Run'
            job:
              $ref: '#/components/schemas/Job'
            inputs:
              description: The set of **input** datasets.
              type: array
              items:
                $ref: '#/components/schemas/InputDataset'
            outputs:
              description: The set of **output** datasets.
              type: array
              items:
                $ref: '#/components/schemas/OutputDataset'
          required:
            - run
            - job
    BaseEvent:
      type: object
      properties:
        eventTime:
          description: the time the event occurred at
          type: string
          format: date-time
        producer:
          description: >-
            URI identifying the producer of this metadata. For example this
            could be a git url with a given tag or sha
          type: string
          format: uri
          example: https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/client
        schemaURL:
          description: >-
            The JSON Pointer (https://tools.ietf.org/html/rfc6901) URL to the
            corresponding version of the schema definition for this RunEvent
          type: string
          format: uri
          example: https://openlineage.io/spec/0-0-1/OpenLineage.json
      required:
        - eventTime
        - producer
        - schemaURL
    Run:
      type: object
      properties:
        runId:
          description: The globally unique ID of the run associated with the job.
          type: string
          format: uuid
        facets:
          description: The run facets.
          type: object
          anyOf:
            - type: object
              additionalProperties:
                $ref: '#/components/schemas/RunFacet'
      required:
        - runId
    Job:
      type: object
      properties:
        namespace:
          description: The namespace containing that job
          type: string
          example: my-scheduler-namespace
        name:
          description: The unique name for that job within that namespace
          type: string
          example: myjob.mytask
        facets:
          description: The job facets.
          type: object
          anyOf:
            - type: object
              additionalProperties:
                $ref: '#/components/schemas/JobFacet'
      required:
        - namespace
        - name
    InputDataset:
      description: An input dataset
      type: object
      allOf:
        - $ref: '#/components/schemas/Dataset'
        - type: object
          properties:
            inputFacets:
              description: The input facets for this dataset.
              type: object
              anyOf:
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/InputDatasetFacet'
    OutputDataset:
      description: An output dataset
      type: object
      allOf:
        - $ref: '#/components/schemas/Dataset'
        - type: object
          properties:
            outputFacets:
              description: The output facets for this dataset
              type: object
              anyOf:
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/OutputDatasetFacet'
    RunFacet:
      description: A Run Facet
      type: object
      allOf:
        - $ref: '#/components/schemas/BaseFacet'
    JobFacet:
      description: A Job Facet
      type: object
      allOf:
        - $ref: '#/components/schemas/BaseFacet'
        - type: object
          properties:
            _deleted:
              description: set to true to delete a facet
              type: boolean
    Dataset:
      type: object
      properties:
        namespace:
          description: The namespace containing that dataset
          type: string
          example: my-datasource-namespace
        name:
          description: The unique name for that dataset within that namespace
          type: string
          example: instance.schema.table
        facets:
          description: The facets for this dataset
          type: object
          anyOf:
            - type: object
              additionalProperties:
                $ref: '#/components/schemas/DatasetFacet'
      required:
        - namespace
        - name
    InputDatasetFacet:
      description: An Input Dataset Facet
      type: object
      allOf:
        - $ref: '#/components/schemas/BaseFacet'
    OutputDatasetFacet:
      description: An Output Dataset Facet
      type: object
      allOf:
        - $ref: '#/components/schemas/BaseFacet'
    BaseFacet:
      description: >-
        all fields of the base facet are prefixed with _ to avoid name conflicts
        in facets
      type: object
      properties:
        _producer:
          description: >-
            URI identifying the producer of this metadata. For example this
            could be a git url with a given tag or sha
          type: string
          format: uri
          example: https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/client
        _schemaURL:
          description: >-
            The JSON Pointer (https://tools.ietf.org/html/rfc6901) URL to the
            corresponding version of the schema definition for this facet
          type: string
          format: uri
          example: https://openlineage.io/spec/1-0-2/OpenLineage.json#/$defs/BaseFacet
      additionalProperties: true
      required:
        - _producer
        - _schemaURL
    DatasetFacet:
      description: A Dataset Facet
      type: object
      allOf:
        - $ref: '#/components/schemas/BaseFacet'
        - type: object
          properties:
            _deleted:
              description: set to true to delete a facet
              type: boolean
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````