Batch requests are similar to regular Query requests,
except that they 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: UrlInfo.1.Url).
The numbers for the request params must
be contiguous (i.e. if UrlInfo.3.Url is present,
UrlInfo.1.Url
and UrlInfo.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:
TrafficHistory.Shared.Start).
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 three UrlInfo Rank for the given three URLs.
Example Sample Request
http://awis.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=
UrlInfo
&UrlInfo.Shared.ResponseGroup=
Rank
&UrlInfo.1.Url=
[website #1]
&UrlInfo.2.Url=
[website #2]
&UrlInfo.3.Url=
[website #3]
Sample Batch Request #2. The following example shows a batch Query request that returns five sites linking in for the given three URLs.
Example Sample Request
http://awis.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=
SitesLinkingIn
&SitesLinkingIn.1.Url=
[website #1]
&SitesLinkingIn.2.Url=
[website #2]
&SitesLinkingIn.3.Url=
[website #3]
&SitesLinkingIn.Shared.Count=
5
&SitesLinkingIn.Shared.ResponseGroup=
SitesLinkingIn