Knowledge

Complete an upload

POST
/api/v1/knowledge/uploads/{upload_id}/complete

Assembles the parts, each checked against its ETag, into the Vault file and queues its document (202). Read its status with GET /api/v1/knowledge/documents/{doc_id}, or have it sent to a webhook (/api/v1/webhooks).

More in Knowledge API.

apiKey
headerAuthorizationBearer <token>

An API key, sk-syn- and 32 characters. On SynapseOrch Cloud an owner or admin makes it under Settings → Developer; on a self-hosted install, under Settings → API Keys.

upload_id*string
application/json
  1. body
parts*array<>
Items1 <= items <= 10000

Response Body

Successful Response

application/json
  1. response
documents*array<>
curl -X POST "https://api.synapseorch.com/api/v1/knowledge/uploads/kup_01a10e5b7d9f1a3c5e7a9b1d3f5a7c9e/complete" \  -H "Authorization: Bearer sk-syn-..." \  -H "Content-Type: application/json" \  -d '{    "parts": [      {        "part_number": 1,        "etag": "string"      }    ]  }'
{  "documents": [    {      "id": "string",      "kb_id": "string",      "path": "string",      "source": "upload",      "source_url": "string",      "status": "queued",      "status_reason": "string",      "error": "string",      "version": 0,      "sha256": "string",      "size_bytes": 0,      "mime": "string",      "title": "string",      "doc_date": "string",      "metadata": {},      "pages": 0,      "chunks": 0,      "tokens": 0,      "created_at": "string",      "updated_at": "string",      "indexed_at": "string",      "progress": {        "stage": "parse",        "done": 0,        "total": 0,        "unit": "pages",        "eta_s": 0,        "waiting": {          "reason": "rate_limited",          "provider": "string",          "provider_id": "string",          "until": "string"        },        "updated_at": "string"      }    }  ]}