Search Message
- Print
- DarkLight
- PDF
Search Message
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Get
/api/v1/chat.search
Search for messages by room ID and text message.
Changelog
Version | Description |
---|---|
0.67.0 | Changed limit query parameter to count |
0.60.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
count
integer
The number of items to return.
Example50
roomId
stringRequired
The room ID.
searchText
stringRequired
The text to search for in messages.
Responses
200
OK
Example 1
{
"messages": [
{
"_id": "px9KLW9G2SfD5DKFt",
"rid": "GENERAL",
"msg": "this is a test",
"ts": "2018-03-27T14:44:00.549Z",
"u": {
"_id": "RtMDEYc28fQ5aHpf4",
"username": "marc.dev",
"name": "Marc Dev"
},
"mentions": [],
"channels": [],
"_updatedAt": "2018-03-27T14:44:00.550Z",
"score": 0.5833333333333334
}
],
"success": true
}
object
messages
Array of object
object
_id
string
rid
string
msg
string
ts
string
u
object
_id
string
username
string
name
string
mentions
Array of object
object
channels
Array of object
object
_updatedAt
string
score
number
success
boolean
400
Bad Request
Example 1
{
"success": false,
"error": "The required \"roomId\" query param is missing. [error-roomId-param-not-provided]",
"errorType": "error-roomId-param-not-provided"
}
Example 2
{
"success": false,
"error": "The required \"searchText\" query param is missing. [error-searchText-param-not-provided]",
"errorType": "error-searchText-param-not-provided"
}
object
success
boolean
error
string
errorType
string
401
Unauthorized
Authorization Error
{
"status": "error",
"message": "You must be logged in to do this."
}
object
status
string
message
string
Was this article helpful?