# Create batch
This endpoint creates a batch for a given operation. Please note that the permission of the operation requested to be performed in batch must be included in the statement of the role of the calling user.
For more information about the format of files that can be uploaded in batch, please visit the batch file section.
Method | Path | Operation* |
---|---|---|
POST | /batches | create_batch |
*
In order for a user to perform the "create_batch" operation, the "create_batch" permission must be included in the list of allowed actions in the statement of the user's role.
# Request
Parameter | Type | In | Description |
---|---|---|---|
handler required | string | body | URL handler generated through the create_upload_url endpoint. |
operation required | string | body | Name of the operation to be performed in batch. For a comprehensive list of operations, please see the List of endpoints section. |
hash optional * | string | body | SHA-256 hash(opens new window). It must match the regular expression(opens new window) '^[a-f0-9]{64}$'. |
batch_dict optional * | dictionary | body | User-defined key-value pair: - key: It must match the regular expression(opens new window) ^[a-z_][0-9a-z_]{0,63}$ .- value: JSON-compliant value. |
*
If the "hash"
parameter is provided in the request, the method will check whether the hash provided by the user is equivalent to the hash generated for the batch. If they don't match, a copy of the batch will not be generated.
# Response
Attribute | Type | Description |
---|---|---|
batch | string | Batch UUID. |
status | string, value can be "new" , "copying" , "copied" , "hash_mismatch" , "validating" , "validation_failed" , "processing" , "processed" , "writing_results" , "cancel" , "cancelling" , "cancelled" , "deleting" , "completed" | Status of the batch. For more details, see the Batch statuses section. |
created_ts | timestamp | Time at which the batch was created. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch(opens new window). |
updated_ts | timestamp | Time at which the batch was last updated. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch(opens new window) |
# Status codes
Requests to this endpoint result in generic status codes. For a comprehensive list of status codes, please consult the Status codes section.
← Overview Get batches →
Was this article helpful?