---
title: "GET /jobs"
method: GET
path: "/jobs"
tags: ["Jobs"]
---

# GET /jobs

`GET /jobs`

Lists all of the jobs in the specified account.

## Query parameters

- `$filter` string
- `$select` string
- `$expand` 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`

OK

- CloudJobListResult — Response to a CloudJobOperation.List or ListFromJobSchedule request.
  - `value` CloudJob[] — The list of jobs.
    - `id` string — A string that uniquely identifies the job within the account. The id can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. It is common to use a GUID for the id.
    - `displayName` string — The display name for the job.
    - `usesTaskDependencies` boolean — The flag that determines if this job will use tasks with dependencies.
    - `url` string — The URL of the job.
    - `eTag` string — The ETag of the job.
    - `lastModified` string, date-time — The last modified time of the job.
    - `creationTime` string, date-time — The creation time of the job.
    - `state` 'active' | 'disabling' | 'disabled' | 'enabling' | 'terminating' | 'completed' | 'deleting' — The current state of the job.
    - `stateTransitionTime` string, date-time — The time at which the job entered its current state.
    - `previousState` 'active' | 'disabling' | 'disabled' | 'enabling' | 'terminating' | 'completed' | 'deleting' — The previous state of the job. This property is not set if the job is in its initial Active state.
    - `previousStateTransitionTime` string, date-time — The time at which the job entered its previous state. This property is not set if the job is in its initial Active state.
    - `priority` integer — The priority of the job. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0.
    - `constraints` JobConstraints — Specifies the execution constraints for jobs created on a schedule.
      - `maxWallClockTime` string, duration — The maximum elapsed time that the job may run, measured from the time the job starts. If the job does not complete within the time limit, the Batch service terminates it and any tasks that are still running.
      - `maxTaskRetryCount` integer — The maximum number of times each task may be retried. The Batch service retries a task if its exit code is nonzero.
    - `jobManagerTask` JobManagerTask — Specifies details of a Job Manager task.
      - `id` string — A string that uniquely identifies the Job Manager task. A GUID is recommended.
      - `displayName` string — The display name of the Job Manager task.
      - `commandLine` string — The command line of the Job Manager task.
      - `resourceFiles` ResourceFile[] — A list of files that the Batch service will download to the compute node before running the command line.
        - `blobSource` string — The URL of the file within Azure Blob Storage. This URL should include a shared access signature if the blob is not publicly readable.
        - `filePath` string — The location to which to download the file, relative to the task's working directory.
        - `fileMode` string — The file mode attribute in octal format. This property will be ignored if it is specified for a resourceFile which will be downloaded to a Windows compute node.
      - `environmentSettings` EnvironmentSetting[] — A list of environment variable settings for the Job Manager task.
        - `name` string — The name of the environment variable.
        - `value` string — The value of the environment variable.
      - `constraints` TaskConstraints — Constraints to apply to the Job Manager task.
        - `maxWallClockTime` string, duration — The maximum elapsed time that the task may run, measured from the time the task starts. If the task does not complete within the time limit, the Batch service terminates it.
        - `retentionTime` string, duration — The minimum time to retain the working directory for the task on the compute node where it ran, from the time it completes execution. After this time, the Batch service may delete the working directory and all its contents. The default is infinite.
        - `maxTaskRetryCount` integer — The maximum number of times the task may be retried. The Batch service retries a task if its exit code is nonzero.
      - `killJobOnCompletion` boolean — Whether completion of the Job Manager task signifies completion of the entire job.
      - `runElevated` boolean — Whether to run the Job Manager task in elevated mode. The default value is false.
      - `runExclusive` boolean — Whether the Job Manager task requires exclusive use of the compute node where it runs. If true, no other tasks will run on the same compute node for as long as the Job Manager is running. If false, other tasks can run simultaneously with the Job Manager on a compute node. (The Job Manager task counts normally against the node's concurrent task limit, so this is only relevant if the node allows multiple concurrent tasks.)
    - `jobPreparationTask` JobPreparationTask — A Job Preparation task to run before any tasks of the job on any given compute node.
      - `id` string — A string that uniquely identifies the job preparation task within the job. The id can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters.
      - `commandLine` string — The command line of the Job Preparation task.
      - `resourceFiles` ResourceFile[] — A list of files that the Batch service will download to the compute node before running the command line.
        - `blobSource` string — The URL of the file within Azure Blob Storage. This URL should include a shared access signature if the blob is not publicly readable.
        - `filePath` string — The location to which to download the file, relative to the task's working directory.
        - `fileMode` string — The file mode attribute in octal format. This property will be ignored if it is specified for a resourceFile which will be downloaded to a Windows compute node.
      - `environmentSettings` EnvironmentSetting[] — A list of environment variable settings for the Job Preparation task.
        - `name` string — The name of the environment variable.
        - `value` string — The value of the environment variable.
      - `constraints` TaskConstraints — Constraints to apply to the Job Manager task.
        - `maxWallClockTime` string, duration — The maximum elapsed time that the task may run, measured from the time the task starts. If the task does not complete within the time limit, the Batch service terminates it.
        - `retentionTime` string, duration — The minimum time to retain the working directory for the task on the compute node where it ran, from the time it completes execution. After this time, the Batch service may delete the working directory and all its contents. The default is infinite.
        - `maxTaskRetryCount` integer — The maximum number of times the task may be retried. The Batch service retries a task if its exit code is nonzero.
      - `waitForSuccess` boolean — Whether the Batch service should wait for the Job Preparation task to complete successfully before scheduling any other tasks of the job on the compute node.
      - `runElevated` boolean — Whether to run the Job Preparation task in elevated mode. The default value is false.
      - `rerunOnNodeRebootAfterSuccess` boolean — Whether the Batch service should rerun the Job Preparation task after a compute node reboots. Note that the Job Preparation task should still be written to be idempotent because it can be rerun if the compute node is rebooted while Job Preparation task is still running. The default value is true.
    - `jobReleaseTask` JobReleaseTask — A Job Release task to run on job completion on any compute node where the job has run.
      - `id` string — A string that uniquely identifies the Job Release task within the job. The id can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters.
      - `commandLine` string — The command line of the Job Release task.
      - `resourceFiles` ResourceFile[] — A list of files that the Batch service will download to the compute node before running the command line.
        - `blobSource` string — The URL of the file within Azure Blob Storage. This URL should include a shared access signature if the blob is not publicly readable.
        - `filePath` string — The location to which to download the file, relative to the task's working directory.
        - `fileMode` string — The file mode attribute in octal format. This property will be ignored if it is specified for a resourceFile which will be downloaded to a Windows compute node.
      - `environmentSettings` EnvironmentSetting[] — A list of environment variable settings for the Job Release task.
        - `name` string — The name of the environment variable.
        - `value` string — The value of the environment variable.
      - `maxWallClockTime` string, duration — The maximum elapsed time that the Job Release task may run on a given compute node, measured from the time the task starts. If the task does not complete within the time limit, the Batch service terminates it. The default value is 15 minutes.
      - `retentionTime` string, duration — The minimum time to retain the working directory for the Job Release task on the compute node. After this time, the Batch service may delete the working directory and all its contents. The default is infinite.
      - `runElevated` boolean — Whether to run the Job Release task in elevated mode. The default value is false.
    - `commonEnvironmentSettings` EnvironmentSetting[] — The list of common environment variable settings. These environment variables are set for all tasks in the job (including the Job Manager, Job Preparation and Job Release tasks).
      - `name` string — The name of the environment variable.
      - `value` string — The value of the environment variable.
    - `poolInfo` PoolInformation — Specifies how a job should be assigned to a pool.
      - `poolId` string — The id of an existing pool. All the tasks of the job will run on the specified pool. You must specify either PoolId or AutoPoolSpecification, but not both.
      - `autoPoolSpecification` AutoPoolSpecification — Specifies characteristics for a temporary 'auto pool'. The Batch service will create this auto pool, run all the tasks for the job on it, and will delete the pool once the job has completed.
        - `autoPoolIdPrefix` string — A prefix to be added to the unique identifier when a pool is automatically created. The prefix can be up to 20 characters long.
        - `poolLifetimeOption` 'jobschedule' | 'job' | 'unmapped', required — The minimum lifetime of created auto pools, and how multiple jobs on a schedule are assigned to pools.
        - `keepAlive` boolean — Whether to keep an auto pool alive after its lifetime expires.
        - `pool` PoolSpecification — Specification for creating a new pool.
          - `displayName` string — The display name for the pool.
          - `vmSize` string — The size of the virtual machines in the pool. All virtual machines in a pool are the same size.
          - `cloudServiceConfiguration` CloudServiceConfiguration — The configuration for nodes in a pool based on the Azure Cloud Services platform.
            - `osFamily` string, required — The Azure Guest OS family to be installed on the virtual machines in the pool.
            - `targetOSVersion` string — The Azure Guest OS version to be installed on the virtual machines in the pool. The default value is * which specifies the latest operating system version for the specified OS family.
            - `currentOSVersion` string — The Azure Guest OS Version currently installed on the virtual machines in the pool. This may differ from TargetOSVersion if the pool state is Upgrading.
          - `virtualMachineConfiguration` VirtualMachineConfiguration — The configuration for compute nodes in a pool based on the Azure Virtual Machines infrastructure.
            - `imageReference` ImageReference, required — A reference to an Azure Virtual Machines Marketplace image.
              - …
            - `nodeAgentSKUId` string, required — The SKU of Batch Node Agent to be provisioned on the compute node. The Batch node agent is a program that runs on each node in the pool, and provides the command-and-control interface between the node and the Batch service. There are different implementations of the node agent, known as SKUs, for different operating systems.
            - `windowsConfiguration` WindowsConfiguration — Windows operating system settings to apply to the virtual machine.
              - …
          - `maxTasksPerNode` integer — The maximum number of tasks that can run concurrently on a single compute node in the pool.
          - `taskSchedulingPolicy` TaskSchedulingPolicy — Specifies how tasks should be distributed across compute nodes.
            - `nodeFillType` 'spread' | 'pack' | 'unmapped', required — How tasks should be distributed across compute nodes
          - `resizeTimeout` string, duration — The timeout for allocation of compute nodes to the pool.
          - `targetDedicated` integer — The desired number of compute nodes in the pool.
          - `enableAutoScale` boolean — Whether the pool size should automatically adjust over time.
          - `autoScaleFormula` string — The formula for the desired number of compute nodes in the pool.
          - `autoScaleEvaluationInterval` string, duration — A time interval for the desired AutoScale evaluation period in the pool.
          - `enableInterNodeCommunication` boolean — Whether the pool permits direct communication between nodes.
          - `startTask` StartTask — A task which is run when a compute node joins a pool in the Azure Batch service, or when the compute node is rebooted or reimaged.
            - `commandLine` string — The command line of the start task.
            - `resourceFiles` ResourceFile[] — A list of files that the Batch service will download to the compute node before running the command line.
              - …
            - `environmentSettings` EnvironmentSetting[] — A list of environment variable settings for the start task.
              - …
            - `runElevated` boolean — Whether to run the start task in elevated mode. The default value is false.
            - `maxTaskRetryCount` integer — The maximum number of times the task may be retried.
            - `waitForSuccess` boolean — Whether the Batch service should wait for the start task to complete successfully (that is, to exit with exit code 0) before scheduling any tasks on the compute node.
          - `certificateReferences` CertificateReference[] — A list of certificates to be installed on each compute node in the pool.
            - `thumbprint` string, required — The thumbprint of the certificate.
            - `thumbprintAlgorithm` string, required — The algorithm with which the thumbprint is associated. This must be sha1.
            - `storeLocation` 'currentuser' | 'localmachine' | 'unmapped' — The location of the certificate store on the compute node into which to install the certificate. The default value is CurrentUser.
            - `storeName` string — The name of the certificate store on the compute node into which to install the certificate. The default value is My.
            - `visibility` string[] — Which user accounts on the compute node should have access to the private data of the certificate. This may be any subset of the values 'starttask', 'task' and 'remoteuser', separated by commas. The default is all accounts, corresponding to the string 'starttask,task,remoteuser'.
          - `applicationPackageReferences` ApplicationPackageReference[] — The list of application packages to be installed on each compute node in the pool.
            - `applicationId` string, required — The id of the application to install.
            - `version` string — The version of the application to install. If omitted, the default version is installed.
          - `metadata` MetadataItem[] — A list of name-value pairs associated with the pool as metadata.
            - `name` string — The name of the metadata item.
            - `value` string — The value of the metadata item.
    - `metadata` MetadataItem[] — A list of name-value pairs associated with the job as metadata.
      - `name` string — The name of the metadata item.
      - `value` string — The value of the metadata item.
    - `executionInfo` JobExecutionInformation — Contains information about the execution of a job in the Azure Batch service.
      - `startTime` string, date-time, required — The start time of the job.
      - `endTime` string, date-time — The completion time of the job. This property is set only if the job is in the completed state.
      - `poolId` string — The id of the pool to which this job is assigned.
      - `schedulingError` JobSchedulingError — An error encountered by the Batch service when scheduling a job.
        - `category` 'usererror' | 'servererror' | 'unmapped', required — The category of the job scheduling error.
        - `code` string — An identifier for the job scheduling error. Codes are invariant and are intended to be consumed programmatically.
        - `message` string — A message describing the job scheduling error, intended to be suitable for display in a user interface.
        - `details` NameValuePair[] — A list of additional error details related to the scheduling error.
          - `name` string — The name in the name-value pair.
          - `value` string — The value in the name-value pair.
      - `terminateReason` string — A string describing the reason the job ended.
    - `stats` JobStatistics — Resource usage statistics for a job.
      - `url` string, required — The URL of the statistics.
      - `startTime` string, date-time, required — The start time of the time range covered by the statistics.
      - `lastUpdateTime` string, date-time, required — The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime.
      - `userCPUTime` string, duration, required — The total user mode CPU time (summed across all cores and all compute nodes) consumed by all tasks in the job.
      - `kernelCPUTime` string, duration, required — The total kernel mode CPU time (summed across all cores and all compute nodes) consumed by all tasks in the job.
      - `wallClockTime` string, duration, required — The total wall clock time of all tasks in the job.
      - `readIOps` integer, required — The total number of disk read operations made by all tasks in the job.
      - `writeIOps` integer, required — The total number of disk write operations made by all tasks in the job.
      - `readIOGiB` number, double, required — The total gibibytes read from disk by all tasks in the job.
      - `writeIOGiB` number, double, required — The total gibibytes written to disk by all tasks in the job.
      - `numSucceededTasks` integer, required — The total number of tasks successfully completed in the job during the given time range.
      - `numFailedTasks` integer, required — The total number of tasks in the job that failed during the given time range.
      - `numTaskRetries` integer, required — The total number of retries on all the tasks in the job during the given time range.
      - `waitTime` string, duration, required — The total wait time of all tasks in the job. The wait time for a task is defined as the elapsed time between the creation of the task and the start of task execution. (If the task is retried due to failures, the wait time is the time to the most recent task execution.)
  - `odata.nextLink` string — The URL to get the next set of results.

## 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/bee2d837bf8f/schema)
