Getting Authorization Tokens
Veeam ONE REST API authorization with Swagger UI involves the following procedures:
- Obtain a pair of tokens:
- On the Veeam ONE REST API page, expand the Authentication tag and click POST /api/token.
- In the expanded method window, click Try it out.
- In the username and password fields, specify the user credentials.
- Click Execute.
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.
- Save the refresh token locally for further use.
- Validate the access token:
- At the top right corner of the page, click Authorize.
The Available authorizations window will open.
- In the Value field, provide the access token in the Bearer <access_token> format.
- Click Authorize.
- When the access token expires, use the refresh token:
- On the Veeam ONE REST API page, expand the Authentication tag and click POST /api/token.
- In the expanded method window, click Try it out.
- From the grant_type drop-down list, select refresh_token.
- In the refresh_token field, insert the refresh token saved locally.
- Click Execute.
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.
- When you finish working with Veeam ONE REST API:
- At the top right corner of the page, click Authorize.
The Available authorizations window will open.
- Click Logout.