Skip to content

Latest commit

 

History

History
51 lines (45 loc) · 11 KB

doc.org

File metadata and controls

51 lines (45 loc) · 11 KB

API Endpoints Description

API description

Resources

Category

Course

Lesson

Litem

API endpoint description table

Category

descriptionactionrequest payloadresponse payloadresponse codeURI /category +
create a categoryPOST{"cat_name": "", "cat_desc": "", "cat_icon_url": null}{"cat_id": , "cat_name": "", "cat_desc": "", "cat_icon_url": null, "date_created": "", "date_modified": ""}201, Created/create/
retrieve category detailsGET{"cat_id": , "cat_name": "", "cat_desc": "", "cat_icon_url": null, "date_created": "", "date_modified": "", courses: []}200, OK/<cat_id>/
get list of all the categories with detailsGET[{"cat_id": , "cat_name": "", "cat_desc": "", "cat_icon_url": null, "date_created": "", "date_modified": "", courses: []}, ... ...]200, OK/
update a categoryPUT{"cat_name": "", "cat_desc": "", "cat_icon_url": null}{"cat_id": , "cat_name": "", "cat_desc": "", "cat_icon_url": null, "date_created": "", "date_modified": "", courses: []}200, OK/<cat_id>/
delete a category#DELETE204, No Content/<cat_id>/

#If there are courses associated with a category, then you can’t delete that category until you delete or dissociate all the related courses.

Course

descriptionactionrequest payloadresponse payloadresponse codeURI /courses +
create a coursePOST{"course_name": "","course_description": "","faculty": null, "course_icon_url": null, "category":<pk> }{"cid": ,"course_name": "", "course_description": "", "faculty": null, "course_icon_url": null, "date_created": "", "date_modified": "", "lessons":[]}201, CREATED/create/
retrieve course’s detailsGET{"cid": ,"course_name": "", "course_description": "", "faculty": null, "course_icon_url": null, "date_created": "", "date_modified": "", "lessons":[]}200, OK/<cid>/
retrieve list of all courses with detailsGET[{"cid": ,"course_name": "", "course_description": "", "faculty": null, "course_icon_url": null, "date_created": "", "date_modified": "", "lessons":[]}, ... ...]200, OK/
update a coursePUT{"course_name": "","course_description": "","faculty": null, "course_icon_url": null, "category":<pk> }{"cid": ,"course_name": "", "course_description": "", "faculty": null, "course_icon_url": null, "date_created": "", "date_modified": "", "lessons":[]}200, OK/<cid>/
delete a course#DELETE204, NO CONTENT/<cid>/
retrieve a list of selected coursesPOST{"list":[cid1, cid2, cid3]}[{---object details---}, {---object details---}, ... ...]200, OK/getbulk/

# If there are lessons associated with a course, then you can’t delete that course until you delete or dissociate all the related lessons.

Lesson

descriptionactionrequest payloadresponse payloadresponse codeURI /lessons +
create a lessonPOST{"course": null, "lesson_name": " ", "lesson_seqnum": null, "lesson_desc": " ", "lesson_icon_url": " "}{"liid": , "litem_name": " ", "litem_seqnum": , "litem_icon_url": null, "litem_asset_url": " ", "litem_desc": " ", "date_created": " ", "date_modified": " "}201 Created/create/
retrieve a lesson’s detailsGET{"liid": , "litem_name": " ", "litem_seqnum": , "litem_icon_url": null, "litem_asset_url": " ", "litem_desc": " ", "date_created": " ", "date_modified": " "}200, OK/<lid>/
retrieve list of all lessons with details of each lessonGET[{"liid": , "litem_name": " ", "litem_seqnum": , "litem_icon_url": null, "litem_asset_url": " ", "litem_desc": " ", "date_created": " ", "date_modified": " "}, {... ...},...]200, OK/
update a lessonPUT{"course": null, "lesson_name": " ", "lesson_seqnum": null, "lesson_desc": " ", "lesson_icon_url": " "}{"liid": , "litem_name": " ", "litem_seqnum": , "litem_icon_url": null, "litem_asset_url": " ", "litem_desc": " ", "date_created": " ", "date_modified": " "}200, OK/<lid>/
delete a lessonDELETE204, No Content/<lid>/

LessonItem

descriptionactionrequest payloadresponse payloadresponse codeURI /litems +
create a lesson itemPOST{"lesson": null, "litem_name": "", "litem_seqnum": null, "litem_icon_url": "", "litem_asset_url": "", "litem_desc": ""}{"liid": , "lesson": , "litem_name": " ", "litem_seqnum": , "litem_icon_url": null, "litem_asset_url": " ", "litem_desc": " ", "date_created": " ", "date_modified": " "}201, Created/create/
retrieve a lesson item’s detailsGET{"liid": , "lesson": , "litem_name": " ", "litem_seqnum": , "litem_icon_url": null, "litem_asset_url": " ", "litem_desc": " ", "date_created": " ", "date_modified": " "}200, OK/<llid>/
retrieve list of all lessons items with detail of each lesson itemGET[{"liid": , "lesson": , "litem_name": " ", "litem_seqnum": , "litem_icon_url": null, "litem_asset_url": " ", "litem_desc": " ", "date_created": " ", "date_modified": " "}, {... ...}, ...]200, OK/
update a lesson itemPUT{"lesson": null, "litem_name": "", "litem_seqnum": null, "litem_icon_url": "", "litem_asset_url": "", "litem_desc": ""}{"liid": , "lesson": , "litem_name": " ", "litem_seqnum": , "litem_icon_url": null, "litem_asset_url": " ", "litem_desc": " ", "date_created": " ", "date_modified": " "}200, OK/<llid>/
delete a lesson itemDELETE204, No Content/<llid>/