# Lineage

The Lineage API allows you to track and manage data lineage relationships between assets in your Decube organization. Use these endpoints to visualize, create, and maintain manual lineage connections, supporting data governance and impact analysis across your data ecosystem.

## List Manual Lineages On Object

> List any manual lineages attached to an object in the specified direction

```json
{"openapi":"3.1.0","info":{"title":"Decube Public API (BETA)","version":"1.0.0"},"servers":[{"url":"https://connect.<REGION>.decube.io/api/v1/data"}],"paths":{"/catalog/lineage/manual_lineage":{"get":{"tags":["Catalog","Lineage"],"summary":"List Manual Lineages On Object","description":"List any manual lineages attached to an object in the specified direction","operationId":"list_manual_lineages_on_object_catalog_lineage_manual_lineage_get","parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"integer","description":"The ID of the object to list lineages for","title":"Id"},"description":"The ID of the object to list lineages for"},{"name":"type","in":"query","required":true,"schema":{"enum":["dataset","property","chart","dashboard"],"type":"string","description":"The type of the object to list lineages for","title":"Type"},"description":"The type of the object to list lineages for"},{"name":"object_is","in":"query","required":true,"schema":{"enum":["source","target"],"type":"string","description":"Whether the object is the source or target of the lineage","title":"Object Is"},"description":"Whether the object is the source or target of the lineage"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LineageData"},"title":"Response List Manual Lineages On Object Catalog Lineage Manual Lineage Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"LineageData":{"properties":{"id":{"type":"integer","title":"Id"},"source":{"$ref":"#/components/schemas/DataAssets"},"target":{"$ref":"#/components/schemas/DataAssets"},"data_job":{"anyOf":[{"$ref":"#/components/schemas/DataAssets"},{"type":"null"}]}},"type":"object","required":["id","source","target"],"title":"LineageData"},"DataAssets":{"properties":{"type":{"type":"string","title":"Type"},"name":{"type":"string","title":"Name"},"id":{"type":"integer","title":"Id"},"subtype":{"anyOf":[{"$ref":"#/components/schemas/DbType"},{"$ref":"#/components/schemas/AssetMetadataSubtypes"},{"type":"string","enum":["glossary","category","term"]}],"title":"Subtype"},"qual_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qual Id"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"}},"type":"object","required":["type","name","id","subtype"],"title":"DataAssets"},"DbType":{"type":"string","enum":["bigquery","redshift","postgresql","mysql","snowflake","databricks","sql_server","azure_server","singlestore","synapse","oracle","cloudera_hive","hive","power_bi","tableau","looker","dbt_cloud","dbt_core","fivetran","airflow","adf","glue","s3dl","adls","gcsdl","open_lineage","spark","iceberg","cloudera_atlas","atlas","unknown","virtual_source"],"title":"DbType"},"AssetMetadataSubtypes":{"type":"string","enum":["database","schema","table","virtual_table","view","column","virtual_column","data_job","data_task","data_job_run","data_task_run","file","glossary","category","term","monitor","incident","case","policy","policy_rule","property_monitor","dataset_monitor","etl_monitor","custom_monitor","dashboard","report","chart"],"title":"AssetMetadataSubtypes"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Create Manual Lineage

> Create a manual lineage between two objects, returns the ID of the generated lineage

```json
{"openapi":"3.1.0","info":{"title":"Decube Public API (BETA)","version":"1.0.0"},"servers":[{"url":"https://connect.<REGION>.decube.io/api/v1/data"}],"paths":{"/catalog/lineage/manual_lineage":{"post":{"tags":["Catalog","Lineage"],"summary":"Create Manual Lineage","description":"Create a manual lineage between two objects, returns the ID of the generated lineage","operationId":"create_manual_lineage_catalog_lineage_manual_lineage_post","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateManualLineageBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"integer","title":"Response Create Manual Lineage Catalog Lineage Manual Lineage Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"CreateManualLineageBody":{"properties":{"source":{"$ref":"#/components/schemas/AssetIdentifier-Input"},"target":{"$ref":"#/components/schemas/AssetIdentifier-Input"},"data_job":{"anyOf":[{"$ref":"#/components/schemas/DataJobIdentifier"},{"type":"null"}]}},"type":"object","required":["source","target"],"title":"CreateManualLineageBody"},"AssetIdentifier-Input":{"properties":{"id":{"type":"integer","title":"Id"},"type":{"type":"string","enum":["dataset","property","chart","dashboard"],"title":"Type"}},"type":"object","required":["id","type"],"title":"AssetIdentifier"},"DataJobIdentifier":{"properties":{"id":{"type":"integer","title":"Id"},"type":{"type":"string","const":"data_job","title":"Type"}},"type":"object","required":["id","type"],"title":"DataJobIdentifier"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Delete Manual Lineage

> Delete a manual lineage between two objects

```json
{"openapi":"3.1.0","info":{"title":"Decube Public API (BETA)","version":"1.0.0"},"servers":[{"url":"https://connect.<REGION>.decube.io/api/v1/data"}],"paths":{"/catalog/lineage/manual_lineage":{"delete":{"tags":["Catalog","Lineage"],"summary":"Delete Manual Lineage","description":"Delete a manual lineage between two objects","operationId":"delete_manual_lineage_catalog_lineage_manual_lineage_delete","parameters":[{"name":"source_id","in":"query","required":true,"schema":{"type":"integer","description":"The ID of the source object","title":"Source Id"},"description":"The ID of the source object"},{"name":"source_type","in":"query","required":true,"schema":{"enum":["dataset","property","chart","dashboard"],"type":"string","description":"The type of the source object","title":"Source Type"},"description":"The type of the source object"},{"name":"target_id","in":"query","required":true,"schema":{"type":"integer","description":"The ID of the target object","title":"Target Id"},"description":"The ID of the target object"},{"name":"target_type","in":"query","required":true,"schema":{"enum":["dataset","property","chart","dashboard"],"type":"string","description":"The type of the target object","title":"Target Type"},"description":"The type of the target object"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.decube.io/public-api/overview/index/lineage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
