Get Room Discussions

HTTP MethodURLRequires Auth

GET

/api/v1/rooms.getDiscussions

Query Parameters

This endpoint supports thePagination and theQuery and Fields parameters. Additional parameters are as follows:

KeyExample ValueDescription

roomId* or roomName*

ByehQjC44FwMeiLbX or general

The room ID or name. You must enter at least one of the parameters.

Example Call

curl -H "X-Auth-Token: ijFlJ1yfidXhwEYY284Anoq_iEsOeMMVCupzNhX22tB" \
     -H "X-User-Id: hw5DThnhQmxDWnavu" \
     -H "Content-type: application/json" \
     http://localhost:3000/api/v1/rooms.getDiscussions?roomId=GENERAL

Example Response

{
    "discussions": [
        {
            "_id": "hthLkno5RqTyNna4H",
            "name": "8BRnQEJQM8MjJWxkJ",
            "fname": "general discussion",
            "t": "p",
            "msgs": 1,
            "usersCount": 1,
            "u": {
                "_id": "rocketchat.internal.admin.test",
                "username": "rocketchat.internal.admin.test"
            },
            "topic": "general",
            "prid": "GENERAL",
            "ts": "2019-04-03T01:01:36.286Z",
            "ro": false,
            "sysMes": true,
            "default": false,
            "_updatedAt": "2019-04-03T01:01:36.402Z",
            "lastMessage": {
                "msg": "test",
                "ts": "2019-04-03T01:01:36.339Z",
                "u": {
                    "_id": "rocketchat.internal.admin.test",
                    "username": "rocketchat.internal.admin.test",
                    "name": "RocketChat Internal Admin Test"
                },
                "rid": "hthLkno5RqTyNna4H",
                "_id": "LLoaxBR8A7M24Qiji",
                "_updatedAt": "2019-04-03T01:01:36.368Z",
                "mentions": [],
                "channels": []
            },
            "lm": "2019-04-03T01:01:36.339Z"
        }
    ],
    "count": 1,
    "offset": 0,
    "total": 1,
    "success": true
}

Change Log

VersionDescription

1.0.0

Added

Last updated

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