Archived users missing when getting info from API endpoint

I noticed that archived/locked users are missing for the endpoints to get the list of supervisors (GET /api/v1/supervisors) and interviewers (GET /api/v1/supervisors/{supervisorId}/interviewers)

Unlike the endpoint for getting the list of assignments (GET /api/v1/assignments), there is no parameter for archived/locked status for those two endpoints so there is currently no way to get archived/locked supervisors/interviewers using the API. The archived/locked status for every user is part of the response data in the variable: IsLocked. Is it possible to add archived/locked status as a parameter for the two endpoints to get the list of supervisors and the list of interviewers?


I’m hitting up against this problem too.

On use cases

In my case, I’m testing out some code that uses outputs from these API endpoints (and others) to build reports. I’m testing my report scripts using “historic” data and users from a pilot in preparation for a survey with new data and new users. Because of this limitation, I need to compile the mapping of pilot supervisors to interviewers manually :frowning_face:

While my current use case may be narrow, I can also see the utility of having this option for surveys. Even if users are locked/archived, an end user might want to build reports about their past actions.

On changes to the endpoints

I see a few ways to modify the endpoints:

  1. Add a request parameter to designate the set of users (e.g., all, IsLocked, IsArchived, etc).
  2. Return all users, with flags IsLocked and IsArchived

The only difference is between the two approaches is which device does the query: the SuSo server or the user’s machine. The current implementation does 2, but fails to return all users.

Work-around that’s not automatable, but involves relativley few clicks and could work for some use cases (like mine):

  • Log in as HQ
  • Teams and Roles > Interviewers
  • Select “Archived interviewers” from the “Archive status” filter
  • Download the report via one of the download links at the bottom of the filtered table.

I don’t think it is easily recoverable: Interviewers may be transferred between the teams. There is a recording of the interviewers transfer between the teams in the server log accessible to the admin for manual inspection, but not download through API.

As a result, the mapping must be dynamic, showing different matches at different times.