Job - List Preparation And Release Task Status
Lists the execution status of the Job Preparation and Job Release Task for the specified Job across the Compute Nodes where the Job has run.
This API returns the Job Preparation and Job Release Task status on all Compute Nodes that have run the Job Preparation or Job Release Task. This includes Compute Nodes which have since been removed from the Pool. If this API is invoked on a Job which has no Job Preparation or Job Release Task, the Batch service returns HTTP status code 409 (Conflict) with an error code of JobPreparationTaskNotSpecified.
GET {batchUrl}/jobs/{jobId}/jobpreparationandreleasetaskstatus?api-version=2024-07-01.20.0
GET {batchUrl}/jobs/{jobId}/jobpreparationandreleasetaskstatus?$filter={$filter}&$select={$select}&maxresults={maxresults}&timeout={timeout}&api-version=2024-07-01.20.0
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
batch
|
path | True |
string |
The base URL for all Azure Batch service requests. |
job
|
path | True |
string |
The ID of the Job. |
api-version
|
query | True |
string |
Client API Version. |
$filter
|
query |
string |
An OData $filter clause. For more information on constructing this filter, see https://docs.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-job-preparation-and-release-status. |
|
$select
|
query |
string |
An OData $select clause. |
|
maxresults
|
query |
integer int32 |
The maximum number of items to return in the response. A maximum of 1000 Tasks can be returned. |
|
timeout
|
query |
integer int32 |
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead. |
Request Header
Media Types: "application/json; odata=minimalmetadata"
Name | Required | Type | Description |
---|---|---|---|
client-request-id |
string uuid |
The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. |
|
return-client-request-id |
boolean |
Whether the server should return the client-request-id in the response. |
|
ocp-date |
string date-time-rfc1123 |
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
A response containing a list of Job Preparation and Job Release Task statuses. Headers
|
|
Other Status Codes |
The error from the Batch service. If this API is invoked on a Job which has no Job Preparation or Job Release Task, the Batch service returns HTTP status code 409. |
Security
azure_auth
Microsoft Entra OAuth 2.0 auth code flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | Impersonate your user account |
Authorization
Type:
apiKey
In:
header
Examples
Job list preparation and release task status
Sample request
GET account.region.batch.azure.com/jobs/jobId/jobpreparationandreleasetaskstatus?api-version=2024-07-01.20.0
Sample response
{
"value": [
{
"poolId": "poolId",
"nodeId": "tvm-2167304207_1-20140905t174658z",
"nodeUrl": "https://account.region.batch.azure.com/pools/poolId/nodes/tvm-2167304207_1-20140905t174658z",
"jobPreparationTaskExecutionInfo": {
"state": "completed",
"startTime": "2015-05-01T10:20:31Z",
"endTime": "2015-05-02T20:12:42Z",
"taskRootDirectory": "tasks/myjob/job-1/myjobpreptask",
"taskRootDirectoryUrl": "https://account.region.batch.azure.com/pools/poolId/nodes/tvm-2167304207_1-20140905t174658z/files/tasks/myjob/job-1/myjobpreptask",
"exitCode": 0,
"retryCount": 0
},
"jobReleaseTaskExecutionInfo": {
"state": "completed",
"startTime": "2015-05-01T10:20:31Z",
"endTime": "2015-05-02T20:12:42Z",
"taskRootDirectory": "tasks/myjob/job-1/myjobreleasetask",
"taskRootDirectoryUrl": "https://account.region.batch.azure.com/pools/poolId/nodes/tvm-2167304207_1-20140905t174658z/files/tasks/myjob/job-1/myjobreleasetask",
"exitCode": 0
}
}
],
"odata.nextLink": "https://account.region.batch.azure.com/jobs/myjob/jobpreparationandreleasestatus?$skipToken=tvm-2167304207_1-20140905t174658z&api-version=2024-07-01.20.0"
}
Definitions
Name | Description |
---|---|
Batch |
An error response received from the Azure Batch service. |
Batch |
An item of additional information included in an Azure Batch error response. |
Cloud |
The result of listing the status of the Job Preparation and Job Release Tasks for a Job. |
Error |
The category of the error. |
Error |
An error message received in an Azure Batch error response. |
Job |
The status of the Job Preparation and Job Release Tasks on a Compute Node. |
Job |
Contains information about the execution of a Job Preparation Task on a Compute Node. |
Job |
The current state of the Job Preparation Task on the Compute Node. |
Job |
Contains information about the execution of a Job Release Task on a Compute Node. |
Job |
The current state of the Job Release Task on the Compute Node. |
Name |
Represents a name-value pair. |
Task |
Contains information about the container which a Task is executing. |
Task |
The result of Task execution. |
Task |
Information about a Task failure. |
BatchError
An error response received from the Azure Batch service.
Name | Type | Description |
---|---|---|
code |
string |
An identifier for the error. Codes are invariant and are intended to be consumed programmatically. |
message |
A message describing the error, intended to be suitable for display in a user interface. |
|
values |
A collection of key-value pairs containing additional details about the error. |
BatchErrorDetail
An item of additional information included in an Azure Batch error response.
Name | Type | Description |
---|---|---|
key |
string |
An identifier specifying the meaning of the Value property. |
value |
string |
The additional information included with the error response. |
CloudJobListPreparationAndReleaseTaskStatusResult
The result of listing the status of the Job Preparation and Job Release Tasks for a Job.
Name | Type | Description |
---|---|---|
odata.nextLink |
string |
The URL to get the next set of results. |
value |
A list of Job Preparation and Job Release Task execution information. |
ErrorCategory
The category of the error.
Name | Type | Description |
---|---|---|
servererror |
string |
The error is due to an internal server issue. |
usererror |
string |
The error is due to a user issue, such as misconfiguration. |
ErrorMessage
An error message received in an Azure Batch error response.
Name | Type | Description |
---|---|---|
lang |
string |
The language code of the error message |
value |
string |
The text of the message. |
JobPreparationAndReleaseTaskExecutionInformation
The status of the Job Preparation and Job Release Tasks on a Compute Node.
Name | Type | Description |
---|---|---|
jobPreparationTaskExecutionInfo |
Information about the execution status of the Job Preparation Task on this Compute Node. |
|
jobReleaseTaskExecutionInfo |
Information about the execution status of the Job Release Task on this Compute Node. |
|
nodeId |
string |
The ID of the Compute Node to which this entry refers. |
nodeUrl |
string |
The URL of the Compute Node to which this entry refers. |
poolId |
string |
The ID of the Pool containing the Compute Node to which this entry refers. |
JobPreparationTaskExecutionInformation
Contains information about the execution of a Job Preparation Task on a Compute Node.
Name | Type | Description |
---|---|---|
containerInfo |
Information about the container under which the Task is executing. |
|
endTime |
string |
The time at which the Job Preparation Task completed. |
exitCode |
integer |
The exit code of the program specified on the Task command line. |
failureInfo |
Information describing the Task failure, if any. |
|
lastRetryTime |
string |
The most recent time at which a retry of the Job Preparation Task started running. |
result |
The result of the Task execution. |
|
retryCount |
integer |
The number of times the Task has been retried by the Batch service. Task application failures (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file upload errors are not retried. The Batch service will retry the Task up to the limit specified by the constraints. |
startTime |
string |
The time at which the Task started running. |
state |
The current state of the Job Preparation Task on the Compute Node. |
|
taskRootDirectory |
string |
The root directory of the Job Preparation Task on the Compute Node. You can use this path to retrieve files created by the Task, such as log files. |
taskRootDirectoryUrl |
string |
The URL to the root directory of the Job Preparation Task on the Compute Node. |
JobPreparationTaskState
The current state of the Job Preparation Task on the Compute Node.
Name | Type | Description |
---|---|---|
completed |
string |
The Task has exited with exit code 0, or the Task has exhausted its retry limit, or the Batch service was unable to start the Task due to Task preparation errors (such as resource file download failures). |
running |
string |
The Task is currently running (including retrying). |
JobReleaseTaskExecutionInformation
Contains information about the execution of a Job Release Task on a Compute Node.
Name | Type | Description |
---|---|---|
containerInfo |
Information about the container under which the Task is executing. |
|
endTime |
string |
The time at which the Job Release Task completed. |
exitCode |
integer |
The exit code of the program specified on the Task command line. |
failureInfo |
Information describing the Task failure, if any. |
|
result |
The result of the Task execution. |
|
startTime |
string |
The time at which the Task started running. |
state |
The current state of the Job Release Task on the Compute Node. |
|
taskRootDirectory |
string |
The root directory of the Job Release Task on the Compute Node. You can use this path to retrieve files created by the Task, such as log files. |
taskRootDirectoryUrl |
string |
The URL to the root directory of the Job Release Task on the Compute Node. |
JobReleaseTaskState
The current state of the Job Release Task on the Compute Node.
Name | Type | Description |
---|---|---|
completed |
string |
The Task has exited with exit code 0, or the Task has exhausted its retry limit, or the Batch service was unable to start the Task due to Task preparation errors (such as resource file download failures). |
running |
string |
The Task is currently running (including retrying). |
NameValuePair
Represents a name-value pair.
Name | Type | Description |
---|---|---|
name |
string |
The name in the name-value pair. |
value |
string |
The value in the name-value pair. |
TaskContainerExecutionInformation
Contains information about the container which a Task is executing.
Name | Type | Description |
---|---|---|
containerId |
string |
The ID of the container. |
error |
string |
Detailed error information about the container. |
state |
string |
The state of the container. |
TaskExecutionResult
The result of Task execution.
Name | Type | Description |
---|---|---|
failure |
string |
There was an error during processing of the Task. The failure may have occurred before the Task process was launched, while the Task process was executing, or after the Task process exited. |
success |
string |
The Task ran successfully. |
TaskFailureInformation
Information about a Task failure.
Name | Type | Description |
---|---|---|
category |
The category of the Task error. |
|
code |
string |
An identifier for the Task error. Codes are invariant and are intended to be consumed programmatically. |
details |
A list of additional details related to the error. |
|
message |
string |
A message describing the Task error, intended to be suitable for display in a user interface. |