Go to All Forums

Setting server monitors to be in maintenance mode via API

Hi Folks,

Can someone point me to instruction about how to set server monitors to be in maintenance mode via the API? This is probably in the documentation somewhere, but searching for it is a bit tricky because it leads to hits on how to monitor APIs themselves, put those monitors in maintenance mode etc.

Requirement is that we are turning servers in Azure on and off automatically according to a schedule, and would like to extend that to switch off Site24x7 monitoring before switching them off, and re-enable it after switching them back on.

Like (2) Reply
Replies (3)

Hi Geordie,

    All the API documentation is found in https://www.site24x7.com/help/api/

Below is the link where you can find documentation to do schedule maintenance via our API. 

 

https://www.site24x7.com/help/api/#schedule-maintenances

https://www.site24x7.com/api/maintenance \
    -H "Content-Type: application/json;charset=UTF-8" \
    -H "Accept: application/json; version=2.0" \
    -H "Authorization: Zoho-authtoken a12345b6c8de901f2gh3456ij78k901l" \
    -d '{
        "maintenance_type": 3,
        "selection_type": 2,
        "start_time": "19:08",
        "end_time": "20:08",
        "display_name": "Weekly maintenance",
        "description": "Maintenance Description",
        "monitors": [
          "1XXXXXXX"
        ],
        "start_date": "2016-10-03",
        "end_date": "2016-10-03",
        "perform_monitoring":true
    }'


-Jasper
Product Manager, Site24x7

Like (0) Reply

Thanks for that Jasper. Unfortunately I get "{"error_code":1000,"message":"Internal error."}" in response?

Like (0) Reply

Hi Geordie,

   Since this requires further investigation, please contact support@site24x7.com for further analysis.  

-Jasper

Product Manager, Site24x7

Like (0) Reply

Was this post helpful?