mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
api: Add GET /user_groups documentation.
This documents our GET endpoint for interacting with Zulip's user groups feature. Fixes #10298.
This commit is contained in:
@@ -1895,6 +1895,46 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/JsonSuccess'
|
||||
/user_groups:
|
||||
get:
|
||||
description: Get all user groups of the realm.
|
||||
security:
|
||||
- basicAuth: []
|
||||
responses:
|
||||
'200':
|
||||
description: Success.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/JsonSuccess'
|
||||
- properties:
|
||||
user_groups:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
description: A list of `user_group` objects, which contain a
|
||||
`description`, a `name`, their `id` and the list of members
|
||||
of the user group.
|
||||
- example:
|
||||
{
|
||||
"msg": "",
|
||||
"result": "success",
|
||||
"user_groups": [
|
||||
{
|
||||
"description": "Characters of Hamlet",
|
||||
"id": 1,
|
||||
"name": "hamletcharacters",
|
||||
"members": [3, 4]
|
||||
},
|
||||
{
|
||||
"description": "Other users",
|
||||
"id": 2,
|
||||
"name": "other users",
|
||||
"members": [1, 2]
|
||||
}
|
||||
]
|
||||
}
|
||||
components:
|
||||
#######################
|
||||
# Security definitions
|
||||
|
||||
Reference in New Issue
Block a user