...
Query Parameter | Possible Values |
---|---|
properties | Array of property names. If provided only the properties specified will be returned (instead of the whole document. eg: properties=["configuration.customer", "configuration.group"] By default the nodes UUID is returned by default if no properties are given |
filter | Array of key=value pairs, but coded in an array. Applied to the list of results in the order they are given. If an application key is provided that will be applied first. eg: filter=[{"configuration.group",:"NMIS8","catchall.data.nodestatus": "reachable"] } (which is "configuration.group"="NMIS8" AND "catchall.data.nodestatus"="reachable" ) |
count | (int) 0 or 1, if set to 1 the results are returned paged including the link to the next paged document and the total results for the requested collection |
page | (int) Which page of the requested document to returned |
limit | (int) How many results are returned, defaults to 25 |
...
Code Block |
---|
GET HTTP://server/omk/opCharts/v2/nodes?limit=25&count=1&filter[={"configuration.group" : "DataCentre", "catchall.data.nodestatus": "reachable"]}&page=1&properties=["name","configuration.customer", "configuration.group"] |
This will query all nodes that are in the group NMIS8 and return their nodestatus':
Code Block |
---|
{ "nodes": [ { "configuration": { "customer": "Opmantek", "group": "DataCentre" }, "uuid": "3f49619e-b8ae-4e96-b56a-a7331baf71d3", "name": "monkeyRouter" } ], "total": 1 } |
Nodes (Config/Status/Info)
...
Code Block |
---|
# GET /omk/opCharts/v2/nodes/UUID1/interfaces/IFINDEX { "@nodes_interface_url": "/en/omk/opCharts/nodes/NODEUUID/resources/interface/indicies/10", "info": { "Description": "Connection to ...", "collect": "true", "event": "true", "ifAdminStatus": "up", "ifDescr": "Tunnel100", "ifHighSpeed": 0, "ifIndex": 10, "ifLastChange": "0:00:25", "ifLastChangeSec": 25, "ifOperStatus": "up", "ifPhysAddress": "", "ifSpeed": 9000, "ifType": "tunnel", "index": 10, "interface": "tunnel100", "ip": [ { "ipAdEntAddr": "...", "ipAdEntNetMask": "...", "ipSubnet": "...", "ipSubnetBits": 30 } ], "ipAdEntAddr1": "...", "ipAdEntNetMask1": "...", "ipSubnet1": "...", "ipSubnetBits1": 30, "nocollect": "Collecting: Collection Policy", "real": "true", "setlimits": "normal", "threshold": "true" }, "name": "Eth1", "node": { "name": "nodeNAME", "uuid": "NODEUUID" }, "status": { "discards_out": -1, "errors_in": -1, "util_in": 0, "util_out": 0.45 } } |
Node Inventory, Status, Events
Node inventory is documented in the Inventory API
Node status is documented in the Status API
Node events is documented in the Events API
Postman Collection
A postman collection is available to test all this methods easily.
...