Skip to content

Web end points

mohammadmahdiabdollahpour edited this page Jul 10, 2019 · 3 revisions

/api/supervisor/...

entity: card

{
  "id": "guid"
  "course": {
     "title" : "",
     "color": "#123512"
   },
  "duration": "timespan",
  "startTime": "date"
  "dueDate": "date"
  "description": "desc",
  "done": false,
  "expired": false, # due date < today
  "editable": false, # done or expired
  "supervisorCreated": true
}
  • get all cards in specific day range (inclusive): array of 7 arrays (one for each day) GET card/studentId/2019-12-02/7
  • create new card POST card/
{
  "courseId": "guid". 
  "duration": "timespan",
  "description": "desc",
  "dueDate": "date",
  "studentId" "guid"
}
  • edit card PUT card/studentId/cardId/
{
   "courseId": "guid",
  "duration": "timespan",
  "description": "desc",
}
  • delete card DELETE card/studentId/cardId

entity: course

{
  "id": "guid",
  "title": "string",
  "color": "#413312"
}
  • get all courses GET /course

  • get all courses of a student: GET /course/student/studentId

  • create course POST course/

{
  "title": "string",
  "color": "#413312"
}

no edit course was mentioned for supervisor

  • edit course PUT course/id
{
  "title": "string",
  "color": "#413312"
}

entity: comment

{
  "id": "guid"
  "date": "Date",
  "creationTime": "Date",
  "text": "some text"
}
  • get all comments of a student in a day with pagination: GET comment/studentId/2019-12-02/page (0 based)/count

  • create comment POST comment/

{
  "date": "Date",
  "text": "some text",
  "studentId": "guid",
}

entity: channelPost

{
  "id": "guid"
  "creationTime": "Date",
  "text": "some text",
  "image": "text"
  "classId": "guid"
}
  • get all channelPosts of a class with pagination: GET channelPost/classId/page (0 based)/count

  • create channelPost POST channelPost/classId

{
  "image": "text",
  "text": "some text"
}
  • delete channelPost DELETE channelPost/classId/id

entity: schoolClass

{
  "id": "guid",
  "name": "text",
  "schoolName": "text",
  "token": "text"
}
  • get all schoolClasses of the logged in supervisor: GET schoolClass/

  • get all students in a specific class of the logged in supervisor: GET schoolClass/classId/students

  • create class POST schoolClass/

{
  "name": "text",
  "schoolName": "text",
}
  • delete schoolClass DELETE schoolClass/id

entity: AnalysisData

[
  {"course": {
    "color": "#fff",
    "title": "biology"
  },
  "totalTime": "123",
  "totalDoneTime": "123"},...
]
  • get all analysis data within a range GET analysis/studentId/date/range

Register

{
   "email": "string",
   "password": "string",
   "role": "supervisor",
   "userName": "string",
   "firstName": "string",
   "lastName": "string",
   "image": "byte[]"
}

POST /api/shared/account/register

Login

{
    "email": "string",
    "password": "string"
}

POST /api/shared/account/login

  • test: GET /api/shared/user/name