Share via


Job Step Executions - Get

Gets a step execution of a job execution.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}?api-version=2023-08-01

URI Parameters

Name In Required Type Description
jobAgentName
path True

string

The name of the job agent.

jobExecutionId
path True

string (uuid)

The unique id of the job execution

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.

stepName
path True

string

The name of the step.

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

JobExecution

Successfully retrieved the step execution.

Other Status Codes

ErrorResponse

*** Error Responses: ***

  • 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state

  • 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state

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

  • 404 ResourceNotFound - The requested resource was not found.

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

  • 404 SubscriptionDoesNotHaveServer - The requested server was not found

  • 404 ResourceNotFound - The requested resource was not found.

Examples

Get a job step execution

Sample request

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5A86BF65-43AC-F258-2524-9E92992F97CA/steps/step1?api-version=2023-08-01

Sample response

{
  "properties": {
    "jobVersion": 1,
    "stepName": "step1",
    "stepId": 1,
    "jobExecutionId": "5A86BF65-43AC-F258-2524-9E92992F97CA",
    "lifecycle": "Succeeded",
    "provisioningState": "Succeeded",
    "createTime": "2017-12-27T04:33:15.7189151Z",
    "startTime": "2017-12-27T04:33:16.176937Z",
    "endTime": "2017-12-27T04:33:19.0600862Z",
    "currentAttempts": 1,
    "currentAttemptStartTime": "2017-12-27T04:33:17.4840068Z",
    "lastMessage": "Step 1 succeeded."
  },
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999/steps/step1",
  "name": "step1",
  "type": "Microsoft.Sql/servers/jobAgents/jobs/executions/steps"
}

Definitions

Name Description
ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

JobExecution

An execution of a job

JobExecutionLifecycle

The detailed state of the job execution.

JobExecutionTarget

The target that a job execution is executed on.

JobTargetType

The type of the target.

ProvisioningState

The ARM provisioning state of the job execution.

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

JobExecution

An execution of a job

Name Type Description
id

string

Resource ID.

name

string

Resource name.

properties.createTime

string (date-time)

The time that the job execution was created.

properties.currentAttemptStartTime

string (date-time)

Start time of the current attempt.

properties.currentAttempts

integer (int32)

Number of times the job execution has been attempted.

properties.endTime

string (date-time)

The time that the job execution completed.

properties.jobExecutionId

string (uuid)

The unique identifier of the job execution.

properties.jobVersion

integer (int32)

The job version number.

properties.lastMessage

string

The last status or error message.

properties.lifecycle

JobExecutionLifecycle

The detailed state of the job execution.

properties.provisioningState

ProvisioningState

The ARM provisioning state of the job execution.

properties.startTime

string (date-time)

The time that the job execution started.

properties.stepId

integer (int32)

The job step id.

properties.stepName

string

The job step name.

properties.target

JobExecutionTarget

The target that this execution is executed on.

type

string

Resource type.

JobExecutionLifecycle

The detailed state of the job execution.

Value Description
Created
InProgress
WaitingForChildJobExecutions
WaitingForRetry
Succeeded
SucceededWithSkipped
Failed
TimedOut
Canceled
Skipped

JobExecutionTarget

The target that a job execution is executed on.

Name Type Description
databaseName

string

The database name.

serverName

string

The server name.

type

JobTargetType

The type of the target.

JobTargetType

The type of the target.

Value Description
TargetGroup
SqlDatabase
SqlElasticPool
SqlShardMap
SqlServer

ProvisioningState

The ARM provisioning state of the job execution.

Value Description
Created
InProgress
Succeeded
Failed
Canceled