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.
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://loading/api/v1/documents" \ -H "Content-Type: application/json" \ -d '{ "tenant_id": "string", "collection": "string", "doc_id": "string", "data": {} }'{
"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"
}{
"detail": "string",
"error": {
"code": "string",
"message": "string",
"details": {}
}
}{
"detail": "string",
"error": {
"code": "string",
"message": "string",
"details": {}
}
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Authorization
APIKeyHeader X-API-Key<token>
In: header
Query Parameters
tenant_id*Tenant Id
collection*Collection
fleet_id?string|null
limit?Limit
Default
50Range
1 <= value <= 1000offset?Offset
Default
0Range
0 <= valueResponse Body
application/json
application/json
application/json
application/json
curl -X GET "https://loading/api/v1/documents?tenant_id=string&collection=string"[
{
"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"
}
]{
"detail": "string",
"error": {
"code": "string",
"message": "string",
"details": {}
}
}{
"detail": "string",
"error": {
"code": "string",
"message": "string",
"details": {}
}
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}