Skip to main content

An Open edX plugin to add API for course export to s3

Project description

A django app plugin to add a new API to Open edX to export courses to S3 buckets.

Installation

For detailed installation instructions, please refer to the plugin installation guide.

Installation required in:

  • Studio (CMS)

Configuration

1) edx-platform configuration

  • You might need to add the following configuration values to the config file in Open edX. For any release after Juniper, that config file is /edx/etc/cms.yml. If you’re using private.py, add these values to cms/envs/private.py. These should be added to the top level. Ask a fellow developer or devops for these values.

    AWS_ACCESS_KEY_ID: <your aws access id>
    AWS_SECRET_ACCESS_KEY: <your api access key>
    COURSE_IMPORT_EXPORT_BUCKET: <bucket name to export the courses to>
  • For Tutor installations, these values can also be managed through a custom tutor plugin.

How To Use

The API supports a POST API call that accepts the list of course Ids and returns the uploaded paths of the courses on S3

To call the API, Send a POST request to <STUDIO_BASE>/api/courses/v0/export/ with the a payload with a list of course IDs that might look like:

{
   "courses": ["course-v1:edX+DemoX+Demo_Course"]
}

The successful response would look like:

With 200

{
    "successful_uploads": {
        "course-v1:edX+DemoX+Demo_Course": "https://bucket_name.s3.amazonaws.com/course-v1:edX+DemoX+Demo_Course.tar.gz",
        "course-v1:edX+Test+Test_Course": "https://bucket_name.s3.amazonaws.com/course-v1:edX+Test+Test_Course.tar.gz"
    },
    "failed_uploads": {}
}

With 400

{
    "successful_uploads": {
        "course-v1:edX+DemoX+Demo_Course": "https://bucket_name.s3.amazonaws.com/course-v1:edX+DemoX+Demo_Course.tar.gz",
    },
    "failed_uploads": {
        "course-v1:edX+Test+Test_Course": "Error message"
    }
}

The response will contain either the s3 bucket url for successful uploads and/or an error message for failed uploads.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ol_openedx_course_export-0.2.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ol_openedx_course_export-0.2.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file ol_openedx_course_export-0.2.0.tar.gz.

File metadata

File hashes

Hashes for ol_openedx_course_export-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0f76801ef367899d43b3fc829ee4ffd4821c8d583b1e3d802213ed01dcf26d5e
MD5 5debb2a0d823e3d5795ddc5c71b7f84b
BLAKE2b-256 62f5bb400f76d5a38f5324528d5484059d60a404cd858e6406eb93ff4368d4d8

See more details on using hashes here.

File details

Details for the file ol_openedx_course_export-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ol_openedx_course_export-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 95ba7a91f54ebdb82ee71c7ed8a05103f0f809b403e206fa713f8af6959d0f57
MD5 cbdbfd2f9c902ac603f1105dfc15491a
BLAKE2b-256 10412ed2b5623e11fd8d1ca649c9162cfe2cfd55b1dbe9ae9809a4c667163342

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page