Front page
- Get metadata about front pages
- Get metadata about front pages owned by a user
- Get front page by name
- Update existing front page
- Create new front page
- Delete existing front page
- Front page JSON
Get metadata about front pages
Section titled “Get metadata about front pages”Retrieve information about all the available front pages.
Definition
Section titled “Definition”GET /api/front-pageExample request
Section titled “Example request”curl -X GET "http://127.0.0.1:8080/api/front-page" \ -u admin:PASSWORDExample response
Section titled “Example response”[ { "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 }, {...}]Arguments
Section titled “Arguments”None.
Returns
Section titled “Returns”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.
Definition
Section titled “Definition”GET /api/front-page?user=USER_NAMEExample request
Section titled “Example request”curl -X GET "http://127.0.0.1:8080/api/front-page?user=%24default_user" \ -u admin:PASSWORDExample response
Section titled “Example response”[ { "user": "$default_user", "front_page_name": "Default front page", "default": true }, {...}, {...}]Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
| username | Required. The string value of the username. |
Returns
Section titled “Returns”An array of front page objects owned by the specified user.
Get front page by name
Section titled “Get front page by name”Retrieve a front page.
Definition
Section titled “Definition”GET /api/front-page/FRONTPAGE_NAMEExample request
Section titled “Example request”curl -X GET "http://127.0.0.1:8080/api/front-page/Default%20front%20page" \ -u admin:PASSWORDExample response
Section titled “Example response”[ { "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" }, {...} ] }]Arguments
Section titled “Arguments”None.
Returns
Section titled “Returns”A front page object if a valid name was provided. If the name is invalid an error object is received:
{ "error": "Reason"}Create front page
Section titled “Create front page”Create a new front page entry in WombatOAM. For more details of the front_page value read the Front page JSON section.
Definition
Section titled “Definition”PUT /api/front-page{ "front_page_name": "FRONT_PAGE_NAME", "front_page": "FRONT_PAGE"}Example request
Section titled “Example request”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:PASSWORDExample response
Section titled “Example response”200 OK
Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
| FRONT_PAGE_NAME | Required. The name of the front page to be created. |
| FRONT_PAGE | Required. The front page to be created. |
Returns
Section titled “Returns”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 front page
Section titled “Update front page”Update an existing front page entry in WombatOAM. For more details of the front_page value read the Front page JSON section.
Definition
Section titled “Definition”POST /api/front-page{ "old_page_name": "OLD_PAGE_NAME", "new_page_name": "NEW_PAGE_NAME", "front_page": "FRONT_PAGE"}Example request
Section titled “Example request”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:PASSWORDExample response
Section titled “Example response”200 OK
Arguments
Section titled “Arguments”| 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. |
Returns
Section titled “Returns”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 front page
Section titled “Delete front page”Delete an existing front page entry in WombatOAM.
Definition
Section titled “Definition”DELETE /api/front-page/FRONTPAGE_NAMEExample request
Section titled “Example request”curl -X DELETE "http://127.0.0.1:8080/api/front-page/my%20page" \ -u admin:PASSWORDExample response
Section titled “Example response”[ { "user": "$default_user", "front_page_name": "Default front page" }, {...}, {...}]Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
| front_page_name | Required. The name of the front page to be deleted. |
Returns
Section titled “Returns”The array of remaining front page objects.
Front page JSON
Section titled “Front page JSON”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
typeis list, thensubTypecan bealarmsornodes. Iftypeis metric,subTypecan besimple-numeric,live-numericorhistogram. 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 arecounterandgauge.display: This text will appear on the dashboard.unit: Valid units arebyte,numericandpercentage.origin: The metric group’s name.active: Boolean value.
