Skip to main content

Module batch

Module batch 

Source
Expand description

Wire vocabulary of the batch endpoint: part header names and part names.

The batch endpoint accepts two multipart/form-data layouts and answers in the layout of the request (see BatchFormat):

  • The header layout carries each operation in one part and its kind, key, index, status and metadata in part headers. Clients include HEADER_BATCH_OPERATION_KEY and HEADER_BATCH_OPERATION_KIND on each request part; the server echoes all three, including HEADER_BATCH_OPERATION_INDEX, on each response part so clients can correlate results with their original operations.
  • The JSON layout carries each operation in a JSON part named by its index ("0", "1", …) plus a payload part named "<i>.payload" ("0.payload") for inserts and successful gets. Parts carry no headers besides Content-Disposition and Content-Type.

Constants§

HEADER_BATCH_OPERATION_INDEX
Zero-based position of this operation within the batch, set by the server on response parts.
HEADER_BATCH_OPERATION_KEY
Object key for this batch operation, required on request parts.
HEADER_BATCH_OPERATION_KIND
Operation kind for this batch part: "get", "head", "insert", or "delete".