Courses endpoint¶
Endpoint to search and retrieve information about graduate courses. Follows specification of Moxie.
-
GET
/courses/course/
(string: id)¶ Get details of a course by its ID
Example request:
GET /courses/course/daisy-course-8572 HTTP/1.1 Host: api.m.ox.ac.uk Accept: application/json
Example response as JSON:
HTTP/1.1 200 OK Content-Type: application/hal+json { "subjects": [], "_embedded": { "presentations": [ { "attendance_pattern": "Daytime", "apply_from": "2012-10-01T00:00:00", "apply_until": "2012-11-16T00:00:00", "apply_link": "https://weblearn.ox.ac.uk/course-signup/rest/course/3C09CZ0004", "_links": { "poi": { "href": "/places/oxpoints:23232609" } }, "location": "oxpoints:23232609", "attendance_mode": "Campus", "id": "daisy-presentation-19625" }, { "attendance_pattern": "Daytime", "apply_from": "2012-10-01T00:00:00", "apply_until": "2012-11-16T00:00:00", "apply_link": "https://weblearn.ox.ac.uk/course-signup/rest/course/3C09CZ0004", "_links": { "poi": { "href": "/places/oxpoints:23232609" } }, "location": "oxpoints:23232609", "attendance_mode": "Campus", "id": "daisy-presentation-15277" } ] }, "description": "Topics to be [...] ousand Oaks, CA: Sage Publications. \n", "title": "Beyond Surveys - Researching the Internet and Internet Data ", "_links": { "self": { "href": "/courses/course/daisy-course-8572" } }, "provider": "Oxford Internet Institute", "id": "daisy-course-8572" }
Each presentation MAY have a link to poi, representing the Place of Interest where the course should take place.
Parameters: - id (string) – ID of the resource
Status Codes: - 200 OK – resource found
- 404 Not Found – no resource found
-
GET
/courses/search
¶ Search for courses by title / description or subjects.
Example request:
GET /courses/search?q=python HTTP/1.1 Host: api.m.ox.ac.uk Accept: application/hal+json
Example response as HAL+JSON:
HTTP/1.1 200 OK Content-Type: application/hal+json { "query": "python", "_embedded": { "courses": [ { "_embedded": { "presentations": [ { "attendance_pattern": "Daytime", "apply_from": "2012-10-01T00:00:00", "apply_until": "2012-11-16T00:00:00", "apply_link": "https://weblearn.ox.ac.uk/course-signup/rest/course/3C09CZ0004", "_links": { "poi": { "href": "/places/oxpoints:23232609" } }, "location": "oxpoints:23232609", "attendance_mode": "Campus", "id": "daisy-presentation-19625" } ] }, "description": "Topics to be cove[...] CA: Sage Publications. \n", "title": "Beyond Surveys - Researching the Internet and Internet Data ", "subjects": [], "_links": { "self": { "href": "/courses/course/daisy-course-8572" } }, "provider": "Oxford Internet Institute", "id": "daisy-course-8572" } ] }, "_links": { "hl:first": { "href": "/courses/search?q=python&count=35" }, "curie": { "href": "http://moxie.readthedocs.org/en/latest/http_api/relations/{rel}.html", "name": "hl", "templated": true }, "self": { "href": "/courses/search?q=python" }, "hl:last": { "href": "/courses/search?q=python&count=35" } } }
The response contains a list of results, links to go to first, previous, next and last pages depending on current start and count parameters, and the total count of results.
Query Parameters: - q – full text search query
- start – first result to display
- count – number of results to display
Status Codes: - 200 OK – results found
- 400 Bad Request – search query is inconsistent (expect details about the error as plain/text in the body of the response)
- 503 Service Unavailable – search service is not available
-
GET
/courses/subjects
¶ Get a list of subjects
Example request:
GET /courses/subjects HTTP/1.1 Host: api.m.ox.ac.uk Accept: application/hal+json
Example response as HAL+JSON:
HTTP/1.1 200 OK Content-Type: application/hal+json { "_links": { "self": { "href": "/courses/subjects" }, "courses:subject": [ { "count": 32, "href": "/courses/search?q=course_subject%3A%22Career+Development%22", "title": "Career Development" }, { "count": 24, "href": "/courses/search?q=course_subject%3A%22Communication+skills%22", "title": "Communication skills" }, { "count": 15, "href": "/courses/search?q=course_subject%3A%22Teaching+and+Academic+Skills%22", "title": "Teaching and Academic Skills" }, { "count": 7, "href": "/courses/search?q=course_subject%3A%22Technical+skills%22", "title": "Technical skills" } ] } }
You can browse courses by using the relation courses:subjects which provides links to the search resource, to search by subject.
Status Codes: - 200 OK – results found
- 503 Service Unavailable – search service is not available