---
title: "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."
method: GET
path: "/jobs/{jobId}/jobpreparationandreleasetaskstatus"
tags: ["Jobs"]
---

# 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.

`GET /jobs/{jobId}/jobpreparationandreleasetaskstatus`

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.

## Path parameters

- `jobId` string, required

## Query parameters

- `api-version` string, required
- `timeOut` integer
- `maxresults` integer
- `$filter` string
- `$select` string[]

## Headers

- `client-request-id` string
- `return-client-request-id` boolean
- `ocp-date` string, date-time-rfc7231

## Response `200`

The request has succeeded.

- BatchJobPreparationAndReleaseTaskStatusListResult — The result of listing the status of the Job Preparation and Job Release Tasks for a Job.
  - `value` BatchJobPreparationAndReleaseTaskStatus[] — A list of Job Preparation and Job Release Task execution information.
    - `poolId` string — The ID of the Pool containing the Compute Node to which this entry refers.
    - `nodeId` string — The ID of the Compute Node to which this entry refers.
    - `nodeUrl` string, uri — The URL of the Compute Node to which this entry refers.
    - `jobPreparationTaskExecutionInfo` BatchJobPreparationTaskExecutionInfo — Contains information about the execution of a Job Preparation Task on a Compute Node.
      - `startTime` string, date-time, required — The time at which the Task started running. If the Task has been restarted or retried, this is the most recent time at which the Task started running.
      - `endTime` string, date-time — The time at which the Job Preparation Task completed. This property is set only if the Task is in the Completed state.
      - `state` 'running' | 'completed', required — BatchJobPreparationTaskState enums
      - `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, uri — The URL to the root directory of the Job Preparation Task on the Compute Node.
      - `exitCode` integer — The exit code of the program specified on the Task command line. This parameter is returned only if the Task is in the completed state. The exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. Note that the exit code may also be generated by the Compute Node operating system, such as when a process is forcibly terminated.
      - `containerInfo` BatchTaskContainerExecutionInfo — Contains information about the container which a Task is executing.
        - `containerId` string — The ID of the container.
        - `state` string — The state of the container. This is the state of the container according to the Docker service. It is equivalent to the status field returned by "docker inspect".
        - `error` string — Detailed error information about the container. This is the detailed error string from the Docker service, if available. It is equivalent to the error field returned by "docker inspect".
      - `failureInfo` BatchTaskFailureInfo — Information about a Task failure.
        - `category` 'usererror' | 'servererror', required — BatchErrorSourceCategory enums
        - `code` string — An identifier for the Task error. Codes are invariant and are intended to be consumed programmatically.
        - `message` string — A message describing the Task error, intended to be suitable for display in a user interface.
        - `details` NameValuePair[] — A list of additional details related to the error.
          - `name` string — The name in the name-value pair.
          - `value` string — The value in the name-value pair.
      - `retryCount` integer, required — 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. 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.
      - `lastRetryTime` string, date-time — The most recent time at which a retry of the Job Preparation Task started running. This property is set only if the Task was retried (i.e. retryCount is nonzero). If present, this is typically the same as startTime, but may be different if the Task has been restarted for reasons other than retry; for example, if the Compute Node was rebooted during a retry, then the startTime is updated but the lastRetryTime is not.
      - `result` 'success' | 'failure' — BatchTaskExecutionResult enums
    - `jobReleaseTaskExecutionInfo` BatchJobReleaseTaskExecutionInfo — Contains information about the execution of a Job Release Task on a Compute Node.
      - `startTime` string, date-time, required — The time at which the Task started running. If the Task has been restarted or retried, this is the most recent time at which the Task started running.
      - `endTime` string, date-time — The time at which the Job Release Task completed. This property is set only if the Task is in the Completed state.
      - `state` 'running' | 'completed', required — BatchJobReleaseTaskState enums
      - `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, uri — The URL to the root directory of the Job Release Task on the Compute Node.
      - `exitCode` integer — The exit code of the program specified on the Task command line. This parameter is returned only if the Task is in the completed state. The exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. Note that the exit code may also be generated by the Compute Node operating system, such as when a process is forcibly terminated.
      - `containerInfo` BatchTaskContainerExecutionInfo — Contains information about the container which a Task is executing.
        - `containerId` string — The ID of the container.
        - `state` string — The state of the container. This is the state of the container according to the Docker service. It is equivalent to the status field returned by "docker inspect".
        - `error` string — Detailed error information about the container. This is the detailed error string from the Docker service, if available. It is equivalent to the error field returned by "docker inspect".
      - `failureInfo` BatchTaskFailureInfo — Information about a Task failure.
        - `category` 'usererror' | 'servererror', required — BatchErrorSourceCategory enums
        - `code` string — An identifier for the Task error. Codes are invariant and are intended to be consumed programmatically.
        - `message` string — A message describing the Task error, intended to be suitable for display in a user interface.
        - `details` NameValuePair[] — A list of additional details related to the error.
          - `name` string — The name in the name-value pair.
          - `value` string — The value in the name-value pair.
      - `result` 'success' | 'failure' — BatchTaskExecutionResult enums
  - `odata.nextLink` string, uri — The URL to get the next set of results.

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.net/azure/apis/batch-batch.md) · [All operations](https://skmtc.net/azure/apis/batch-batch/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/batch-batch/revisions/8427acd8fd77/schema)
