Authorization with Swagger UI
Veeam Backup for Nutanix AHV REST API authorization with the Swagger UI involves the following procedures:
- Obtain an access token and a refresh token:
- On the Veeam Backup for Nutanix AHV public API page, expand the Token resource and click POST api/oauth2/token.
- In the expanded method window, click Try it out.
- From the grantType drop-down list, select Password.
- In the userName and password fields, specify the credentials of a user created in Veeam Backup for Nutanix AHV.
- Click Execute.
Wait for the response from the server. A successfully completed operation returns the 200 response code. In the response body, Veeam Backup for Nutanix AHV returns an access token, a refresh token and expiration time of each token.
- Save the access and refresh token locally for further use.
Tip |
You can download a server response in the .json format. To do that, in the expanded method window, click Download at the lower right corner of the Response body field. |
- Authorize your access in the Swagger UI:
- At the top right corner of the Veeam Backup for Nutanix AHV public API page, click Authorize.
- In the Available authorizations window, insert the access token saved locally in the Value field. Use the Bearer <access_token> format.
- Click Authorize.
- When the access token expires, use the refresh token:
- On the Veeam Backup for Nutanix AHV public API page, expand the Token resource and click POST api/v6/token.
- In the expanded method window, click Try it out.
- From the grantType drop-down list, select RefreshToken.
- In the refreshToken field, insert the refresh token saved locally, and click Execute.
Wait for the response from the server. A successfully completed operation returns the 200 response code and a new pair of tokens in the response body.
- Save the access and refresh token locally for further use. To authorize your access in the Swagger UI, repeat step 2.
- When you finish working with the Swagger UI:
- At the top right corner of the Veeam Backup for Nutanix AHV public API page, click Authorize.
- In the Available authorizations window, click Logout.