wiki:api_v1

Version 6 (modified by michael, 12 years ago) ( diff )

added details to the HTTP Requsts for Courses

Overview

This is the first version of API. The main purpose of this version of API is to provide a way for external applications, e.g., learning management system, to interact with iPeer with tighter integration and better user experience. Data returned will be in JSON format with XML support coming later.

Authentication

OAuth 2.0

Resources

Users

GET/v1/usersget a list of users
GET/v1/users/{id}get a user with id
POST/v1/userscreate a user/users
DELETE/v1/users/{id}remove a user with id
PUT/v1/users/{id}update a user with id

Courses

GET/v1/coursesget a list of courses for current logged in user
parameternone
inputnone
responsesuccess (200) or could not find (404)
outputcourse list (json), or error message
GET/v1/courses/{id}get a course with id
parametercourse id
inputnone
responsesuccess (200) or could not find (404)
outputcourse (json), or error message
POST/v1/coursescreate a course
parameternone
input{"Course":{"course":"COURSE_CODE","title":"COURSE_TITLE"},"Department":{"Department":[DEPARTMENT_ID]}}
responsecreated (201) or error (500)
outputid of created course, or error message
DELETE/v1/courses/{id}remove a course with id
parametercourse id
inputnone
responsesuccess (204) or error (500)
outputid of deleted course, or error message
PUT/v1/courses/{id}update a course with id
parameternone
input{"Course":{"id":"COURSE_ID","course":"COURSE_CODE","title":"COURSE_TITLE"}}
responsesuccess (200) or error (500)
outputid of updated course, or error message

Groups

GET/v1/courses/{course_id}/groupsget a list of groups in course {course_id}
GET/v1/courses/{course_id}/groups/idget a group in course {course_id}
POST/v1/courses{course_id}/groupscreate a group in course {course_id}
DELETE/v1/courses/{course_id}/groups/{id}remove a group in course {course_id}
PUT/v1/courses/{course_id}/groups/{id}update a group in course {course_id}

Grades

GET/v1/courses/{course_id}/gradesget a list of grades in course {course_id}
GET/v1/courses/{course_id}/grades/idget a grades in course {course_id}
  • Grades are read-only

Events

GET/v1/courses/{course_id}/eventsget a list of events in course {course_id}
GET/v1/courses/{course_id}/events/idget a event in course {course_id}
  • Events are read-only
Note: See TracWiki for help on using the wiki.