Upload multiple documents (alpha)
POST/documents/batch
Upload multiple documents to the Camunda 8 cluster.
The caller must provide a file name for each document, which will be used in case of a multi-status response
to identify which documents failed to upload. The file name can be provided in the Content-Disposition
header
of the file part or in the filename
field of the metadata part. If both are provided, the filename
field
takes precedence.
In case of a multi-status response, the response body will contain a list of DocumentBatchProblemDetail
objects,
each of which contains the file name of the document that failed to upload and the reason for the failure.
The client can choose to retry the whole batch or individual documents based on the response.
Note that this currently only supports an in-memory document store, which is not meant for production use.
This endpoint is an alpha feature and may be subject to change in future releases.
Request
Query Parameters
The ID of the document store to upload the documents to.
- multipart/form-data
Body
required
Responses
- 201
- 207
- 400
All documents were uploaded successfully.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- Array [
- ]
- Array [
- ]
- ]
createdDocuments object[]
Possible values: [camunda
]
Document discriminator. Always set to "camunda".
The ID of the document store.
The ID of the document.
The hash of the document.
metadata object
Information about the document.
The content type of the document.
The name of the file.
The date and time when the document expires.
The size of the document in bytes.
The ID of the process definition that created the document.
The key of the process instance that created the document.
customProperties object
Custom properties of the document.
Additional properties allowed.
failedDocuments object[]
The name of the file.
The detail of the failure.
[
{
"createdDocuments": [
{
"camunda.document.type": "camunda",
"storeId": "string",
"documentId": "string",
"contentHash": "string",
"metadata": {
"contentType": "string",
"fileName": "string",
"expiresAt": "2025-01-09T15:07:17.569Z",
"size": 0,
"processDefinitionId": "string",
"processInstanceKey": 0,
"customProperties": {}
}
}
],
"failedDocuments": [
{
"filename": "string",
"detail": "string"
}
]
}
]
Not all documents were uploaded successfully. More details are provided in the response body.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
- Array [
- ]
createdDocuments object[]
Possible values: [camunda
]
Document discriminator. Always set to "camunda".
The ID of the document store.
The ID of the document.
The hash of the document.
metadata object
Information about the document.
The content type of the document.
The name of the file.
The date and time when the document expires.
The size of the document in bytes.
The ID of the process definition that created the document.
The key of the process instance that created the document.
customProperties object
Custom properties of the document.
Additional properties allowed.
failedDocuments object[]
The name of the file.
The detail of the failure.
{
"createdDocuments": [
{
"camunda.document.type": "camunda",
"storeId": "string",
"documentId": "string",
"contentHash": "string",
"metadata": {
"contentType": "string",
"fileName": "string",
"expiresAt": "2025-01-09T15:07:17.570Z",
"size": 0,
"processDefinitionId": "string",
"processInstanceKey": 0,
"customProperties": {}
}
}
],
"failedDocuments": [
{
"filename": "string",
"detail": "string"
}
]
}
The document upload failed. More details are provided in the response body.
- application/problem+json
- Schema
- Example (from schema)
Schema
Default value: about:blank
A URI identifying the problem type.
A summary of the problem type.
Possible values: >= 400
and <= 600
The HTTP status code for this problem.
An explanation of the problem in more detail.
A URI identifying the origin of the problem.
{
"type": "about:blank",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string"
}