{ "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": "DatabaseVulnerabilityAssessmentScans" } ], "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans": { "get": { "operationId": "DatabaseVulnerabilityAssessmentScans_ListByDatabase", "tags": [ "DatabaseVulnerabilityAssessmentScans" ], "description": "Lists the vulnerability assessment scans of a 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": "vulnerabilityAssessmentName", "in": "path", "description": "The name of the vulnerability assessment.", "required": true, "type": "string", "enum": [ "default" ], "x-ms-enum": { "name": "VulnerabilityAssessmentName", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" } ] } } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "./common.json#/definitions/VulnerabilityAssessmentScanRecordListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Gets the list of a database vulnerability assessment scan records": { "$ref": "./examples/DatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}": { "get": { "operationId": "DatabaseVulnerabilityAssessmentScans_Get", "tags": [ "DatabaseVulnerabilityAssessmentScans" ], "description": "Gets a vulnerability assessment scan record of a 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": "vulnerabilityAssessmentName", "in": "path", "description": "The name of the vulnerability assessment.", "required": true, "type": "string", "enum": [ "default" ], "x-ms-enum": { "name": "VulnerabilityAssessmentName", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" } ] } }, { "name": "scanId", "in": "path", "description": "The vulnerability assessment scan Id of the scan to retrieve.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "./common.json#/definitions/VulnerabilityAssessmentScanRecord" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Gets a database vulnerability assessment scan record by scan ID": { "$ref": "./examples/DatabaseVulnerabilityAssessmentScanRecordsGet.json" } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export": { "post": { "operationId": "DatabaseVulnerabilityAssessmentScans_Export", "tags": [ "DatabaseVulnerabilityAssessmentScans" ], "description": "Convert an existing scan result to a human readable format. If already exists nothing happens", "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": "vulnerabilityAssessmentName", "in": "path", "description": "The name of the vulnerability assessment.", "required": true, "type": "string", "enum": [ "default" ], "x-ms-enum": { "name": "VulnerabilityAssessmentName", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" } ] } }, { "name": "scanId", "in": "path", "description": "The vulnerability assessment scan Id of the scan to retrieve.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "./common.json#/definitions/DatabaseVulnerabilityAssessmentScansExport" } }, "201": { "description": "Resource 'DatabaseVulnerabilityAssessmentScansExport' create operation succeeded", "schema": { "$ref": "./common.json#/definitions/DatabaseVulnerabilityAssessmentScansExport" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Export a database's vulnerability assessment scan results.": { "$ref": "./examples/DatabaseVulnerabilityAssessmentScanExport.json" } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan": { "post": { "operationId": "DatabaseVulnerabilityAssessmentScans_InitiateScan", "tags": [ "DatabaseVulnerabilityAssessmentScans" ], "description": "Executes a Vulnerability Assessment database scan.", "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": "vulnerabilityAssessmentName", "in": "path", "description": "The name of the vulnerability assessment.", "required": true, "type": "string", "enum": [ "default" ], "x-ms-enum": { "name": "VulnerabilityAssessmentName", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" } ] } }, { "name": "scanId", "in": "path", "description": "The vulnerability assessment scan Id of the scan to retrieve.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request has succeeded." }, "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": { "Executes a database's vulnerability assessment scan.": { "$ref": "./examples/DatabaseVulnerabilityAssessmentScansExecute.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location" }, "x-ms-long-running-operation": true } } }, "definitions": {}, "parameters": {} }