Job Executions - List By Agent
Lists all executions in a job agent.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/executions?api-version=2021-11-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/executions?createTimeMin={createTimeMin}&createTimeMax={createTimeMax}&endTimeMin={endTimeMin}&endTimeMax={endTimeMax}&isActive={isActive}&$skip={$skip}&$top={$top}&api-version=2021-11-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
job
|
path | True |
string |
The name of the job agent. |
resource
|
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. |
server
|
path | True |
string |
The name of the server. |
subscription
|
path | True |
string |
The subscription ID that identifies an Azure subscription. |
api-version
|
query | True |
string |
The API version to use for the request. |
$skip
|
query |
integer int64 |
The number of elements in the collection to skip. |
|
$top
|
query |
integer int64 |
The number of elements to return from the collection. |
|
create
|
query |
string date-time |
If specified, only job executions created before the specified time are included. |
|
create
|
query |
string date-time |
If specified, only job executions created at or after the specified time are included. |
|
end
|
query |
string date-time |
If specified, only job executions completed before the specified time are included. |
|
end
|
query |
string date-time |
If specified, only job executions completed at or after the specified time are included. |
|
is
|
query |
boolean |
If specified, only active or only completed job executions are included. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Successfully retrieved job executions. |
|
Other Status Codes |
*** Error Responses: ***
|
Examples
List all job executions in a job agent with filtering. |
List all job executions in a job agent. |
List all job executions in a job agent with filtering.
Sample request
GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/executions?createTimeMin=2017-03-21T19:00:00Z&createTimeMax=2017-03-21T19:05:00Z&endTimeMin=2017-03-21T19:20:00Z&endTimeMax=2017-03-21T19:25:00Z&isActive=False&api-version=2021-11-01
Sample response
{
"value": [
{
"properties": {
"jobVersion": 1,
"jobExecutionId": "5A86BF65-43AC-F258-2524-9E92992F97CA",
"lifecycle": "Created",
"provisioningState": "Created",
"createTime": "2017-03-21T19:02:00.8707045Z",
"startTime": "2017-03-21T19:12:00.8707045Z",
"endTime": "2017-03-21T19:22:00.8707045Z",
"currentAttempts": 0,
"currentAttemptStartTime": "2017-03-21T19:12:00.8707045Z",
"lastMessage": "Job execution created."
},
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999",
"name": "5555-6666-7777-8888-999999999999",
"type": "Microsoft.Sql/servers/jobAgents/jobs/executions"
},
{
"properties": {
"jobVersion": 1,
"jobExecutionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"lifecycle": "Succeeded",
"provisioningState": "Succeeded",
"createTime": "2017-12-15T19:02:00.8707045Z",
"startTime": "2017-12-15T19:12:00.8707045Z",
"endTime": "2017-12-15T19:22:00.8707045Z",
"currentAttempts": 1,
"lastMessage": "Job execution succeeded."
},
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job2/executions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"name": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"type": "Microsoft.Sql/servers/jobAgents/jobs/executions"
}
],
"nextLink": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1//executions?api-version=2017-03-01-preview&%24skip=2"
}
List all job executions in a job agent.
Sample request
Sample response
{
"value": [
{
"properties": {
"jobVersion": 1,
"jobExecutionId": "5A86BF65-43AC-F258-2524-9E92992F97CA",
"lifecycle": "Created",
"provisioningState": "Created",
"createTime": "2017-03-21T19:02:00.8707045Z",
"startTime": "2017-03-21T19:12:00.8707045Z",
"endTime": "2017-03-21T19:22:00.8707045Z",
"currentAttempts": 0,
"currentAttemptStartTime": "2017-03-21T19:12:00.8707045Z",
"lastMessage": "Job execution created."
},
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999",
"name": "5555-6666-7777-8888-999999999999",
"type": "Microsoft.Sql/servers/jobAgents/jobs/executions"
},
{
"properties": {
"jobVersion": 1,
"jobExecutionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"lifecycle": "Succeeded",
"provisioningState": "Succeeded",
"createTime": "2017-12-15T19:02:00.8707045Z",
"startTime": "2017-12-15T19:12:00.8707045Z",
"endTime": "2017-12-15T19:22:00.8707045Z",
"currentAttempts": 1,
"lastMessage": "Job execution succeeded."
},
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job2/executions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"name": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"type": "Microsoft.Sql/servers/jobAgents/jobs/executions"
}
],
"nextLink": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1//executions?api-version=2017-03-01-preview&%24skip=2"
}
Definitions
Name | Description |
---|---|
Job |
An execution of a job |
Job |
The detailed state of the job execution. |
Job |
A list of job executions. |
Job |
The target that a job execution is executed on. |
Job |
The type of the target. |
Provisioning |
The ARM provisioning state of the job execution. |
JobExecution
An execution of a job
Name | Type | Description |
---|---|---|
id |
string |
Resource ID. |
name |
string |
Resource name. |
properties.createTime |
string |
The time that the job execution was created. |
properties.currentAttemptStartTime |
string |
Start time of the current attempt. |
properties.currentAttempts |
integer |
Number of times the job execution has been attempted. |
properties.endTime |
string |
The time that the job execution completed. |
properties.jobExecutionId |
string |
The unique identifier of the job execution. |
properties.jobVersion |
integer |
The job version number. |
properties.lastMessage |
string |
The last status or error message. |
properties.lifecycle |
The detailed state of the job execution. |
|
properties.provisioningState |
The ARM provisioning state of the job execution. |
|
properties.startTime |
string |
The time that the job execution started. |
properties.stepId |
integer |
The job step id. |
properties.stepName |
string |
The job step name. |
properties.target |
The target that this execution is executed on. |
|
type |
string |
Resource type. |
JobExecutionLifecycle
The detailed state of the job execution.
Name | Type | Description |
---|---|---|
Canceled |
string |
|
Created |
string |
|
Failed |
string |
|
InProgress |
string |
|
Skipped |
string |
|
Succeeded |
string |
|
SucceededWithSkipped |
string |
|
TimedOut |
string |
|
WaitingForChildJobExecutions |
string |
|
WaitingForRetry |
string |
JobExecutionListResult
A list of job executions.
Name | Type | Description |
---|---|---|
nextLink |
string |
Link to retrieve next page of results. |
value |
Array of results. |
JobExecutionTarget
The target that a job execution is executed on.
Name | Type | Description |
---|---|---|
databaseName |
string |
The database name. |
serverName |
string |
The server name. |
type |
The type of the target. |
JobTargetType
The type of the target.
Name | Type | Description |
---|---|---|
SqlDatabase |
string |
|
SqlElasticPool |
string |
|
SqlServer |
string |
|
SqlShardMap |
string |
|
TargetGroup |
string |
ProvisioningState
The ARM provisioning state of the job execution.
Name | Type | Description |
---|---|---|
Canceled |
string |
|
Created |
string |
|
Failed |
string |
|
InProgress |
string |
|
Succeeded |
string |