Response Paging¶
Use response paging when the service's response contains the URL of the next page of records in its body. It comes in two forms, JSON Response and XML Response, to match the format of the response. Both work the same way.
- IMan requests the first page with the URL in the reader or lookup.
- IMan takes the next page's URL from the response, at the Paging Path set on the behaviour.
- If that value is a relative URL, IMan joins it to the behaviour's Base Url. IMan uses an absolute URL as it is.
- IMan requests the next page with that URL.
- Steps 2 to 4 repeat until the response does not contain the node, or its value is empty.
IMan uses the value at the Paging Path only as a URL. You cannot use this method with a service that returns a cursor to send back in the request body instead of a URL to follow.
Response paging uses two settings on the behaviour:
- Base Url: required, and it must be a valid base URL. Next-page values are commonly relative, and IMan joins them to this.
- Paging Path/Parameter Name: the JPath or XPath of the next-page value in the response.
The other paging fields do not apply.
JSON¶
Consider the following JSON returned by the first request:
{
"nextRecordsUrl": "/services/data/v20.0/query/01gD0000002HU6KIAW-2000",
"done": false,
"totalSize": 3028,
"records": [
{
"attributes": {
"type": "Account",
"url": "/services/data/v20.0/sobjects/Account/001D000000IRFmaIAH"
},
"Name": "Rick and Co Services"
},
{
"attributes": {
"type": "Account",
"url": "/services/data/v20.0/sobjects/Account/001D000000IomazIAB"
},
"Name": "Realisable Software Ltd"
}
]
}
The Paging Path /nextRecordsUrl yields a relative URL. IMan joins it to the Base Url for the next request:
This repeats until a response has no nextRecordsUrl property, or its value is empty.
XML¶
Consider the following XML returned by the first request:
<response>
<done>false</done>
<nextRecordsUrl>/services/data/v20.0/query/01gD0000002HU6KIAW-2000</nextRecordsUrl>
<records>
<element>
<Name>Rick and Co Services</Name>
<attributes>
<type>Account</type>
<url>/services/data/v20.0/sobjects/Account/001D000000IRFmaIAH</url>
</attributes>
</element>
<element>
<Name>Realisable Software Ltd</Name>
<attributes>
<type>Account</type>
<url>/services/data/v20.0/sobjects/Account/001D000000IomazIAB</url>
</attributes>
</element>
</records>
<totalSize>3028</totalSize>
</response>
The Paging Path /response/nextRecordsUrl yields the same relative URL, and IMan joins it to the Base Url in the same way:
This repeats until a response has no nextRecordsUrl element, or its value is empty.

