Commit 8008cfbe by Mark Hoeber

Redirect Enrollment API to Platform API doc

parent 11f75e04
.. _edX API Authentication:
##################################
edX Enrollment API Authentication
##################################
You have two options for authentication when using the edX Enrollment API:
* `OAuth 2.0`_
* `Session Authentication`_
.. note::
You do not need to authenticate to :ref:`get enrollment details for a course
<Get Enrollment Details for a Course>`.
*************
OAuth 2.0
*************
The edX Enrollment API uses OAuth 2.0 for authentication. OAuth 2.0 is an open
standard used by many systems that require secure user authentication. See the
`OAuth 2.0 Standard`_ standard for more information.
========================================
Registering with Your Open edX Instance
========================================
To use the edX Enrollment API with courses on you instance of Open edX, you
must register your application with the Open edX server. See the OAuth 2.0
specification for details.
**************************
Session Authentication
**************************
To use the edX Enrollment API, you can use session authentication in your
application.
You must authenticate as a registred edX user.
.. include:: links.rst
\ No newline at end of file
.. _edX Enrollment API Endpoints:
################################################
edX Enrollment API Endpoints
################################################
The edX Platform API allows you to view information about users and their course enrollments, course information, and videos and transcripts.
The following tasks and endpoints are currently supported.
.. list-table::
:widths: 10 70
:header-rows: 1
* - To:
- Use this endpoint:
* - :ref:`Get the user's enrollment status in a course <Get the Users Enrollment Status in a Course>`
- /api/enrollment/v1/enrollment/{user_id},{course_id}
* - :ref:`Get enrollment details for a course<Get Enrollment Details for a Course>`
- /api/enrollment/v1/course/{course_id}
* - :ref:`View a user's enrollments <View and add to a Users Course Enrollments>`
- /api/enrollment/v1/enrollment
* - :ref:`Enroll a user in a course <View and add to a Users Course Enrollments>`
- /api/enrollment/v1/enrollment{“course_details”:{“course_id”:“*course_id*”}}
\ No newline at end of file
##################################################
Enrollment API Module
##################################################
.. module:: enrollment
This page contains information on using the Enrollment API to:
* :ref:`Get the user's enrollment status in a course <Get the Users Enrollment Status in a Course>`
* :ref:`Get enrollment details for a course<Get Enrollment Details for a Course>`
* :ref:`View a user's enrollments <View and add to a Users Course Enrollments>`
* :ref:`Enroll a user in a course <View and add to a Users Course Enrollments>`
.. _Get the Users Enrollment Status in a Course:
********************************************
Get the User's Enrollment Status in a Course
********************************************
.. autoclass:: enrollment.views.EnrollmentView
**Example response showing the user's enrollment status in a course**
.. code-block:: json
HTTP 200 OK
Content-Type: application/json
Vary: Accept
Allow: GET, HEAD, OPTIONS
{
"created": "2014-11-19T04:06:55Z",
"mode": "honor",
"is_active": true,
"course_details": {
"course_id": "edX/DemoX/Demo_Course",
"enrollment_end": null,
"course_modes": [
{
"slug": "honor",
"name": "Honor Code Certificate",
"min_price": 0,
"suggested_prices": [],
"currency": "usd",
"expiration_datetime": null,
"description": null
}
],
"enrollment_start": null,
"invite_only": false
},
"user": "staff"
}
.. _Get Enrollment Details for a Course:
************************************
Get Enrollment Details for a Course
************************************
.. autoclass:: enrollment.views.EnrollmentCourseDetailView
**Example response showing a user's course enrollments**
.. code-block:: json
HTTP 200 OK
Content-Type: application/json
Vary: Accept
Allow: GET, HEAD, OPTIONS
{
"course_id": "edX/DemoX/Demo_Course",
"enrollment_end": null,
"course_modes": [
{
"slug": "honor",
"name": "Honor Code Certificate",
"min_price": 0,
"suggested_prices": [],
"currency": "usd",
"expiration_datetime": null,
"description": null
}
],
"enrollment_start": null,
"invite_only": false
}
.. _View and add to a Users Course Enrollments:
*********************************************
View and Add to a User's Course Enrollments
*********************************************
.. autoclass:: enrollment.views.EnrollmentListView
**Example response showing a user's course enrollments**
.. code-block:: json
HTTP 200 OK
Content-Type: application/json
Vary: Accept
Allow: GET, POST, HEAD, OPTIONS
[
{
"created": "2014-09-19T18:08:37Z",
"mode": "honor",
"is_active": true,
"course_details": {
"course_id": "edX/DemoX/Demo_Course",
"enrollment_end": null,
"course_modes": [
{
"slug": "honor",
"name": "Honor Code Certificate",
"min_price": 0,
"suggested_prices": [],
"currency": "usd",
"expiration_datetime": null,
"description": null
}
],
"enrollment_start": null,
"invite_only": false
},
"user": "honor"
},
{
"created": "2014-09-19T18:09:35Z",
"mode": "honor",
"is_active": true,
"course_details": {
"course_id": "ArbisoftX/BulkyEmail101/2014-15",
"enrollment_end": null,
"course_modes": [
{
"slug": "honor",
"name": "Honor Code Certificate",
"min_price": 0,
"suggested_prices": [],
"currency": "usd",
"expiration_datetime": null,
"description": null
}
],
"enrollment_start": "2014-05-01T04:00:00Z",
"invite_only": false
},
"user": "honor"
}
]
**Example post request to enroll the user in a new course**
.. code-block:: json
{
“course_details”: {
“course_id”: “edX/DemoX/Demo_Course”
}
}
\ No newline at end of file
...@@ -2,12 +2,4 @@ ...@@ -2,12 +2,4 @@
edX Enrollment API Version 1 edX Enrollment API Version 1
################################################ ################################################
.. toctree:: This documentation has moved. Enrollment API information is now included in the `EdX Platform APIs documentation <http://edx.readthedocs.org/projects/edx-platform-api/en/latest/>`_.
:maxdepth: 2
read_me
preface
overview
authentication
endpoints
enrollment
.. _OAuth 2.0 Standard: https://tools.ietf.org/html/draft-ietf-oauth-v2-31
\ No newline at end of file
.. _edX Enrollment API Overview:
################################################
edX Enrollment API Overview
################################################
The edX Enrollment API enables you to view user and course enrollment
information, and to enroll a user in a course.
The edX Platform API uses Representational State Transfer (REST) design
principles and supports the JavaScript Object Notation (JSON) data-interchange
format. Our REST API is simple, lightweight and optimized.
You can use the edX Enrollment API for web, desktop, and mobile applications.
*************************************
edX Enrollment API Version 1
*************************************
The edX Enrollment API is currently at version 1.0. We plan on making
significant enhancements to this API.
********************************
edX Enrollment API Capabilities
********************************
With the edX Enrollment API, you can:
* :ref:`Get the user's enrollment status in a Course <Get the Users Enrollment
Status in a Course>`
* :ref:`Get enrollment details for a course<Get Enrollment Details for a
Course>`
* :ref:`View a user's enrollments <View and add to a Users Course Enrollments>`
* :ref:`Enroll a user in a course <View and add to a Users Course Enrollments>`
.. include:: ../../shared/preface.rst
\ No newline at end of file
########
Read Me
########
The edX Enrollment API documentation is created using RST_
files and Sphinx_. You, the user community, can help update and revise this
documentation project on GitHub:
https://github.com/edx/edx-platform/tree/master/docs/enrollment_api/source
To suggest a revision, fork the project, make changes in your fork, and submit
a pull request back to the original project: this is known as the `GitHub Flow`_.
.. _Sphinx: http://sphinx-doc.org/
.. _LaTeX: http://www.latex-project.org/
.. _`GitHub Flow`: https://github.com/blog/1557-github-flow-in-the-browser
.. _RST: http://docutils.sourceforge.net/rst.html
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment