openedX community,
I’ve been working on an OAuth2 compatible API for importing and exporting of full course/library tarballs (PR: https://github.com/edx/edx-platform/pull/6190), which is intended for use on edx.org. As it’s very close to completion, I wanted to do a small write-up of how these changes will affect Studio’s current full course Import/Export system when merged.
In short, everything should appear and work exactly as it does now when clicking through Studio’s UI. However, any existing tools that automatically login to studio and do course/library imports/exports will at least need to update the URLs:
Old Export URL: https://your-studio/export/[COURSE_OR_LIBRARY_KEY]?_accept=application/x-tgz
New Export URL: https://your-studio/api/import_export/v1/courses/[COURSE_OR_LIBRARY_KEY]?accept=application/x-tgz&redirect=[(OPTIONAL)REDIRECT_URL]
Old Import URL: https://your-studio/import/[COURSE_OR_LIBRARY_KEY]
New Import URL: https://your-studio/import/[COURSE_OR_LIBRARY_KEY]
Old Status URL: https://your-studio/import_status/[COURSE_OR_LIBRARY_KEY]/[FILENAME]
New Status URL: https://your-studio/api/import_export/v1/courses/[COURSE_OR_LIBRARY_KEY]/import_status/[FILENAME]
Key:
[COURSE_OR_LIBRARY_KEY]: The course key or library key of the course to return.
Example: course-v1:1234+1234+1234
[REDIRECT_URL]: Optional, and only passed as a parameter to the export endpoint. If supplied, this is the URL that the API will redirect to upon any export failure, passing it various GET params.
Example (URL encoded): %2Fexport%2Fcourse-v1%3A1234%2B1234%2B1234
[FILENAME]: Only used in the status URL. It's function has not changed from that of Studio's old import status endpoint, and should be equal to the name of the course/library tarball being imported.
Example: 1T2015.KtWAXA.tar.gz
Other than the URL changes, importing and exporting via session authentication will still work the same as it does now. Please post here if you have any questions or concerns.
Thank you,
Brandon