...
Name | Description |
---|
userId | The ID of the timetable |
timetableId | The ID of the timetable |
...
GROUPS
...
/api/user/group/:zid
Request type: GET
Description
Get the information of a group given a group ID.
Code | Format |
---|
200 | Code Block |
---|
| {
"status": Success message for creation of group.
"data": {
"groups": [
...Groups
]
}
} |
|
404 | Code Block |
---|
| {
"timestamp": An ISOString format timestamp of when error encountered.
"path": The url path that cause this error to occur.
"data": Can't find user!.
} |
|
Path Parameters
Name | Description |
---|
zid | The zid of the user. |
Group object:
Code Block |
---|
"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.
"groupImageURL": The image URL for the group. |
/api/group/:id
Request type: GET
Description
Get the information of a group given a group ID.
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.
"groupImageURL": The image URL for the group.
}
} |
|
404 | Code Block |
---|
| {
"timestamp": An ISOString format timestamp of when error encountered.
"path": The url path that cause this error to occur.
"data": Can't find group!.
} |
|
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.
"groupImageURL": The image URL for the group.
}
} |
|
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.
"groupAdminsgroupImageURL": The listimage ofURL allfor 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.
} |
|
...
/api/group
Request type: PUT
Description
Updates the information of a group given a group ID.
...
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.
"groupImageURL": The image URL for the group.
}
} |
|
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.
"groupImageURL": The image URL for the group.
}
} |
|
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
} |
|
...
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.
"groupImageURL": The image URL for the group.
} |
|
groupID | The ID of the group. |
...
/api/group
Request type: DELETE
Description
Delete a group given the group ID.
...