Authorization with Swagger UI

In this article

    Veeam Backup for AWS REST API authorization with the Swagger UI involves the following procedures:

    1. Obtain an access token and a refresh token:
    1. On the Veeam Backup for AWS public API page, expand the Token resource and click POST api/v1/token.
    2. In the expanded method window, click Try it out.

    Getting Authorization Token

    1. From the grant_type drop-down list, select password.
    2. In the username and password fields, specify the credentials of a user created in Veeam Backup for AWS.

    Note

    To learn how to obtain an access token for a user whose identity has been retrieved from the identity provider, see Authorization (Single Sign-On).

    1. Click Execute.

    Getting Authorization Token - Enter Credentials

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

    Note

    If MFA is enabled for the user, Veeam Backup for AWS returns an mfa token in the response body. To learn how to obtain an access token and a refresh token when MFA is enabled, see Requesting Authorization.

    Getting Authorization Token — Server Response

    1. 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.

    1. Authorize your access in the Swagger UI:
    1. At the top right corner of the Veeam Backup for AWS public API page, click Authorize.

    Getting Authorization

    1. In the Available authorizations window, insert the access token saved locally in the Value field. Use the Bearer <access_token> format.

    Available Authorizations Window

    1. Click Authorize.
    1. When the access token expires, use the refresh token:
    1. On the Veeam Backup for AWS public API page, expand the Token resource and click POST api/v1/token.
    2. In the expanded method window, click Try it out.
    3. From the grant_type drop-down list, select refresh_token.
    4. In the refresh_token field, insert the refresh token saved locally, and click Execute.

    Refresh Token

    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.

    Refresh Token — Server Response

    1. Save the access and refresh token locally for further use. To authorize your access in the Swagger UI, repeat step 2.
    1. When you finish working with the Swagger UI:
    1. At the top right corner of the Veeam Backup for AWS public API page, click Authorize.
    2. In the Available authorizations window, click Logout.

    Logging Out