Caura / docs
API Reference

Documents

POST /api/v1/documents and GET /api/v1/documents — create, update and list documents.

POST upserts on (collection, doc_id) and returns both keys: doc_id is the one you supplied, and id is the row primary key. Either can be used to read the document back.

A document is only reachable from Documents · Search when its write supplies data.summary (or data.description for skills). The write response reports this as indexed — a document without it is stored and readable by id, but never returned by search.

POST
/api/v1/documents

Authorization

APIKeyHeader
X-API-Key<token>

In: header

Header Parameters

Idempotency-Key?string|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/documents" \  -H "Content-Type: application/json" \  -d '{    "collection": "string",    "doc_id": "string",    "data": {}  }'
{  "indexed": true,  "id": "string",  "tenant_id": "string",  "fleet_id": "string",  "collection": "string",  "doc_id": "string",  "data": {},  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "agent_id": "string"}
GET
/api/v1/documents

Authorization

APIKeyHeader
X-API-Key<token>

In: header

Query Parameters

tenant_id*Tenant Id
collection*Collection
fleet_id?string|null
limit?Limit
Range1 <= value <= 1000
Default50
offset?Offset
Range0 <= value
Default0

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/documents?tenant_id=string&collection=string"
[  {    "indexed": true,    "id": "string",    "tenant_id": "string",    "fleet_id": "string",    "collection": "string",    "doc_id": "string",    "data": {},    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z",    "agent_id": "string"  }]