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. Access token expires after 1 hour.
- 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:
|
Simultaneous sessions initiated in different client applications under the same user credentials may interfere with each other. To avoid unexpected logout, use a different user account for every application. |
|
To learn how to authorize your access using a client application, you can review the Example Requests and Responses section. Alternatively, you can use Swagger UI. |
Example Requests and Responses
In the body of the request, the client specifies the following parameters:
Request: POST https://localhost:1281/token
Request Header: Content-Type: application/json Authorization: Bearer
Request Body: grant_type=password&username=vac\administrator&password=Password1 |
The server sends a response in the following format.
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_ZZ1tEFnZ3K8W0JFuJFKjoil8RO4TgyfVfZCrAxHkNI03NJ6miVcEAxkAyZN7Zkleu1jnZg5hT05KsZSGSgaBkAqsn49heMz3qkMTUaxZIi7 } |
In the body of the request, the client specifies the following values for the parameters:
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_ZZ1tEFnZ3K8W0JFuJFKjoil8RO4TgyfVfZCrAxHkNI03NJ6miVcEAxkAyZN7Zkleu1jnZg5hT05KsZSGSgaBkAqsn49heMz3qkMTUaxZIi7 |
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 |
The server sends a response in the following format.
Response body { "message": "Logout successful" } |