Batch Requests
Sometimes you want to perform multiple queries all at once. For example, maybe you need to load a few collections to populate a form. Normally you would need to submit multiple HTTP requests which could be slow.
You POST a map to the /batch
endpoint describing the requests you want to submit. The system will process all of your requests at once, and send you back a single result object. The keys of the result will be the same keys you submitted.
Example request using a key-value map of requests to execute in a batch:
Example response where each response uses the same key you sent in the request:
POST /batch
POST /batch
Post an object/map (top-level) with the following schema:
GET /batch
-- Short GET Syntax
GET /batch
-- Short GET SyntaxYou can also use the short GET syntax to process multiple GET requests all at once by specifying multiple get[KEY]=endpoint_path
parameters.
If you need to specify parameters for any of the get[KEY]
calls (for example, to specify a page number), you can use the extended syntax.
Example GET call (note: for purposes of readability, the URL has been split on multiple lines):
Here's an example where the endpoint contains parameters. You need to encode '?' and '&' so they don't get read by the main batch request itself.
Last updated