Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
{
    "change_id": "ticket #1234",
    "current": "current",
    "description": "Emergency outage",
    "element": [
        {
            "element_name": "Vlan2",
            "node_name": "Switch-1"
        },
        {
            "element_name": "regex:^Vlan.*?$",
            "node_name": "Switch-2"
        }
    ],
    "end": 1684156863,
    "frequency": "once",
    "id": "0ea7644e-b6fa-4fa2-9b33-a86b79db21a4",
    "nodes": {},
    "options": {},
    "start": 1683811263
}

...

Property

...

Description

...

Example

...

id

...

A globally unique Outage ID

...

Insert any reference number if required in the change id field

...

Create Outage
POST  http://server/en/omk/admin/api/v3/outages

Returns 201 if the outage was successfully created.

Payload example:

Code Block
{
    "change_id": "ticket #1234

...

date and time of outage start and end

...

 [ {

  "element_name": "Vlan2",
  "node_name": "Switch-1"
}, {

   "element_name": "regex:^Vlan.*?$",
   "node_name": "Switch-2"
} ]

...

Limitations

API Endpoint

All requests are made under the following base URL:

Code Block

  http[s]://server/omk/admin/v3/outages

...

Code Block

GET HTTP://server/omk/opCharts/v2/enterprise_services/63fdd07e0454aa367e368b0b.json
 
************* OUTPUT ****************  
{
    description: "This is a test Enterprise Service",
    frequency"description": "30Emergency outage",
    id"nodes": "63fdd07e0454aa367e368b0b"["Switch-2","Switch-1"],
    interface_state"elements" : "Normal",[
     interface_status: 100,
  {  interface_status_level"node_name": "NormalSwitch-1",
    interfaces_reachable: null,
       interfaces_unreachable: 0,"element_name" : "Vlan2"
    last_updated: 1682489067    },
    name: "John Test",
  {  "node_name": "john_test_ESSwitch-2",
    node_state: "Down",
    node_status: 98.3333333333333,
    node_status_level"element_name" : "Minor",
    nodes_degraded: 1,
regex:^Vlan.*?$"
       nodes_down: 1, }
    nodes_total: 3],
    nodes_up: 1,
    overall_status: "Down""start": "11-May-2023 23:21:03",
    service_state"end": "Down",
    service_status: 0,
    service_status_level: "Fatal",
    services_degraded: 0,
    services_reachable: 0,
    services_unreachable: 1
}


################################## List ##################################

GET HTTP://server/omk/opCharts/v2/enterprise_services.json

************* OUTPUT ****************


[ 
  {
    description: "Show core network15-May-2023 23:21:03"
}

Return

Code Block
{
    "id": "0ea7644e-b6fa-4fa2-9b33-a86b79db21a4",
    "success": 1
}

Update Outage

PUT http://server/en/omk/admin/api/v3/outages/#ID

Returns 200 if the outage was successfully updated.

Payload example:

Code Block
{
    "change_id": "ticket #1234",
    frequency"description": "60Emergency outage",
    id"nodes": ["63f6fda90454aa0265333e61Switch-2",
    interface_state: "Normal",
    interface_status: 100"Switch-1"],
    interface_status_level: "Normal",
    interfaces_reachable: null,"elements" : [
    interfaces_unreachable: 0,
   { last_updated: 1682570689,
    name: "Core Network",
    node_name": "core_network_esSwitch-1",
    node_state: "Normal",
    node_status: 96.6666666666667,
    node_status_level "element_name" : "MinorVlan222",
    nodes_degraded: 1,
    nodes_down: 0},
    nodes_total: 1,
    nodes_up: 0,
  {  overall"node_statusname": "DegradedSwitch-2",
    service_state: "Normal",
    service_status: 100,
    service_status_level"element_name" : "Normal",regex:^Vlan.*?$"
    services_degraded: 0,
    services_reachable: 1,}
    services_unreachable: 0
  }],
  {
    description"start": "This is a test Enterprise Service11-May-2023 23:21:03",
    frequency"end": "30",15-May-2023 23:21:03"
}

Return 

Code Block
{
    "id": "63fdd07e0454aa367e368b0b0ea7644e-b6fa-4fa2-9b33-a86b79db21a4",
    interface_state: "Normal",
    interface_statussuccess": 1
}

Delete Outage

DELETE http://server/en/omk/admin/api/v3/outages/0ea7644e-b6fa-4fa2-9b33-a86b79db21a4

Returns 200 if the outage was successfully removed.

Anchor
properties
properties
Outages Properties

The following tables represents theproperties of an Outage.


Property

Description

Example

id

A globally unique Outage ID

"63576103ad794974594a1f11"
change_id

Insert any reference number if required in the change id field

ticket #12345"
currentIf the outage is current or scheduled/future outage"current/null"
descriptionLong description of an Outage"This is a test outage"
frequency
one of 'once', 'daily', 'weekly' or 'monthly'



start

date and time of outage start and end


 e.g. 2017-10-31T03:04:26+0000
enddate and time of outage start and end e.g. 2017-10-31T03:04:26+0000



nodesList of nodes for which Outages is defined[ 'Switch-1','Switch-2' ]
elementList of elements from nodes for which Outages are defined.

 [ {

  "element_name": "Vlan2",
  "node_name": "Switch-1"
}, {

   "element_name": "regex:^Vlan.*?$",
   "node_name": "Switch-2"
} ]

optionsoptional key=values to adjust NMIS' behaviour during an outageo"Normal"




Limitations

API Endpoint

All requests are made under the following base URL:

Code Block

  http[s]://server/omk/admin/v3/outages

100,
    interface_status_level: "Normal",
    interfaces_reachable: null,
    interfaces_unreachable: 0,
    last_updated: 1682489067,
    name: "John Test",
    node_name: "john_test_ES",
    node_state: "Down",
    node_status: 98.3333333333333,
    node_status_level: "Minor",
    nodes_degraded: 1,
    nodes_down: 1,
    nodes_total: 3,
    nodes_up: 1,
    overall_status: "Down",
    service_state: "Down",
    service_status: 0,
    service_status_level: "Fatal",
    services_degraded: 0,
    services_reachable: 0,
    services_unreachable: 1
  }
]