Skip to Content
Open Retainer
Events

Query across event types

POST
/v1/events/query

Filter by shared event columns or event type, and page the results. Requires the read scope.

Authorization

bearerAuth
headerAuthorizationBearer <token>

A workspace API key.

Request Body

application/json
  1. body
search?string

Keywords within this object only, matched by Postgres full-text search over its label and searchable fields. Every word must match, as a whole word or the start of one ("Dan" finds "Dana"); accents are ignored.

Length1 <= length <= 500
filter?

Filter by a shared event column or by type. The type filter supports eq, neq, and in.

sort?array<>
Itemsitems <= 3
limit?integer
Range1 <= value <= 200
Default50
cursor?string
include?array<>
linked?

Event types only: events directly attached to this record, as a participant, about it, or through one of the event's own relation fields (link: field).

Response Body

Successful response.

application/json
  1. response
nextCursor*string|null
relationReferences?
records*array<>
Example Request
curl -X POST 'https://retainer.tamloot.cc/v1/events/query' \  -H 'Authorization: Bearer YOUR_WORKSPACE_API_KEY' \  -H 'Content-Type: application/json' \  -d '{  "filter": {    "type": "conversation"  },  "limit": 10}'
Example Response
{  "nextCursor": "string",  "relationReferences": {    "property1": {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "object": "string",      "label": "string"    },    "property2": {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "object": "string",      "label": "string"    }  },  "records": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "object": "string",      "label": "string",      "fields": {        "property1": null,        "property2": null      },      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z",      "createdBy": {        "via": "string",        "type": "user",        "id": "string",        "name": "string"      },      "updatedBy": {        "via": "string",        "type": "user",        "id": "string",        "name": "string"      },      "provenance": {        "property1": {          "pendingAssertion": {            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",            "recordId": "0470cfd4-dcf3-4d8c-ac28-58c6deeff25f",            "object": "string",            "recordLabel": "string",            "field": "string",            "value": null,            "currentValue": null,            "status": "active",            "reason": "outranked",            "actor": {              "via": "string",              "type": "user",              "id": "string",              "name": "string"            },            "confidence": 0,            "sourceRecordId": "799244ea-56f2-4870-bdb3-37032b615ea2",            "isInitial": true,            "observedAt": "2019-08-24T14:15:22Z",            "createdAt": "2019-08-24T14:15:22Z",            "source": {              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",              "type": "string",              "title": "string",              "occurredAt": "2019-08-24T14:15:22Z"            },            "conflictingRecord": {              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",              "object": "string",              "label": "string"            },            "relationReferences": {              "property1": {                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",                "object": "string",                "label": "string"              },              "property2": {                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",                "object": "string",                "label": "string"              }            },            "reviewedBy": {              "via": "string",              "type": "user",              "id": "string",              "name": "string"            },            "reviewedAt": "2019-08-24T14:15:22Z"          },          "assertion": {            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",            "recordId": "0470cfd4-dcf3-4d8c-ac28-58c6deeff25f",            "object": "string",            "recordLabel": "string",            "field": "string",            "value": null,            "currentValue": null,            "status": "active",            "reason": "outranked",            "actor": {              "via": "string",              "type": "user",              "id": "string",              "name": "string"            },            "confidence": 0,            "sourceRecordId": "799244ea-56f2-4870-bdb3-37032b615ea2",            "isInitial": true,            "observedAt": "2019-08-24T14:15:22Z",            "createdAt": "2019-08-24T14:15:22Z",            "source": {              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",              "type": "string",              "title": "string",              "occurredAt": "2019-08-24T14:15:22Z"            },            "conflictingRecord": {              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",              "object": "string",              "label": "string"            },            "relationReferences": {              "property1": {                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",                "object": "string",                "label": "string"              },              "property2": {                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",                "object": "string",                "label": "string"              }            },            "reviewedBy": {              "via": "string",              "type": "user",              "id": "string",              "name": "string"            },            "reviewedAt": "2019-08-24T14:15:22Z"          },          "pendingAssertionIds": [            "732649dc-43fe-487d-852b-96b1e8639ae4"          ]        },        "property2": {          "pendingAssertion": {            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",            "recordId": "0470cfd4-dcf3-4d8c-ac28-58c6deeff25f",            "object": "string",            "recordLabel": "string",            "field": "string",            "value": null,            "currentValue": null,            "status": "active",            "reason": "outranked",            "actor": {              "via": "string",              "type": "user",              "id": "string",              "name": "string"            },            "confidence": 0,            "sourceRecordId": "799244ea-56f2-4870-bdb3-37032b615ea2",            "isInitial": true,            "observedAt": "2019-08-24T14:15:22Z",            "createdAt": "2019-08-24T14:15:22Z",            "source": {              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",              "type": "string",              "title": "string",              "occurredAt": "2019-08-24T14:15:22Z"            },            "conflictingRecord": {              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",              "object": "string",              "label": "string"            },            "relationReferences": {              "property1": {                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",                "object": "string",                "label": "string"              },              "property2": {                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",                "object": "string",                "label": "string"              }            },            "reviewedBy": {              "via": "string",              "type": "user",              "id": "string",              "name": "string"            },            "reviewedAt": "2019-08-24T14:15:22Z"          },          "assertion": {            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",            "recordId": "0470cfd4-dcf3-4d8c-ac28-58c6deeff25f",            "object": "string",            "recordLabel": "string",            "field": "string",            "value": null,            "currentValue": null,            "status": "active",            "reason": "outranked",            "actor": {              "via": "string",              "type": "user",              "id": "string",              "name": "string"            },            "confidence": 0,            "sourceRecordId": "799244ea-56f2-4870-bdb3-37032b615ea2",            "isInitial": true,            "observedAt": "2019-08-24T14:15:22Z",            "createdAt": "2019-08-24T14:15:22Z",            "source": {              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",              "type": "string",              "title": "string",              "occurredAt": "2019-08-24T14:15:22Z"            },            "conflictingRecord": {              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",              "object": "string",              "label": "string"            },            "relationReferences": {              "property1": {                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",                "object": "string",                "label": "string"              },              "property2": {                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",                "object": "string",                "label": "string"              }            },            "reviewedBy": {              "via": "string",              "type": "user",              "id": "string",              "name": "string"            },            "reviewedAt": "2019-08-24T14:15:22Z"          },          "pendingAssertionIds": [            "732649dc-43fe-487d-852b-96b1e8639ae4"          ]        }      },      "relationReferences": {        "property1": {          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",          "object": "string",          "label": "string"        },        "property2": {          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",          "object": "string",          "label": "string"        }      },      "counts": {        "comments": -9007199254740991,        "facts": -9007199254740991,        "linked": -9007199254740991,        "claims": -9007199254740991      },      "event": {        "occurredAt": "2019-08-24T14:15:22Z",        "channel": "string",        "externalId": "string",        "title": "string",        "summary": "string",        "participants": {          "matched": [            {              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",              "handle": "string",              "role": "string",              "recordId": "0470cfd4-dcf3-4d8c-ac28-58c6deeff25f"            }          ],          "unmatched": [            {              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",              "handle": "string",              "role": "string",              "reason": "no_match",              "candidates": [                "ca3c6e0b-3eb2-4d6c-b8d9-7ce3bd020121"              ]            }          ]        },        "about": [          "dae22e5f-09ed-4916-9fa4-01d6902a20dd"        ],        "content": true,        "source": {          "sourceItemId": "f5556b82-7fa2-4511-87c1-adb3f77deeb7",          "revisionId": "bae12d01-48af-47b3-9304-b09ef0081cd6",          "current": true,          "previousEventId": "6aab701a-b5da-4540-bfbd-b77b75627881"        }      },      "type": "string"    }  ]}