Batch Requests

Instead of making many asynchronous GET requests to the RamBase API, it is possible to combine these requests into one single synchronous GET request.

The syntax of the request URI is:

http://api.rambase.net/batch?resource1={resourceURL}&resource2={resourceURL}&....

Example:

In this example both sales orders and customers is requested in one single batch request:

http://api.rambase.net/batch?resource1=/sales/orders&resource2=/sales/customers

The result is divided into one result section for each request:

1
<Resources>
2
    <Resource>
3
        <Uri>http://api.rambase.net/sales/orders</Uri>
4
        <BatchId>resource1</BatchId>
5
        <Result>
6
            <SalesOrders>
7
                ...
8
            </SalesOrders>
9
        </Result>
10
    </Resource>
11
    <Resource>
12
        <Uri>http://api.rambase.net/sales/customers</Uri>
13
        <BatchId>resource2</BatchId>
14
        <Result>
15
            <Customers>
16
                ...
17
            </Customers>
18
        </Result>
19
    </Resource>
20
</Resources>