Skip to Content
Open Retainer
Retrieval

Search records, facts, and events

POST
/v1/search

Search workspace text. The limit applies separately to each result category. Requires the read scope.

Authorization

bearerAuth
headerAuthorizationBearer <token>

A workspace API key.

Request Body

application/json
  1. body
query*string
Length1 <= length <= 500
limit?integer
Range1 <= value <= 50
Default10
includeContext?boolean

Response Body

Successful response.

application/json
  1. response
records*array<>
facts*array<|>
events*array<>
references?
Example Request
curl -X POST 'https://retainer.tamloot.cc/v1/search' \  -H 'Authorization: Bearer YOUR_WORKSPACE_API_KEY' \  -H 'Content-Type: application/json' \  -d '{  "query": "Acme renewal",  "limit": 10}'
Example Response
{  "records": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "object": "string",      "label": "string",      "match": "text",      "detail": "string"    }  ],  "facts": [    {      "record": "4d59c234-2278-409a-b612-f158aa22befe",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "content": "string",      "validFrom": "2019-08-24T14:15:22Z"    }  ],  "events": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "type": "string",      "occurredAt": "2019-08-24T14:15:22Z",      "title": "string",      "summary": "string",      "records": [        "ad9d1030-b308-484e-ad69-d4df2132452b"      ],      "match": "content"    }  ],  "references": {    "property1": {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "object": "string",      "label": "string"    },    "property2": {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "object": "string",      "label": "string"    }  }}