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

Add Repository

You can add a repository to the Veeam Backup for Microsoft Azure configuration database.

Request

To add an  repository, send the HTTP POST request to the /repositories endpoint.

HTTP Request

POST https://<hostname>/api/v3/repositories

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.

Request Body

To add the  repository, send the following parameters in the request body.

Parameter

Type

Description

keyVaultId

string

Azure ID assigned to an azure Key Vault.

keyVaultKeyUri

string

Unique resource identifier of the cryptographic key.

azureStorageAccountId

string

Azure ID assigned to an Azure storage account where the blob container resides.

azureStorageFolder

string

Name of the folder in the selected blob container used to store Azure VM backups.

azureStorageContainer

string

Azure ID assigned to a blob container where the repository is located.

azureAccountId

string

Azure ID assigned to an Azure account whose permissions are used to connect to a repository.

storageTier

array[string]

Specifies the type of selected access tier: Inferred, Hot, Cool, Archive.

importIfFolderHasBackup

boolean

Defines whether Veeam Backup for Microsoft Azure must import backup files located in the selected folder.

autoCreateTiers

boolean

Defines whether Veeam Backup for Microsoft Azure must create a repository for each access tier.

name

string

Specifies a name of a repository.

description

string

Description of a repository.

enableEncryption

boolean

Defines whether to enable encryption for backup files stored in the created  repository.

password

string

[Applies only if encryption is enabled] Specifies a password that Veeam Backup for Microsoft Azure will use for encryption.

hint

string

[Applies only if encryption is enabled] Specifies a hint for the specified password.

Note

Before you add an  repository, you can check whether settings you plan to specify for it are valid. For more information, see Validate Repository Settings.

Set the parameter values in the following format:

{

 "azureStorageAccountId": "string",

 "azureStorageFolder": "string",

 "azureStorageContainer": "string",

 "azureAccountId": "string",

 "storageTier": "Inferred",

 "name": "string",

 "description": "string",

 "enableEncryption": true,

 "password": "string",

 "hint": "string"

}

Response

The server returns the following response to the client.

Response Codes

A successfully completed operation returns a response code 202 (Accepted).

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 added repository. The Repositoryv3 schema is used for the resource representation.

Add RepositoryExample

The following request adds a repository to the Veeam Backup for Microsoft Azure configuration database.

Request:

POST https://51.11.247.127/api/v3/repositories

 

Request Header:

Authorization: Bearer <Access-Token>

Content-Type: application/json

 

Request Body:

{

 "azureStorageAccountId": "k1iwcetykpfn6r457qdsrpedsbj9yj5ibiqxapn9sgr1zy5qsa3y",

 "azureStorageFolder": "new folder",

 "azureStorageContainer": "backup",

 "azureAccountId": "1",

 "storageTier": "Cool",

 "name": "Added Rep",

 "description": "none",

 "enableEncryption": false,

 "password": "West9112#",

 "hint": "string"

}

 

Response:

200

 

Response Body:

[

 {

   "id": "7df21a02-a6fc-46ed-a407-729776ce39f8",

   "type": "RepositoryCreation",

   "status": "Pending",

   "usn": 0,

   "repositoryJobInfo": {

     "repositoryId": "2",

     "repositoryName": "Added Rep",

     "repositoryRemoved": false

   },

   "_links": {

     "self": {

       "href": "https://51.11.247.127/api/v3/jobSessions/7df21a02-a6fc-46ed-a407-729776ce39f8"

     },

     "log": {

       "href": "https://51.11.247.127/api/v3/jobSessions/7df21a02-a6fc-46ed-a407-729776ce39f8/log"

     }

   },

 }

]