...
Name | Description |
---|
userId | The ID of the timetable |
timetableId | The ID of the timetable |
...
GROUPS
...
/api/group/:id
Request type:
...
GET
Description
Create a new group.
...
Get the information of a group given a group ID.
201200 | Code Block |
---|
| {
"status": Success message for creation of group.
"data": {
"id": The id of the group created.
"name": The name of the group created.
"visibility": The group visibility, the default is private groups.
"timetableIDs": The list of all the selected timetables for users in the group.
"memberIDs": The list of all members in the group.
"groupAdmins": The list of all the group admins.
}
} |
|
404 | |
{
"statusCode":404.
"timestamp": An ISOString format timestamp of when error encountered.
"path": The url path that cause this error to occur.
"data": |
|
Messagedetailing what went wrong.
eg "Timetable Not found!" or "User Not found!".
Path Parameters
Name | Description |
---|
id | The ID of the group. |
/api/group
Request type: POST
Description
Create a new group.
Result
Code | Format |
---|
200 | Code Block |
---|
| {
"status": Success message for creation of group.
"data": {
"id": The id of the group created.
"name": The name of the group created.
"visibility": The group visibility, the default is private groups.
"timetableIDs": The list of all the selected timetables for users in the group.
"memberIDs": The list of all members in the group.
"groupAdmins": The list of all the group admins.
}
} |
|
201 | Code Block |
---|
| {
"status": Group with that ID already exists!
"data": {
"id": The id of the group created.
"name": The name of the group created.
"visibility": The group visibility, the default is private groups.
"timetableIDs": The list of all the selected timetables for users in the group.
"memberIDs": The list of all members in the group.
"groupAdmins": The list of all the group admins.
}
} |
|
400 | Code Block |
---|
{
"timestamp": An ISOString format timestamp of when error encountered.
"path": The url path that cause this error to occur.
"data": Message detailing what went wrong.
} |
|
Body Parameters
Name | Description |
---|
groupData | Code Block |
---|
| {
"name": The name of the group.
"visibility": The group visibility, the default is private groups.
"timetableIDs": The list of all the selected timetables for users in the group.
"memberIDs": The list of all members in the group.
"groupAdmins": The list of all the group admins.
} |
|
groupID | The ID of the group. |
/api/group
Request type: PUT
Description
Updates the information of a group given a group ID.
Result
Code | Format |
---|
200 | Code Block |
---|
| {
"status": Success message for updating of group.
"data": {
"id": The id of the group created.
"name": The name of the group created.
"visibility": The group visibility, the default is private groups.
"timetableIDs": The list of all the selected timetables for users in the group.
"memberIDs": The list of all members in the group.
"groupAdmins": The list of all the group admins.
}
} |
|
201 | Code Block |
---|
| {
"status": Group created!
"data": {
"id": The id of the group created.
"name": The name of the group created.
"visibility": The group visibility, the default is private groups.
"timetableIDs": The list of all the selected timetables for users in the group.
"memberIDs": The list of all members in the group.
"groupAdmins": The list of all the group admins.
}
} |
|
409 | Code Block |
---|
{
"timestamp": An ISOString format timestamp of when error encountered.
"path": The url path that cause this error to occur.
"data": Message detailing what went wrong. ie already exists
} |
|
Body Parameters
Name | Description |
---|
adminUserID | The ID of the admin wishing to make changes. |
groupData | Code Block |
---|
| {
"name": The name of the group.
"visibility": The group visibility, the default is private groups.
"timetableIDs": The list of all the selected timetables for users in the group.
"memberIDs": The list of all members in the group.
"groupAdmins": The list of all the group admins.
} |
|
groupID | The ID of the group. |
/api/group
Request type: DELETE
Description
Delete a group given the group ID.
Result
Code | Format |
---|
204 | Code Block |
---|
| {
"status": Success message for deletion of group.
"data": {}
} |
|
404 | Code Block |
---|
{
"timestamp": An ISOString format timestamp of when error encountered.
"path": The url path that cause this error to occur.
"data": Message detailing what went wrong. ie Not Found,
Or user is not authorized for the action.
} |
|
Body Parameters
adminUserID creator of the groupuser wishing to delete group. |
groupID | The ID of the |
timetable