Config - Time Period

Object type: timeperiod

Request URL: /rest/config/timeperiod

Example GET Copied

    {
       "object" : {
          "sunday" : "00:00-24:00",
          "friday" : "00:00-09:00,17:00-24:00",
          "name" : "nonworkhours",
          "servicecheck_notification_periods" : [
             {
                "ref" : "/rest/config/servicecheck/26",
                "name" : "TFTP"
             },
             {
                "ref" : "/rest/config/servicecheck/43",
                "name" : "Whois"
             }
          ],
          "servicecheck_check_periods" : [
             {
                "ref" : "/rest/config/servicecheck/43",
                "name" : "Whois"
             }
          ],
          "monday" : "00:00-09:00,17:00-24:00",
          "tuesday" : "00:00-09:00,17:00-24:00",
          "saturday" : "00:00-24:00",
          "wednesday" : "00:00-09:00,17:00-24:00",
          "thursday" : "00:00-09:00,17:00-24:00",
          "id" : "3",
          "host_check_periods" : [
             {
                "ref" : "/rest/config/host/22",
                "name" : "monitored_by_cluster"
             },
             {
                "ref" : "/rest/config/host/4",
                "name" : "monitored_by_collector"
             }
          ],
          "alias" : "Non-work Hours",
          "host_notification_periods" : [
             {
                "ref" : "/rest/config/host/12",
                "name" : "toclone"
             }
          ],
          "uncommitted" : "0"
       }
    }

Note

When PUTing, you cannot change the related host/service check period/notification periods. If you want to change those, you have to change the related host/service check itself.
["Opsview On-premises"] ["API", "Technical Reference"]

Was this topic helpful?