Docs

Get Crew State Records

GET /crew/{crewId}/state-records

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

FieldTypeRequiredDescription
crewIduuidRequired

Query Parameters

FieldTypeRequiredDescription
fromdate-timeOptional
todate-timeOptional
ruleIduuidOptional

Response

FieldTypeDescription
crewIduuid
fromdate-time
todate-time
recordsGetCrewStateRecordsResponseRecordInfo[]| null
blocksGetCrewStateRecordsResponseBlockInfo[]| null

GetCrewStateRecordsResponseRecordInfo

FieldTypeDescription
stateIduuid
stateGetCrewStateRecordsResponseStateInfo
ruleIduuid
ruleNamestring| null
startDateTimedate-time
endDateTimedate-time| null
isActualboolean
explanationGetCrewStateRecordsResponseExplanationInfo

GetCrewStateRecordsResponseBlockInfo

FieldTypeDescription
iduuid
typeIduuid| null
startDateTimedate-time
endDateTimedate-time
isActualboolean
sourceGetCrewScheduleBlocksResponseSourceInfo
statesGetCrewStateRecordsResponseSegmentInfo[]| null

GetCrewStateRecordsResponseStateInfo

FieldTypeDescription
namestring| null
colorstring| null
iconstring| null
sortOrderinteger

GetCrewStateRecordsResponseExplanationInfo

FieldTypeDescription
thresholdGetCrewStateRecordsResponseThresholdInfo
countedFromdate-time| null
sourcesGetCrewStateRecordsResponseSourceHoursInfo[]| null

GetCrewScheduleBlocksResponseSourceInfo

FieldTypeDescription
resourceReservationIduuid| null
eventReservationIduuid| null
eventIduuid| null
eventNamestring| null
isCandidateboolean

GetCrewStateRecordsResponseSegmentInfo

FieldTypeDescription
stateIduuid
ruleIduuid
startDateTimedate-time
endDateTimedate-time

GetCrewStateRecordsResponseThresholdInfo

FieldTypeDescription
valuenumber
unitstring| null

GetCrewStateRecordsResponseSourceHoursInfo

FieldTypeDescription
eventIduuid| null
eventNamestring| null
isOrgDirectboolean
isCandidateboolean
actualHoursnumber
planHoursnumber