Actions
You can upload many files at once in two ways: drop them on a pool in the browser, or send them from a script with an API token.
Drop all the files on the pool's upload area in one go. Upload progress shows how many are sent, then how far processing has come, and it stays when you reload the page. Stop remaining work stops what has not finished; searchable documents and the original files are kept. See Documents → Upload progress.
To upload from a script, create an API token. Every user can, under Settings → API tokens.
Contract archive import.dp_. It is shown only once.Your tokens lists each token with its name, prefix and expiry date. Revoke stops a token at once, and the token then shows Revoked.
Good to know:
Settings → API tokens → Open Swagger API documentation opens the API
reference, at /api-docs on your Data Pools address. The OpenAPI 3.0
specification can be downloaded from /api/openapi.
To try it:
dp_ token, without Bearer./pools/<pool ID>/documents.totalFiles: 1.X-Upload-Batch-Id.complete is 1.Swagger uses the token you pasted, not your browser sign-in, and forgets it when you reload the page.
One request uploads one file. Creating a batch first is optional, but gives one
progress view and one place to stop the upload. Example with curl and jq:
201 means stored and queued, not yet searchable. Batch progress counts the files stored, queued, processing, searchable, complete, failed and duplicate.Idempotency-Key per file and send it again if a request times out. A file already accepted is not stored twice. The key needs the X-Content-SHA256 header.409. To upload the file anyway, send the form field onDuplicate=keep. To replace the earlier file, send onDuplicate=replace and replaceId with its document ID. Use a new Idempotency-Key for that request.POST /api/documents/{id}/reprocess for one document, or POST /api/pools/{id}/reprocess with {"scope":"failed"} for all failed documents of a pool. Both need a token of the pool's owner.Only if you want to stop an upload: this refuses further files for the batch and stops the files that have not finished processing. Documents that are already searchable stay in the pool, and the original of every stopped file is kept.
Data Pools accepts a limited number of transfers at a time per user, and
refuses more with 429. A script that sends thousands of files has to wait
and send refused files again, rather than sending everything at once.