{ "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": "DatabaseOperations" } ], "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations": { "get": { "operationId": "DatabaseOperations_ListByDatabase", "tags": [ "DatabaseOperations" ], "description": "Gets a list of operations performed on the database.", "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": "databaseName", "in": "path", "description": "The name of the database.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/DatabaseOperationListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "List the database management operations": { "$ref": "./examples/ListDatabaseOperations.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations/{operationId}/cancel": { "post": { "operationId": "DatabaseOperations_Cancel", "tags": [ "DatabaseOperations" ], "description": "Cancels the asynchronous operation on the database.", "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": "databaseName", "in": "path", "description": "The name of the database.", "required": true, "type": "string" }, { "name": "operationId", "in": "path", "description": "The operation identifier.", "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 the database management operation": { "$ref": "./examples/CancelDatabaseOperation.json" } } } } }, "definitions": { "DatabaseOperation": { "type": "object", "description": "A database operation.", "properties": { "properties": { "$ref": "#/definitions/DatabaseOperationProperties", "description": "Resource properties.", "x-ms-client-flatten": true } }, "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" } ] }, "DatabaseOperationListResult": { "type": "object", "description": "The response of a DatabaseOperation list operation.", "properties": { "value": { "type": "array", "description": "The DatabaseOperation items on this page", "items": { "$ref": "#/definitions/DatabaseOperation" } }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items" } }, "required": [ "value" ] }, "DatabaseOperationProperties": { "type": "object", "description": "The properties of a database operation.", "properties": { "databaseName": { "type": "string", "description": "The name of the database the operation is being performed on.", "readOnly": true }, "operation": { "type": "string", "description": "The name of operation.", "readOnly": true }, "operationFriendlyName": { "type": "string", "description": "The friendly name of operation.", "readOnly": true }, "percentComplete": { "type": "integer", "format": "int32", "description": "The percentage of the operation completed.", "readOnly": true }, "serverName": { "type": "string", "description": "The name of the server.", "readOnly": true }, "startTime": { "type": "string", "format": "date-time", "description": "The operation start time.", "readOnly": true }, "state": { "$ref": "./common.json#/definitions/ManagementOperationState", "description": "The operation state.", "readOnly": true }, "errorCode": { "type": "integer", "format": "int32", "description": "The operation error code.", "readOnly": true }, "errorDescription": { "type": "string", "description": "The operation error description.", "readOnly": true }, "errorSeverity": { "type": "integer", "format": "int32", "description": "The operation error severity.", "readOnly": true }, "isUserError": { "type": "boolean", "description": "Whether or not the error is a user error.", "readOnly": true }, "estimatedCompletionTime": { "type": "string", "format": "date-time", "description": "The estimated completion time of the operation.", "readOnly": true }, "description": { "type": "string", "description": "The operation description.", "readOnly": true }, "isCancellable": { "type": "boolean", "description": "Whether the operation can be cancelled.", "readOnly": true }, "operationPhaseDetails": { "$ref": "#/definitions/PhaseDetails", "description": "The operation phase details.", "readOnly": true } } }, "PhaseDetails": { "type": "object", "description": "The phase details properties of a database operation.", "properties": { "phase": { "$ref": "./common.json#/definitions/Phase", "description": "The operation phase.", "readOnly": true }, "phaseInformation": { "type": "object", "description": "The operation phase information.", "additionalProperties": { "type": "string" }, "readOnly": true } } } }, "parameters": {} }