Learn how to use the REST API outside of the in-product API documentation UI.

The REST API enables you to interact with the Wavefront service by using standard REST API tools. You can use the REST API to automate commonly executed operations, for example, to tag sources automatically.

When you make REST API calls outside the REST API documentation UI, you must use an API token to authenticate. See Managing API Tokens.

Make API Calls by Using a User Account

If you want to use your own user account to make the REST API calls, use an API token associated with your user account:

  1. Log in to your Wavefront instance.
  2. Click the gear icon on the toolbar and click your user name.
  3. On the API Access tab, click the Copy icon next to the API token that you want to use.
  4. If you use curl, and want to get information about all cloud integrations in your environment, run:

    curl 'https://<your_wavefront_instance>/api/v2/cloudintegration' -H 'Authorization: Bearer <your_api_token>'
    

    Here, <your_wavefront_instance> is the name of your Wavefront instance, and <your_api_token> is the API token for your user account.

Make API Calls by Using a Service Account

If you want to use a service account to make the REST API calls, use an API token associated with that service account.

  1. Log in to your Wavefront instance.
  2. Click the gear icon on the toolbar and click Accounts.
  3. On the Service Accounts tab, click the service account that you want to use.
  4. Click the Copy icon next to the API token that you want to use.
  5. If you use curl, and want to get information about all cloud integrations in your environment, run:

    curl 'https://<your_wavefront_instance>/api/v2/cloudintegration' -H      'Authorization: Bearer <service_account_api_token>'
    

    Here, <your_wavefront_instance> is the name of your Wavefront instance, and <service_account_api_token> is the API token for the service account.