Get subgroups of the user group

GET https://dry-rb.zulipchat.com/api/v1/user_groups/{user_group_id}/subgroups

Get the subgroups of a user group.

Changes: New in Zulip 6.0 (feature level 127).

Usage examples

curl -sSX GET -G https://dry-rb.zulipchat.com/api/v1/user_groups/22/subgroups \
    -u BOT_EMAIL_ADDRESS:BOT_API_KEY \
    --data-urlencode direct_subgroup_only=true

Parameters

user_group_id integer required in path

Example: 22

The ID of the target user group.


direct_subgroup_only boolean optional

Example: true

Whether to consider only direct subgroups of the user group or subgroups of subgroups also.

Defaults to false.


Response

Return values

  • subgroups: (integer)[]

    A list containing the IDs of subgroups of the user group.

Example response

A typical successful JSON response may look like:

{
    "msg": "",
    "result": "success",
    "subgroups": [
        2,
        3
    ]
}