Permalink
Fetching contributors…
Cannot retrieve contributors at this time
328 lines (191 sloc) 7.23 KB
FORMAT: 1A
HOST: http://teachers.odl.mit.edu/
# ccxcon
CCXCon is a simple API serves as an interface between edX running instances and different MIT apps.
## Group Courses
## Courses Collection [/api/v1/coursexs/]
### List All Courses [GET]
+ Response 200 (application/json)
+ Attribute (array[Course])
### Create a New Course [POST]
+ Request (application/json)
{
"title": "Introductory Physics: Classical Mechanics",
"author_name": "David E. Pritchard",
"edx_instance": "https://edx.org",
"overview": "This is the course overview.",
"description": "This is a college level Introductory Newtonian Mechanics",
"image_url": "http://placehold.it/350x150",
"instructors": ["2d133482b3214a119f55c3060d882ceb"],
"course_id": "course-locator:$org+$course.$run+branch+$branch+version+$version+type"
}
+ Response 201 (application/json)
+ Attributes (Course)
+ Headers
Location: /coursexs/1016dd7e
## Course [/api/v1/coursexs/{course_uuid}/]
+ Parameters
+ course_uuid: `7e0e52d0386411df81ce001b631bdd31` (string, required) - UUID of the edX course
### Retrieve a Course [GET]
+ Response 200 (application/json)
+ Attributes (Course)
### Delete Course [DELETE]
Deletes a course and all of its components and CCXs associated with it.
+ Response 204
### Partially update Course [PATCH]
+ Request (application/json)
{
}
+ Response 200 (application/json)
+ Attributes (Course)
### Update Course [PUT]
+ Request (application/json)
{
"uuid": "7e0e52d0386411df81ce001b631bdd31",
"title": "CHANGED: Super important physics class",
"author_name": "David E. Pritchard",
"edx_instance": "https://edx.org",
"overview": "This is the course overview.",
"description": "This is a college level Introductory Newtonian Mechanics",
"image_url": "http://placehold.it/350x150",
"instructors": ["2d133482b3214a119f55c3060d882ceb"],
"course_id": "course-locator:$org+$course.$run+branch+$branch+version+$version+type"
}
+ Response 200 (application/json)
+ Attributes (Course)
## Group Modules
## Modules collection [/api/v1/coursexs/{course_uuid}/modules/]
+ Parameters
+ course_uuid: `7e0e52d0386411df81ce001b631bdd31` (string, required) - UUID of the edX course
### List All modules for a given Course [GET]
+ Response 200 (application/json)
+ Attributes (array[Module])
### Create a New Module [POST]
+ Request (application/json)
{
"title": "Introduction to Quantum Bits",
"subchapters": ["Quarks and Similar things", "Things that are not quarks"]
}
+ Response 201 (application/json)
+ Attributes (Module)
+ Headers
Location: /coursexs/7e0e52d0386411df81ce001b631bdd31/modules/{uuid}/
## Module [/api/v1/coursexs/{course_uuid}/modules/{module_uuid}/]
+ Parameters
+ course_uuid: `7e0e52d0386411df81ce001b631bdd31` (string, required) - UUID of the edX course
+ module_uuid: `1db1a8439cbf4a8f8c395ad63fb43e8a` (string, required) - UUID of the module
### Retrieve a Module [GET]
+ Response 200 (application/json)
+ Attributes (Module)
### Delete a Module [DELETE]
Deletes a CCX course and all of its components associated with it.
+ Response 204
### Partially update a Module [PATCH]
+ Request (application/json)
{
}
+ Response 200 (application/json)
+ Attributes (Module)
### Update a Module [PUT]
+ Request (application/json)
{
"title": "Introduction to Quantum Bits",
"subchapters": ["Quarks and Similar things", "Things that are not quarks"]
}
+ Response 200 (application/json)
+ Attributes (Module)
## Group CCXs
## CCX Collection [/api/v1/coursexs/{course_uuid}/ccxs]
+ Parameters
+ course_uuid: `7e0e52d0386411df81ce001b631bdd31` (string, required) - UUID of the edX course
### List All CCXs for a given Course [GET]
+ Response 200 (application/json)
+ Body
{
}
### Create a New CCX Course [POST]
+ Request (application/json)
{
}
+ Response 201 (application/json)
+ Headers
Location: /coursexs/7e0e52d0386411df81ce001b631bdd31/ccxs/bcfa43b4/
+ Body
{
}
## CCX [/api/v1/coursexs/{course_uuid}/ccxs/{ccx_uuid}]
+ Parameters
+ course_uuid: `7e0e52d0386411df81ce001b631bdd31` (string, required) - UUID of the edX course
+ ccx_uuid: `bcfa43b4` (string, required) - UUID of the ccx course
### Retrieve a CCX [GET]
+ Response 200 (application/json)
{
}
### Delete a CCX [DELETE]
Deletes a CCX course and all of its components associated with it.
+ Response 204 (application/json)
### Partially update a CCX [PATCH]
+ Request (application/json)
{
}
+ Response 200 (application/json)
{
}
### Update a CCX [PUT]
+ Request (application/json)
{
}
+ Response 200 (application/json)
{
}
## Group CCX Modules
## Modules collection [/api/v1/coursexs/{ccx_uuid}/modules]
+ Parameters
+ ccx_uuid: `7e0e52d0386411df81ce001b631bdd31` (string, required) - UUID of the CCX course
### List All modules associated with a given CCX [GET]
+ Response 200 (application/json)
+ Body
{
}
## Module membership [/api/v1/ccxs/{ccx_uuid}/modules/{module_uuid}]
+ Parameters
+ ccx_uuid: `7e0e52d0386411df81ce001b631bdd31` (string, required) - UUID of the CCX course
+ module_uuid: `bcfa43b4` (string, required) - UUID of the module
### Add a module to a CCX Course [POST]
+ Request (application/json)
{
}
+ Response 201 (application/json)
+ Headers
Location: /ccxs/bcfa43b4/modules/40c35471
+ Body
{
}
### Delete a CCX [DELETE]
Deletes the association of a module from a CCX course.
+ Response 204 (application/json)
## Group Less RESTful endpoints
### User Existence Checks [GET /api/v1/user_exists/{?uid}]
+ Parameters
+ uid: `861e87a0803e436b989cb62d5e672c5f` (string, required) - UUID of user to check for.
+ Response 200 (application/json)
+ Body
{"exists": false}
# Data Structures
## Course (object)
+ uuid (string)
+ title: Introductory Physics: Classical Mechanics (string)
+ course_id: course-locator:$org+$course.$run+branch+$branch+version+$version+type (string)
+ author: David E. Pritchard (string)
+ image_url (string)
+ terms_url (string)
+ overview: This is the course overview. (string)
+ description: This is a college level Introductory Newtonian Mechanics (string)
+ modules (string) - url to list modules
+ instructors (array[string])
## Module (object)
+ uuid: 1140283aa1b24f5e895e97a76a339040 (string)
+ title: Introduction to Quantum Bits (string)
+ subchapters (array[string]): ["Quarks and similar things", "Things that are not quarks"] - list of strings representing chapter pages
+ course: http://localhost:8000/api/v1/coursexs/7e0e52d0386411df81ce001b631bdd31/ (string) - url of the parent course
+ url: /api/v1/coursexs/7e0e52d0386411df81ce001b631bdd31/modules/1140283aa1b24f5e895e97a76a339040/ (string) - url of the module