GET/crew/{crewId}/state-records
Lists the states the organization's own rules put one crew member in between from and to, across every active event plus the organization's own work,
computed live and never stored. Only rules scoped to Organization run (an event's own rules are answered by that event). Approved actual hours count
where a reservation has them, otherwise its plan; each block says which, with the states over it, and a record is actual only when every hour
behind it is. Each record explains itself: the threshold crossed and the hours behind it, by event and organization work. With ruleId,
runs only that rule as if it were active, nothing saved: what the rule would have done to this person. An Organization-scoped rule runs over
the whole week; an Event-scoped one over each event's own hours separately and never over organization work. Unnamed and vendor-supplied
heads never count. crewId comes from OrgCrew_GetCrew, ruleId from ResourceTypes_GetRuleSet. Needs Crew.View at the organization.
Path Parameters
| Field | Type | Required | Description |
|---|
| crewId | uuid | Required | |
Query Parameters
| Field | Type | Required | Description |
|---|
| from | date-time | Optional | |
| to | date-time | Optional | |
| ruleId | uuid | Optional | |
Response
| Field | Type | Description |
|---|
| crewId | uuid | |
| from | date-time | |
| to | date-time | |
| records | GetCrewStateRecordsResponseRecordInfo[]| null | |
| blocks | GetCrewStateRecordsResponseBlockInfo[]| null | |
GetCrewStateRecordsResponseRecordInfo
| Field | Type | Description |
|---|
| stateId | uuid | |
| state | GetCrewStateRecordsResponseStateInfo | |
| ruleId | uuid | |
| ruleName | string| null | |
| startDateTime | date-time | |
| endDateTime | date-time| null | |
| isActual | boolean | |
| explanation | GetCrewStateRecordsResponseExplanationInfo | |
GetCrewStateRecordsResponseBlockInfo
| Field | Type | Description |
|---|
| id | uuid | |
| typeId | uuid| null | |
| startDateTime | date-time | |
| endDateTime | date-time | |
| isActual | boolean | |
| source | GetCrewScheduleBlocksResponseSourceInfo | |
| states | GetCrewStateRecordsResponseSegmentInfo[]| null | |
GetCrewStateRecordsResponseStateInfo
| Field | Type | Description |
|---|
| name | string| null | |
| color | string| null | |
| icon | string| null | |
| sortOrder | integer | |
GetCrewStateRecordsResponseExplanationInfo
| Field | Type | Description |
|---|
| threshold | GetCrewStateRecordsResponseThresholdInfo | |
| countedFrom | date-time| null | |
| sources | GetCrewStateRecordsResponseSourceHoursInfo[]| null | |
GetCrewScheduleBlocksResponseSourceInfo
| Field | Type | Description |
|---|
| resourceReservationId | uuid| null | |
| eventReservationId | uuid| null | |
| eventId | uuid| null | |
| eventName | string| null | |
| isCandidate | boolean | |
GetCrewStateRecordsResponseSegmentInfo
| Field | Type | Description |
|---|
| stateId | uuid | |
| ruleId | uuid | |
| startDateTime | date-time | |
| endDateTime | date-time | |
GetCrewStateRecordsResponseThresholdInfo
| Field | Type | Description |
|---|
| value | number | |
| unit | string| null | |
GetCrewStateRecordsResponseSourceHoursInfo
| Field | Type | Description |
|---|
| eventId | uuid| null | |
| eventName | string| null | |
| isOrgDirect | boolean | |
| isCandidate | boolean | |
| actualHours | number | |
| planHours | number | |