Skip to content

Front page

Retrieve information about all the available front pages.

GET /api/front-page
curl -X GET "http://127.0.0.1:8080/api/front-page" \
-u admin:PASSWORD
[
{
"user": "$default_user",
"front_page_name": "Default front page",
"default": true
},
{
"user": "$default_user",
"front_page_name": "Erlang",
"default": false
},
{
"user": "$default_user",
"front_page_name": "Wombat overview",
"default": false
},
{...}
]

None.

An array of front page objects.

Get metadata about front pages owned by a user

Section titled “Get metadata about front pages owned by a user”

Retrieve information about all the available front pages owned by a specified user.

GET /api/front-page?user=USER_NAME
curl -X GET "http://127.0.0.1:8080/api/front-page?user=%24default_user" \
-u admin:PASSWORD
[
{
"user": "$default_user",
"front_page_name": "Default front page",
"default": true
},
{...},
{...}
]
Argument Description
username Required. The string value of the username.

An array of front page objects owned by the specified user.

Retrieve a front page.

GET /api/front-page/FRONTPAGE_NAME
curl -X GET "http://127.0.0.1:8080/api/front-page/Default%20front%20page" \
-u admin:PASSWORD
[
{
"items": [
{
"id": "",
"type": "node",
"metric": {
"name": "total_memory",
"type": "gauge",
"display": "Total memory",
"unit": "byte",
"origin": "builtin_memory_metrics",
"active": false
},
"nodeFamilyId": "",
"name": "Total memory"
},
{...}
]
}
]

None.

A front page object if a valid name was provided. If the name is invalid an error object is received:

{
"error": "Reason"
}

Create a new front page entry in WombatOAM. For more details of the front_page value read the Front page JSON section.

PUT /api/front-page
{
"front_page_name": "FRONT_PAGE_NAME",
"front_page": "FRONT_PAGE"
}
curl -X PUT "http://127.0.0.1:8080/api/front-page" \
-H "Content-Type: application/json" \
-d "{\"front_page_name\":\"My new front page name\", \"front_page\":[]}" \
-u admin:PASSWORD

200 OK

Argument Description
FRONT_PAGE_NAME Required. The name of the front page to be created.
FRONT_PAGE Required. The front page to be created.

In case of success, the HTTP response is 200 OK, and the new front page is stored.

Otherwise, HTTP 400 is sent with an error object:

{"error": "Reason"}

Update an existing front page entry in WombatOAM. For more details of the front_page value read the Front page JSON section.

POST /api/front-page
{
"old_page_name": "OLD_PAGE_NAME",
"new_page_name": "NEW_PAGE_NAME",
"front_page": "FRONT_PAGE"
}
curl -X POST "http://127.0.0.1:8080/api/front-page" \
-H "Content-Type: application/json" \
-d "{\"old_page_name\":\"Original page\", \"new_page_name\":\"My new front page name\", \"front_page\":[]}" \
-u admin:PASSWORD

200 OK

Argument Description
OLD_PAGE_NAME Required. The old name of the front page to be updated.
NEW_PAGE_NAME Optional. The new name of the front page to be updated.
FRONT_PAGE Required. The front page to be updated.

In case of success, the HTTP response is 200 OK and the new front page is stored.

Otherwise, HTTP 400 is sent with an error object:

{"error": "ERROR_REASON_STR"}

Delete an existing front page entry in WombatOAM.

DELETE /api/front-page/FRONTPAGE_NAME
curl -X DELETE "http://127.0.0.1:8080/api/front-page/my%20page" \
-u admin:PASSWORD
[
{
"user": "$default_user",
"front_page_name": "Default front page"
},
{...},
{...}
]
Argument Description
front_page_name Required. The name of the front page to be deleted.

The array of remaining front page objects.

This section specifies a JSON structure called “front page JSON object”. This structure is returned in the response of a get front page request. Also, when adding a new page or updating an existing one, a front page JSON object needs to be specified to describe how the page should look like.

The front page is a list of panels. An empty list represents a front page without any panel.

Each panel is a JSON object with the following mandatory fields:

  • items: Describes the contents of the panel.
  • name: The name of the panel.
  • type: The type of the panel can be list or metric.
  • subType: If type is list, then subType can be alarms or nodes. If type is metric, subType can be simple-numeric, live-numeric or histogram.
  • size: The width of the panel.

If the panel’s subType is simple-numeric or histogram, then there should be an extra field: series. It defines the time interval of the metric data. The valid values are the following: 1, 2, 3, 5, 7.

Each item has 3 mandatory fields:

  • id: The identifier of the item.
  • type: The type of the item. Valid values are: node, nodeFamily, all.
  • name: The name of the item.

If an item is a metric, then it have to have a 4th field. The key is metric and the value is an object that describes the metric. It has 6 fields:

  • name: The name of the metric.
  • type: Valid types are counter and gauge.
  • display: This text will appear on the dashboard.
  • unit: Valid units are byte, numeric and percentage.
  • origin: The metric group’s name.
  • active: Boolean value.