Links

Admin Rooms

REST API Admin Rooms Methods
Retrieves all rooms (requires the view-room-administration permission). It supports the Pagination parameters.
URL
Requires Auth
HTTP Method
/api/v1/rooms.adminRooms
yes
GET

Query Parameters

Argument
Example
Required
Description
types
['c']
Optional (must be an array)
The rooms types
filter
general
Optional
The rooms's name

Example

curl -H "X-Auth-Token: ijFlJ1yfidXhwEYY284Anoq_iEsOeMMVCupzNhX22tB" \
-H "X-User-Id: hw5DThnhQmxDWnavu" \
-H "Content-type: application/json" \
http://localhost:3000/api/v1/rooms.adminRooms?types[]=c&types[]=p&filter=GENERAL

Example Result

{
"rooms": [
{
"_id": "GENERAL",
"t": "c",
"name": "general",
"usernames": [],
"msgs": 98,
"usersCount": 38,
"default": true
},
],
"count": 1,
"offset": 0,
"total": 88,
"success": true
}

Change Log

Version
Description
2.4.0
Added
Last modified 5mo ago
Deprecation for cloud services and apps is now extended to November 20, 2023. Rocket.Chat versions receive support for six months after release.