Groups
Возвращает набор групп. Клиент может выбрать фильтрацию групп аналогично тому, как фильтруются рабочие пакеты. В дополнение к предоставленным фильтрам сервер сократит результирующий набор, чтобы он содержал только те группы, для которых запрашивающий клиент имеет достаточные разрешения (view_members, manage_members).
JSON, указывающий критерии сортировки. Принимает тот же формат, который возвращается конечной точкой queries. В настоящее время поддерживаются следующие виды сортировки:
-
id: Сортировка по первичному ключу
-
created_at: Сортировка по дате и времени создания группы
-
updated_at: Сортировка по времени последнего обновления группы
[["id", "asc"]]Example: [["id", "asc"]]Список свойств, которые нужно включить, разделенный запятыми.
total,elements/name,elements/self,selfOK
{"_type":"Collection","total":2,"count":2,"_links":{"self":{"href":"/api/v3/groups"}},"_embedded":{"elements":[{"_type":"Group","id":1337,"name":"Stormtroopers","createdAt":"2022-09-23T11:06:36.300Z","updatedAt":"2022-09-23T11:06:36.300Z","_links":{"self":{"href":"/api/v3/groups/9","title":"Stormtroopers"},"delete":{"href":"/api/v3/group/9","method":"delete"},"memberships":{"href":"/api/v3/memberships?filters=[{\"principal\":{\"operator\":\"=\",\"values\":[\"9\"]}}]","title":"Memberships"},"updateImmediately":{"href":"/api/v3/group/9","method":"patch"},"members":[{"href":"/api/v3/users/363","title":"ST-097E"},{"href":"/api/v3/users/60","title":"ST-C-334"}]}},{"_hint":"Group resource shortened for brevity","id":1338}]}}Returned if the client does not have sufficient permissions.
Required permission: View members or manage members in any project
Создает новую группу, применяя атрибуты, указанные в тексте.
Новое название группы.
Created
Occurs when the client did not send a valid JSON object in the request body.
Returned if the client does not have sufficient permissions.
Required permission: Administrator
Occurs when the client did not send a Content-Type header
Occurs when the client sends an unsupported Content-Type header.
Returned if:
- a constraint for a property was violated (
PropertyConstraintViolation)
Извлекает групповой ресурс.
Идентификатор группы
1OK
Returned if the group does not exist or if the API user does not have permission to view them.
Required permission If the user has the manage members permission in at least one project the user will be able to query all groups. If not, the user will be able to query all groups which are members in projects, he has the view members permission in.
Удаляет группу.
Идентификатор группы
1Returned if the group was marked for deletion.
Note that the response body is empty as of now. In future versions of the API a body might be returned, indicating the progress of deletion.
Returned if the client does not have sufficient permissions.
Required permission: Administrator
Returned if the group does not exist or the client does not have sufficient permissions to see it.
Required permission: Administrator
Note: A client without sufficient permissions shall not be able to test for the existence of a version. That's why a 404 is returned here, even if a 403 might be more appropriate.
Occurs when the client did not send a Content-Type header
Occurs when the client sends an unsupported Content-Type header.
No content
Обновляет данную группу, применяя атрибуты, указанные в тексте.
Пожалуйста, обратите внимание, что предоставленный массив members переопределит существующий набор элементов (аналогично PUT). Таким
образом, клиент должен предоставить полный список участников, которые будут в группе после обновления, даже если будет добавлен только один
участник.
Идентификатор группы
1Новое название группы.
OK
Occurs when the client did not send a valid JSON object in the request body.
Returned if the client does not have sufficient permissions.
Required permission: Administrator
Returned if the group does not exist or the client does not have sufficient permissions to see it.
Required permission If the user has the manage members permission in at least one project the user will be able to query all groups. If not, the user will be able to query all groups which are members in projects, he has the view members permission in.
Note: A client without sufficient permissions shall not be able to test for the existence of a version. That's why a 404 is returned here, even if a 403 might be more appropriate.
Occurs when the client did not send a Content-Type header
Occurs when the client sends an unsupported Content-Type header.
Returned if:
- a constraint for a property was violated (
PropertyConstraintViolation)