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.
Tip:
For web pages with multiple thumbnail images on the same page, reduce server-side latency by aggregating multiple thumbnail requests into one batch request.
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: Thumbnail.1.Url).
The numbers for the request params must
be contiguous (i.e. if Thumbnail.3.Url is present,
Thumbnail.1.Url
and Thumbnail.2.Url 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:
Thumbnail.Shared.Size).
Short-hand form of Shared.[ParameterName] is supported as well.
Up to 30 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 three thumbnails for the given three URLs and sizes.
Sample Request
http://ast.amazonaws.com/Xino?
AWSAccessKeyId=
[your AWSAccessKeyId]
&Timestamp=
[timestamp now, format as described in http://www.w3.org/TR/xmlschema-2/#dateTime]
&Signature=
[signature calculated from request]
&Action=
Thumbnail
&Thumbnail.1.Url=
[website #1]
&Thumbnail.2.Url=
[website #2]
&Thumbnail.3.Url=
[website #3]
&Thumbnail.1.Size=
Large
&Thumbnail.2.Size=
Small
&Thumbnail.3.Size=
Large
Sample Batch Request #2
The following example shows a batch QUERY request that returns three large thumbnails for the given three URLs.
Sample Request
http://ast.amazonaws.com/Xino?
AWSAccessKeyId=
[your AWSAccessKeyId]
&Timestamp=
[timestamp now, format as described in http://www.w3.org/TR/xmlschema-2/#dateTime]
&Signature=
[signature calculated from request]
&Action=
Thumbnail
&Thumbnail.1.Url=
[website #1]
&Thumbnail.2.Url=
[website #2]
&Thumbnail.3.Url=
[website #3]
&Thumbnail.Shared.Size=
Large