Newer Version Available
Get Information About a Query Job
Syntax
- 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
-
Parameter Description Required or Optional queryJobId The ID of the query job. Required - Response Body
-
- Response Parameters
-
Parameter Type Description id string The unique ID for this job. operation OperationEnum The type of query. Possible values are: - query—Returns data that has not been deleted or archived. For more information, see query() in the 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 the SOAP API Developer Guide.
object string The object type being queried. createdById string The ID of the user who created the job. createdDate dateTime The UTC date and time when the job was created. systemModstamp dateTime The UTC date and time when the API last updated the job information. state JobStateEnum The current state of processing for the job. Possible values are:- UploadComplete—All job data has been uploaded and the job is ready to be processed. 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.
concurrencyMode ConcurrencyModeEnum Reserved for future use. How the request is processed. Currently only parallel mode is supported. (When other modes are added, the API will choose the mode automatically. The mode will not be user configurable.) contentType ContentType The format that is used for the results. Currently the only supported value is CSV. apiVersion string The API version that the job was created in. jobType JobTypeEnum The job’s type. For a query job, the type is always V2Query. lineEnding LineEndingEnum The 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
columnDelimiter ColumnDelimiterEnum The column delimiter used for CSV job data. The default value is COMMA. Possible values are: - BACKQUOTE—backquote character (`)
- CARET—caret character (^)
- COMMA—comma character (,)
- PIPE—pipe character (|)
- SEMICOLON—semicolon character (;)
- TAB—tab character
numberRecordsProcessed long The number of records processed in this job. retries int The number of times that Salesforce attempted to save the results of an operation. Repeated attempts indicate a problem such as a lock contention. totalProcessingTime long The number of milliseconds taken to process the job. - 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:
Example
This example gets information about the job with ID 750R0000000zxikIAA:
The response
is: