Front page REST interface
- 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
Retrieve information about all the available front pages.
Definition
1 |
|
Example request
1 |
|
Example response
1 2 3 4 5 6 7 8 |
|
Arguments
None.
Returns
An array of front page objects.
Get metadata about front pages owned by a user
Retrieve information about all the available front pages owned by a specified user.
Definition
1 |
|
Example request
1 |
|
Example response
1 2 3 4 5 6 7 8 |
|
Arguments
Argument | Description |
---|---|
username | Required. The string value of the username. |
Returns
An array of front page objects owned by the specified user.
Get front page by name
Retrieve a front page.
Definition
1 |
|
Example request
1 |
|
Example response
1 2 3 4 5 6 7 8 9 10 11 |
|
Arguments
None.
Returns
A front page object if a valid name was provided.
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
1 |
|
Data
1 2 3 4 |
|
Example request
1 2 3 |
|
Example response
200 OK
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
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:
1 |
|
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
1 |
|
Data
1 2 3 4 5 |
|
Example request
1 2 3 |
|
Example response
200 OK
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
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:
1 |
|
Delete front page
Delete an existing front page entry in WombatOAM.
Definition
1 |
|
Example request
1 |
|
Example response
1 2 3 4 5 6 7 8 |
|
Arguments
Argument | Description |
---|---|
front_page_name | Required. The name of the front page to be deleted. |
Returns
An array of front page objects.
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
type
is list, thensubType
can bealarms
ornodes
. Iftype
is metric,subType
can besimple-numeric
,live-numeric
orhistogram
. 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 arecounter
andgauge
.display
: This text will appear on the dashboard.unit
: Valid units arebyte
,numeric
andpercentage
.origin
: The metric group's name.active
: Boolean value.