This is an archive version of the document. To get the most up-to-date information, see the current version.

Getting Backup Policy Properties by Backup Policy ID

This section explains how to get a list of properties for the specified backup policy.

Request

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

Request Headers

The request header must contain an authorization token of the current session.

Request Parameters

The following parameters must be posted as URL.

Parameter

Description

policyId

The identification numbers of the backup policy. Can be obtained as described in Getting Backup Policies.

Request Body

None.

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 HTTPS headers.

Header

Description

Content-length

The length of the response body.

Content-type

The media type and syntax of the response body message: application/json; charset=utf-8

Response Body

Property

Type

Description

id

string

Shows the identification number of the backup policy.

priority

integer

Shows the priority.

snapshotSettings

PolicySnapshotSettings Object

Contains the PolicySnapshotSettings object.

backupSettings

PolicyBackupSettings Object

Contains the PolicyBackupSettings object.

excludedItemsCount

integer

Shows number excluded items.

usn

integer

Shows the version of the backup policy. Used by platform services to detect if a backup policy has been hanged since the last sync.

_links

Dictionary of string [key] and Object [value]

Links to related resources (navigation property).

name

string

Shows the name of the backup policy.

description

string

Shows the description of the backup policy.

tenantId

string

Shows the identification number of the tenant.

retrySettings

RetrySettings Object

Contains the RetrySettings object.

policyNotificationSettings

PolicyNotificationSettings Object

Contains the PolicyNotificationSettings object.

isEnabled

boolean

Shows if a backup policy is enabled.

backupType

string

Shows a backup type.

PolicySnapshotSettings Object

Property

Type

Description

generationsToSave

integer

Shows the number of snapshots to be saved by the backup policy.

scheduleId

integer

Shows the identification number of the schedule.

PolicyBackupSettings Object

Property

Type

Description

targetRepositoryId

integer

Shows the identification number of the backup repository to which backups are going to be saved.

retentionSettings

RepositoryRetentionSettings Object

Contains the RepositoryRetentionSettings object.

scheduleId

string

Shows the identification number of the schedule.

RepositoryRetentionSettings Object

Property

Type

Description

timeRetentionDuration

integer

Shows how many restore points to keep in the backup repository.

retentionDurationType

string

Shows the method of how to keep backup. Possible values: Daily, Monthly.

RetrySettings Object

Property

Type

Description

retryCount

integer

Shows how many retry attempts are allowed.

PolicyNotificationSettings Object

Property

Type

Description

recipient

string

Shows the email address to which notifications about backup policy results muse be sent.

notifyOnSuccess

boolean

Shows if a notification must be sent on Success.

notifyOnWarning

boolean

Shows if a notification must be sent on Warning.

notifyOnFailure

boolean

Shows if a notification must be sent on Failure.

Example

Request:

GET https://abc.ukwest.cloudapp.azure.com/api/v1/policies/d4ec0e97-8ce4-455c-a699-c1b3635886ae

 

Request Header:

Authorization: Bearer <Access-Token>

 

Response:

200 OK

 

Response Body:

{

  "id": "d4ec0e97-8ce4-455c-a699-c1b3635886ae",

  "priority": 1,

  "snapshotSettings":    {

     "generationsToSave": 7,

     "scheduleId": 3

  },

  "backupSettings":    {

     "targetRepositoryId": 1,

     "retentionSettings":       {

        "timeRetentionDuration": 21,

        "retentionDurationType": "Daily"

     },

     "scheduleId": 2

  },

  "excludedItemsCount": 1,

  "usn": 8,

  "_links":    {

     "self": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/policies/d4ec0e97-8ce4-455c-a699-c1b3635886ae"},

     "selecteditems": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/policies/d4ec0e97-8ce4-455c-a699-c1b3635886ae/selectedItems"},

     "excludeditems": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/policies/d4ec0e97-8ce4-455c-a699-c1b3635886ae/excludedItems"},

     "targetrepository": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/repositories/1"}

  },

  "name": "Backup Policy",

  "description": "",

  "tenantId": "3e924ba9-93bc-40d5-8a47-33f07b239a52",

  "retrySettings": {"retryCount": 3},

  "policyNotificationSettings":    {

     "recipient": "@tech.local",

     "notifyOnSuccess": true,

     "notifyOnWarning": true,

     "notifyOnFailure": true

  },

  "isEnabled": true,

  "backupType": "SelectedItems"

}

I want to report a typo

There is a misspelling right here:

 

I want to let the Veeam Documentation Team know about that.