Developers API

getScheduledDowntimePeriods

Fetches a list of all downtime periods scheduled for the specified host.

Request Parameters

Parameter Data Type Description Required Default
hostid integer The HostID identifying the host whose downtime periods you wish to query Required -

Response Data

Response Variable Data Type Description
errorcode integer Returns an errorcode of 0 if call is successful.
periods This is an array - its' contents follow:
periodid integer The unique ID of the period
start string The starting time of the period (HH:mm, 24-hour clock, e.g. '15:30')
end string The ending time of the period (HH:mm, 24-hour clock)
timezone string The POSIX standard timezone of the starting and finishing times; e.g. 'GMT' or 'Europe/London'
recurrence string ONCEONLY, DAILY, WEEKLY, MONTHLY depending on the desired recurrence of the period
on string A date in YYYY-MM-DD format for ONCEONLY periods.
The day of the week (e.g. 'Sunday') for WEEKLY periods.
The day of the month (1-31 or 'LASTDAY') for MONTHLY periods.
NULL for DAILY periods.
Try it out with the API Explorer:

Your API Key

API command to be called

Desired response format

The HostID identifying the host whose downtime periods you wish to query (integer)