Inventory API
...
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 |
page | (int) Which page of the requested document to returned |
limit | (int) How many results are returned, defaults to 25 |
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","data.index": "196609"} (which is "configuration.group"="NMIS8" AND "data.index"="196609" ) |
sort | -1 | 1 : sort the response with _id ascending or descending b=zzz |
redact | 0 | 1 : redact the information in nodes.configuration . |
...
Request | Response |
---|---|
GET http://server/omk/opCharts/v2/inventory/interface.json?limit=50 | First 50 elements sorted by nodes.name ("id" and "nodes.node_uuid") |
GET http://server/omk/opCharts/v2/inventory/interface.json?limit=50&page=2 | Next 50 elements sorted by nodes.name ("id" and "nodes.node_uuid") |
GET http://server/omk/opCharts/v2/inventory/interface.json?limit=50&properties=["nodes.node_name"] | First 50 elements sorted by nodes.name ("id" , "nodes.node_uuid", "nodes.node_name") |
GET http://server/omk/opCharts/v2/inventory/interface.json?limit=50&page=2&properties=["inventory.data"] | Next 50 elements sorted by nodes.name ("id" , "nodes.node_uuid", "inventory.data") |
GET http://server/omk/opCharts/v2/inventory/interface.json?limit=50&properties=["nodes.node_name"]&filter={"inventory.data.ifIndex":3} | First 50 elements sorted by nodes.name, filtered by inventory.data.ifIndex => 3 ("id" , "nodes.node_uuid", "nodes.node_name") |
GET http://server/en/omk/opCharts/v2/inventory/interface.json?properties=["data.ifIndex","data.ifDescr","node_name","description"]&filter={"data.ifIndex":1} | First 25 interfaces sorted by nodes.name displaying 6 properties [ ... |
...
Request | Response |
---|---|
GET HTTP://server/omk/opCharts/v2/inventory/63195a0341073d2dd339ce82.json | Raw inventory element with given object id |
GET HTTP://server/omk/opCharts/v2/inventory/63195a0341073d2dd339ce82.json?properties=["inventory.data"] | Raw inventory element with given object id ("_id", "inventory.data" and "nodes.node_uuid") |