Job - List By Automation Account

Retrieve a list of jobs.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs?api-version=2023-11-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs?$filter={$filter}&api-version=2023-11-01

URI Parameters

Name In Required Type Description
automationAccountName
path True

string

The name of the automation account.

resourceGroupName
path True

string

Name of an Azure Resource group.

Regex pattern: ^[-\w\._]+$

subscriptionId
path True

string

Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

api-version
query True

string

Client Api Version.

$filter
query

string

The filter to apply on the operation.

Request Header

Name Required Type Description
clientRequestId

string

Identifies this specific client request.

Responses

Name Type Description
200 OK

JobListResultV2

OK

Other Status Codes

ErrorResponse

Automation error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

List jobs by automation account

Sample request

GET https://management.azure.com/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/jobs?api-version=2023-11-01

Sample response

{
  "value": [
    {
      "id": "/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/jobs/job1",
      "name": "job1",
      "type": "Microsoft.Automation/AutomationAccounts/Jobs",
      "properties": {
        "jobId": "45203a94-a8cb-47c3-8ce4-4dcc3a5f7d23",
        "runbook": {
          "name": "TestRunbook"
        },
        "provisioningState": "Succeeded",
        "status": "New",
        "creationTime": "2017-03-30T05:53:30.243+00:00",
        "startTime": null,
        "lastModifiedTime": "2017-03-30T05:53:30.243+00:00",
        "endTime": null
      }
    },
    {
      "id": "/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/jobs/job2",
      "name": "job2",
      "type": "Microsoft.Automation/AutomationAccounts/Jobs",
      "properties": {
        "jobId": "7584055f-5118-460a-a2dd-5176c9c8efe9",
        "runbook": {
          "name": "TestRunbook"
        },
        "provisioningState": "Succeeded",
        "status": "Completed",
        "creationTime": "2017-03-30T05:46:49.37+00:00",
        "startTime": "2017-03-30T05:47:35.2+00:00",
        "lastModifiedTime": "2017-03-30T05:48:38.857+00:00",
        "endTime": "2017-03-30T05:48:38.857+00:00"
      }
    }
  ],
  "nextLink": null
}

Definitions

Name Description
ErrorResponse

Error response of an operation failure

JobCollectionItem

Job collection item properties.

JobListResultV2

The response model for the list job operation.

JobStatus

Gets or sets the status of the job.

RunbookAssociationProperty

The runbook property associated with the entity.

ErrorResponse

Error response of an operation failure

Name Type Description
code

string

Error code

message

string

Error message indicating why the operation failed.

JobCollectionItem

Job collection item properties.

Name Type Description
id

string

Fully qualified resource Id for the resource

name

string

The name of the resource

properties.creationTime

string

The creation time of the job.

properties.endTime

string

The end time of the job.

properties.jobId

string

The id of the job.

properties.lastModifiedTime

string

The last modified time of the job.

properties.provisioningState

string

The provisioning state of a resource.

properties.runOn

string

Specifies the runOn group name where the job was executed.

properties.runbook

RunbookAssociationProperty

The runbook association.

properties.startTime

string

The start time of the job.

properties.status

JobStatus

The status of the job.

type

string

The type of the resource.

JobListResultV2

The response model for the list job operation.

Name Type Description
nextLink

string

The link to the next page.

value

JobCollectionItem[]

List of jobs.

JobStatus

Gets or sets the status of the job.

Name Type Description
Activating

string

Blocked

string

Completed

string

Disconnected

string

Failed

string

New

string

Removing

string

Resuming

string

Running

string

Stopped

string

Stopping

string

Suspended

string

Suspending

string

RunbookAssociationProperty

The runbook property associated with the entity.

Name Type Description
name

string

Gets or sets the name of the runbook.