Get Room Discussions

Get
/api/v1/rooms.getDiscussions

Get all discussions of a room.

Changelog

Version Description
1.0.0 Added
Header parameters
X-Auth-Token
stringRequired

The authToken of the authenticated user.

ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired

The userId of the authenticated user.

ExamplerbAXPnMktTFbNpwtJ
Query parameters
roomName
string

The room name. It is required if the roomId is not provided.

Examplegeneral
roomId
string

The room ID. It is required if the roomName is not provided.

Exampledlpfuijw7ej
query

This parameter allows you to use MongoDB query operators to search for specific data. For example, to query users with a name that contains the letter "g": query={ "name": { "$regex": "g" } }. Refer to the official documentation to learn more.

count
integer

The number of items to return. Refer to the official documentation to learn more.

Example50
fields
string

This parameter accepts a JSON object with properties that have a value of 1 or 0 to include or exclude them in the response. For example, to only retrieve the usernames of users: fields={ "username": 1 }. Refer to the official documentation to learn more.

offset
integer

Number of items to "skip" in the query, i.e. requests return count items, skipping the first offset items. Refer to the official documentation to learn more.

Example50
sort

List of fields to order by, and in which direction. This is a JSON object, with properties listed in desired order, with values of 1 for ascending, or -1 for descending. For example, {"value": -1, "_id": 1}. Refer to the official documentation to learn more.

Responses
200

OK

Success
{
  "discussions": [
    {
      "_id": "6514d34ea2f73c7460e18cb4",
      "fname": "test-discussion",
      "_updatedAt": "2023-09-28T01:14:04.275Z",
      "topic": "general",
      "prid": "GENERAL",
      "encrypted": false,
      "name": "M75nSgA3uYsnTbKRu",
      "t": "c",
      "msgs": 1,
      "usersCount": 1,
      "u": {
        "_id": "rbAXPnMktTFbNpwtJ",
        "username": "roxie",
        "name": "test test"
      },
      "ts": "2023-09-28T01:13:50.574Z",
      "ro": false,
      "default": false,
      "sysMes": true,
      "lastMessage": {
        "_id": "pnm4kh84HfncDEZj7",
        "rid": "6514d34ea2f73c7460e18cb4",
        "msg": "Hi guys , this is for SWE team",
        "ts": "2023-09-28T01:14:04.119Z",
        "u": {
          "_id": "rbAXPnMktTFbNpwtJ",
          "username": "roxie",
          "name": "test test"
        },
        "_updatedAt": "2023-09-28T01:14:04.233Z",
        "urls": [],
        "mentions": [],
        "channels": [],
        "md": [
          {
            "type": "PARAGRAPH",
            "value": [
              {
                "type": "PLAIN_TEXT",
                "value": "Hi guys , this is for SWE team"
              }
            ]
          }
        ]
      },
      "lm": "2023-09-28T01:14:04.119Z"
    }
  ],
  "count": 1,
  "offset": 0,
  "total": 1,
  "success": true
}
Expand All
object
discussions
Array of object
object
_id
string
fname
string
_updatedAt
string
topic
string
prid
string
encrypted
boolean
name
string
t
string
msgs
integer
usersCount
integer
u
object
_id
string
username
string
name
string
ts
string
ro
boolean
default
boolean
sysMes
boolean
lastMessage
object
_id
string
rid
string
msg
string
ts
string
u
object
_id
string
username
string
name
string
_updatedAt
string
urls
Array of object
object
mentions
Array of object
object
channels
Array of object
object
md
Array of object
object
type
string
value
Array of object
object
type
string
value
string
lm
string
count
integer
offset
integer
total
integer
success
boolean
401

Unauthorized

Authorization Error
{
  "status": "error",
  "message": "You must be logged in to do this."
}
object
status
string
message
string