Instructor data downloads for student responses via an API

I would like to download the student problem responses for a course via an API.

I don’t see a ReST API to do this directly - is that correct?

Is there an API to initiate a download task (as would happen when a data download is requested in the Instructor tab of the course front end, using “Create a report of problem responses”)? Getting the student responses as a data download would be fine for my use case.

I have tried to use the endpoints that the front end uses, for example:, but the endpoint requires a CSRF cookie which implies that they are not intended to be used outside the front end?

1 Like

My team has a pull request open to implement this exact functionality. We’d love if you could test it and provide feedback: Add OAuth2 support for problem response reports endpoints by pcockwell · Pull Request #24873 · edx/edx-platform · GitHub

More details are on the earlier version, which unfortunately was reverted as it may have had a bug:

Thanks @braden! What is holding up the PR? I t looks like some of the pipeline checks are failing, but I am not able to see the details. If I can, I would be happy to help to get this merged.

@xitij2000 is planning to rebase the PR very soon, and the failing tests should be gone once he does that. I think the main cause of delay is that we don’t yet understand if or how this PR may have caused the error that was seen last time it was deployed.

@braden is there a way to run these reports using or cimilar CLI utilities?

I’m not sure. You should be able to run ./ lms help to get a list of available commands though.

@james_imsimbi @braden I’ve created a fresh new PR that leaves the original endpoints untouched and creates new ones for MFEs or other API uses.

@xitij2000 thanks for this and I see the PR was merged. I am considering patching this PR onto the Koa release (open-release/koa.2) - as far as you know are there any other changes that it depends on that might cause this not to work?

It’s hard to say honestly. There are a lot of changes going on especially with removing six etc that might make it hard to resolve the diff. The work is done near lilac and koa is pretty old now, so chances are it won’t apply cleanly.

That said it’s definitely worth a try. It isn’t using any kind of external library code that would be affected between releases.

Thanks @xitij2000 ! I will upgrade to lilac - and it sounds like the PR will be more likely to work with lilac. Do you know when this feature will get added to lilac?

@james_imsimbi I’m afraid I don’t know. I don’t know the cuttoff there. It might just be part of Maple. Although it should be a pretty simple backport to Lilac if it doesn’t make it.

I’m afraid it didn’t make the cut for Lilac by about a month. But:

  • It will be much easier to backport the change to Lilac than to Koa
  • It will definitely be included in Maple