Evaluation in Swagger UI

In this article

    You can use the Swagger UI to evaluate and explore capabilities of Veeam Backup for Microsoft Office 365 REST API. The Swagger UI framework allows you to interact with Veeam Backup for Microsoft Office 365 REST API in a sandbox UI. With such an approach, you can test how the API responds to parameters and requests.

    To access the Swagger UI for Veeam Backup for Microsoft Office 365 REST API, in a web browser, navigate to the following URL:

    https://<hostname>:<port>/swagger/ui/index

    where:

    • <hostname> is the DNS name or IP address of the server where Veeam Backup for Microsoft Office 365 is installed.
    • <port> is the port number. The default port number is 4443.

    Obtaining Authorization Token

    To start working with Swagger UI, you must first authorize your access to Veeam Backup for Microsoft Office 365 REST 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:

    1. In Swagger UI, choose the API version v5 on top of the page.

    Evaluation in Swagger UI 

    1. Expand the Auth resource and click POST /v5/token.
    2. In the grant_type drop-down list, make sure that the password (default) value is selected.
    3. In the username and password fields, specify credentials for authenticating with the Veeam Backup for Microsoft Office 365 server.
    4. Click Try it out.

    Evaluation in Swagger UI 

    Evaluation in Swagger UI Note

    The client_id and assertion parameters are used in the scenario of data restore for Office 365 organizations with modern app-only authentication and enabled security defaults. For more information, see Authorization for Organizations with Modern App-Only Authentication.

    Adding Authorization Token

    Wait for the response from the server. A successfully completed operation returns the 200 OK response code. In the response body, Veeam Backup for Microsoft Office 365 returns an access token, its expiration time and a refresh token.

    Evaluation in Swagger UI 

    Check that the access token is inserted in the api_key field in the Bearer <access_token> format and click Explore.

    Evaluation in Swagger UI 

    When the access token expires, you can either obtain a new access token or renew the access token using the refresh token.

    To use the refresh token, perform the following steps:

    1. Expand the Auth resource and click POST /v5/token.
    2. From the grant_type drop-down list, select refresh_token.
    3. In the refresh_token field, insert the refresh token.
    4. Click Try it out.

    Evaluation in Swagger UI 

    Wait for the response from the server. A successfully completed operation returns the 200 OK response code and a new pair of tokens in the response body.

    Sending Request

    To send a request, select the required resource and request method, enter parameters if required and click Try it out.

    Evaluation in Swagger UI 

    Getting Response

    The server returns a response to the successful request command.

    I want to report a typo

    There is a misspelling right here:

     

    I want to let the Veeam Documentation Team know about that.