Skip to content

Latest commit

 

History

History
176 lines (118 loc) · 1.66 KB

quizzes.md

File metadata and controls

176 lines (118 loc) · 1.66 KB

Quizzes


Retrieve all quizzes

api.ayat.com/v1/programs/{id}/courses/{id}/quizzes GET

Payload:
{
 "jwt": "65416584846465644546"
}
Success Response:

code: 200

{
  "quizes": [...]
}
Error Response:

code: 403

{
  "error": "user is unauthorized"
}

Retrieving a specific quiz

api.ayat.com/v1/programs/{id}/courses/{id}/quizzes/{id} GET

Payload:
{
  "jwt": "32132143432432"
}
Success Response:
  • Code: 200
{
  // course data.
}
Error Response:

code: 403

{
  "error": "user is unauthorized"
}

Create quiz

api/v1/programs/{id}/courses/{id}/quizzes POST

Payload:
{
    "jwt":   "ffff",
    "Quiz content" : "dummy content"
}
Success Response:

code : 200

{
    "status":  "created"
}
Error Response:

code: 403

{
  "error": "user is unauthorized"
}

Update the quiz

api/v1/programs/{id}/courses/{id}/quizzes/{id} PUT

Payload:
{
    "jwt":   "ffff",
    "content" : "content"
}
Success Response:

code : 200

{
    "status":  "updated"
}
Error Response:

code: 403

{
  "error": "user is unauthorized"
}

Delete the quiz

api/v1/programs/{id}/courses/{id}/quizzes/{id} DELETE

Payload:
{
    "jwt":   "ffff"
}
Success Response:

code : 200

{
    "status":  "deleted"
}
Error Response:

code: 403

{
  "error": "user is unauthorized"
}