Include district-level staff assigned to Primary School Code 0 in OneRoster 1.1 /users
Riverbank Unified School District needs to roster district-level certificated and administrative staff through the OneRoster 1.1 API. These employees may have active STF records and valid STC credentials but do not have classroom, TCH, or SSE assignments. Their Primary School Code is 0 because they work at the district office.
The current OneRoster staff-selection logic processes individual configured school sites but does not allow school 0 to be selected. As a result, otherwise qualifying district-level staff cannot be returned by /ims/oneroster/v1p1/users or included in users.csv.
Here is the sql query to retrieve the list of staff member in this category:
select
Concat('ADM', stf.id) as 'sourcedId'
, '' as 'status'
, '' as 'dateLastModified'
, 'TRUE' as 'enabledUser'
, stf.psc as 'orgSourcedIds'
, 'administrator' as 'role'
, stf.em as 'username'
, '' as 'userIds'
, stf.fn as 'givenName'
, stf.ln as 'familyName'
, '' as 'middleName'
, Concat('0ADM_', stf.id) as 'identifier'
, stf.em as 'email'
, '' as 'sms'
, '' as 'phone'
, '' as 'agentSourcedIds'
, '' as 'grades'
, '' as 'password'
from stf
where stf.del = 0 and stf.tg = '' and stf.em <> '' and stf.psc in (0)
