Get Admin of Room

Retrieves the admin of a room (requires the view-room-administration permission).

HTTP MethodURLRequires Auth

GET

/api/v1/rooms.adminRooms.getRoom

Query Parameters

KeyExample ValueDescription

rid*

654c9d1ca2f73c7460e1918b

The room ID.

Example Call

curl -L -X GET 'http://localhost:3000/api/v1/rooms.adminRooms.getRoom?rid=654c9d1ca2f73c7460e1918b' \
-H 'X-User-Id: d26x6zSkaPSe5gCyy' \
-H 'X-Auth-Token: Zu-Z6eKzIIz7MCCRGeHi29bYkXZCJ4SxFC0JAasqm92'

Example Response

Success

{
    "_id": "ukFsHiySDhMkQyyyF",
    "name": "freightwave",
    "fname": "freightwave",
    "t": "p",
    "msgs": 4,
    "usersCount": 1,
    "u": {
        "_id": "Gd6iymRZBK4C6wqHN",
        "username": "bruno.raymundo"
    },
    "ro": false,
    "default": false,
    "success": true
}

Error

Any of the following errors can occur:

  • Authorization: Requires an authentication token for the request to be made.

  • No Permission: Occurs when the authenticated user doesn't have the view-room-administration permission.

  • Missing query parameter: Occurs when the required parameter rid is missing.

{
    "success": false,
    "error": "unauthorized"
}

Change Log

VersionDescription

2.4.0

Added

Last updated

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