Lineage API
Document lineage tracking provides Git-like version history for your documents. Track parent-child relationships, compare versions, and visualize document evolution.Get Document Lineage
Get complete version history for a document lineage.Path Parameters
Document ID
Query Parameters
Include soft-deleted documents in lineage
Response
Unique lineage identifier
Total number of documents in lineage
Array of documents in chronological order
Document Object
Document ID
Document filename
SHA-256 content hash
Human-readable version label
Parent document ID (null for root documents)
Similarity to parent (0.0-1.0, null for roots)
ISO 8601 timestamp
File size in bytes
Whether this is the requested document
Get Lineage Tree
Get lineage as a tree structure showing parent-child relationships.Path Parameters
Document ID
Response
Total number of documents in lineage
Array of root nodes (documents without parents)
Tree Node Object
Document ID
Document filename
SHA-256 content hash
Human-readable version label
ISO 8601 timestamp
Array of child nodes (recursive structure)
Get Lineage Stats
Get statistics about a document’s lineage.Path Parameters
Document ID
Response
Total number of documents in lineage
Information about the oldest document in lineage
Find Similar Documents
Find documents that might be versions of the given document (outside current lineage).Path Parameters
Document ID
Query Parameters
Minimum similarity score (0.0-1.0)
Maximum number of suggestions (1-50)
Response
Array of similar documents
Number of suggestions returned
Similar Document Object
Document ID
Document filename
Similarity score (0.0-1.0)
ISO 8601 timestamp
Version label (if set)
Link to Parent
Manually link a document to its parent in version lineage.Path Parameters
Child document ID
Request Body
Parent document ID
Optional version label
Response
Child document ID
Parent document ID
Lineage ID (may be updated)
Calculated similarity score
Version label (if set)
Unlink from Lineage
Remove document from its current lineage and create a new lineage.Path Parameters
Document ID to unlink
Response
Document ID
New lineage ID created
Parent is now null
Version label is cleared
Get Lineage Changelog
Generate changelog for entire lineage showing version-to-version changes.Path Parameters
Document ID
Response
Array of version transition objects
Total number of version transitions
Changelog Entry
Starting version label
Ending version label
Starting version filename
Ending version filename
Similarity between versions (0.0-1.0)
Timestamp of new version
Detailed diff information
Error Responses
Document not found or doesn’t belong to user
Invalid parameters (e.g., circular lineage detected)