User management API?

Hi all,
Is there an API endpoint in the current Koa release to retrieve all users?
If not, would it be possible to add one using a plugin or extension (i.e., without making any modifications to the core platform). I’m running under Tutor if that matters.

Thanks

Hello @harel

You might want to check:

  1. edx-platform/urls.py at master · edx/edx-platform · GitHub
  2. edx-platform/views.py at 6a2adde87c79e25a8bbcd1442273851a5bb2aecc · edx/edx-platform · GitHub

I think what you look for might be already present there. If not, can you be more specific on what are you trying to achieve?

By the way, you can code new APIs such as this as plugins (or IDAs) :slight_smile:

Cheers!

1 Like

Thanks @viadanna
Unfortunately, as far as I can see, while querying as a superuser via the api, I cannot get a listing of ALL users. I can filter by username for example, but not get all. If I don’t provide a filter it defaults to my current user. One other thing I can’t see there is the ability to enrol a user in a course via the API.

For that purpose, I’d like to add those and other api endpoints to the platform, but doing so with zero (or minimal) changes to the platform itself, so that not to hinder future upgrades.

I looked at the IDAs, and that is a possible approach for our extended interface for scheduling course bookings and managing users, but I would like to still query the live edx data for the users and courses and the lack of those two api, as an example, causes a problem. The API layer I put in the IDA will still be decoupled from the edx platform as I understand it, since those are independent. But if I had a way to add all the endpoint i am missing I can simply use API calls to retrieve any missing data as needed.

1 Like