{ "swagger": "2.0", "info": { "title": "Azure SQL Database", "description": "Provides create, read, update and delete functionality for Azure SQL Database resources including servers, databases, elastic pools, recommendations, operations, and usage metrics.", "version": "2014-04-01" }, "host": "management.azure.com", "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers": { "get": { "tags": [ "Servers" ], "operationId": "Servers_List", "description": "Returns a list of servers.", "x-ms-examples": { "List servers": { "$ref": "./examples/ServerList.json" } }, "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/ServerListResult" } } }, "x-ms-pageable": { "nextLinkName": null } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}": { "put": { "tags": [ "Servers" ], "operationId": "Servers_CreateOrUpdate", "description": "Creates or updates a new server.", "x-ms-examples": { "Create server min": { "$ref": "./examples/ServerCreateOrUpdateMin.json" }, "Create server max": { "$ref": "./examples/ServerCreateOrUpdateMax.json" } }, "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" }, { "$ref": "#/parameters/ServerNameParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/Server" }, "description": "The required parameters for creating or updating a server." } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Server" } }, "201": { "description": "Created", "schema": { "$ref": "#/definitions/Server" } } } }, "patch": { "tags": [ "Servers" ], "operationId": "Servers_Update", "description": "Updates an existing server.", "x-ms-examples": { "Create server min": { "$ref": "./examples/ServerUpdateMin.json" }, "Create server max": { "$ref": "./examples/ServerUpdateMax.json" } }, "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" }, { "$ref": "#/parameters/ServerNameParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/ServerUpdate" }, "description": "The required parameters for updating a server." } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Server" } } } }, "delete": { "tags": [ "Servers" ], "operationId": "Servers_Delete", "description": "Deletes a SQL server.", "x-ms-examples": { "Delete SQL Server": { "$ref": "./examples/ServerDelete.json" } }, "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" }, { "$ref": "#/parameters/ServerNameParameter" } ], "responses": { "200": { "description": "OK" }, "204": { "description": "Accepted" } } }, "get": { "tags": [ "Servers" ], "operationId": "Servers_Get", "description": "Gets a server.", "x-ms-examples": { "Get Server": { "$ref": "./examples/ServerGet.json" } }, "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" }, { "$ref": "#/parameters/ServerNameParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Server" } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers": { "get": { "tags": [ "Servers" ], "operationId": "Servers_ListByResourceGroup", "description": "Returns a list of servers in a resource group.", "x-ms-examples": { "List servers by resource group": { "$ref": "./examples/ServerListByResourceGroup.json" } }, "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/ServerListResult" } } }, "x-ms-pageable": { "nextLinkName": null } } } }, "definitions": { "ServerProperties": { "properties": { "fullyQualifiedDomainName": { "readOnly": true, "type": "string", "description": "The fully qualified domain name of the server." }, "version": { "type": "string", "enum": [ "2.0", "12.0" ], "description": "The version of the server.", "x-ms-enum": { "name": "ServerVersion", "modelAsString": true } }, "administratorLogin": { "type": "string", "description": "Administrator username for the server. Can only be specified when the server is being created (and is required for creation).", "x-ms-mutability": [ "create", "read" ] }, "administratorLoginPassword": { "type": "string", "description": "The administrator login password (required for server creation).", "x-ms-mutability": [ "create", "update" ] }, "externalAdministratorSid": { "readOnly": true, "type": "string", "format": "uuid", "description": "The ID of the Active Azure Directory object with admin permissions on this server. Legacy parameter, always null. To check for Active Directory admin, query .../servers/{serverName}/administrators." }, "externalAdministratorLogin": { "readOnly": true, "type": "string", "description": "The display name of the Azure Active Directory object with admin permissions on this server. Legacy parameter, always null. To check for Active Directory admin, query .../servers/{serverName}/administrators" }, "state": { "readOnly": true, "type": "string", "description": "The state of the server.", "enum": [ "Ready", "Disabled" ], "x-ms-enum": { "name": "ServerState" } } }, "description": "Represents the properties of a server." }, "Server": { "properties": { "kind": { "readOnly": true, "type": "string", "description": "Kind of sql server. This is metadata used for the Azure portal experience." }, "properties": { "$ref": "#/definitions/ServerProperties", "description": "Represents the properties of the resource.", "x-ms-client-flatten": true } }, "allOf": [ { "$ref": "../../../common/v1/types.json#/definitions/TrackedResource" } ], "description": "Represents a server." }, "ServerUpdate": { "properties": { "tags": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Resource tags." }, "properties": { "$ref": "#/definitions/ServerProperties", "description": "Represents the properties of the resource.", "x-ms-client-flatten": true } }, "allOf": [ { "$ref": "../../../common/v1/types.json#/definitions/Resource" } ], "description": "Represents an update to a server." }, "ServerListResult": { "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/Server" }, "description": "The list of servers." } }, "required": [ "value" ], "description": "Represents the response to a get server request." } }, "parameters": { "ServerNameParameter": { "name": "serverName", "in": "path", "required": true, "type": "string", "description": "The name of the server.", "x-ms-parameter-location": "method" }, "DatabaseExpandParameter": { "name": "$expand", "in": "query", "required": false, "type": "string", "description": "A comma separated list of child objects to expand in the response. Possible properties: serviceTierAdvisors, transparentDataEncryption.", "x-ms-parameter-location": "method" } }, "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" } } } }