Coelevate Documentation
API ReferenceContext Repository

Get an object's version history

Returns the versions of one context object.

GET /context/v1/context-versions/{object_id}

Returns the versions of one context object. Without version it lists them; with version it also returns that version's archived body, so you can read what the object said before it changed. Versions are append-only, and a retired object keeps its history.

Requires the context:read scope.

Parameters

ParameterLocationRequiredDescription
object_idpathyesThe id of the context object.
versionquerynoAlso return the archived body of this version. Omit to list the versions only.

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
bodyobject or nullnoThe object's body as it was at that version; its fields depend on the object's type.
object_idstringyesThe object's id.
versioninteger or nullnoThe version whose body is returned. Present when version was asked for.
versionsarray of integeryesEvery version the object has had, oldest first.

Example

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