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

# Pipeline Observability

> Get and set pipeline observability data for tables

# Pipeline Observability

Manage pipeline observability data for a table. This tracks which pipelines produce or consume the table and their execution status.

## Get Pipeline Observability

`GET /v1/tables/{id}/pipelineObservability`

**id** `string` *required*

UUID of the table.

## Add Pipeline Observability

`PUT /v1/tables/{id}/pipelineObservability`

**id** `string` *required*

UUID of the table.

The request body is a list. Each item describes one pipeline:

**pipeline** `object` *required*

Reference to the pipeline. Include its `id` (UUID), `type` (`pipeline`), and `fullyQualifiedName`.

**serviceType** `string`

Type of the pipeline service, such as `Airflow`.

**scheduleInterval** `string`

Schedule of the pipeline, as a cron expression.

**lastRunTime** `integer`

Unix timestamp (milliseconds) of the last pipeline run.

**lastRunStatus** `string`

Status of the last pipeline run: `Successful`, `Failed`, `Pending`, `Skipped`.

**averageRunTime** `number`

Average run time of the pipeline in milliseconds.

```python GET /v1/tables/{id}/pipelineObservability theme={null}
from metadata.sdk import configure, client
from metadata.sdk.entities import Pipelines

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)

rest = client().ometa.client

table_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"

# Add pipeline observability
pipeline = Pipelines.retrieve_by_name("airflow_prod.customer_etl")
rest.put(f"/tables/{table_id}/pipelineObservability", data=[{
    "pipeline": {
        "id": str(pipeline.id.root),
        "type": "pipeline",
        "fullyQualifiedName": "airflow_prod.customer_etl"
    },
    "serviceType": "Airflow",
    "scheduleInterval": "0 0 * * *",
    "lastRunTime": 1706745600000,
    "lastRunStatus": "Successful"
}])

# Get pipeline observability
observability = rest.get(f"/tables/{table_id}/pipelineObservability")
for item in observability:
    print(f"{item['pipeline']['fullyQualifiedName']}: {item['lastRunStatus']}")
```

```java GET /v1/tables/{id}/pipelineObservability theme={null}
import java.util.List;
import org.openmetadata.schema.api.services.CreatePipelineService.PipelineServiceType;
import org.openmetadata.schema.entity.data.Pipeline;
import org.openmetadata.schema.type.PipelineObservability;

String tableId = "a1b2c3d4-e5f6-7890-abcd-ef1234567890";

// Get pipeline observability
List<PipelineObservability> observability = client.tables().getPipelineObservability(tableId);

// Add pipeline observability
Pipeline pipeline = client.pipelines().getByName("airflow_prod.customer_etl");

PipelineObservability item = new PipelineObservability()
    .withPipeline(pipeline.getEntityReference())
    .withServiceType(PipelineServiceType.Airflow)
    .withScheduleInterval("0 0 * * *")
    .withLastRunTime(1706745600000L)
    .withLastRunStatus(PipelineObservability.LastRunStatus.SUCCESSFUL);

client.tables().addPipelineObservability(tableId, List.of(item));
```

```bash GET /v1/tables/{id}/pipelineObservability theme={null}
# Get pipeline observability
curl "{base_url}/api/v1/tables/455e3d9d-dbbf-455e-b3be-7191daa825f3/pipelineObservability" \
  -H "Authorization: Bearer {access_token}"

# Add pipeline observability
curl -X PUT "{base_url}/api/v1/tables/455e3d9d-dbbf-455e-b3be-7191daa825f3/pipelineObservability" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '[{
    "pipeline": {
      "id": "9a1d3c52-6f0b-4c1e-8a57-2b6f4e0d7c11",
      "type": "pipeline",
      "fullyQualifiedName": "airflow_prod.agent_metrics_etl"
    },
    "serviceType": "Airflow",
    "scheduleInterval": "0 0 * * *",
    "lastRunTime": 1769982651320,
    "lastRunStatus": "Successful"
  }]'
```

```json Response (Get Pipeline Observability) theme={null}
[
  {
    "pipeline": {
      "id": "9a1d3c52-6f0b-4c1e-8a57-2b6f4e0d7c11",
      "type": "pipeline",
      "fullyQualifiedName": "airflow_prod.customer_etl"
    },
    "serviceType": "Airflow",
    "scheduleInterval": "0 0 * * *",
    "lastRunTime": 1706745600000,
    "lastRunStatus": "Successful"
  }
]
```

***

## Returns

**Get** returns a list with one item for each pipeline linked to the table.

**Add** returns the updated table.

## Response

**pipeline** `object`

Reference to the pipeline, with its `id`, `type`, and `fullyQualifiedName`.

**serviceType** `string`

Type of the pipeline service.

**scheduleInterval** `string`

Schedule of the pipeline, as a cron expression.

**lastRunTime** `integer`

Unix timestamp of the last run in milliseconds.

**lastRunStatus** `string`

Status of the last run.

**averageRunTime** `number`

Average run time of the pipeline in milliseconds.

***

## Error Handling

| Code | Error Type | Description |
| - | - | - |
| `401` | `UNAUTHORIZED` | Invalid or missing authentication token |
| `403` | `FORBIDDEN` | User lacks permission |
| `404` | `NOT_FOUND` | Table does not exist |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.