Get All User Mentions in Channel

HTTP MethodURLRequires Auth

GET

/api/v1/channels.getAllUserMentionsByChannel

Query Parameters

This endpoint supports the Pagination parameters.

KeyExample ValueDescription

roomId*

ByehQjC44FwMeiLbX

The channel ID.

Example Call

curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
     -H "X-User-Id: aobEdbYhXfu5hkeqG" \
     https://localhost:3000/api/v1/channels.getAllUserMentionsByChannel?roomId=ByehQjC44FwMeiLbX

Example Response

{
    "mentions": [
        {
            "_id": "Gptx3mc6TjSv5tLWb",
            "rid": "GENERAL",
            "msg": "@rocket.cat",
            "ts": "2018-03-12T14:59:14.166Z",
            "u": {
                "_id": "47cRd58HnWwpqxhaZ",
                "username": "test",
                "name": "test"
            },
            "mentions": [
                {
                    "_id": "47cRd58HnWwpqxhaZ",
                    "username": "rocket.cat"
                }
            ],
            "channels": [],
            "_updatedAt": "2018-03-12T14:59:14.171Z"
        },
        {
            "_id": "rwerwfjuii6TjSv5tLWb",
            "rid": "GENERAL",
            "msg": "@rocket.cat",
            "ts": "2018-03-12T14:59:14.166Z",
            "u": {
                "_id": "47cRd58HnWwpqxhaZ",
                "username": "test",
                "name": "test"
            },
            "mentions": [
                {
                    "_id": "47cRd58HnWwpqxhaZ",
                    "username": "rocket.cat"
                }
            ],
            "channels": [],
            "_updatedAt": "2018-03-12T14:59:14.171Z"
        }
    ],
    "count": 2,
    "offset": 10,
    "total": 2,
    "success": true
}

Change Log

VersionDescription

0.63.0

Added

Last updated

Rocket.Chat versions receive support for six months after release.