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/restorePoints.json
      version: "2.0"
  x-preferred: false
  x-providerName: azure.com
  x-serviceName: sql-restorePoints
  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}/databases/{databaseName}/restorePoints":
    get:
      description: Gets a list of database restore points.
      operationId: RestorePoints_ListByDatabase
      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 to get available restore points.
          in: path
          name: databaseName
          required: true
          type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/RestorePointListResult"
      tags:
        - DatabaseBackup
      x-ms-examples:
        Get a data warehouse's restore points:
          parameters:
            api-version: 2014-04-01
            databaseName: "3481"
            resourceGroupName: sqlcrudtest-6730
            serverName: sqlcrudtest-9007
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/9007/databases/3481/restorepoints/131448209670000000
                    location: West US
                    name: "131448209670000000"
                    properties:
                      earliestRestoreDate: null
                      restorePointCreationDate: 2017-07-18T03:09:27Z
                      restorePointType: DISCRETE
                    type: Microsoft.Sql/servers/databases/restorePoints
                  - id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/9007/databases/3481/restorepoints/131448353660000000
                    location: West US
                    name: "131448353660000000"
                    properties:
                      earliestRestoreDate: null
                      restorePointCreationDate: 2017-07-18T07:09:26Z
                      restorePointType: DISCRETE
                    type: Microsoft.Sql/servers/databases/restorePoints
                  - id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/9007/databases/3481/restorepoints/131448497660000000
                    location: West US
                    name: "131448497660000000"
                    properties:
                      earliestRestoreDate: null
                      restorePointCreationDate: 2017-07-18T11:09:26Z
                      restorePointType: DISCRETE
                    type: Microsoft.Sql/servers/databases/restorePoints
                  - id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/9007/databases/3481/restorepoints/131448641650000000
                    location: West US
                    name: "131448641650000000"
                    properties:
                      earliestRestoreDate: null
                      restorePointCreationDate: 2017-07-18T15:09:25Z
                      restorePointType: DISCRETE
                    type: Microsoft.Sql/servers/databases/restorePoints
        Get a database's restore points:
          parameters:
            api-version: 2014-04-01
            databaseName: "3481"
            resourceGroupName: sqlcrudtest-6730
            serverName: sqlcrudtest-9007
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/sqlcrudtest-9007/databases/3481/restorepoints/ContinuousRestorePoint
                    location: West US
                    name: ContinuousRestorePoint
                    properties:
                      earliestRestoreDate: 2017-06-12T00:00:00Z
                      restorePointCreationDate: null
                      restorePointType: CONTINUOUS
                    type: Microsoft.Sql/servers/databases/restorePoints
      x-ms-pageable:
        nextLinkName: null
definitions:
  RestorePoint:
    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 database restore point.
    properties:
      properties:
        $ref: "#/definitions/RestorePointProperties"
        description: The properties of the restore point.
        x-ms-client-flatten: true
  RestorePointListResult:
    description: The response to a list database restore points request.
    properties:
      value:
        description: The list of database restore points.
        items:
          $ref: "#/definitions/RestorePoint"
        type: array
    required:
      - value
  RestorePointProperties:
    description: Represents the properties of a database restore point.
    properties:
      earliestRestoreDate:
        description: Earliest restore time (ISO8601 format). Populated when restorePointType = DISCRETE. Null otherwise.
        format: date-time
        readOnly: true
        type: string
      restorePointCreationDate:
        description: Restore point creation time (ISO8601 format). Populated when restorePointType = CONTINUOUS. Null otherwise.
        format: date-time
        readOnly: true
        type: string
      restorePointType:
        description: The restore point type of the database restore point.
        enum:
          - DISCRETE
          - CONTINUOUS
        readOnly: true
        type: string
        x-ms-enum:
          name: RestorePointType
