Open Dashboard and Visualization Workshop: Exploring Perses API

Again in December of 2022, I began a sequence taking you on a excursion of the Perses mission. Those articles lined this reasonably new open dashboard and visualization mission focused on cloud-native environments. I used a “getting began” workshop to steer you via this collection and to supply a hands-on revel in for the ones new to visualizing observability information.Perses Dashboard

In the former article, I kicked off with an creation to and set up of Perses and equipped hyperlinks to the true on-line workshop content material.

On this article, I’m going to proportion a guided excursion of the Perses utility programming interface (API) and the way you’ll be able to engage along with your Perses example via its API.

Let’s dive proper in, we could?

I will preview the Perses API as lined in my workshop lab prior to diving into the true hands-on with the mission.

You’ll be able to in finding the unfastened workshop right here on-line:

Workshop: Getting started with open dashboards and visualization slide

Now let’s dive into the Perses mission API lab. Word this newsletter is just a brief abstract, so please see all the lab discovered on-line as lab 3 to paintings in the course of the API revel in your self:

Lab 3 - Exploring dashboard tooling slide

The next is a brief evaluate of what’s on this particular lab of the Perses workshop.

Perses API

Some of the attention-grabbing sides of any mission for builders is the volume and simplicity of get entry to {that a} mission API supplies. Relaxation confident, the entirety you ever may need to do along with your Perses example is roofed, permitting you to accomplish operations to your sources. You’ll be able to see {that a} useful resource is a part of the Perses dashboard specification and you’ll be able to carry out all the following along with your sources referred to as CRUD (create, learn, replace, delete):

  • Making a useful resource
  • Retrieving a useful resource
  • Updating a useful resource
  • Deleting a useful resource
  • Retrieving an inventory of sources

After putting in Perses within the earlier lab, you’ve a dashboard open for your browser. There may be an utility programming interface (API) to be had so that you can achieve insights into the configuration implemented in your Perses example. You’ll be able to in finding out extra in regards to the tasks, dashboards, and information assets which were created. This can also be to hand first of all current sources and adjust them to your personal variations.

The pre-installed mission is known as WorkshopProject. That is how we get began exploring one of the vital equipped API operations for dealing with a Perses useful resource, which can also be probably the most following:

  • Mission
  • Dashboard
  • Knowledge supply

You be told that you’ll be able to use a normal browser and the RestAPI (URL) to leverage the API operations, corresponding to how you’ll be able to view the configured tasks to your Perses server with a browser, simply input this URL:

http://localhost:8080/api/v1/tasks

This presentations you the unformatted JSON output of the to be had tasks. You must see the only WorkshopProject indexed:

Unformatted JSON output of available projects

Subsequent, you discover an instance REST API device and question the similar operation:

Same operation in example RestAPI tool

See the consequences now embedded and formatted well for human intake:

Results, formatted and embedded

In spite of everything, you’ll be able to get started the use of the equipped Perses command line executable referred to as percli. For those who constructed the mission from the supply code, you’ve constructed this executable, however if you’re the use of the container symbol set up, then you are going to in finding an executable percli to your working machine the use of the tips equipped within the lab. The remainder of this lab is devoted to exploring the best way to use this command line device and also you discover all the following instructions:

  • login – Log in to an example of the Perses API
  • get – Request a reaction from the Perses API
  • mission – Make a selection a mission for use because the default
  • describe – Request main points for a selected useful resource
  • delete – Delete a selected useful resource
  • observe – Create or replace current sources the use of JSON or YAML report

You’ll be able to be told by means of the use of each and every the sort of instructions and exploring the output they supply. For instance, if you happen to use the command line device to get all of the tasks for your Perses example, it could appear to be this for your console:Console: all projects in Perses instance

This lab leaves you one step nearer to making your personal dashboards and visualizations.

Extra To Come

Subsequent up, I’m going to proceed operating with you in the course of the Perses mission with a have a look at the Perses specification. Keep tuned for extra insights into an actual sensible revel in as my cloud-native o11y adventure continues.

Leave a Comment

Your email address will not be published. Required fields are marked *