GET /api/v2/query/{nextBatchId}

Returns the next batch of data from the initial POST request.

  • HTTP Method: GET
  • Availability: Data Cloud v2.0, Salesforce 54.0
  • format: REST
  • URI: /api/v2/query/{nextBatchId}
ParameterTypeDescription
nextBatchIdstringRequired. The batch identifier returned from the previous query response. Example: 09151b49-54ed-4948-8139-1f4c7c3a9581

The response includes:

  • data: Array of record objects containing the requested data
  • startTime: ISO 8601 timestamp indicating when the query started executing
  • endTime: ISO 8601 timestamp indicating when the query finished executing
  • rowCount: Number of rows returned by the query
  • queryId: Unique identifier for the query
  • nextBatchId: Identifier for the next batch of results
  • done: boolean indicating if all results have been returned
  • metadata: Object containing metadata about the fields in the result set

The metadata object contains information about each field on the result set:

Field NameField TypeDescription
typestringSQL data type of the field
placeInOrderintegerPosition of the field on the result set
typeCodeintegerNumeric code representing the SQL data type
  • The maximum number of rows returned is 49,999
  • Use the done flag to determine if more results are available
  • When done is false, use the nextBatchId to retrieve the next set of records
  • The API supports ANSI standard SQL queries
  • All queries are executed synchronously
  • The API supports cursor-based pagination via nextBatchId
  • You must fetch the complete result set within one hour
  • The time interval between batch calls must not exceed three minutes