TG-60 : Ajout de l'API GroupAPI
This commit is contained in:
@ -55,3 +55,41 @@ GET -> Getting specified user infos
|
||||
Out:
|
||||
200 -> USER = <USER_OBJECT>|null : Dictionary containing user infos or null
|
||||
|
||||
########################
|
||||
GroupAPI (api/group)
|
||||
########################
|
||||
POST -> Create a group if it not already exists
|
||||
In:
|
||||
name = Name of the group (must be unique)
|
||||
year = Parameter setting the year
|
||||
class_short = Parameter setting the short name of the class
|
||||
class_long = Parameter setting the full name of the class
|
||||
department = Parameter setting the name of the class's department
|
||||
resp_id = UID of the group's responsible
|
||||
sec_id = UID of the group's secretary
|
||||
Out:
|
||||
200 -> GID = <GROUP_ID> : The group already exists with the id GROUP_ID
|
||||
201 -> GID = <GROUP_ID> : The group has been successfully created with the id GROUP_ID
|
||||
400 -> ERROR = "One or more parameters are missing" : Bad request
|
||||
400 -> ERROR = "The user with id <USER_ID> doesn't exists !" : The given USER_ID for resp_id or sec_id is not found
|
||||
|
||||
PUT -> Modify an existing group
|
||||
In: (Suffix = /bygid/<GROUP_ID>)
|
||||
name = Name of the group (must be unique)
|
||||
year = Parameter setting the year
|
||||
class_short = Parameter setting the short name of the class
|
||||
class_long = Parameter setting the full name of the class
|
||||
department = Parameter setting the name of the class's department
|
||||
resp_id = UID of the group's responsible
|
||||
sec_id = UID of the group's secretary
|
||||
Out:
|
||||
200 -> GID = <GROUP_ID> : The group has been modified sucessfully with the id GROUP_ID
|
||||
400 -> ERROR = "One or more parameters are missing !" : Bad request
|
||||
400 -> ERROR = "The user with id <USER_ID> doesn't exists !" : The given USER_ID for resp_id or sec_id is not found
|
||||
405 -> ERROR = "This group doesn't exists !" : Bad GROUP_ID provided
|
||||
405 -> ERROR = "A group with this name already exists !" : A group with this name already exists
|
||||
|
||||
GET -> Getting specified group infos
|
||||
In: (Suffixes = /bygid/<GROUP_ID> | /byname/<GROUP_NAME> )
|
||||
Out:
|
||||
200 -> GROUP = <GROUP_OBJECT>|null : Dictionary containing group infos or null
|
Reference in New Issue
Block a user