
Getting Authorization Tokens
VAO REST API authorization with Swagger UI involves the following procedures:
- On the Veeam Availability Orchestrator REST API page, expand the Accounts resource and click POST /v2/Token.
- From the grant_type drop-down list, select password (default).
- In the username and password fields, specify the credentials of an account with the VAO Administrator or Plan Author privileges.
- Click Try it out.
Wait for the response from the server. A successfully completed operation returns the 200 Success response code. In the response body, VAO returns an access token, a refresh token and a client ID.
- Save the refresh token and client ID locally for further use.
|
If you lose the refresh token, you can log in again under the same user account and get a new pair of tokens. In this case, the client ID will remain the same and you will be able to continue working under the same client account. |
- Make sure that the access token is automatically inserted in the api_key field at the top of the page.
- At the top of the page, in the api_key field, click Explore.
Generate a child client account:
- On the Veeam Availability Orchestrator REST API page, expand the Accounts resource and click POST /v2/Clients.
- Click Try it out.
Wait for the response from the server. A successfully completed operation returns the 200 Success response code. In the response body, VAO returns a child client ID and client secret.
- Save the child client ID and client secret locally for further use.
|
If you lose the client secret, you will have to create a new child client account. The child client whose client secret was lost become useless and can be deleted by the root client. |
Obtain an access under the child client account:
- On the Veeam Availability Orchestrator REST API page, expand the Accounts resource and click POST /v2/Token.
- From the grant_type drop-down list, select client_credentials.
- In the client_id and client_secret fields, specify the credentials of the child client account.
- Click Try it out.
Wait for the response from the server. A successfully completed operation returns the 200 Success response code. In the response body, VAO returns access and refresh tokens.
- Save the refresh token locally for further use.
|
If you lose the refresh token, you can log in again under the same client ID and client secret. In this case, you will get a new pair of tokens. |
- Make sure that the access token is automatically inserted in the api_key field at the top of the page.
- At the top of the page, in the api_key field, click Explore.
- When the access token expires, use the refresh token:
- On the Veeam Availability Orchestrator REST API page, expand the Accounts resource and click POST /v2/Token.
- From the grant_type drop-down list, select refresh_token.
- In the client_id field, insert the ID of the client whose token has expired.
- In the refresh_token field, insert the refresh token saved locally.
- Click Try it out.
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.
- Get the root client ID and all child client IDs related to this root client account:
- On the Veeam Availability Orchestrator REST API page, expand the Accounts resource and click GET /v2/Clients.
- Click Try it out.
прапро
|
A child client account can get only its own ID. |
- On the Veeam Availability Orchestrator REST API page, expand the Accounts resource and click DELETE /v2/Clients.
- In the client_id field, insert the ID of the client that you want to delete.
- Click Try it out.
Wait for the response from the server. A successfully completed operation returns the 200 Success response code.
Related Topics