Get Information About a Query Job

Gets information about one query job.

URI: /services/data/vXX.X/jobs/query/queryJobId

Available since release:

This resource is available in API version 47.0 and later.

Formats: JSON

HTTP methods: GET

Authentication: Authorization: Bearer token

Request parameters:

ParameterDescriptionRequired or Optional
queryJobIdThe ID of the query job.Required

Response Body

Response Parameters:

ParameterTypeDescription
idstringThe unique ID for this job.
operationOperationEnumThe type of query. Possible values are:
  • query—Returns data that hasn’t been deleted or archived. For more information, see query() in SOAP API Developer Guide.
  • queryAll—Returns records that have been deleted because of a merge or delete, and returns information about archived Task and Event records. For more information, see queryAll() in SOAP API Developer Guide.
objectstringThe object type being queried.
createdByIdstringThe ID of the user who created the job.
createdDatedateTimeThe UTC date and time when the job was created.
systemModstampdateTimeThe UTC date and time when the API last updated the job information.
stateJobStateEnumThe current state of processing for the job. Possible values are:
  • UploadComplete—The job is ready to be processed and Salesforce has put the job in the queue.
  • InProgress—Salesforce is processing the job.
  • Aborted—The job has been aborted. See Abort a Query Job.
  • JobComplete—Salesforce has finished processing the job.
  • Failed—The job failed.
concurrencyModeConcurrencyModeEnumReserved for future use. How the request is processed. Currently only parallel mode is supported. (When other modes are added, the API chooses the mode automatically. The mode isn’t user configurable.)
contentTypeContentTypeThe format that is used for the results. Currently the only supported value is CSV.
apiVersionstringThe API version that the job was created in.
jobTypeJobTypeEnumThe job’s type. For a query job, the type is always V2Query.
lineEndingLineEndingEnumThe line ending used for CSV job data, marking the end of a data row. The default is LF. Possible values are:
  • LF—linefeed character
  • CRLF—carriage return character followed by a linefeed character
columnDelimiterColumnDelimiterEnumThe column delimiter used for CSV job data. The default value is COMMA. Possible values are:
  • BACKQUOTE—back quote character (`)
  • CARET—caret character (^)
  • COMMA—comma character (,)
  • PIPE—pipe character (|)
  • SEMICOLON—semicolon character (;)
  • TAB—tab character
numberRecordsProcessedlongThe number of records processed in this job.
retriesintThe number of times that Salesforce attempted to save the results of an operation. Repeated attempts indicate a problem such as a lock contention.
totalProcessingTimelongThe number of milliseconds taken to process the job.
isPkChunkingSupportedbooleanWhether PK chunking is supported for the queried object (true), or isn’t supported (false).

Response Body - For an Unsuccessful Request

If the request fails, the server returns a non-200 status, and the request body shows details of the error. For example, if the job has been deleted the status is 404 (Not Found) and the response body is:

For details about error codes and messages, see Errors.

This example gets information about the job with ID 750R0000000zxikIAA:

The response is: