Back to main
Add User
Remove User
Get All Classes From Teachers
Get All Users
Get User Info
Back to the top
{
"body" : {
"firstname" : " Trey" ,
"lastname" : " Davis" ,
"user_password" : " password3" ,
"email" : " [email protected] " ,
"role_id" : 0 ,
"grade" : 11
},
"action" : " add_user"
}
Variable
Data Type
Required
Additional Validation
firstname
string
True
No
lastname
string
True
No
user_password
string
True
Minimum 8 characters. At least one letter and at least one number
email
string
True
Looks for something like [email protected]
role
integer
True
Looking for a valid role_id. Currently that's something from 0-3
{
"message" : " User added"
}
{
"error" : " error message"
}
Back to the top
DELETE /api/user/remove_user
Expected Request ?user_id=559&action=remove_user
Variable
Data Type
Required
Additional Validation
user_id
integer
True
No
{
"message" : " User Removed"
}
{
"error" : " error message"
}
Get All Classes From User
Back to the top
Expected Request ?user_id=6&action=get_all_classes_of_user
Variable
Data Type
Required
Additional Validation
user_id
integer
True
No
{
"message" : " a list of all the class data for the user"
}
{
"error" : " error message"
}
Back to the top
Expected Request: ?role_id=-1&action=get_all_users
Variable
Data Type
Required
Additional Validation
role_id
integer
True
No
{
"message" : " a list of all of the users if role id = -1, filtered by role if role_id is a valid role"
}
{
"error" : " error message"
}
Back to the top
Expected Request: ?user_id=6&action=get_user_info
Variable
Data Type
Required
Additional Validation
user_id
integer
False
No
{
"message" : " All user info from one user"
}
{
"error" : " error message"
}