Dashboard: API tokens

Note

In the default configuration, this section of the personal dashboard is available only to users in the Administrative and Technical groups.

In the API tokens section of the dashboard, you can add or delete tokens for authorization in the Qrator API. Each token can be individually assigned a set of API methods that you will be able to call using it.

View list of tokens

The API tokens section displays a table with all the active tokens for the account.

The following columns are available:

  • Token value — the string that should be passed in a HTTP header for the authorization in Qrator API.

    The string is displayed in a short form. Click on it to copy the full string to clipboard.

  • Comment — the comment, as entered when adding tor editing he token. May be empty.

  • Policies — the number of policies added for the token.

    Sometimes, this value corresponds to the number of API methods that can be called using the token. However, in some cases, the actual number of methods can be greater (when using the Any client's method or Any resource's method policies).

Add a token

  1. In the API tokens section, click the Add API-token button. A dialog for adding a token will appear.

  2. Enter the Comment for the token. You can leave the field empty.

    It is recommended to use the commend to describe who and for what will use the token. This will allow to easier find the token to edit it later.

  3. Add one or more policies. The set of policies defines which API methods you will be able to use with this token.

    To add a policy related to a Qrator API client method:

    1. Click Add policy. A dialog for adding a policy will appear.
    2. In the dropdown list, select a client method name or the Any client's method policy.
    3. Click Save.

    To add a policy related to a Qrator API domain method or service methods:

    1. Click Add policy. A dialog for adding a policy will appear.
    2. In the dropdown list, select a resource method name or the Any resource's method policy.
    3. Select one or more resources (domains or services) to which the policy should apply, or check the Any resource checkbox.
    4. Click Save.

    To cancel adding a policy, click next to its name.

  4. Click Add to finish adding the token.

    You can copy the token by clicking on the value in the first column.

Edit a token

  1. In the API tokens section, click next to the token that you want to edit.

  2. If necessary, edit the Comment for the token.

  3. If necessary, edit the list of policies for the token.

    To add a policy related to a Qrator API client method:

    1. Click Add policy. A dialog for adding a policy will appear.
    2. In the dropdown list, select a client method name or the Any client's method policy.
    3. Click Save.

    To add a policy related to a Qrator API domain method or service methods:

    1. Click Add policy. A dialog for adding a policy will appear.
    2. In the dropdown list, select a resource method name or the Any resource's method policy.
    3. Select one or more resources (domains or services) to which the policy should apply, or check the Any resource checkbox.
    4. Click Save.

    To delete a policy, click next to its name.

  4. Click Edit to save the changes and close the dialog.

Delete a token

  1. In the API tokens section, click next to the token that you want to delete.

  2. Confirm the action by clicking Delete in the dialog that appears.

expand_less