---
title: "Lists the compute nodes in the specified pool."
method: GET
path: "/pools/{poolId}/nodes"
tags: ["ComputeNodes"]
---

# Lists the compute nodes in the specified pool.

`GET /pools/{poolId}/nodes`

## Path parameters

- `poolId` string, required

## Query parameters

- `$filter` string
- `$select` string
- `maxresults` integer
- `timeout` integer
- `api-version` string, required

## Headers

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

## Response `200`

A response containing the list of nodes.

- ComputeNodeListResult
  - `value` ComputeNode[]
    - `id` string — Every node that is added to a pool is assigned a unique ID. Whenever a node is removed from a pool, all of its local files are deleted, and the ID is reclaimed and could be reused for new nodes.
    - `url` string
    - `state` 'idle' | 'rebooting' | 'reimaging' | 'running' | 'unusable' | 'creating' | 'starting' | 'waitingforstarttask' | 'starttaskfailed' | 'unknown' | 'leavingpool' | 'offline'
    - `schedulingState` 'enabled' | 'disabled' — Possible values are: enabled – Tasks can be scheduled on the node. disabled – No new tasks will be scheduled on the node. Tasks already running on the node may still run to completion. All nodes start with scheduling enabled.
    - `stateTransitionTime` string, date-time
    - `lastBootTime` string, date-time — This property may not be present if the node state is unusable.
    - `allocationTime` string, date-time
    - `ipAddress` string — Every node that is added to a pool is assigned a unique IP address. Whenever a node is removed from a pool, all of its local files are deleted, and the IP address is reclaimed and could be reused for new nodes.
    - `affinityId` string
    - `vmSize` string — For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall. For information about available VM sizes for pools using images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series).
    - `totalTasksRun` integer
    - `runningTasksCount` integer
    - `totalTasksSucceeded` integer
    - `recentTasks` TaskInformation[]
      - `taskUrl` string
      - `jobId` string
      - `taskId` string
      - `subtaskId` integer
      - `taskState` 'active' | 'preparing' | 'running' | 'completed', required
      - `executionInfo` TaskExecutionInformation
        - `startTime` string, date-time — 'Running' corresponds to the running state, so if the task specifies resource files or application packages, then the start time reflects the time at which the task started downloading or deploying these. If the task has been restarted or retried, this is the most recent time at which the task started running. This property is present only for tasks that are in the running or completed state.
        - `endTime` string, date-time — This property is set only if the task is in the Completed state.
        - `exitCode` integer — This property is set only if the task is in the completed state. In general, 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. However, if the Batch service terminates the task (due to timeout, or user termination via the API) you may see an operating system-defined exit code.
        - `schedulingError` TaskSchedulingError
          - `category` 'usererror' | 'servererror' | 'unmapped', required
          - `code` string
          - `message` string
          - `details` NameValuePair[]
            - `name` string
            - `value` string
        - `retryCount` integer, required — The task is retried if it exits with a nonzero exit code, up to the specified maxTaskRetryCount.
        - `lastRetryTime` string, date-time — This element is present 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.
        - `requeueCount` integer, required — When the user removes nodes from a pool (by resizing/shrinking the pool) or when the job is being disabled, the user can specify that running tasks on the nodes be requeued for execution. This count tracks how many times the task has been requeued for these reasons.
        - `lastRequeueTime` string, date-time — This property is set only if the requeueCount is nonzero.
    - `startTask` StartTask
      - `commandLine` string, required — The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux.
      - `resourceFiles` ResourceFile[]
        - `blobSource` string, required — This URL must be readable using anonymous access; that is, the Batch service does not present any credentials when downloading the blob. There are two ways to get such a URL for a blob in Azure storage: include a Shared Access Signature (SAS) granting read permissions on the blob, or set the ACL for the blob or its container to allow public access.
        - `filePath` string, required
        - `fileMode` string — This property applies only to files being downloaded to Linux compute nodes. It will be ignored if it is specified for a resourceFile which will be downloaded to a Windows node. If this property is not specified for a Linux node, then a default value of 0770 is applied to the file.
      - `environmentSettings` EnvironmentSetting[]
        - `name` string, required
        - `value` string
      - `runElevated` boolean
      - `maxTaskRetryCount` integer — The Batch service retries a task if its exit code is nonzero. Note that this value specifically controls the number of retries. The Batch service will try the task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries the task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry the task. If the maximum retry count is -1, the Batch service retries the task without limit.
      - `waitForSuccess` boolean — If true and the start task fails on a compute node, the Batch service retries the start task up to its maximum retry count (maxTaskRetryCount). If the task has still not completed successfully after all retries, then the Batch service marks the compute node unusable, and will not schedule tasks to it. This condition can be detected via the node state and scheduling error detail. If false, the Batch service will not wait for the start task to complete. In this case, other tasks can start executing on the compute node while the start task is still running; and even if the start task fails, new tasks will continue to be scheduled on the node. The default is false.
    - `startTaskInfo` StartTaskInformation
      - `state` 'running' | 'completed', required — Possible values are: running – The start task is currently running. completed – The start task has exited with exit code 0, or the start task has failed and the retry limit has reached, or the start task process did not run due to scheduling errors.
      - `startTime` string, date-time, required — This value is reset every time the task is restarted or retried (that is, this is the most recent time at which the start task started running).
      - `endTime` string, date-time — This is the end time of the most recent run of the start task, if that run has completed (even if that run failed and a retry is pending). This element is not present if the start task is currently running.
      - `exitCode` integer — This property is set only if the start task is in the completed state. In general, 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. However, if the Batch service terminates the start task (due to timeout, or user termination via the API) you may see an operating system-defined exit code.
      - `schedulingError` TaskSchedulingError
        - `category` 'usererror' | 'servererror' | 'unmapped', required
        - `code` string
        - `message` string
        - `details` NameValuePair[]
          - `name` string
          - `value` string
      - `retryCount` integer, required — The task is retried if it exits with a nonzero exit code, up to the specified MaxTaskRetryCount.
      - `lastRetryTime` string, date-time — This element is present 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.
    - `certificateReferences` CertificateReference[] — For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of remoteuser, a certs directory is created in the user's home directory (e.g., /home/<user-name>/certs) where certificates are placed.
      - `thumbprint` string, required
      - `thumbprintAlgorithm` string, required
      - `storeLocation` 'currentuser' | 'localmachine' | 'unmapped' — The default value is CurrentUser. This property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of remoteuser, a certs directory is created in the user's home directory (e.g., /home/<user-name>/certs) where certificates are placed.
      - `storeName` string — The default value is My. This property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference).
      - `visibility` string[] — The default is all accounts.
    - `errors` ComputeNodeError[]
      - `code` string
      - `message` string
      - `errorDetails` NameValuePair[]
        - `name` string
        - `value` string
  - `odata.nextLink` string

## Other responses

- `default` — The error from the Batch service.

---

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