Batch Requests
Batch requests are very similar to regular requests, except that it allows multiple service calls to be sent in one request. Batch requests save on HTTP turnaround time compared to making multiple individual service invocations.
All parameters except the core AWS parameters (AWSAccessKeyId, Timestamp, Signature, Action) are batched according to the following rules.
If a query request contains at least one parameter of the format
[ActionName].[integer].[ParameterName], it is a batched request.
(example: TopSites.1.CountryCode).
The numbers for the request params must
be contiguous (i.e. if TopSites.3.CountryCode is present,
TopSites.1.CountryCode
and TopSites.2.CountryCode are required as well).
To save on typing, batched requests are allowed to have shared
parameters. These are the parameters that have the same value for all
the batch sub-requests. Shared parameters have the form
[ActionName].Shared.[ParameterName] (example:
TopSites.Shared.ResponseGroup).
Short-hand form of Shared.[ParameterName] is supported as well.
Up to 5 service calls can be batched at a time in a single request. If more service calls are needed, they must be divided into multiple batch requests.
All service calls within a single batch request must be of the same Action type. You cannot mix different actions in a single batch request.
Sample Batch Request #1
The following example shows a batch Query request that returns the topsites for the 3 given countries.
Sample Request
http://ats.amazonaws.com?
AWSAccessKeyId=
[your AWSAccessKeyId]
&Timestamp=
[timestamp now, format as described in http://www.w3.org/TR/xmlschema-2/#dateTime]
&Signature=
[signature calculated from request]
&Action=TopSites
&TopSites.Shared.ResponseGroup=
Country
&TopSites.1.CountryCode=
[query #1]
&TopSites.2.CountryCode=
[query #2]
&TopSites.3.CountryCode=
[query #3]