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
| Parameter | Location | Required | Description |
|---|---|---|---|
object_id | path | yes | The id of the context object. |
version | query | no | Also return the archived body of this version. Omit to list the versions only. |
Responses
| Status | Meaning |
|---|---|
200 | The request succeeded. |
401 | The token is missing, expired or invalid. |
403 | The token does not carry the scope this operation requires. |
404 | No such project, or the token belongs to a different project. |
422 | The request was not valid: a parameter or the body failed validation. |
The 200 response body:
| Field | Type | Required | Description |
|---|---|---|---|
body | object or null | no | The object's body as it was at that version; its fields depend on the object's type. |
object_id | string | yes | The object's id. |
version | integer or null | no | The version whose body is returned. Present when version was asked for. |
versions | array of integer | yes | Every version the object has had, oldest first. |
Example
curl -sS "$API_URL/context/v1/context-versions/$OBJECT_ID" \
-H "Authorization: Bearer $TOKEN"