Backend for DevDesk Queue
https://devdesk-queue.herokuapp.com
All endpoints require tokens in header. role requirements specified in each endpoint which requires a role.
{
"Authorization": "token",
"role": "student" || "helper"
}
/api/auth/register
Payload: Expects an object with a username, password and email
{
"email": "test2@gmail.com",
"username": "jay",
"password": "pass",
"role": "student"
}
/api/auth/login
Payload Expects an object with a username and password, Returns a security token
{
"username": "jay",
"password": "pass"
}
/api/users
Returns a list of all registered users
/api/users:id
Returns the user by id specified on the endpoint
api/users/:id
{
"Authorization": "token",
"role": "student"
}
/api/tickets
Payload Expects an object with a status, title, description & student_id (Optional: tried and helper_id)
{
"status": "test status",
"title": "test title",
"description": "test description",
"student_id": "1",
"categories": "javascript" // optional, & will only accept categories in the categories table
}
/api/tickets/
Returns a list of all posted help tickets
{
"Authorization": "token",
"role": "helper"
}
/api/tickets/:id
Payload edit the status and helper_id, only open to helpers
{
"status": "complete"
}
{
"Authorization": "token",
"role": "helper"
}
/api/tickets/:id
/api/categories
Payload Expects an object with a name
{
"name": "Javascript"
}
/api/categories
Returns a list of all posted help tickets
/api/categories/:id
Returns the category by id specified on the endpoint
/api/categories/:id
{
"name": "Javascript"
}
/api/categories/:id