Loading...

Authorizing RESTful API Requests inAPI Explorer

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.

Last modified: 1/4/2019 7:41:22 PM