swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  description: Provides read functionality for Azure SQL Database Backups
  title: Azure SQL Database Backup
  version: 2014-04-01
  x-apisguru-categories:
    - cloud
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png
  x-origin:
    - format: swagger
      url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/backups.json
      version: "2.0"
  x-providerName: azure.com
  x-serviceName: sql-backups
  x-tags:
    - Azure
    - Microsoft
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  azure_auth:
    authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
    description: Azure Active Directory OAuth2 Flow
    flow: implicit
    scopes:
      user_impersonation: impersonate your user account
    type: oauth2
parameters:
  DatabaseExpandParameter:
    description: "A comma separated list of child objects to expand in the response. Possible properties: serviceTierAdvisors, transparentDataEncryption."
    in: query
    name: $expand
    required: false
    type: string
    x-ms-parameter-location: method
  ServerNameParameter:
    description: The name of the server.
    in: path
    name: serverName
    required: true
    type: string
    x-ms-parameter-location: method
paths:
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases":
    get:
      description: Gets a list of recoverable databases
      operationId: RecoverableDatabases_ListByServer
      parameters:
        - description: The API version to use for the request.
          in: query
          name: api-version
          required: true
          type: string
          x-ms-parameter-location: client
        - description: The subscription ID that identifies an Azure subscription.
          in: path
          name: subscriptionId
          required: true
          type: string
          x-ms-parameter-location: client
        - description: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - $ref: "#/parameters/ServerNameParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/RecoverableDatabaseListResult"
      tags:
        - RecoverableDatabases
      x-ms-examples:
        Get list of restorable dropped databases:
          parameters:
            api-version: 2014-04-01
            resourceGroupName: recoverabledatabasetest-1234
            serverName: recoverabledatabasetest-7177
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/recoverabledatabasetest-1234/providers/Microsoft.Sql/servers/recoverabledatabasetest-7177/recoverabledatabases/recoverabledatabasetest-1235
                    name: recoverabledatabasetest-1235
                    properties:
                      edition: Standard
                      elasticPoolName: null
                      lastAvailableBackupDate: 2017-05-26T01:06:29.78Z
                      serviceLevelObjective: S0
                    type: Microsoft.Sql/servers/recoverabledatabases
                  - id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/recoverabledatabasetest-1234/providers/Microsoft.Sql/servers/recoverabledatabasetest-7177/recoverabledatabases/recoverabledatabasetest-9231
                    name: recoverabledatabasetest-9231
                    properties:
                      edition: Premium
                      elasticPoolName: null
                      lastAvailableBackupDate: 2017-05-26T03:20:31.78Z
                      serviceLevelObjective: P1
                    type: Microsoft.Sql/servers/recoverabledatabases
                  - id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/recoverabledatabasetest-1234/providers/Microsoft.Sql/servers/recoverabledatabasetest-7177/recoverabledatabases/recoverabledatabasetest-0342
                    name: recoverabledatabasetest-0342
                    properties:
                      edition: Basic
                      elasticPoolName: null
                      lastAvailableBackupDate: 2017-05-24T02:06:18.78Z
                      serviceLevelObjective: Basic
                    type: Microsoft.Sql/servers/recoverabledatabases
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases/{databaseName}":
    get:
      description: Gets a recoverable database, which is a resource representing a database's geo backup
      operationId: RecoverableDatabases_Get
      parameters:
        - description: The API version to use for the request.
          in: query
          name: api-version
          required: true
          type: string
          x-ms-parameter-location: client
        - description: The subscription ID that identifies an Azure subscription.
          in: path
          name: subscriptionId
          required: true
          type: string
          x-ms-parameter-location: client
        - description: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - $ref: "#/parameters/ServerNameParameter"
        - description: The name of the database
          in: path
          name: databaseName
          required: true
          type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/RecoverableDatabase"
      tags:
        - RecoverableDatabases
      x-ms-examples:
        Get a recoverable database:
          parameters:
            api-version: 2014-04-01
            databaseName: recoverabledatabasetest-9187
            resourceGroupName: recoverabledatabasetest-6852
            serverName: recoverabledatabasetest-2080
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/recoverabledatabasetest-6852/providers/Microsoft.Sql/servers/recoverabledatabasetest-2080/recoverabledatabases/recoverabledatabasetest-9187
                name: recoverabledatabasetest-9187
                properties:
                  edition: Basic
                  elasticPoolName: null
                  lastAvailableBackupDate: 2017-05-26T01:06:29.78Z
                  serviceLevelObjective: Basic
                type: Microsoft.Sql/servers/recoverabledatabases
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases":
    get:
      description: Gets a list of deleted databases that can be restored
      operationId: RestorableDroppedDatabases_ListByServer
      parameters:
        - description: The API version to use for the request.
          in: query
          name: api-version
          required: true
          type: string
          x-ms-parameter-location: client
        - description: The subscription ID that identifies an Azure subscription.
          in: path
          name: subscriptionId
          required: true
          type: string
          x-ms-parameter-location: client
        - description: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - $ref: "#/parameters/ServerNameParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/RestorableDroppedDatabaseListResult"
      tags:
        - RestorableDroppedDatabases
      x-ms-examples:
        Get list of restorable dropped databases:
          parameters:
            api-version: 2014-04-01
            resourceGroupName: restorabledroppeddatabasetest-1349
            serverName: restorabledroppeddatabasetest-1840
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/restorabledroppeddatabasetest-1349/providers/Microsoft.Sql/servers/restorabledroppeddatabasetest-1840/restorableDroppedDatabases/restorabledroppeddatabasetest-1345,131403269876900000
                    location: Japan East
                    name: restorabledroppeddatabasetest-1345,131403269876900000
                    properties:
                      creationDate: 2017-02-10T00:56:19.2Z
                      databaseName: restorabledroppeddatabasetest-1345
                      deletionDate: 2017-05-27T02:49:47.69Z
                      earliestRestoreDate: 2017-05-20T02:49:47.69Z
                      edition: Basic
                      elasticPoolName: null
                      maxSizeBytes: "2147483648"
                      serviceLevelObjective: Basic
                    type: Microsoft.Sql/servers/restorableDroppedDatabases
                  - id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/restorabledroppeddatabasetest-1349/providers/Microsoft.Sql/servers/restorabledroppeddatabasetest-1840/restorableDroppedDatabases/restorabledroppeddatabasetest-2764,131403249684030000
                    location: Japan East
                    name: restorabledroppeddatabasetest-2764,131403249684030000
                    properties:
                      creationDate: 2016-05-10T00:56:19.2Z
                      databaseName: restorabledroppeddatabasetest-2764
                      deletionDate: 2017-05-27T02:16:08.403Z
                      earliestRestoreDate: 2017-04-21T02:49:47.69Z
                      edition: Standard
                      elasticPoolName: null
                      maxSizeBytes: "268435456000"
                      serviceLevelObjective: S0
                    type: Microsoft.Sql/servers/restorableDroppedDatabases
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases/{restorableDroppededDatabaseId}":
    get:
      description: Gets a deleted database that can be restored
      operationId: RestorableDroppedDatabases_Get
      parameters:
        - description: The API version to use for the request.
          in: query
          name: api-version
          required: true
          type: string
          x-ms-parameter-location: client
        - description: The subscription ID that identifies an Azure subscription.
          in: path
          name: subscriptionId
          required: true
          type: string
          x-ms-parameter-location: client
        - description: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - $ref: "#/parameters/ServerNameParameter"
        - description: The id of the deleted database in the form of databaseName,deletionTimeInFileTimeFormat
          in: path
          name: restorableDroppededDatabaseId
          required: true
          type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/RestorableDroppedDatabase"
      tags:
        - RestorableDroppedDatabases
      x-ms-examples:
        Get a restorable dropped database:
          parameters:
            api-version: 2014-04-01
            resourceGroupName: restorabledroppeddatabasetest-1257
            restorableDroppededDatabaseId: restorabledroppeddatabasetest-7654,131403269876900000
            serverName: restorabledroppeddatabasetest-2389
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/restorabledroppeddatabasetest-1257/providers/Microsoft.Sql/servers/restorabledroppeddatabasetest-2389/restorableDroppedDatabases/restorabledroppeddatabasetest-7654,131403269876900000
                location: Japan East
                name: restorabledroppeddatabasetest-7654,131403269876900000
                properties:
                  creationDate: 2017-02-10T00:56:19.2Z
                  databaseName: restorabledroppeddatabasetest-7654
                  deletionDate: 2017-05-27T02:49:47.69Z
                  earliestRestoreDate: 2017-05-20T02:49:47.69Z
                  edition: Basic
                  elasticPoolName: null
                  maxSizeBytes: "2147483648"
                  serviceLevelObjective: Basic
                type: Microsoft.Sql/servers/restorableDroppedDatabases
definitions:
  RecoverableDatabase:
    allOf:
      - allOf:
          - description: ARM resource.
            properties:
              id:
                description: Resource ID.
                readOnly: true
                type: string
              name:
                description: Resource name.
                readOnly: true
                type: string
              type:
                description: Resource type.
                readOnly: true
                type: string
            type: object
            x-ms-azure-resource: true
        description: ARM proxy resource.
        properties: {}
        type: object
    description: A recoverable database
    properties:
      properties:
        $ref: "#/definitions/RecoverableDatabaseProperties"
        description: The properties of a recoverable database
        x-ms-client-flatten: true
  RecoverableDatabaseListResult:
    description: The response to a list recoverable databases request
    properties:
      value:
        description: A list of recoverable databases
        items:
          $ref: "#/definitions/RecoverableDatabase"
        type: array
    required:
      - value
  RecoverableDatabaseProperties:
    description: The properties of a recoverable database
    properties:
      edition:
        description: The edition of the database
        readOnly: true
        type: string
      elasticPoolName:
        description: The elastic pool name of the database
        readOnly: true
        type: string
      lastAvailableBackupDate:
        description: The last available backup date of the database (ISO8601 format)
        format: date-time
        readOnly: true
        type: string
      serviceLevelObjective:
        description: The service level objective name of the database
        readOnly: true
        type: string
  RestorableDroppedDatabase:
    allOf:
      - allOf:
          - description: ARM resource.
            properties:
              id:
                description: Resource ID.
                readOnly: true
                type: string
              name:
                description: Resource name.
                readOnly: true
                type: string
              type:
                description: Resource type.
                readOnly: true
                type: string
            type: object
            x-ms-azure-resource: true
        description: ARM proxy resource.
        properties: {}
        type: object
    description: A restorable dropped database
    properties:
      location:
        description: The geo-location where the resource lives
        readOnly: true
        type: string
      properties:
        $ref: "#/definitions/RestorableDroppedDatabaseProperties"
        description: The properties of a restorable dropped database
        x-ms-client-flatten: true
  RestorableDroppedDatabaseListResult:
    description: The response to a list restorable dropped databases request
    properties:
      value:
        description: A list of restorable dropped databases
        items:
          $ref: "#/definitions/RestorableDroppedDatabase"
        type: array
    required:
      - value
  RestorableDroppedDatabaseProperties:
    description: The properties of a restorable dropped database
    properties:
      creationDate:
        description: The creation date of the database (ISO8601 format)
        format: date-time
        readOnly: true
        type: string
      databaseName:
        description: The name of the database
        readOnly: true
        type: string
      deletionDate:
        description: The deletion date of the database (ISO8601 format)
        format: date-time
        readOnly: true
        type: string
      earliestRestoreDate:
        description: The earliest restore date of the database (ISO8601 format)
        format: date-time
        readOnly: true
        type: string
      edition:
        description: The edition of the database
        readOnly: true
        type: string
      elasticPoolName:
        description: The elastic pool name of the database
        readOnly: true
        type: string
      maxSizeBytes:
        description: The max size in bytes of the database
        readOnly: true
        type: string
      serviceLevelObjective:
        description: The service level objective name of the database
        readOnly: true
        type: string
