Note: for
creating
,updating
anddeleting
courses user must haveadmin permissions.
api.ayat.com/v1/programs/{id}/courses
POST
{
"jwt": "ffff",
"course_name": "Title",
"course_description": "description",
"course_order": "order"
// other course data.
}
{
"status": "created"
}
or
{
"status": "<Duplicate resource codes: 4>"
}
{
"error": "user is unauthorized"
}
api.ayat.com/v1/programs/{id}/courses/{id}
PUT
{
"jwt": "ffff"
// which data to be updated
}
{
"status": "updated"
}
{
"error": "user is unauthorized"
}
api.ayat.com/v1/programs/{id}/courses
GET
{
"jwt": "32132143432432"
}
{
"courses": [...]
}
{
"error": "user is unauthorized"
}
api.ayat.com/v1/programs/{id}/courses/{id}
GET
{
"jwt": "32132143432432"
}
{
//course data.
}
{
"error": "user is unauthorized"
}
api.ayat.com/v1/programs/{id}/courses/{id}
DELETE
{
"jwt": "ffff"
}
{
"status": "deleted"
}
{
"error": "user is unauthorized"
}