Developers API

setScheduledDowntimePeriod

Create or update a scheduled downtime period for the specified host.

Request Parameters

Parameter Data Type Description Required Default
hostid integer The HostID identifying the host to have downtime scheduled Required -
start string The starting time of the period (HH:mm, 24-hour clock, e.g. '15:30') Required -
end string The ending time of the period (HH:mm, 24-hour clock) Required -
timezone string The POSIX standard timezone of the starting and finishing times; e.g. 'GMT' or 'Europe/London' Required -
recurrence enum ONCEONLY, DAILY, WEEKLY, or MONTHLY indicating how the pattern of recurrence Required -
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. Ommitted for DAILY periods. Optional
periodid integer Specify a PeriodID if you wish to update an existing period; otherwise a new one will be created Optional

Response Data

Response Variable Data Type Description
errorcode integer Returns an errorcode of 0 if call is successful.
periodid integer Returns the PeriodID of the updated or newly created period.
Try it out with the API Explorer:

Your API Key

API command to be called

Desired response format

The HostID identifying the host to have downtime scheduled (integer)

The starting time of the period (HH:mm, 24-hour clock, e.g. '15:30') (string)

The ending time of the period (HH:mm, 24-hour clock) (string)

The POSIX standard timezone of the starting and finishing times; e.g. 'GMT' or 'Europe/London' (string)

ONCEONLY, DAILY, WEEKLY, or MONTHLY indicating how the pattern of recurrence (enum)

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. Ommitted for DAILY periods. (string)

Specify a PeriodID if you wish to update an existing period; otherwise a new one will be created (integer)