Skip to content

List the Available Panel Types


To create a panel, the serviceId property and the panel type have to be known. The type property of a panel is a fix string specified by the service with the ID serviceName. The combination of the type and the serviceName properties uniquely identifies a single panel type. A service may support more then one panel types.


The call to this endpoint is a GET request.

Example - endpoint URL for listing all panel types

/v1/ui

The result contains an array of objects containing the type and serviceName properties among others.

Hint - same value

When creating a panel, the serviceName property is identical to the serviceId property.


Code Examples

Bash

#!/bin/bash

# !Assuming $TOKEN contains a valid JWT access token!
AUTH="Authorization: Bearer $TOKEN"
JSON="Content-Type:application/json"

# list available panel types
curl -k -s -X GET -H "$AUTH" -H "$JSON" "https://localhost:3008/v1/ui" | jq .

JavaScript

'use strict';

const request = require('request-promise-native');

const listAvailablePanelTypes = async function(token) {
  // list all panels
  let req = {
    url: 'https://localhost:3008/v1/ui',
    headers: {
      Authorization: `Bearer ${token}`
    },
    resolveWithFullResponse: true,
    json: true,
    strictSSL: false
  };
  let res = await request.get(req);
  console.log(JSON.stringify(res.body, null, 2));
};

Back to top