Authorization Examples
The Swagger UI allows a user to try the following Orchestrator REST API authorization procedures:
- Obtaining authorization tokens.
- Creating clients.
- Obtaining authorization tokens under a client account.
- Using a refresh token.
- Getting a list of clients.
- Deleting clients.
- Logging out from the Orchestrator REST API.
Obtaining Authorization Tokens
To obtain an access token and a refresh token:
- On the Veeam Recovery Orchestrator REST API 7.1 page, expand the Token resource and click POST /api/token.
- Click Try it out.
- From the grant_type drop-down list, select password.
- In the username and password fields, specify the credentials of an account with the Orchestrator Administrator or Plan Author privileges. The user name must be specified in the DOMAIN\USERNAME or USERNAME format.
- Click Execute.
Wait for the response from the server. A successfully completed operation returns the 200 response code. In the response body, Orchestrator returns an access token, its expiration time and a refresh token.
- Save the refresh token locally for further use.
To create a client account:
- On the Veeam Recovery Orchestrator REST API 7.1 page, expand the Clients resource and click POST /api/v7.1/Clients.
- Click Try it out and then click Execute.
Wait for the response from the server. A successfully completed operation returns the 200 response code. In the response body, Orchestrator returns a client ID and client secret.
- Save the child client ID and client secret locally for further use.
Note |
Clients cannot create new client accounts. |
Obtaining Authorization Tokens Under Client Account
To obtain an access token and a refresh token using client credentials:
- On the Veeam Recovery Orchestrator REST API 7.1 page, expand the Token resource and click POST /api/token.
- Click Try it out.
- From the grant_type drop-down list, select client_credentials.
- In the client_id and client_secret fields, specify credentials of a client account.
- Click Execute.
Wait for the response from the server. A successfully completed operation returns the 200 response code. In the response body, Orchestrator returns an access token, its expiration time and a refresh token.
- Save the refresh token locally for further use.
To obtain a new pair of tokens using a refresh token:
- On the Veeam Recovery Orchestrator REST API 7.1 page, expand the Token resource and click POST /api/token.
- From the grant_type drop-down list, select refresh_token.
- 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 code and a new pair of tokens in the response body.
To get all client IDs related to a user account:
- On the Veeam Recovery Orchestrator REST API 7.1 page, expand the Clients resource and click GET /api/v7.1/Clients.
- Click Try it out and then click Execute.
Wait for the response from the server. A successfully completed operation returns the 200 response code and a list of client IDs in the response body.
Note |
A client can get only its own client ID. |
To delete a client account:
- On the Veeam Recovery Orchestrator REST API 7.1 page, expand the Clients resource and click DELETE /api/v7.1/Clients.
- Click Try it out.
- In the clientId field, insert the ID of the client that you want to delete.
- Click Execute.
Wait for the response from the server. A successfully completed operation returns the 204 response code.
Note |
A user can delete all related client accounts. A client can delete only his own client account. |
To log out from the Orchestrator REST API:
- On the Veeam Recovery Orchestrator REST API 7.1 page, expand the Token resource and click DELETE /api/token.
- Click Try it out and then click Execute.
Wait for the response from the server. A successfully completed operation returns the 204 response code.
Related Topics