Batching

These endpoints allow you to submit multiple requests in a single call, improving efficiency for various operations. A batch of individual requests sent in the request body will be processed asynchronously in the background. You can then poll the status of the batch request to check if it has been completed and receive a consolidated response for all operations.

Create a batch request

This operation creates a batch request to execute multiple operations asynchronously in a single HTTP request.

SecuritybearerAuth
Request
Request Body schema: application/json
required
Array of objects (SingleRequest) non-empty
Responses
202

The request was accepted for processing and it will be executed asynchronously.

400

Bad Request. The Problem Details object will provide more information about the exact cause.

415

Unsupported Media Type. When provided as a response to a PATCH request, the response will provide an Accept-Patch response header to notify the client what patch document media types are supported.

500

The server encountered an unexpected error. Retrying the request after a certain time could help.

post/cf/batch
Request samples
application/json
{
  • "requests": [
    ]
}
Response samples
application/problem+json
{}

List batch requests

This operation lists all batch requests that have been created.

SecuritybearerAuth
Request
query Parameters
cursor
string (Cursor) non-empty

When the number of results for a request exceeds the allowed limit, the response will include a cursor. That value can then be sent via this parameter on a subsequent request to retrieve the next set of items.

limit
integer <int32> (Limit) [ 1 .. 50 ]

For a paginated request, this parameter defines the maximum number of items to retrieve.

jobStatus
string (BatchJobStatus)
Default: "FINISHED"

If this optional parameter is provided, the batch requests will be filtered based on their status.

Enum: "FINISHED" "FINISHED_SUCCESS" "FINISHED_FAILURE" "UNFINISHED" "UNFINISHED_ACTIVE" "UNFINISHED_QUEUED"
Responses
200

A response containing a potentially paginated list of batch requests.

400

Bad Request. The Problem Details object will provide more information about the exact cause.

406

Unacceptable. Indicates that the target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request.

500

The server encountered an unexpected error. Retrying the request after a certain time could help.

get/cf/batch
Request samples
Response samples
application/json
{
  • "items": [
    ],
  • "cursor": "string"
}

Retrieve the status of a batch request

This operation retrieves the status of a batch request and the results of the operations that were executed.

SecuritybearerAuth
Request
path Parameters
id
required
string

The ID of the Batch Request

Responses
200

The status of the batch request and the results of the operations that were executed.

404

Not Found

406

Unacceptable. Indicates that the target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request.

500

The server encountered an unexpected error. Retrying the request after a certain time could help.

get/cf/batch/{id}
Request samples
Response samples
application/json
{
  • "id": "string",
  • "status": "QUEUED",
  • "responses": [
    ],
  • "created": "2019-08-24T14:15:22Z",
  • "finished": "2019-08-24T14:15:22Z"
}