Fuselage
Search Message
Search for messages in a channel by id and text message.
URL
Requires Auth
HTTP Method
/api/v1/chat.search
yes
GET

Payload

Argument
Example
Required
Description
roomId
7aDSXtjMA3KPLxLjt
Required
The id of the channel.
searchText
test to search
Required
The text message to search in messages.
count
10
Optional
The limit of result.

Example Call

1
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
2
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
3
-H "Content-type:application/json" \
4
http://localhost:3000/api/v1/chat.search?roomId=GENERAL&searchText=test&count=10
Copied!

Example Result

1
{
2
"messages": [
3
{
4
"_id": "px9KLW9G2SfD5DKFt",
5
"rid": "GENERAL",
6
"msg": "this is a test",
7
"ts": "2018-03-27T14:44:00.549Z",
8
"u": {
9
"_id": "RtMDEYc28fQ5aHpf4",
10
"username": "marcos.defendi",
11
"name": "Marcos Defendi"
12
},
13
"mentions": [],
14
"channels": [],
15
"_updatedAt": "2018-03-27T14:44:00.550Z",
16
"score": 0.5833333333333334
17
}
18
],
19
"success": true
20
}
Copied!

Change Log

Version
Description
0.67.0
Changed limit query parameter to count
0.60.0
Added
Export as PDF
Copy link
Edit on GitHub