Authorizing RESTful API Requests in <API_Explorer>

Updated

On this page

Commvault REST APIs support token-based authentication via the Authtoken request header. The POST Login API is used to retrieve the authentication token. After the authentication token is obtained, you can configure the <API_Explorer> to include the Authtoken header in all of your requests within a browser session.

Procedure

  1. Open <API_Explorer>.

  2. Under Login, click POST /Login.

  3. In the upper-right corner of the POST /Login box, click Try it out.

  4. In the model box, edit the JSON login model as follows:

    Parameter

    Description

    Data Type

    domain

    The domain of the user. If there is no domain, you may leave this parameter blank.

    string

    username

    The user name to use for authentication.

    string

    password

    The base64 encoded password for the provided user name.

    string (base64 encoded)

  5. Click Execute.

  6. Under Server Response, copy the value of the token key from the response body.

  7. On the top-right side of the <API_Explorer> page, click Authorize.

  8. In the Available authorizations dialog box, enter the authorization token, and then click Authorize.