Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Get Parallel Results for a Query Job
Syntax
URI:
/services/data/vXX.X/jobs/query/queryJobId/resultPages
Available since release:
This resource is available in API version 58.0 and later.
Formats: JSON
HTTP Methods: GET
Authentication: Authorization: Bearer token
Request Parameters
| Parameter | Description | Required or Optional |
|---|---|---|
| queryJobId | The ID of the query job. The ID is retrieved when you create the query job. | Required |
Response Body with Request Parameters
The JSON response body contains multiple request URIs that you use to request data in parallel.
| Element | Description |
|---|---|
| resultPages | Contains the resultUrl URIs. |
| resultUrl | The request URI with the locator for getting data. |
| nextRecordUrl | The URI used to get a response body with the next resultPages element. |
| done | A Boolean value that indicates whether more resultUrl URIs are available. |
Example
This example retrieves the results for a job with the ID 750R0000000zxr8IAA. We start by sending an initial request to retrieve the first set of result links.
Example Request
1curl --include --request GET \
2--header "Authorization: Bearer token" \
3--header "Accept: application/json" \
4https://MyDomainName.my.salesforce.com\
5/services/data/vXX.X/jobs/query/750R0000000zxr8IAA/resultPagesExample Response Body
1
2 {
3 "resultPages": [
4 {
5 "resultUrl": "/services/data/vXX.X/jobs/query/750R0000000zxr8IAA/results?locator=aBcDeFg4N"
6 },
7 {
8 "resultUrl": "/services/data/vXX.X/jobs/query/750R0000000zxr8IAA/results?locator=HiJkLmN4N"
9 },
10 {
11 "resultUrl": "/services/data/vXX.X/jobs/query/750R0000000zxr8IAA/results?locator=oPQrStU4N"
12 },
13 {
14 "resultUrl": "/services/data/vXX.X/jobs/query/750R0000000zxr8IAA/results?locator=vWxYzz4N"
15 },
16 {
17 "resultUrl": "/services/data/vXX.X/jobs/query/750R0000000zxr8IAA/results?locator=NiKmABC4N"
18 }
19 ],
20 "nextRecordsUrl": "/services/data/vXX.X/jobs/query/750R0000000zxr8IAA/resultpages?locator=YcApWm4N",
21 "done": false
22}
23 The value of nextRecordsUrl is the URI for getting the next set of resultUrl URIs. The value of done is true if there are no more resultUrl URIs. The value of each resultUrl is a URI that you send as a request to get a set of results.