Job Steps - Get
Gets a job step in a job's current version.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}?api-version=2025-01-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
job
|
path | True |
string |
The name of the job agent. |
|
job
|
path | True |
string |
The name of the job. |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
|
server
|
path | True |
string |
The name of the server. |
|
step
|
path | True |
string |
The name of the job step. |
|
subscription
|
path | True |
string (uuid) |
The ID of the target subscription. The value must be an UUID. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Azure operation completed successfully. |
|
| Other Status Codes |
An unexpected error response. |
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
Get the latest version of a job step.
Sample request
GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1?api-version=2025-01-01
Sample response
{
"name": "step1",
"type": "Microsoft.Sql/servers/jobAgents/jobs/steps",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1",
"properties": {
"action": {
"type": "TSql",
"source": "Inline",
"value": "select 2"
},
"credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1",
"executionOptions": {
"initialRetryIntervalSeconds": 11,
"maximumRetryIntervalSeconds": 222,
"retryAttempts": 42,
"retryIntervalBackoffMultiplier": 3,
"timeoutSeconds": 1234
},
"output": {
"type": "SqlDatabase",
"credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0",
"databaseName": "database3",
"resourceGroupName": "group3",
"schemaName": "myschema1234",
"serverName": "server3",
"subscriptionId": "3501b905-a848-4b5d-96e8-b253f62d735a",
"tableName": "mytable5678"
},
"stepId": 1,
"targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1"
}
}
Definitions
| Name | Description |
|---|---|
|
created |
The type of identity that created the resource. |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
Job |
A job step. |
|
Job |
The action to be executed by a job step. |
|
Job |
The source of the action to execute. |
|
Job |
Type of action being executed by the job step. |
|
Job |
The execution options of a job step. |
|
Job |
The output configuration of a job step. |
|
Job |
The output destination type. |
|
system |
Metadata pertaining to creation and last modification of the resource. |
createdByType
The type of identity that created the resource.
| Value | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
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 |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
JobStep
A job step.
| Name | Type | Description |
|---|---|---|
| id |
string (arm-id) |
Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
| name |
string |
The name of the resource |
| properties.action |
The action payload of the job step. |
|
| properties.credential |
string |
The resource ID of the job credential that will be used to connect to the targets. |
| properties.executionOptions |
Execution options for the job step. |
|
| properties.output |
Output destination properties of the job step. |
|
| properties.stepId |
integer (int32) |
The job step's index within the job. If not specified when creating the job step, it will be created as the last step. If not specified when updating the job step, the step id is not modified. |
| properties.targetGroup |
string |
The resource ID of the target group that the job step will be executed on. |
| systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
| type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
JobStepAction
The action to be executed by a job step.
| Name | Type | Default value | Description |
|---|---|---|---|
| source | Inline |
The source of the action to execute. |
|
| type | TSql |
Type of action being executed by the job step. |
|
| value |
string |
The action value, for example the text of the T-SQL script to execute. |
JobStepActionSource
The source of the action to execute.
| Value | Description |
|---|---|
| Inline |
Inline |
JobStepActionType
Type of action being executed by the job step.
| Value | Description |
|---|---|
| TSql |
TSql |
JobStepExecutionOptions
The execution options of a job step.
| Name | Type | Default value | Description |
|---|---|---|---|
| initialRetryIntervalSeconds |
integer (int32) |
1 |
Initial delay between retries for job step execution. |
| maximumRetryIntervalSeconds |
integer (int32) |
120 |
The maximum amount of time to wait between retries for job step execution. |
| retryAttempts |
integer (int32) |
10 |
Maximum number of times the job step will be reattempted if the first attempt fails. |
| retryIntervalBackoffMultiplier |
number (float) |
2 |
The backoff multiplier for the time between retries. |
| timeoutSeconds |
integer (int32) |
43200 |
Execution timeout for the job step. |
JobStepOutput
The output configuration of a job step.
| Name | Type | Default value | Description |
|---|---|---|---|
| credential |
string |
The resource ID of the credential to use to connect to the output destination. |
|
| databaseName |
string |
The output destination database. |
|
| resourceGroupName |
string |
The output destination resource group. |
|
| schemaName |
string |
dbo |
The output destination schema. |
| serverName |
string |
The output destination server name. |
|
| subscriptionId |
string (uuid) |
The output destination subscription id. |
|
| tableName |
string |
The output destination table. |
|
| type | SqlDatabase |
The output destination type. |
JobStepOutputType
The output destination type.
| Value | Description |
|---|---|
| SqlDatabase |
SqlDatabase |
systemData
Metadata pertaining to creation and last modification of the resource.
| Name | Type | Description |
|---|---|---|
| createdAt |
string (date-time) |
The timestamp of resource creation (UTC). |
| createdBy |
string |
The identity that created the resource. |
| createdByType |
The type of identity that created the resource. |
|
| lastModifiedAt |
string (date-time) |
The timestamp of resource last modification (UTC) |
| lastModifiedBy |
string |
The identity that last modified the resource. |
| lastModifiedByType |
The type of identity that last modified the resource. |