You can utilize Swagger UI to evaluate capabilities of Veeam Backup for Microsoft Office 365 RESTful API. The Swagger UI framework allows to interact with Veeam Backup for Microsoft Office 365 RESTful API in a sandbox UI. With such approach, you can test how the API responds to parameters and requests.
Swagger UI can be accessed via the Internet browser by the following URL:
- <Backup-Office365> is the DNS name or IP address of the server where Veeam Backup for Microsoft Office 365 is installed.
- <Port> is the port number. Default: 4443.
Obtaining Authorization Token
To start working with Swagger UI, you must first authorize your access to Veeam Backup for Microsoft Office 365 RESTful API resources.
Authorization process involves obtaining an authorization token that must be used in all requests during the session. To obtain an authorization token, perform the following steps:
- In Swagger UI choose the API version v2 on top of the page.
- Expand the Auth resource and click POST v2/token resource.
- For the grant_type parameter, make sure that password (default) value is chosen.
- For the username and password parameters enter the credentials for authenticating with the Veeam Backup for Microsoft Office 365 server and click Try it out!
Adding Authorization Token
Wait for the response from the server. A successfully completed operation returns response code 200, an access and a refresh token in the response body.
Check that the access token is inserted in the api_key field in the Bearer <access_token> format and click Explore.
If the access token expires you can either obtain it again or renew using refresh token.
To use the refresh token, perform the following steps:
- Expand the Auth resource and click POST /v2/token
- Select the refresh_token value in the grant_type drop-down list.
- Insert the refresh token in the refresh_token field
- Click Try it out!
Wait for the response from the server. A successfully completed operation returns response code 200 and a new pair of tokens in the response body.
Choose the resource and the request method, add parameters (if needed) and click Try it out! to send the request.
The server will return the corresponding response to the successful request command.