Skip to Content
Open Retainer
Retrieval

Read a context pack

GET
/v1/records/{id}/context

Get selected fields, facts, and related information for a record or supported memory alias. Requires the read scope.

Authorization

bearerAuth
headerAuthorizationBearer <token>

A workspace API key.

Path Parameters

id*string

Retainer identifier.

Query Parameters

tokenBudget?integer

Approximate size budget for the context pack.

Range1 <= value <= 16000
Default2000

Response Body

Successful response.

application/json
  1. response
record*
linkedRecords*array<>
facts*array<>
recentEvents*array<>
omitted*
tokenEstimate*integer
Range-9007199254740991 <= value <= 9007199254740991
Example Request
curl -X GET 'https://retainer.tamloot.cc/v1/records/d2c0648c-2994-4f16-bdf1-a0136be6037d/context' \  -H 'Authorization: Bearer YOUR_WORKSPACE_API_KEY'
Example Response
{  "record": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "object": "string",    "label": "string",    "fields": {      "property1": {        "value": null,        "writtenBy": {          "via": "string",          "type": "user",          "id": "string",          "name": "string"        },        "observedAt": "2019-08-24T14:15:22Z"      },      "property2": {        "value": null,        "writtenBy": {          "via": "string",          "type": "user",          "id": "string",          "name": "string"        },        "observedAt": "2019-08-24T14:15:22Z"      }    }  },  "linkedRecords": [    {      "object": "string",      "total": -9007199254740991,      "items": [        {          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",          "title": "string",          "via": {            "field": "string",            "on": "anchor"          },          "selects": {            "property1": null,            "property2": null          }        }      ]    }  ],  "facts": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "content": "string",      "validFrom": "2019-08-24T14:15:22Z",      "writtenBy": {        "via": "string",        "type": "user",        "id": "string",        "name": "string"      },      "sources": [        "7db1a7ba-47e9-4edb-8650-570d4b0a904b"      ],      "internal": true    }  ],  "recentEvents": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "type": "string",      "occurredAt": "2019-08-24T14:15:22Z",      "title": "string",      "summary": "string",      "via": {        "kind": "participant"      }    }  ],  "omitted": {    "linkedRecords": -9007199254740991,    "facts": -9007199254740991,    "recentEvents": -9007199254740991  },  "tokenEstimate": -9007199254740991}