Did You Know That Our API Docs Are Alive?

October 30, 2018 Howard Yoo

The Wavefront REST API powers the Wavefront UI. When you do something in the UI, like click a button, the result is a sequence of API calls that interact with Wavefront services. Wavefront customers can also use our public API to invoke services and to automate certain tasks such as event creation, generation of queries, and so on.

In one of our previous blogs, you learned about the excellent Wavefront documentation. With the Wavefront REST API, you can access the docs right from the product. Just sign up for a free Wavefront trial!

Accessing the REST API Docs

To get to the REST API docs, log in to your Wavefront instance, click the gear icon (top right in the Wavefront UI) and select API Documentation. You can also access the API documentation using the following URL:

https://<your wavefront domain>/api-docs/ui

Interactive API: Learn How Things Work Right on the Spot

When you learn a programming interface, you usually first need to learn and understand it, and then to try and test things. That’s cumbersome and time-consuming. First, you read about the API, then you implement it. We decided you probably prefer doing your testing without having to code anything! And here, we show you how to do it.

The Wavefront REST API documentation is based on Swagger, which provides an interactive document where you can test all available REST API calls within the documentation itself.

Let’s say we want to get some recent Wavefront events. We click the Event section in the list of API endpoints, and we see the list of REST endpoints that supports retrieving, storing, editing, and deleting your events. Let’s click the GET method on the event to expand it.

We see the complete list of available parameters as well as the Model Schema for the response, with the mandatory fields already populated with default settings. We can click the cheerful ‘Try it out!‘ button to try out the service with the current settings. When we click, we send test service calls to Wavefront instance, with all the necessary parameters pre-populated. That shows us how the REST call message has to look like to work properly.

But this is just a start. Because we now know how to call the service and what data is required, let’s try creating a new Wavefront user event, right from our API documentation page. We just have to add the details in the ‘body’ box.

The doc includes an ‘Example Body’ that you can copy and paste to be your payload. In the example below, we’ve made some changes (mostly to the timestamp), and then we click the Try it out button. The testing happens right on the spot, and we can immediately see the service ran successfully. The event is now created in Wavefront, ready to be viewed.

Just like that, we’ve just created a user event, and we can continue testing the event’s behavior before writing any code.

So, If You Are a Developer…

Try our API documentation to learn more about what we provide in our REST API, and learn how you can develop and integrate your applications with Wavefront quickly and easily. Hope you have some fun doing it!

Get Started with Wavefront Follow @yoohoward Follow @WavefrontHQ

The post Did You Know That Our API Docs Are Alive? appeared first on Wavefront by VMware.

5 Ways to Save on Your Google Cloud Services Bill
5 Ways to Save on Your Google Cloud Services Bill

Google Cloud Platform (GCP) is a “top three” public-cloud computing provider along with AWS and Microsoft A...

It’s Not a Network Problem! New Ways to Troubleshoot and Scale NSX-T Data Center with Wavefront
It’s Not a Network Problem! New Ways to Troubleshoot and Scale NSX-T Data Center with Wavefront

It’s been exhilarating to witness the evolution of networking over the years – from traditional architectu...

Visionary in Gartner® Magic Quadrant™

Learn More