group

Add a Group (todo)

This function is an API endpoint that allows an authenticated admin to add a new group. It is tagged with "group" for OpenAPI documentation.

Parameters

  • request: The request data, which includes the details of the group to be added. <br>

Returns

If successful, this function returns a Json<UsersResponse> object, which includes a success message, the total number of groups, and the list of groups. <br> If the admin is not authorized, this function returns a status::Unauthorized error. <br>

Errors

This function will return an error if the system is in maintenance mode, or if the admin is not authorized.

Example

POST /api/group {"name":"new group","password":"string","confirm-password":"string","email":"string","is_admin":false,"group_name":"string"}

post/api/group

Request body

namestring required
passwordstring required
confirm-passwordstring required
emailstring required
is_adminboolean required
group_namestring required

Response

msgstring required
totalinteger required
datastring required

Changes