Wavefront is fully API driven. This means that all interactions between the Wavefront UI and your Wavefront instance occur through the Wavefront API.
The current version of the API is v2 and is accessed at
<wavefront_instance>/api/v2. While Wavefront recommends that you move to the v2 API, the v1 API (
<wavefront_instance>/api/), though deprecated, is still supported.
The API is publicly documented in the Swagger generated API documentation. To access the API documentation from the Wavefront UI, click the gear icon at the top right of the task bar and select API Documentation.
Wavefront supports the following API categories:
- Alert - Allows all users to retrieve all active, snoozed, in-maintenance, and invalid alerts. Users with Alert Management permission can create and update alerts.
- Cloud Integration - Allows all users to retrieve cloud integration data types such as those available with the AWS integration. Users with Proxy Management permission can add and remove cloud integration data types.
- Dashboard - Allows all users to retrieve data about dashboards, list dashboards, and return version history. Users with Dashboard Management permission can save, create, delete, clone, undelete dashboards.
- Event - Allows all users to retrieve events and tags associated with a specific event. Users with Event Management permission can create, update, and delete events. Deleting events is limited to non-system events. System events include events based on alert firings, error events, and maintenance windows.
- External Link - Allows all users to navigate external links. Users with External Links Management permission can create, update, and delete external links.
- Integration - Allow all users to retrieve integrations. Users with Integration Management permission can install and uninstall integration dashboards.
- Maintenance Window - Allows all users to retrieve a complete or filtered list of existing maintenance windows. Users with Alert Management permission can create, close, update, and delete maintenance windows.
- Message - Allows all users to retrieve messages and mark messages read.
- Metric - Allows all users to retrieve details on a metric.
- Proxy - Allows all users to retrieve information about Wavefront proxies. Users with Proxy Management permission can add and remove Wavefront proxies.
- Query - Allows all users to perform queries.
- Saved Search - Allows all users to retrieve, add, and remove saved searches.
- Search - Allows all users to search agents, alerts, integrations, dashboards, external links, maintenance windows, sources, and web hooks.
- Source - Allows all users to retrieve sources and tags associated with a source. Users with Source Tag Management permission can add and remove source tags and set descriptions.
- User - Allows users with User Management permission to retrieve a list of all users, create, update, and delete users, and manage permissions.
- Webhook - Allows all users to retrieve webhooks. Users with Alert Management permission can create, update, and delete webhooks.
Invoking the API
When invoking the API outside of the Wavefront UI, you must pass a Wavefront API token in the
Authorization: Bearer header. For example, to return all alerts, invoke the following:
curl 'https://<wavefront_instance>/api/v2/alert' --header 'Authorization: Bearer <wavefront_api_token>'
A Wavefront API token is a string of hexadecimal characters and dashes. For example:
Generating an API Token
To generate an API token:
- In the Wavefront UI, click the gear icon at the top right of the task bar and select your username.
- At the bottom of your user profile, locate the section API Access.
- Click Generate. You can have up to 2 tokens at any given time. If you want to generate a new token but already have two tokens, then you must revoke one of the existing tokens by clicking the Revoke link next to a token. If you create an API script using a token, and that token is revoked, that script will return an authorization error.
Wavefront provides SDKs in several languages for accessing the Wavefront API and integrations for sending metrics from applications written in Go and Java:
|Language||V1 SDK||V2 SDK||Metrics|
|Go||NA||NA||Go Metrics Integration|
|Java||Wavefront Java client||NA||DropWizard Java Metrics Integration|
|Python||Wavefront Python client||Wavefront Python client||NA|
|Ruby||Wavefront Ruby client||NA||NA|