Documents

Start a chunked upload

A resumable upload of a large file into the workspace workspace_id names, or, without one, for your document jobs, in parts of chunk_size bytes. Takes an Idempotency-Key header.

Send each call below straight to the document service, with X-Upload-Token: <session_token>:

  1. PUT {upload_session_url}/parts/{n} for each part, numbered from 0.
  2. POST {upload_session_url}/complete?wait_seconds=60 with an Idempotency-Key. It assembles the file in the background and answers 202 while it runs.
  3. Repeat step 2 with the same key until it answers 200 with result.file (workspace_id, file_id).

GET {upload_session_url} shows progress, and DELETE {upload_session_url} aborts.

post/v1/documents/upload-sessions

Request

Headers

Idempotency-Keystring

Scoped to your account. Retry with the same key to get the same session.

Request body

workspace_idstring

Optional. A workspace from the Workspaces API that this key may use; the file goes into that workspace. Leave it out to upload a file for your document jobs (parse, extract, classify, split, ground).

pathstring required
total_size_bytesinteger required
ttl_secondsinteger

Response

The session.

workspace_idstring uuid

The workspace the file goes into.

session_idstring
session_tokenstring
chunk_sizeinteger
total_partsinteger
expires_atstring date-time
upload_session_urlstring uri

Changes

No recorded changes to this operation across all 1 revision of this API.