Holiday Calendars
A Holiday Calendar defines site-wide holiday dates and optional partial-day windows that scheduled resources skip.
List Holiday Calendars
Command
files-cli holiday-calendars list
Output
Outputs a list of HolidayCalendar objects according to the output format.
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
Additional Arguments
Show Holiday Calendar
Command
files-cli holiday-calendars find
Output
Outputs a HolidayCalendar object according to the output format.
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
Flags
| Flag | Description |
|---|---|
| --id= int64 Required | Holiday Calendar ID. |
Create Holiday Calendar
Command
files-cli holiday-calendars create
Output
Outputs a HolidayCalendar object according to the output format.
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
Flags
| Flag | Description |
|---|---|
| --definition= object Required | Holiday rules for the calendar. |
| --name= string Required | Holiday Calendar name. |
Update Holiday Calendar
Command
files-cli holiday-calendars update
Output
Outputs a HolidayCalendar object according to the output format.
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
Flags
| Flag | Description |
|---|---|
| --id= int64 Required | Holiday Calendar ID. |
| --definition= object | Holiday rules for the calendar. |
| --name= string | Holiday Calendar name. |
Delete Holiday Calendar
Command
files-cli holiday-calendars delete
Output
No output is returned.
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
Flags
| Flag | Description |
|---|---|
| --id= int64 Required | Holiday Calendar ID. |
The HolidayCalendar Object
Some of the commands above return a HolidayCalendar object. The attributes of this object are listed below.
| Attribute | Description |
|---|---|
| id int64 | Holiday Calendar ID. Set a scheduled resource's holiday_region to custom_ followed by this ID to make it skip the days in this calendar. |
| name string | Holiday Calendar name. |
| definition object | Holiday rules for the calendar. |
| created_at date-time | Creation time. |
| updated_at date-time | Last update time. |
definition
Holiday rules grouped by month. A definition may contain at most 366 rules and its encoded JSON may be at most 65535 bytes.
Definition fields
| Attribute | Description |
|---|---|
| months object Required | Keys 1 through 12 contain rules for that month. Key 0 contains calculated-date rules. At most 366 rules are allowed across all months. |