...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
Table of Contents |
---|
Status API
This opCharts API provides access to Status collection data in a JSON format.
...
Authentication is required to access all methods below. See opCharts REST API Reference.
Public API for opCharts Status "http[s]://server/omk/opCharts/v2/status"
We can view opCharts Status below using these endpoints - http[s]://server/omk/opCharts/v2/status
API Routes
Request Method | Operation | URL Example | id required | Notes |
---|---|---|---|---|
GET | read list | /server/omk/opCharts/v2/status | n | Returns a list of all the status records (status id and node_uuid) Paginated |
GET | read one | /server/omk/opCharts/v2/status/id | y | Returns the details of the status record with the given id. |
GET | read list | / | y | Returns a list of all the status records (status id and node_uuid), matching given node_uuid Paginated |
GET | read list | /server/omk/opCharts/v2/inventory/inventory_id/status | y | Returns a list of the (status id and node_uuid) for all the Status objects matching inventory_id Paginated |
|
|
Request Modifiers (query parameters)
The properties request modifier tells opCharts which properties you would like listed, query limits the requested resources to only those that match all criteria given. This collection can paginated, it is also limited to 25 results by default (this could be subject to change in future opCharts versions) use the limit query parameter to request more nodes
...
Examples of how to use the request modifiers can be found in the response blocks below. In general, the queries will look something like this:
GET of opcharts/v2/status for List
GET /omk/opCharts/v2/status
You will get a list of all the Status records in your database.
Successful Response
HTTP Status | Body | Description |
---|---|---|
200 OK | Possibly empty JSON array of strings | Each array element is a JSON string object with the subconcept name |
Unsuccessful Response
HTTP Status | Body | Description |
---|---|---|
401 Unauthorized | JSON object with an error property | You are not authenticated. |
403 Forbidden | JSON object with an error property | You are not authorized. |
Example
Code Block |
---|
GET HTTP://server/omk/opCharts/v2/status.json Output:- List of first 25 status objects, sorted by id [ { "id": "648a0e4ca44a3ab377278383", "node_uuid": "8da86248-40f3-4c92-90b6-736bb66814aa" }, { "id": "648a0e4ca44a3ab377278389", "node_uuid": "8da86248-40f3-4c92-90b6-736bb66814aa" }, { "id": "648a0e4ca44a3ab37727838c", "node_uuid": "8da86248-40f3-4c92-90b6-736bb66814aa" }, { "id": "648a0e4ca44a3ab377278542", "node_uuid": "8da86248-40f3-4c92-90b6-736bb66814aa" }, . . . ] |
GET of opcharts/v2/inventory/inventory_id/statusfor List
GET /omk/opCharts/v2/inventory/inventory_id/status
...
You can use Request Modifiers (see above) for filtering, pagination, and selecting properties.
Successful Response
HTTP Status | Body | Description |
---|---|---|
200 OK | Possibly empty JSON array of strings | Each array element is a JSON string object with the subconcept name |
Unsuccessful Response
HTTP Status | Body | Description |
---|---|---|
400 Bad Request | JSON object with an error property | |
401 Unauthorized | JSON object with an error property | You are not authenticated. |
403 Forbidden | JSON object with an error property | You are not authorized. |
404 Not Found | JSON object with an error property | You are authenticated but not authorised to view this object. |
404 Not Found | JSON object with an error property | The |
Example
Code Block |
---|
GET HTTP://server/omk/opCharts/v2/inventory/648a0baea44a3ab37721db6d/status.json Output :- List of first 25 status objects ("id" and "node_uuid") sorted by id in ascending order. [ { "id": "648a0e4ca44a3ab377278383", "node_uuid": "8da86248-40f3-4c92-90b6-736bb66814aa" }, { "id": "648a0e4ca44a3ab377278389", "node_uuid": "8da86248-40f3-4c92-90b6-736bb66814aa" }, { "id": "648a0e4ca44a3ab37727838c", "node_uuid": "8da86248-40f3-4c92-90b6-736bb66814aa" } ] |
...
Request | Response |
---|---|
GET http://server/omk/opCharts/v2/inventory/648a0baea44a3ab37721db6d/status.json | First 25 elements sorted by id ("id" and "node_uuid") |
GET http://server/omk/opCharts/v2/inventory/648a0baea44a3ab37721db6d/status.json?limit=50&page=2 | Next 50 elements sorted by id ("id" and "node_uuid") |
GET http://server/omk/opCharts/v2/inventory/648a0baea44a3ab37721db6d/status.json?limit=50&properties=["node_name"] | First 50 elements sorted by id ("id" , "node_uuid", "node_name") |
GET http://server/omk/opCharts/v2/inventory/648a0baea44a3ab37721db6d/status.json?imit=50&page=2&properties=["event"] | Next 50 elements sorted by id ("id" , "node_uuid", "event") |
GET http://server/omk/opCharts/v2/inventory/648a0baea44a3ab37721db6d/status.json?limit=50&properties=["node_name"]&filter={"level":"Normal"} | First 50 elements sorted by id, filtered by level = Normal ("id" , "node_uuid", "node_name") |
GET http://server/en/omk/opCharts/v2/inventory/648a0baea44a3ab37721db6d/status.json?properties=["event","lastupdate"]&filter={"level":"Normal"} | First 25 elements sorted by id displaying 2 properties [ |
GET of opcharts/v2/status/id
GET /omk/opCharts/v2/status/id
...
You can use Request Modifiers (see above) for filtering, pagination, and selecting properties.
Successful Response
HTTP Status | Body | Description |
---|---|---|
200 OK | Possibly empty JSON array of strings | Each array element is a JSON string object with the subconcept name |
Unsuccessful Response
HTTP Status | Body | Description |
---|---|---|
401 Unauthorized | JSON object with an error property | You are not authenticated. |
403 Forbidden | JSON object with an error property | You are not authorized. |
Example
Panel |
---|
|
...
Request | Response |
---|---|
GET HTTP://server/omk/opCharts/v2/status/648a0e4ca44a3ab377278383 .json | Raw inventory element with given object id |
GET HTTP://server/omk/opCharts/v2/status/648a0e4ca44a3ab377278383 .json?properties=["event"] | Raw inventory element with given object id, event and node_uuid {"event": "Proactive Response Time", |