Skip to content

Instantly share code, notes, and snippets.

@ChrisOwen101
Last active April 8, 2021 14:02
Show Gist options
  • Save ChrisOwen101/ffedde83eed6e271ac21c8293e3466ba to your computer and use it in GitHub Desktop.
Save ChrisOwen101/ffedde83eed6e271ac21c8293e3466ba to your computer and use it in GitHub Desktop.

Endpoints

How to use this document

Under each title you'll find

  • The type of method request
    • e.g. POST, DELETE, UPDATE etc
    • More details
    • See here for how to use different method requests using Fetch
  • The request path
    • e.g, /course/
    • When a path uses {} that means it should be replaced with a variable (e.g. course/{moduleId} === /course/13431/)
  • The data that should be included
    • e.g. name, id, date etc

Course

Add Course

POST /course/

  • name
  • id

Delete Course

DELETE /course/{courseid}

Module

Add Module

POST /course/{courseid}

  • id
  • name
  • courseName

Delete Module

DELETE /course/{courseId}/{moduleid}

Coursework

Add Coursework

POST /course/{courseId}/{moduleid}

  • id
  • name
  • syllabusUrl
  • repoUrl
  • rubricUrl

Delete Coursework

DELETE /course/{courseId}/{moduleid}/{courseworkid}

City

Add City

POST /city/

  • name
  • id

Delete City

DELETE /city/{cityId}

Class

Add Class

POST /city/{cityId}

  • id
  • name

Delete Class

DELETE /city/{cityId}/{classId}

Student

Add Student

POST /course/{cityId}/{classId}

  • id
  • name
  • githubUsername

Delete Student

DELETE /city/{cityId}/{classId}/{studentId}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment