Help Center
Choose product document...
Veeam Availability Console 2.0
RESTful API Reference

Authorization and Security

To start working with Veeam Availability Console RESTful API, clients must first authenticate themselves. Veeam Availability Console RESTful API authorization process is based on the OAuth 2.0 Authorization Framework and involves obtaining an access token and a refresh token.

  • Access token is a string that represents authorization issued to the client and must be used in all requests during the current logon session.
  • Refresh token is a string that represents authorization granted to the client and can be used to obtain a new access token when the current access token expires.

Veeam Availability Console RESTful API authorization process involves the following procedures:

  1. To obtain a pair of tokens, send the POST HTTPS request to the Veeam Availability Console token path. In the request body, enter the credentials of a user with the Veeam Availability Console Portal Administrator privileges.

Request:

POST https://localhost:1281/token

 

Request Header:

Content-Type: application/json

Authorization: Bearer

 

Request Body:

grant_type=password&username=vac\administrator&password=Password1

Wait for the response from the server. A successfully completed operation returns the 200 Success response code and an access and a refresh token in the response body.

Response Code:

200 Success

Response Body:

{

 "access_token": "908qldKH7ZZRfCqeWBNVVbnIM5UxisItP6gSnU_pZ5-qDenA5I2T0XvynyoELoEFmUUzm17_WuodIl1yRnneI15UzsgFnxlsHdhH9KQKFWKrR08PKRh-wL_NXj8PirXUa4PjK3Dx1pE-qCJh23FrrljIjsNjWeDFd63yY4j8ldyqP7fdx6bmp-hWwergK7va89AKEuYzIr_IQNir2yZMgVnXR-FqyEVw_xf_e3sFGJw",

 "token_type": "bearer",

 "expires_in": 3599,

 "refresh_token": "EVU7FlFLT2emhwfwnbwM-RiuD0oHjCIGTGeAvT7xOk_IZeTrwDLiPMEJIvqqd6rb-t0SbUnaxUL3Hq_ZZ1tEFnZ3K8W0JFuJFKjoil8RO4TgyfVfZCrAxHkNI03NJ6miVcEAxkAyZN7Zkleu1jnZg5hT05KsZSGSgaBkAqsn49heMz3qkMTUaxZIi7J4Uam-nPbgEd04bmrUfOhOmckjMPmUYZ_QhrPFR2NpiGxmzuQ"

}

Copy both tokens. Insert the access token in headers of further requests to Veeam Availability Console RESTful API. The refresh token must be saved locally.

  1. When the access token expires, or becomes invalid, use the refresh token to obtain a new pair of tokens. Send the POST HTTPS request to the Veeam Availability Console RESTful API token path. In the request body, enter the refresh token.

Request:

POST https://localhost:1281/token

 

Request Header:

Content-Type: application/json

Authorization: Bearer

 

Request Body:

grant_type=refresh_token&refresh_token=EVU7FlFLT2emhwfwnbwM-RiuD0oHjCIGTGeAvT7xOk_IZeTrwDLiPMEJIvqqd6rb-t0SbUnaxUL3Hq_ZZ1tEFnZ3K8W0JFuJFKjoil8RO4TgyfVfZCrAxHkNI03NJ6miVcEAxkAyZN7Zkleu1jnZg5hT05KsZSGSgaBkAqsn49heMz3qkMTUaxZIi7J4Uam-nPbgEd04bmrUfOhOmckjMPmUYZ_QhrPFR2NpiGxmzuQ

Wait for the response from the server. A successfully completed operation returns the 200 Success response code and a new pair of tokens in the response body.

  1. When you finish working with Veeam Availability Console RESTful API, log out by sending the POST HTTPS request to the v2/Accounts/Logout path. A successfully completed operation returns the 200 Success response code and the “Logout successful” message in the response body.

Request:

POST https://localhost:1281/v2/Accounts/Logout

 

Request Header:

Content-Type: application/json

Authorization: Bearer 908qldKH7ZZRfCqeWBNVVbnIM5UxisItP6gSnU_pZ5-qDenA5I2T0XvynyoELoEFmUUzm17_WuodIl1yRnneI15UzsgFnxlsHdhH9KQKFWKrR08PKRh-wL_NXj8PirXUa4PjK3Dx1pE-qCJh23FrrljIjsNjWeDFd63yY4j8ldyqP7fdx6bmp-hWwergK7va89AKEuYzIr_IQNir2yZMgVnXR-FqyEVw_xf_e3sFGJw

 

Response body:

{

 "message": "Logout successful"

}

Veeam Large Logo

Deployment Guide

Migration Guide

Administrator Guide for Service Providers

User Guide for Service Providers

Evaluator's Guide for Service Providers

Administrator Guide for Enterprises

User Guide for Enterprises

Evaluator's Guide for Enterprises

RESTful API Reference