Knowledge

Upload a part

PUT
/api/v1/knowledge/uploads/{upload_id}/parts/{part_number}

Self-hosted only. One part of an upload: exactly part_size bytes as the request body (the last part is the rest), authorised by the upload's own token in X-Synapse-Upload-Token — from the part's headers — not by an API key. The answer carries the part's ETag, in the ETag header and in the body; keep the header's value, quotes included, for complete. A part URL lasts until the upload's expires_at, 24 hours. On SynapseOrch Cloud each part's url points straight at storage instead, with no headers, and this path does not exist.

More in Knowledge API.

upload_id*string

The upload, from the start's answer.

part_number*integer

The part's number, from 1.

X-Synapse-Upload-Token*string

The upload's token, from the part's headers in the start's answer.

The part's bytes.

body*fileapplication/octet-stream
Formatbinary

The part was stored.

application/json
  1. response
part_number?integer
etag?string

Self-hosted only

curl -X PUT "http://localhost:3000/api/v1/knowledge/uploads/kup_01a10e5b7d9f1a3c5e7a9b1d3f5a7c9e/parts/1" \  -H "X-Synapse-Upload-Token: <the part's token>" \  --data-binary @part-1.bin -D -
{  "part_number": 1,  "etag": "9b2c41e07a3f5d6b8c0e2f4a6b8d0e1f"}