Learn about the REST API for managing VMware Aria Operations for Applications (previously known as Tanzu Observability by Wavefront).

The REST API enables you to write scripts to perform management tasks, such as defining alerts and creating events. You can use the REST API to perform any task that is supported by the Operations for Applications GUI. The REST API is based on Swagger, so you can generate the API client of your choice (including a CLI client).

REST API Overview

All interactions between the UI and your product instance occur through the API. You can perform those actions using REST - or you can create an API client using Swagger, discussed below.

The current version of the REST API is v2. You can access the API at <your_instance>/api/v2. The v1 API (<your_instance>/api/) was deprecated in 2017 and is no longer supported.

API Documentation (Service Instance)

Each Operations for Applications service instance includes Swagger-generated documentation for the REST API. In our blog post Did You Know that Our API Docs Are Alive we explain how you can experiment with our API directly from this in-product documentation.

To access the Operations for Applications REST API documentation:

  1. Log in to your product instance.
  2. Display the doc from the UI or using a URL:
    • In the UI, click the gear icon at the top right of the toolbar and select API Documentation.
    • Type https://<your_instance>.com/api-docs/ui/

REST API in a product instance

API Documentation (VMware Developer)

If you don’t have access to a service instance, you can have a look at our Operations for Applications API doc on the VMware Developer website.

We include an overview and a Swagger-generated API Reference. We update the reference on a regular basis.

REST API in VMware Developer

The VMware Developer website also includes some samples, for example, for getting data into Operations for Applications. We’re providing these samples as is - some are from our team, others will come from the community.

Invoking the Operations for Applications REST API

You can invoke the API using curl or from an API client. In either case, you must use a token.

The token that you need depends on your subscription type.

  • For VMware Cloud services subscriptions, invoking the Operations for Application REST API requires a VMware Cloud services access token.
  • For original subscriptions, invoking the Operations for Application REST API requires an Operations for Application API token.

See Use the Operations for Applications REST API for details and examples.

Generate an API Client Using Swagger

Because we expose the REST API via Swagger, you can generate a working implementation of the API for the programming language or CLI you want to use.

Here’s an example for generating a Java client:

  1. Create a file swagger-config.json. Here’s an example:
    {
    "modelPackage": "com.wavefront.rest.models",
    "apiPackage": "com.wavefront.rest.api.client",
    "groupId": "com.wavefront.rest.api.client",
    "artifactId": "wavefront-java-sdk",
    "artifactVersion": "19.10",
    "sourceFolder": "src/main/java",
    "java8": true,
    "dateLibrary": "java8"
    }
    
  2. Generate the client, for example:

swagger-codegen generate -i https://mydomain.wavefront.com/api/v2/swagger.json -c swagger-config.json -l java

Operations for Applications REST API Categories

The REST API supports the following objects corresponding to different categories of management tasks:

Notes on the Access Category

The /api/access/{entity} endpoint provides information on how often an entity has been accessed. Supported entities are metric, histogram, span.

This GET endpoint has the following parameters:

ParameterDescription
name Entity name, e.g, cpu.usage (for a metric).
hostPrefix Prefix of the host name, e.g. you can use test-2a-app67 if the whole host name is test-2a-app67-id-12345
Warning:hostPrefix must be somewhat specific. There's a limit on how many hosts VMware Aria Operations for Applications scans.
usageThresholdDays How many days to look back. 7 days by default.
includeDailyDetail Whether to provide additional data on daily usage. False by default.
  • If includeDailyDetail is false, GET returns true if the data has been accessed in the past usageThresholdDays, and false otherwise.
  • If includeDailyDetail is true, GET returns daily access details.