{ "swagger": "2.0", "info": { "title": "SqlManagementClient", "version": "2025-01-01", "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities.", "x-typespec-generated": [ { "emitter": "@azure-tools/typespec-autorest" } ] }, "schemes": [ "https" ], "host": "management.azure.com", "produces": [ "application/json" ], "consumes": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "description": "Azure Active Directory OAuth2 Flow.", "flow": "implicit", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "scopes": { "user_impersonation": "impersonate your user account" } } }, "tags": [ { "name": "JobExecutions" } ], "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/executions": { "get": { "operationId": "JobExecutions_ListByAgent", "tags": [ "JobExecutions" ], "description": "Lists all executions in a job agent.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "serverName", "in": "path", "description": "The name of the server.", "required": true, "type": "string" }, { "name": "jobAgentName", "in": "path", "description": "The name of the job agent to be retrieved.", "required": true, "type": "string" }, { "name": "createTimeMin", "in": "query", "description": "If specified, only job executions created at or after the specified time are included.", "required": false, "type": "string", "format": "date-time" }, { "name": "createTimeMax", "in": "query", "description": "If specified, only job executions created before the specified time are included.", "required": false, "type": "string", "format": "date-time" }, { "name": "endTimeMin", "in": "query", "description": "If specified, only job executions completed at or after the specified time are included.", "required": false, "type": "string", "format": "date-time" }, { "name": "endTimeMax", "in": "query", "description": "If specified, only job executions completed before the specified time are included.", "required": false, "type": "string", "format": "date-time" }, { "name": "isActive", "in": "query", "description": "If specified, only active or only completed job executions are included.", "required": false, "type": "boolean" }, { "name": "$skip", "in": "query", "description": "The number of elements in the collection to skip.", "required": false, "type": "integer", "format": "int64" }, { "name": "$top", "in": "query", "description": "The number of elements to return from the collection.", "required": false, "type": "integer", "format": "int64" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "./common.json#/definitions/JobExecutionListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "List all job executions in a job agent with filtering.": { "$ref": "./examples/ListJobExecutionsByAgentWithFilter.json" }, "List all job executions in a job agent.": { "$ref": "./examples/ListJobExecutionsByAgent.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions": { "get": { "operationId": "JobExecutions_ListByJob", "tags": [ "JobExecutions" ], "description": "Lists a job's executions.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "serverName", "in": "path", "description": "The name of the server.", "required": true, "type": "string" }, { "name": "jobAgentName", "in": "path", "description": "The name of the job agent.", "required": true, "type": "string" }, { "name": "jobName", "in": "path", "description": "The name of the job.", "required": true, "type": "string" }, { "name": "createTimeMin", "in": "query", "description": "If specified, only job executions created at or after the specified time are included.", "required": false, "type": "string", "format": "date-time" }, { "name": "createTimeMax", "in": "query", "description": "If specified, only job executions created before the specified time are included.", "required": false, "type": "string", "format": "date-time" }, { "name": "endTimeMin", "in": "query", "description": "If specified, only job executions completed at or after the specified time are included.", "required": false, "type": "string", "format": "date-time" }, { "name": "endTimeMax", "in": "query", "description": "If specified, only job executions completed before the specified time are included.", "required": false, "type": "string", "format": "date-time" }, { "name": "isActive", "in": "query", "description": "If specified, only active or only completed job executions are included.", "required": false, "type": "boolean" }, { "name": "$skip", "in": "query", "description": "The number of elements in the collection to skip.", "required": false, "type": "integer", "format": "int64" }, { "name": "$top", "in": "query", "description": "The number of elements to return from the collection.", "required": false, "type": "integer", "format": "int64" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "./common.json#/definitions/JobExecutionListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "List a job's executions.": { "$ref": "./examples/ListJobExecutionsByJob.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}": { "get": { "operationId": "JobExecutions_Get", "tags": [ "JobExecutions" ], "description": "Gets a job execution.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "serverName", "in": "path", "description": "The name of the server.", "required": true, "type": "string" }, { "name": "jobAgentName", "in": "path", "description": "The name of the job agent.", "required": true, "type": "string" }, { "name": "jobName", "in": "path", "description": "The name of the job.", "required": true, "type": "string" }, { "name": "jobExecutionId", "in": "path", "description": "The id of the job execution", "required": true, "type": "string", "format": "uuid" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "./common.json#/definitions/JobExecution" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Get a job execution.": { "$ref": "./examples/GetJobExecution.json" } } }, "put": { "operationId": "JobExecutions_CreateOrUpdate", "tags": [ "JobExecutions" ], "description": "Creates or updates a job execution.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "serverName", "in": "path", "description": "The name of the server.", "required": true, "type": "string" }, { "name": "jobAgentName", "in": "path", "description": "The name of the job agent.", "required": true, "type": "string" }, { "name": "jobName", "in": "path", "description": "The name of the job.", "required": true, "type": "string" }, { "name": "jobExecutionId", "in": "path", "description": "The id of the job execution", "required": true, "type": "string", "format": "uuid" } ], "responses": { "200": { "description": "Resource 'JobExecution' update operation succeeded", "schema": { "$ref": "./common.json#/definitions/JobExecution" } }, "201": { "description": "Resource 'JobExecution' create operation succeeded", "schema": { "$ref": "./common.json#/definitions/JobExecution" }, "headers": { "Location": { "type": "string", "description": "The Location header contains the URL where the status of the long running operation can be checked." }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "202": { "description": "Resource operation accepted.", "headers": { "Location": { "type": "string", "description": "The Location header contains the URL where the status of the long running operation can be checked." }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Create job execution.": { "$ref": "./examples/CreateOrUpdateJobExecution.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location", "final-state-schema": "./common.json#/definitions/JobExecution" }, "x-ms-long-running-operation": true } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/cancel": { "post": { "operationId": "JobExecutions_Cancel", "tags": [ "JobExecutions" ], "description": "Requests cancellation of a job execution.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "serverName", "in": "path", "description": "The name of the server.", "required": true, "type": "string" }, { "name": "jobAgentName", "in": "path", "description": "The name of the job agent.", "required": true, "type": "string" }, { "name": "jobName", "in": "path", "description": "The name of the job.", "required": true, "type": "string" }, { "name": "jobExecutionId", "in": "path", "description": "The id of the job execution", "required": true, "type": "string", "format": "uuid" } ], "responses": { "200": { "description": "The request has succeeded." }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Cancel a job execution.": { "$ref": "./examples/CancelJobExecution.json" } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/start": { "post": { "operationId": "JobExecutions_Create", "tags": [ "JobExecutions" ], "description": "Starts an elastic job execution.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "serverName", "in": "path", "description": "The name of the server.", "required": true, "type": "string" }, { "name": "jobAgentName", "in": "path", "description": "The name of the job agent to be retrieved.", "required": true, "type": "string" }, { "name": "jobName", "in": "path", "description": "The name of the job to get.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "./common.json#/definitions/JobExecution" } }, "202": { "description": "Resource operation accepted.", "headers": { "Location": { "type": "string", "description": "The Location header contains the URL where the status of the long running operation can be checked." }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Start a job execution.": { "$ref": "./examples/CreateJobExecution.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location", "final-state-schema": "./common.json#/definitions/JobExecution" }, "x-ms-long-running-operation": true } } }, "definitions": {}, "parameters": {} }