Help Center
Choose product document...
Veeam Backup for Microsoft Office 365 2.0
RESTful API Reference

(POST) /BackupRepositories

Adds backup repositories to Veeam Backup for Microsoft Office 365.

You can set the retention period for a backup repository in years, months or days. Backup jobs targeted to this repository will back up organization items that were created or modified within the indicated retention period. For example, if you set the retention period to 11 months, the backup job will back up all items that were created or modified 11 months ago or later. When an item’s age exceeds the retention, it is deleted.

Additionally, you can configure a clean-up schedule to check the backups in the repository and remove the outdated ones. Depending on how frequently you want to perform a clean-up you can set a daily or monthly schedule. For each clean-up schedule type, you can specify the clean-up day and time.

Request

To create a backup repository, send the POST HTTPS request to the URL of the /BackupRepositories resource.

HTTPS Request

POST https://<Backup-Office365>:4443/v2/BackupRepositories

Request Headers

The request header must contain the authorization token for the current logon session.

Request Body

The request body must contain the following properties:

Property

Type

Description

Name

string

Specifies the name of the backup repository.

For example, "name": "ABC Support".

ProxyId

string

Specifies the ID of a backup proxy. Veeam Backup for Microsoft Office 365 will add backup repository to this proxy.

For example, "proxyId": "5a905bb5-9071-433c-9d2f-f805d4da2cf4".

Path

string

Specifies the full path to the existing folder where the backups will be stored.

For example, "path": "C:\\ABC_support".

Description

string

Specifies the description of the backup repository.

For example, "description": "Daily".

Retention
Period
Type

string

Specifies the retention period type:

  • Daily
  • Monthly
  • Yearly

For example, "retentionPeriodType": "Daily".

Daily
Retention
Period

string

Specifies the retention period in days. This property is valid if retentionPeriodType is set to Daily.

For example, "dailyRetentionPeriod": "14".

Monthly
Retention
Period

string

Specifies the retention period in months. This property is valid if retentionPeriodType is set to Monthly.

For example, "monthlyRetentionPeriod": "6".

Yearly
Retention
Period

string

Specifies the retention period in years:

  • Year1
  • Years2
  • Years3
  • Years5
  • Years7
  • Years10
  • Years25
  • KeepForever

This property is valid if retentionPeriodType is set to Yearly.

If you select KeepForever, the backup job will back up all selected items and will never remove them.

For example, "yearlyRetentionPeriod": "KeepForever".

Retention
Frequency
Type

string

Specifies clean-up schedule type:

  • Daily: to check and remove the outdated backups once a day. Use DailyTime property to set the time of the day for performing clean-up. Use DailyType property to set the days for performing clean-up.
  • Monthly: to check and remove the outdated backups once a month. Use MonthlyTime property to set the time of the day for performing clean-up. Use MonthlyDayNumber and MonthlyDayOfWeek properties to set the day for performing clean-up.

For example, "retentionFrequencyType": "Monthly".

DailyTime

UTC

For daily clean-up schedule.

Specifies the time of the day when clean-up must be performed.

For example, "dailyTime": "08:00:00".

DailyType

string

For daily clean-up schedule.

Specifies the days when clean-up must be performed:

  • Sunday
  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
  • Everyday
  • Workdays
  • Weekends

For example, "dailyType": "Workdays".

MonthlyTime

UTC

For monthly clean-up schedule.

Specifies the time of the day when clean-up must be performed.

For example, "monthlyTime": "00:00:00".

Monthly
DayNumber

string

For monthly clean-up schedule.

Specifies the order number for the day of the week when clean-up must be performed:

  • First
  • Second
  • Third
  • Fourth
  • Last

For example, "monthlyDayNumber": "Last".

Monthly
DayOfWeek

string

For monthly clean-up schedule.

Specifies the day of the week when clean-up must be performed:

  • Sunday
  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday

For example, "monthlyDayOfWeek": "Sunday".

Attach
UsedRepository

bool

Adds a backup repository that was associated with a different backup proxy.

If set to True, Veeam Backup for Microsoft Office 365 will assign a backup repository with backups to the backup proxy with a specified ID and add it to the backup infrastructure.

For example, "attachUsedRepository": "true".

For example:

{

  "name": "ABC Support",

  "proxyId": "5a905bb5-9071-433c-9d2f-f805d4da2cf4",

  "retentionPeriodType": "Daily",

  "dailyRetentionPeriod": 14,

  "retentionFrequencyType": "Daily",

  "dailyTime": "08:00:00",

  "description": "",

  "dailyType": "Weekends",

  "path": "C:\\ABC_Support",

  "attachUsedRepository": "true"

}

Response

The server returns the following response to the client.

Response Codes

A successfully completed operation returns response code 201 Created.

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 request body message: application/json; charset=utf-8

Response Body

In the response body, the server returns a representation of a backup repository resource. The resource has the following URL: /BackupRepositories/{ID}.

Example

The example below shows how to create a backup repository on a backup proxy.

Request:

POST https://support.east.local:4443/v2/BackupRepositories

 

Request Header:

Authorization: Bearer <Access-Token>

 

Request Body:

 

{

  "name": "ABC Support",

  "proxyId": "5a905bb5-9071-433c-9d2f-f805d4da2cf4",

  "retentionPeriodType": "Daily",

  "dailyRetentionPeriod": 14,

  "retentionFrequencyType": "Daily",

  "dailyTime": "08:00:00",

  "description": "",

  "dailyType": "Weekends",

  "path": "C:\\ABC_support",

  "attachUsedRepository": "true"

}

 

Response:

201 Created

 

Response Body:

{

"id": "5729d9cf-abfa-4077-9dd5-f5a888b98147",

"name": "ABC Support",

  "proxyId": "5a905bb5-9071-433c-9d2f-f805d4da2cf4",

  "retentionPeriodType": "Daily",

  "dailyRetentionPeriod": 14,

  "retentionFrequencyType": "Daily",

  "dailyTime": "08:00:00",

  "description": "Daily",

  "dailyType": "Weekends",

  "path": "C:\\ABC_support",

  "capacity": 128479916032,

  "freeSpace": 111512092672,

 "_links": {

  "self": {

    "href": "https://support.east.local:4443/v2/BackupRepositories/5729d9cf-abfa-4077-9dd5-f5a888b98147"

   },

  "proxy": {

    "href": "https://support.east.local:4443/v2/Proxies/5a905bb5-9071-433c-9d2f-f805d4da2cf4"

   }

 }

}

Veeam Large Logo

User Guide

RESTful API Reference

PowerShell Reference