Export Estimation Cost Report

You can export the estimation cost report to a CSV or an XML file and download the file. To specify the required type of the file, use the Accept request header.

Request

To export the report, send the HTTP POST request to the /costEstimation/export endpoint.

HTTP Request

POST https://<hostname>/api/v2/costEstimation/export

Request Headers

The request contains the following headers.

Header

Required/Optional

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.

Content-Type

Required

application/json

Identifies a media type that is used in the body of the request.

Accept

Required

  • text/scv
  • application/xml

Specifies a media type of representation of the exported data. The default value is text/csv media type.

Request Body

To calculate the estimated monthly cost for the backup policy, send the policy settings in the request body. Use the CostEstimationPolicyFromClientV2 schema.

Set the parameter value in the following format:

{

 "priority": 0,

 "tenantId": "string",

 "regions": [

   {

     "regionId": "string"

   }

 ],

 "selectedItems": {

   "subscriptions": [

     {

       "subscriptionId": "string"

     }

   ],

   "tags": [

     {

       "name": "string",

       "value": "string"

     }

   ],

   "resourceGroups": [

     {

       "id": "string"

     }

   ],

   "virtualMachines": [

     {

       "id": "string"

     }

   ]

 },

 "excludedItems": {

   "virtualMachines": [

     {

       "id": "string"

     }

   ]

 },

 "name": "string",

 "description": "string",

 "retrySettings": {

   "retryCount": 0

 },

 "policyNotificationSettings": {

   "recipient": "string",

   "notifyOnSuccess": true,

   "notifyOnWarning": true,

   "notifyOnFailure": true

 },

 "isEnabled": true,

 "backupType": "AllSubscriptions",

 "snapshotSettings": {

   "additionalTags": [

     {

       "name": "string",

       "value": "string"

     }

   ],

   "copyOriginalTags": true,

   "applicationAwareSnapshot": true,

   "userScripts": {

     "windows": {

       "scriptsEnabled": true,

       "preScriptPath": "string",

       "preScriptArguments": "string",

       "postScriptPath": "string",

       "postScriptArguments": "string",

       "repositorySnapshotsOnly": true,

       "ignoreExitCodes": true,

       "ignoreMissingScripts": true

     },

     "linux": {

       "scriptsEnabled": true,

       "preScriptPath": "string",

       "preScriptArguments": "string",

       "postScriptPath": "string",

       "postScriptArguments": "string",

       "repositorySnapshotsOnly": true,

       "ignoreExitCodes": true,

       "ignoreMissingScripts": true

     }

   }

 },

 "dailySchedule": {

   "dailyType": "Everyday",

   "selectedDays": [

     "Sunday"

   ],

   "runsPerHour": 0,

   "snapshotSchedule": {

     "hours": [

       0

     ],

     "snapshotsToKeep": 0

   },

   "backupSchedule": {

     "hours": [

       0

     ],

     "retention": {

       "timeRetentionDuration": 0,

       "retentionDurationType": "Days"

     },

     "targetRepositoryId": "string"

   }

 },

 "weeklySchedule": {

   "startTime": 0,

   "snapshotSchedule": {

     "selectedDays": [

       "Sunday"

     ],

     "snapshotsToKeep": 0

   },

   "backupSchedule": {

     "selectedDays": [

       "Sunday"

     ],

     "retention": {

       "timeRetentionDuration": 0,

       "retentionDurationType": "Days"

     },

     "targetRepositoryId": "string"

   }

 },

 "monthlySchedule": {

   "startTime": 0,

   "type": "First",

   "dayOfWeek": "Sunday",

   "dayOfMonth": 0,

   "monthlyLastDay": true,

   "snapshotSchedule": {

     "selectedMonths": [

       "January"

     ],

     "snapshotsToKeep": 0

   },

   "backupSchedule": {

     "selectedMonths": [

       "January"

     ],

     "retention": {

       "timeRetentionDuration": 0,

       "retentionDurationType": "Days"

     },

     "targetRepositoryId": "string"

   }

 },

 "yearlySchedule": {

   "startTime": 0,

   "month": "January",

   "type": "First",

   "dayOfWeek": "Sunday",

   "dayOfMonth": 0,

   "yearlyLastDay": true,

   "retentionYearsCount": 0,

   "targetRepositoryId": "string"

 }

}

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 link to download the file with the exported estimation cost report.

Export Estimation Cost ReportExample

 

The following request exports the estimation cost report for a backup policy with the following settings.

Request:

POST https://51.11.247.127/api/v2/costEstimation/export

 

Request Header:

Authorization: Bearer <Access-Token>

Accept: text/scv

Content-Type: application/json

 

Request Body:

 

{

 "priority": 1,

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

 "regions": [

     {

        "regionId":"northeurope"

     },

     {

        "regionId":"ukwest"

     },

     {

        "regionId":"westeurope"

     }

 ],

 "selectedItems": {

   "subscriptions": [],

   "tags": [],

   "resourceGroups": [],

   "virtualMachines": [

     {

           "id":"ej43ifg58cgjs8e9cod74ye6cbwm5nttf6ijzk64rshqoip1abqy"

        },

        {

           "id":"g344t5o8hgxgyp9r5bxqsn1aom88kjsc3hjnk3o8umzdptc3w3ey"

        }

   ]

 },

 "excludedItems": {

   "virtualMachines": []

 },

 "name": "backup policy-01",

 "description": "created by Default Admin",

 "retrySettings": {

   "retryCount": 6

 },

 "policyNotificationSettings": {

   "recipient": "adminc@tech.local",

   "notifyOnSuccess": true,

   "notifyOnWarning": true,

   "notifyOnFailure": true

 },

 "isEnabled": true,

 "backupType": "AllSubscriptions",

 "snapshotSettings": {

   "additionalTags": [

     {

       "name": "dept-01",

       "value": "Department1"

     }

   ],

   "copyOriginalTags": true,

   "applicationAwareSnapshot": false,

   "userScripts": {

     "windows": {

       "scriptsEnabled": false,

       "preScriptPath": "",

       "preScriptArguments": "",

       "postScriptPath": "",

       "postScriptArguments": "",

       "repositorySnapshotsOnly": ,

       "ignoreExitCodes": ,

       "ignoreMissingScripts":

     },

     "linux": {

       "scriptsEnabled": false,

       "preScriptPath": "",

       "preScriptArguments": "",

       "postScriptPath": "",

       "postScriptArguments": "",

       "repositorySnapshotsOnly": ,

       "ignoreExitCodes": true,

       "ignoreMissingScripts":

     }

   }

 },

 "dailySchedule": {

   "dailyType": "Everyday",

   "selectedDays": [

     "Sunday"

   ],

   "runsPerHour": 1,

   "snapshotSchedule": {

     "hours": [

       20:00:00

     ],

     "snapshotsToKeep": 7

   },

   "backupSchedule": {

     "hours": [

       20:00:00

     ],

     "retention": {

       "timeRetentionDuration": 2,

       "retentionDurationType": "Days"

     },

     "targetRepositoryId": "14"

   }

 },

 "weeklySchedule": {

   "startTime": 0,

   "snapshotSchedule": {

     "selectedDays": [

       "Sunday"

     ],

     "snapshotsToKeep": 0

   },

   "backupSchedule": {

     "selectedDays": [

       "Sunday"

     ],

     "retention": {

       "timeRetentionDuration": 0,

       "retentionDurationType": "Days"

     },

     "targetRepositoryId": "14"

   }

 },

 "monthlySchedule": {

   "startTime": 20:00:00,

   "type": "First",

   "dayOfWeek": "Sunday",

   "dayOfMonth": 1,

   "monthlyLastDay": true,

   "snapshotSchedule": {

     "selectedMonths": [

       "January"

     ],

     "snapshotsToKeep": 0

   },

   "backupSchedule": {

     "selectedMonths": [

       "January"

     ],

     "retention": {

       "timeRetentionDuration": 0,

       "retentionDurationType": "Days"

     },

     "targetRepositoryId": "14"

   }

 },

 "yearlySchedule": {

   "startTime": 0,

   "month": "January",

   "type": "First",

   "dayOfWeek": "Sunday",

   "dayOfMonth": 0,

   "yearlyLastDay": true,

   "retentionYearsCount": 0,

   "targetRepositoryId": "string"

 }

}

 

 

Response:

200

 

Response body:

Download file

I want to report a typo

There is a misspelling right here:

 

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