Versions Compared

Key

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

...

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",
       "reachable""id": "e6d371a0-2b74-4dd3-9bc9-fca14f8ddc4f",
        ],"nodes": {
        "nodeTypename": [
            "switchSwitch-2",
            "serverSwitch-3",
            "genericSwitch-1"
        ]
    },
    "options": {},
    "nodeVendorstart": [
  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": "ticket #1234",
    "description": "Emergency outage",
    "Cisco Systems"nodes": ["Switch-2","Switch-3","Switch-1"],
    "elements" : [
  ],
      {  "roleTypenode_name": ["Switch-1",
           "element_name" : "test2Vlan2"
        ]},
      },
  {  "optionsnode_name": {
"Switch-3",
           "nostatselement_name" : 0"regex:^Vlan.*?$"
        }
    ],
    "start": "10-Mar-2022 23:21:03",
    "end": 1683122400"11-Mar-2022 23:21:03"
}

Create Outage

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


Returns

...

:

Code Block
test-block

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.