Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
63 lines (51 loc) · 1.89 KB

get-list-of-user-groups.md

File metadata and controls

63 lines (51 loc) · 1.89 KB

Get List of User Groups

Lists all of the groups/channels of any users.

HTTP MethodURLRequires Auth
GET/api/v1/groups.listAllyes

{% hint style="info" %} Permission required: view-room-administration {% endhint %}

Query Parameters

This endpoint supports the#pagination parameters, alongside the field parameter for#query-and-fields.

Example Call

This example shows a list of groups filtered by customFields.companyId starting with org1 using a regular expression.

{% code overflow="wrap" %}

curl -H "X-Auth-Token: 8-gard51USVYskZ7AAqFF3SZuwg24VIdn9-HchYersg" \
     -H "X-User-Id: 3WpJQkDHhrWPBvXuW" \
     http://localhost:3000/api/v1/groups.listAll?query=%7B%20%22customFields.companyId%22%3A%20%7B%20%22%24regex%22%3A%20%22%5Eorg1%22%7D%20%7D

{% endcode %}

Example Response

{
    "groups": [
        {
            "_id": "xA52DRDM7dqx2PfTp",
            "name": "private1",
            "fname": "private1",
            "t": "p",
            "msgs": 0,
            "u": {
                "_id": "3WpJQkDHhrWPBvXuW",
                "username": "admin"
            },
            "customFields": {
                "companyId": "org1"
            },
            "ts": "2018-01-21T21:05:06.729Z",
            "ro": false,
            "sysMes": true,
            "_updatedAt": "2018-01-21T21:05:06.729Z"
        }
    ],
    "offset": 0,
    "count": 1,
    "total": 1,
    "success": true
}

Change Log

Version Description
0.62.0 Add 'query' parameter support.
0.59.0 Added