Outages API - V3
...
NMIS has supported this for a long time, please refer to the NMIS Outages documentation for further information.
...
All these methods require authentication.
POST http://server/en/omk/admin/login
Form data:
- username
- password
GET of /v3/outages for List
GET http[s]://server/en/omk/admin/api/v3/outages
If your GET call provides an Accept
header indicating JSON, or if you use a .json
suffix, eg /v3/outages.json
as URI, then It will look for matching Outages and return their properties in the form of a JSON object, an array of Outages.
...
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. |
GET http://server/en/omk/admin/api/v3/outages
Returns a list of outages.
...
If your GET call provides an accept
header indicating application/json
or if you use /en/omk/admin/api/v3/outages/
<id>.json
as URI, then the Outage will be looked up and all properties will be returned in the form of a JSON object.
...
GET http://server/en/omk/admin/api/v3/outages/#ID
Ex. http://server/en/omk/admin/api/v3/outages/0ea7644e-b6fa-4fa2-9b33-a86b79db21a4
Returns an outage.
Response:
...
Code Block |
---|
{ "id": "0ea7644e-b6fa-4fa2-9b33-a86b79db21a4", "success": 1 } |
PUT of /v3/outages/<id> for
...
Update
Create an Outage by sending a pay-load JSON object and this will create an Outage on your system and receive an appropriate response.
...
DELETE http://server/en/omk/admin/api/v3/outages/0ea7644e-b6fa-4fa2-9b33-a86b79db21a4
Returns 200 if the outage was successfully removed.
...
Property | Description | Example |
| A globally unique Outage ID | 0ea7644e-b6fa-4fa2-9b33-a86b79db21a4 |
change_id | Insert any reference number if required in the change id field | ticket #12345 |
current | If the outage is current or scheduled/future outage. IS THIS 'currrent' for scheduled or null for future. | current |
description | Long description of an Outage | This is a test outage |
frequency | one of 'once', 'daily', 'weekly' or 'monthly' | once |
start | date and time of outage start. See XYZ for description of allowed values. | 2023-10-31T03:00:00+0000 |
end | date and time of outage end. See XYZ for description of allowed values. | 2023-10-31T03:30:00+0000 |
nodes | List of nodes for which Outages is defined. IS THIS MANDATORY? | [ 'Switch-1','Switch-2' ] |
element | List of elements from nodes for which Outages are defined. IS THIS MANDATORY? DOCUMENT REGEX OR SEE LINK CAN I DO NODE REGEX? | [ { "element_name": "Vlan2", "element_name": "regex:^Vlan.*?$", |
options | optional key=values to adjust NMIS behaviour during an outage DOCUMENT THE KEYS AND VALUES | "Normal" |
...