Jobs - Get

Gets a job.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}?api-version=2021-11-01

URI Parameters

Name In Required Type Description
jobAgentName
path True

string

The name of the job agent.

jobName
path True

string

The name of the job to get.

resourceGroupName
path True

string

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

serverName
path True

string

The name of the server.

subscriptionId
path True

string

The subscription ID that identifies an Azure subscription.

api-version
query True

string

The API version to use for the request.

Responses

Name Type Description
200 OK

Job

Successfully retrieved the job.

Other Status Codes

*** Error Responses: ***

  • 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.

  • 404 SubscriptionDoesNotHaveServer - The requested server was not found

  • 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.

  • 404 ResourceNotFound - The requested resource was not found.

Examples

Get a job

Sample request

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1?api-version=2021-11-01

Sample response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1",
  "name": "job1",
  "type": "Microsoft.Sql/servers/jobAccounts/jobs",
  "properties": {
    "description": "my favourite job",
    "version": 0,
    "schedule": {
      "startTime": "2015-09-24T18:30:01Z",
      "endTime": "2015-09-24T23:59:59Z",
      "type": "Once",
      "enabled": true
    }
  }
}

Definitions

Name Description
Job

A job.

JobSchedule

Scheduling properties of a job.

JobScheduleType

Schedule interval type

Job

A job.

Name Type Description
id

string

Resource ID.

name

string

Resource name.

properties.description

string

User-defined description of the job.

properties.schedule

JobSchedule

Schedule properties of the job.

properties.version

integer

The job version number.

type

string

Resource type.

JobSchedule

Scheduling properties of a job.

Name Type Default value Description
enabled

boolean

Whether or not the schedule is enabled.

endTime

string

9999-12-31T11:59:59+00:00

Schedule end time.

interval

string

Value of the schedule's recurring interval, if the ScheduleType is recurring. ISO8601 duration format.

startTime

string

0001-01-01T00:00:00+00:00

Schedule start time.

type

JobScheduleType

Once

Schedule interval type

JobScheduleType

Schedule interval type

Name Type Description
Once

string

Recurring

string