Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
85 lines (68 loc) · 2.09 KB

File metadata and controls

85 lines (68 loc) · 2.09 KB

Get Admin of Room

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

HTTP MethodURLRequires Auth
GET/api/v1/rooms.adminRooms.getRoomyes

Query Parameters

KeyExample ValueDescription
rid*654c9d1ca2f73c7460e1918bThe room ID.

Example Call

{% code overflow="wrap" %}

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'

{% endcode %}

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.

{% tabs %} {% tab title=" Authorization" %}

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

{% endtab %}

{% tab title="No Permission" %}

{
    "success": false,
    "error": "error-not-authorized"
}

{% endtab %}

{% tab title="Missing Query Parameter" %}

{
    "success": false,
    "error": "not-allowed",
    "errorType": "Not Allowed"
}

{% endtab %} {% endtabs %}

Change Log

Version Description
2.4.0 Added