Versions Compared

Key

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

If you have a maintenance window or a scheduled outage for a device then you will likely want to suspend alerting for that device during that period.

...

All these methods require authentication.

POST http://server/en/omk/admin/login

Form data:

  • username
  • password

Methods


Get Outages

GET http://server/en/omk/admin/api/v3/outages

Returns a list of outages.

...

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

Ex. http://server/en/omk/admin/api/v3/outages/df0affe5e6d371a0-a16f2b74-4fa24dd3-a2999bc9-5376a3fabb73fca14f8ddc4f

Returns an outage.

Response:

...

Code Block
{
    "change_id": "123456ticket #1234",
    "currentdescription": "currentEmergency outage",
    "descriptionelement": "testing 123456",[
        {
"end": 1683381540,     "frequency": "once",     "idelement_name": "df0affe5-a16f-4fa2-a299-5376a3fabb73Vlan2",
    "nodes": {         "groupnode_name": ["Switch-1"
        },
   "HQDev"     {
   ],         "element_name": ["regex:^Vlan.*?$",
            "node_name": "Switch-13"
        }
],    ],
    "nodeStatusend": [1647004863,
    "frequency": "once",
     "id": "reachable"e6d371a0-2b74-4dd3-9bc9-fca14f8ddc4f",
    "nodes": {
  ],         "nodeTypename": [
            "switchSwitch-2",
            "serverSwitch-3",
            "genericSwitch-1"
        ],
    },
    "nodeVendoroptions": [{},
    "start": 1646918463
}



Create Outage

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

Returns 200 if the outage was successfully created.

Payload example:


Code Block
{
    "change_id": "Ciscoticket Systems#1234",
    "description": "Emergency outage",
    "nodes": ["Switch-2","Switch-3","Switch-1"],
    "elements" : [
      "roleType  {  "node_name": ["Switch-1",
           "element_name" : "test2Vlan2"
        },
]     },   {  "optionsnode_name": {"Switch-3",
           "nostatselement_name" : 0"regex:^Vlan.*?$"
        }
    ],
    "start": 1683122400
}

Create Outage

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

Returns 200 if the outage was successfully created.

Payload example:

Code Block
test-block"10-Mar-2022 23:21:03",
    "end": "11-Mar-2022 23:21:03"
}


Returns:

Code Block
test-response{
    "id": "e6d371a0-2b74-4dd3-9bc9-fca14f8ddc4f",
    "success": 1
}

Update Outage

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

Returns 200 if the outage was successfully updated.

Payload example:



Code Block
test-block-payload{
    "change_id": "ticket #1234",
    "description": "Emergency outage",
    "nodes": ["Switch-2","Switch-3","Switch-1"],
    "elements" : [
        {  "node_name": "Switch-1",
           "element_name" : "Vlan2"
        },
        {  "node_name": "Switch-3",
           "element_name" : "regex:^Vlan.*?$"
        }
    ],
    "start": "10-Mar-2022 23:21:03",
    "end": "11-Mar-2022 23:21:03"
}


Return 

Code Block
test-response



Delete Outage

DELETE http://server/en/omk/admin/api/v3/outages/df0affe5-a16f-4fa2-a299-5376a3fabb73

Returns 200 if the outage was successfully removed.