Docs
Add Rule
POST /rule-sets/{ruleSetId}/rules
POST
/rule-sets/{ruleSetId}/rulesAdds a rule to a rule set; resources governed by the set are re-evaluated. conditionType is BlockDuration, TimeSinceClearance or TimeOfDayWindow, and resultingStateId comes from Resources_GetResourceStates. A TimeOfDayWindow rule is live on a day when the weekday is in daysOfWeek or the day matches an annualDates entry (MM-DD, or MM-ordinal-weekday such as 05-Last-Monday, where ordinal is 1, 2, 3, 4 or Last); with neither it is live every day, and a date matches the actual calendar day, never a weekend observance. When windowStart and windowEnd are equal the window covers the whole day. Needs the event settings permission.
Path Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| ruleSetId | uuid | Required |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Optional | |
| description | string | Optional | |
| priority | integer | Optional | |
| conditionType | string | Optional | |
| trackedBlockTypeId | uuid | Optional | |
| isActive | boolean | Optional | |
| windowStart | time | Optional | |
| windowEnd | time | Optional | |
| resultingStateId | uuid | Optional | |
| daysOfWeek | string[] | Optional | |
| annualDates | string[] | Optional |