The Admin API Keys view

The Admin API Keys view displays a list of API Keys that are allocated to teams and users. Using the tools in this view, you can assign users with keys which support and control the activities they can perform via the Eyes API, such as:

  • Running tests

  • Viewing test results

  • Extracting data from the test results

  • Editing and saving tests

  • Accepting or rejecting checkpoint diffs

  • Updating baselines

  • Merging branch baselines

This section covers the API Keys view and the operations you can perform.

  1. API Keys view layout.

  2. The Admin API Keys view.

  3. Adding new API Keys.

  4. Editing an API key.

  5. Copying an API key.

  6. Deleting API keys

API Keys view layout

To access the API Keys view, on the Admin panel, click the Teams tile.

This opens a view that shows all API keys for the account with their properties. The toolbar buttons enable you to filter and group the API keys list, and manage it by adding, modifying, or deleting keys. Click on a row to change the API key properties.

The API Keys view displays a table in which each row lists an API key associated with a team or team member.

API Key details displayed by default in the table are:

  1. Key – Lists the actual API Key (display-only). The API key is issued to users by name and should be treated as confidential.

  2. Team – The name of the team with which the API key is associated.

  3. User – The name of the user with which the API key is associated.

  4. Permissions – The permission types assigned to the API key (see API key permission types).

  5. Purpose – Optional description of what the API is used for.

  6. Expires At – Date that the API key expires. If this field is blank, the key does not expire.

  7. Last Access – The most recent time the API key was used.

Click to view additional columns:

  1. Team ID – Internal ID that is assigned to the team when the team is created. Customer Services may request the ID when handling a customer request that relates to the team.

  2. Created At – The date and time when the API key was created.

  3. Created By – The name of the administrator that created the API key.

  4. Disabled – Indicates that the API key has been disabled.

  5. Expired – Indicates that the API key has expired (see Setting the API key expiry date).

API key permission types

You can assign the following permissions to an API key:

  1. Read – Allows users to access tests and test results, but does not allow them to execute tests, change data through the API, or make changes to the tests.

  2. Execute – Allows users to execute tests but does not allow them to access the tests and test results, change data through the API, or make changes to the tests.

  3. Write – Allows users to access the test results, make and save changes to test results, save such changes to the baselines, and merge branch baselines.

  4. Merge – Allows users to use the API to merge branch baselines but does not support read, execute, or any write operations other than merging branches.

Test Manager user permissions and API Key permissions

When you assign an API key to a user, the API Key permissions can only include a subset of the permissions that are set for their given team. If the user's team has View only user permissions, the user cannot be granted an API Key with more extensive permissions (e.g. write permissions).

Adding new API Keys

You can add a new API key in the Add API key dialog box.

To add a new API Key:

  1. Click Add a new API Key to open the Add API key dialog box.

  2. Select a team from the Team drop-down menu.

  3. Enter the user's email address in the User edit box. Skip this step if you want to create an API Key for a Team only.

  4. Select the required Permissions.

  5. Optionally, enter a description for the API key in the Purpose edit field.

  6. Click Add.

Editing an API key

You may need to modify an API key’s parameters.

To edit an API Key:

  1. In the API Keys view click on a row to open the Edit API Key dialog box.

  2. Make any required changes to the API Key parameters:

    • Enable / Disable – Disabling an API Key prevents the team or user from using the API to perform test activities that are supported by the key. Disabling the use of an API Key in this way allows you to enable its use at a later time as opposed to deleting the API Key, which erases the key from the system.

    • Permissions – Select the required Permissions.

    • Expiry – You can set an expiry date for an API Key. If you reach the expiry date, the API Key is disabled and users are prevented from using that API Key.

  3. Click Apply to save the changes and close the Edit API Key dialog box.

If a key has been disabled or expired, an icon appears next to the key

Copying an API key

To allow tests to interact with Eyes you must set the relevant API Key in your application code using configuration.setApiKey. Alternatively you can set the environment variable APPLITOOLS_API_KEY to the value of the API key. For that purpose, you can copy an API Key to the clipboard from the API Keys view or from the Edit API Key dialog box.

To copy an API key:

  1. In the API Keys view, hover over a key and click Copy key to clipboard

See also How to retrieve your API keythis latter method is convenient for use by users who are do not have admin rights and can not access the admin pages.

Deleting API keys

To delete keys, select the required keys and click .