batch-processor resource endpoint

URL: /batch-processor

For performance reasons clients are recommended to perform multiple requests as a single batch request. This allows the backend server to service the requests in parallel and return all of the responses together.

Batch requests are sent as POST requests to this endpoint. Such requests must have a content type of multipart/parallel and a body that is a valid MIME multipart message body. Each part in the message must have a content type of application/http-request and have as a body a valid HTTP request message. Each part must also have a Multipart-Request-ID header whose value is a client-supplied name for each atomic request.

Responses are returned as an HTTP response with the status code 207 Multi-status, indicating that the body contains per-response status information. The response will also be of type multipart/parallel and will contain a MIME multipart message body, but in this case each part is of type application/http-response and contains an HTTP response message. Each part will have a Multipart-Request-ID header whose value matches that of the corresponding request. The response parts may not be returned in the same order as the request parts.

It is not permitted to make nested batch requests, either by submitting a nested multipart/parallel entity or by including a constituent request to the batch processor endpoint.

The server will accept parts that have a Content-Transfer-Encoding of either quoted-printable or base64, the latter being more appropriate for binary data. Clients should also be prepared to handle both of these encodings.

Authentication in Batch Requests

When doing authenticated requests via the batch endpoint, both the outer batch request and the inner requests must be authenticated. As usual, authenticated requests are allowed only on the authenticated API endpoints; this means that authenticated batch requests must be made to the authenticated batch processor endpoint.

An additional constraint is imposed that, when using OAuth for authentication, the consumer_key value on each inner request must match the value on the outer batch request. If any of the inner requests do not have a matching consumer_key value, the entire batch request will fail. The oauth_token value, however, does not need to match, so a batch request may mix requests on behalf of different users as long as the calling application is the same.

Supported Methods

POST Submit a selection of API requests to be performed as a batch job.