Get Azure SQL Backup Policies Data

In this article

    You can get details of an Azure SQL backup policy with the specified ID.

    Request

    To retrieve information on a specific backup policy, send the HTTP GET request to the /policies/sql/{policyId} endpoint. {policyId} is a system ID assigned to the backup policy in the Veeam Backup for Microsoft Azure REST API.

    HTTP Request

    GET https://<hostname>/api/v3/policies/sql/{policyId}

    Request Headers

    The request contains the following headers.

    Header

    Required

    Value

    Description

    Authorization

    Required

    Bearer <Access-Token>

    Authenticates a client who sends the request to the server. Must contain the access token for the current logon session in the Bearer <Access-Token> format.

    Response

    The server returns the following response to the client.

    Response Codes

    A successfully completed operation returns a response code 200 (OK).

    Response Headers

    The response to this request contains the following headers. The response may also include additional standard HTTP headers.

    Header

    Value

    Description

    Content-length

    integer

    Identifies the length of the response body message, in bytes.

    Content-type

    • application/json
    • application/problem+json

    Identifies the media type of the response body message.

    Response Body

    In the response body, Veeam Backup for Microsoft Azure returns a representation of the backup policy with the specified ID. The PolicySQLV3 schema is used for the resource representation.

    Get Azure SQL Backup Policies DataExample

    The following request returns information on a backup policy with the ID 8cd8d89f-e774-4a3d-a87a-f77f5d2d432b.

    Request:

    GET https://51.11.247.127/api/v3/policies/sql/8cd8d89f-e774-4a3d-a87a-f77f5d2d432b

     

    Request Header:

    Authorization: Bearer <Access-Token>

     

    Response:

    200

     

    Response Body:

    {

     "id": "8cd8d89f-e774-4a3d-a87a-f77f5d2d432b",

     "priority": 1,

     "excludedItemsCount": 0,

     "tenantId": "97568793-c243-4a51-8345-d33056db7b9b",

     "serviceAccountId": "0265c811-173d-43eb-a84e-aff90c48d40d",

     "usn": 26848,

     "backupStatus": "Success",

     "nextExecutionTime": "2021-09-13T20:00:00Z",

     "_links": {

       "self": {

         "href": "https://51.11.247.127/api/v3/policies/sql/8cd8d89f-e774-4a3d-a87a-f77f5d2d432b"

       }

     },

     "name": "sql_policy",

     "description": "",

     "retrySettings": {

       "retryCount": 3

     },

     "policyNotificationSettings": {

       "recipient": "tomas.anders@veeam.com",

       "notifyOnSuccess": false,

       "notifyOnWarning": false,

       "notifyOnFailure": false

     },

     "isEnabled": true,

     "backupType": "SelectedItems",

     "dailySchedule": {

       "dailyType": "SelectedDays",

       "selectedDays": [

         "Monday"

       ],

       "backupSchedule": {

         "hours": [

           22

         ],

         "retention": {

           "timeRetentionDuration": 14,

           "retentionDurationType": "Days"

         },

         "targetRepositoryId": "2"

       }

     }

    }