Lists all of the specific groups/channels messages on the server.
HTTP Method | URL | Requires Auth |
---|
GET | /api/v1/groups.messages | yes |
This endpoint supports the#pagination parameters, alongside the#query-and-fields parameters.
Key | Example Value | Description |
---|
roomId * | ByehQjC44FwMeiLbX | The group ID. The parameter is required if roomName is not provided. |
roomName * | testGroup | The group name. The parameter is required if roomId is not provided. |
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
http://localhost:3000/api/v1/groups.messages?roomId=ByehQjC44FwMeiLbX
{
"messages": [
{
"_id": "CeXwh5eBbdrtvnqG6",
"rid": "agh2Sucgb54RQ8dDo",
"msg": "s",
"ts": "2018-10-05T13:48:21.616Z",
"u": {
"_id": "KPkEYwKKBKZnEEPpt",
"username": "marcos.defendi",
"name": "Marcos Defendi"
},
"_updatedAt": "2018-10-05T13:48:49.535Z",
"reactions": {
":frowning2:": {
"usernames": [
"marcos.defendi"
]
}
},
"mentions": [],
"channels": [],
"starred": {
"_id": "KPkEYwKKBKZnEEPpt"
}
},
{
"_id": "MrAeupRiF9TvhMesK",
"t": "room_changed_privacy",
"rid": "agh2Sucgb54RQ8dDo",
"ts": "2018-10-05T00:11:16.998Z",
"msg": "Private Group",
"u": {
"_id": "rocketchat.internal.admin.test",
"username": "rocketchat.internal.admin.test"
},
"groupable": false,
"_updatedAt": "2018-10-05T00:11:16.998Z"
}
],
"count": 2,
"offset": 0,
"total": 2,
"success": true
}
Version |
Description |
0.59.0 |
Added |