Lineage
The dependencies between resources. Learn more about lineage here.
Get lineage objects with optional filtering by source and destination entity.
1OK
GET /api/v1/lineage/manual/ HTTP/1.1
Host: api.secoda.co
Accept: */*
OK
{
"links": {
"next": "text",
"previous": "text"
},
"meta": {
"page": 1,
"previous_page": 1,
"next_page": 1,
"count": 1,
"total_pages": 1
},
"count": 1,
"total_pages": 1,
"results": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2025-11-26T00:17:16.067Z",
"updated_at": "2025-11-26T00:17:16.067Z",
"from_entity_id": "123e4567-e89b-12d3-a456-426614174000",
"to_entity_id": "123e4567-e89b-12d3-a456-426614174000",
"direction": "text",
"workspace_id": "123e4567-e89b-12d3-a456-426614174000",
"is_manual": false
}
]
}Get a lineage object by its ID.
OK
GET /api/v1/lineage/manual/{lineage_id}/ HTTP/1.1
Host: api.secoda.co
Accept: */*
OK
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2025-11-26T00:17:16.067Z",
"updated_at": "2025-11-26T00:17:16.067Z",
"from_entity_id": "123e4567-e89b-12d3-a456-426614174000",
"to_entity_id": "123e4567-e89b-12d3-a456-426614174000",
"direction": "text",
"workspace_id": "123e4567-e89b-12d3-a456-426614174000",
"is_manual": false
}Delete a lineage object by its ID.
No Content
DELETE /api/v1/lineage/manual/{lineage_id}/ HTTP/1.1
Host: api.secoda.co
Accept: */*
No Content
No content
Preview Lineage from a Query.
The SQL query to analyze for lineage relationships
SELECT a.customer_id, b.order_id FROM customers a JOIN orders b ON a.customer_id = b.customer_idSQL dialect of the query (e.g. postgresql, bigquery)
postgresqlID of target table (optional)
550e8400-e29b-41d4-a716-446655440000Default database name for resolving table references (optional)
productionDefault schema name for resolving table references (optional)
publicOK
GET /api/v1/lineage/lineage_from_query/?sql=SELECT+a.customer_id%2C+b.order_id+FROM+customers+a+JOIN+orders+b+ON+a.customer_id+%3D+b.customer_id&dialect=postgresql HTTP/1.1
Host: api.secoda.co
Accept: */*
OK
{
"sql": "text",
"source_tables": [
{
"id": "text",
"created_at": "2025-11-26T00:17:16.067Z",
"updated_at": "2025-11-26T00:17:16.067Z",
"title": "text",
"schema_name": "text",
"database_name": "text",
"native_type": "text",
"integration_id": "text",
"integration_title": "text",
"integration_type": "text"
}
],
"column_lineages": [
{
"from_column": {
"id": "text",
"created_at": "2025-11-26T00:17:16.067Z",
"updated_at": "2025-11-26T00:17:16.067Z",
"title": "text",
"entity_type": "text",
"type": "text",
"schema_name": "text",
"database_name": "text",
"native_type": "text",
"integration_id": "text",
"integration_title": "text",
"integration_type": "text"
},
"to_column": {
"id": "text",
"created_at": "2025-11-26T00:17:16.067Z",
"updated_at": "2025-11-26T00:17:16.067Z",
"title": "text",
"entity_type": "text",
"type": "text",
"schema_name": "text",
"database_name": "text",
"native_type": "text",
"integration_id": "text",
"integration_title": "text",
"integration_type": "text"
}
}
],
"target_table": {
"id": "text",
"created_at": "2025-11-26T00:17:16.067Z",
"updated_at": "2025-11-26T00:17:16.067Z",
"title": "text",
"schema_name": "text",
"database_name": "text",
"native_type": "text",
"integration_id": "text",
"integration_title": "text",
"integration_type": "text"
}
}Create Lineage from a Query.
OK
No content
Bad Request
Provided table ID does not exist
Internal Server Error
POST /api/v1/lineage/lineage_from_query/ HTTP/1.1
Host: api.secoda.co
Content-Type: application/json
Accept: */*
Content-Length: 99
{
"sql": "text",
"dialect": "text",
"table_id": "text",
"default_database": "text",
"default_schema": "text"
}No content
Create Lineage from Query and Removes Existing Upstream Non-Manual Lineage from Target Table
Create Lineage from Query and Removes Existing Upstream Non-Manual Lineage from Target Table.
OK
No content
Bad Request
Provided table ID does not exist
Internal Server Error
PATCH /api/v1/lineage/lineage_from_query/ HTTP/1.1
Host: api.secoda.co
Content-Type: application/json
Accept: */*
Content-Length: 99
{
"sql": "text",
"dialect": "text",
"table_id": "text",
"default_database": "text",
"default_schema": "text"
}No content
Create a new lineage object manually. Only one direction of the relationship needs to be created. The opposite direction of the lineage is automatically generated.
DOWNSTREAMOK
Created
POST /api/v1/lineage/ HTTP/1.1
Host: api.secoda.co
Content-Type: application/json
Accept: */*
Content-Length: 66
{
"from_entity": "text",
"to_entity": "text",
"direction": "DOWNSTREAM"
}{
"id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2025-11-26T00:17:16.067Z",
"updated_at": "2025-11-26T00:17:16.067Z",
"from_entity_id": "123e4567-e89b-12d3-a456-426614174000",
"to_entity_id": "123e4567-e89b-12d3-a456-426614174000",
"direction": "text",
"workspace_id": "123e4567-e89b-12d3-a456-426614174000",
"is_manual": false
}Last updated
Was this helpful?