Newer Version Available

This content describes an older version of this product. View Latest

QueryAll

Executes the specified SOQL query. Unlike the Query resource, QueryAll will return records that have been deleted because of a merge or delete. QueryAll will also return information about archived Task and Event records. QueryAll is available in API version 29.0 and later.

If the query results are too large, the response contains the first batch of results and a query identifier in the nextRecordsUrl field of the response. The identifier can be used in an additional request to retrieve the next batch. Note that even though nextRecordsUrl has query in the URL, it will still provide remaining results from the initial QueryAll request. The remaining results will include deleted records that matched the initial query.

URI
/vXX.X/queryAll/?q=SOQL query
For retrieving additional query results if the initial results are too large:
/vXX.X/queryAll/query identifier
Formats
JSON, XML
HTTP Method
GET
Authentication
Authorization: Bearer token
Parameters
Parameter Description
q A SOQL query. Note that you will need to replace spaces with “+” characters in your query string to create a valid URI. An example query parameter string might look like: “SELECT+Name+FROM+MyObject”.
Example

For more information on SOQL see the Force.com SOQL and SOSL Reference. For more information on query batch sizes, see Changing the Batch Size in Queries in the SOAP API Developer's Guide.