REST API JSON help for Arista WiFi

Hi All,

Im quite new to REST API’s and need some help.
I’ve been searching the internet for plugins grafana can use so that i can pass an KeyId and KeyValue as a POST request.
What should return is a cookie, which is then used as Token for authentication as a GET request.

The API Key and Value is created using the Arista Wireless Guest Manager.
Basically im trying to pull information about:
Total number of active wireless access points
Total number of current clients groupby SSID

We use PRTG as our main datasource, and this has worked for many things. However not for REST API queries.
Open to using another datasource with grafana, but not sure which one to use.

The information i have so far is as follows (masking sensitive information)

//POST operation which should return a cookie value
URL: https:https://(tenant).mojonetworks.com
Content-Type: application/json
POST

{
“type”:“apikeycredentials”,
“keyId”:“XXXXXXXXXXXX”,
“keyValue”:“XXXXXXXXXXXXXXXXXX”
}

//GET operation to return relevant data from our tenant using APIs Arista
GET /new/webservice/V5/devices/manageddevices
GET /new/webservice/V5/wlans

Arista’s documentation state the following:

  1. Authenticate (KEy ID, Key Value)
  2. Validate (Key ID + Key Value)
  3. Success (Key Name + Attributes)
  4. Authentication Success
  5. API request
  6. API response

Sample code Arista provide are as follows:

Sample Code
POST https://training.mojonetworks.com/new/webservice/v5/login/keepsessionalive

Sample Code
GET https://training.mojonetworks.com/new/webservice/V5/devices/manageddevices?
sortby=”name”&filter=%7B%0A%09%09%22property%22%3A%20%22devicemode%22%2C%0A%09%
09%22value%22%3A%20%5B%22AP%22%2C%22SENSOR%22%5D%2C%0A%09%09%22operator%22%3A%20
%22contains%22%0A%20%20%20%20%20%20%20%20%20%20%20%7D%0A&filter=%7B%0A%09%09%22
property%22%3A%20%22model%22%2C%0A%09%09%22value%22%3A%20%5B%22c-75%22%2C%22c-
55%22% 5D%2C%0A%09%09%22operator%22%3A%20%22%3D%22%0A%20%20%20%20%20%20%20%20%
20%20%20%7D%0A