Before you can invoke the REST API using curl
or from an API client, you must have an API token. An API token is a string of hexadecimal characters and dashes. For example:
a411c16b-3cf7-4f03-bf11-8ca05aab898d
Operations for Applications allows user accounts and service accounts to use the REST API.
Generate and Manage the API Tokens for Your User Account
- Log in to your service instance (
https://<your_instance>.wavefront.com
) as user with the API Tokens permission. - Click the gear icon at the top right of the toolbar and select your user name.
-
On the API Access tab, click Generate.
You can have up to 20 tokens at any given time. If you want to generate a new token but already have 20 tokens, then you must revoke one of the existing tokens.
-
To revoke a token, click the Revoke button for the token.
If you run a script that uses a revoked token, the script returns an authorization error.
- To add a name or rename an API token, click the Edit icon for the token, enter the name, and press Enter.
Generate and Manage the API Tokens for a Service Account
As a user with the Accounts permission, you can generate API tokens for service accounts upon creation or at a later stage. To generate an API token for an existing service account:
- Log in to your service instance (
https://<your_instance>.wavefront.com
) as a user with the Accounts permission. - Click the gear icon at the top right of the toolbar and select Accounts.
- On the Service Accounts tab, click the ellipsis icon next to the service account for which you want to generate an API token, and select Edit.
-
To generate a new token, in the Tokens section, click Generate.
You can have up to 20 tokens per service account at any given time. If you want to generate a new token but already have 20 tokens, then you must revoke one of the existing tokens.
-
To revoke a token, click the Revoke button for the token.
Revoking a token cannot be undone.
- To rename an API token, click the Edit icon for the token, enter the name, and press Enter.
- Select the appropriate permissions for the service account and click Update.
View and Manage the API Tokens in Your Organization
As a user with the Accounts permission, you can view and revoke the API token of any user or service account in your organization.
- Log in to your product instance as a user with the Accounts permission.
- Click the gear icon at the top right of the toolbar and select Accounts.
- Click the API Tokens tab.
You see the API tokens for all user and service accounts in a paginated table format.
On the API Tokens page, you can:
- Sort the API tokens table by column.
- Search and, optionally, save and share your search.
- Filter the API tokens by account type, usage, particular accounts, or your saved search.
- Revoke an API token from the vertical ellipsis icon for the token.