Coelevate Documentation
API ReferenceContext Repository

Trace where a version came from

Returns the chain that produced one version of an object: the revision that wrote it, and beneath it the evidence and earlier edits it was derived from, each as a node with its own children.

GET /context/v1/context-history/{object_id}/lineage

Returns the chain that produced one version of an object: the revision that wrote it, and beneath it the evidence and earlier edits it was derived from, each as a node with its own children. Defaults to the latest version.

Requires the context:read scope.

Parameters

ParameterLocationRequiredDescription
object_idpathyesThe id of the context object.
versionquerynoWhich version to trace. Defaults to the latest.

Responses

StatusMeaning
200The request succeeded.
401The token is missing, expired or invalid.
403The token does not carry the scope this operation requires.
404No such project, or the token belongs to a different project.
422The request was not valid: a parameter or the body failed validation.

The 200 response body:

FieldTypeRequiredDescription
object_idstringyesThe object's id.
rootobjectyesThe revision that made this version. Its children are what it was derived from, each with its own children, so the whole chain can be walked; every earlier version's own revision follows, newest first, so the lineage is cumulative.
versionintegeryesThe version traced.

Example

curl -sS "$API_URL/context/v1/context-history/$OBJECT_ID/lineage" \
  -H "Authorization: Bearer $TOKEN"