Fuselage
Get Thread Messages
Get thread messages. It supports the Offset, Count, and Sort Query Parameters along with Query and Fields Query Parameters.
URL
Requires Auth
HTTP Method
/api/v1/chat.getThreadMessages
yes
GET

Payload

Argument
Example
Required
Description
tmid
7aDSXtjMA3KPLxLjt
Required
The id of the the thread message.
tlm
2019-04-08T14:40:27.724Z
Required
The thread last message, is used to inform the last time some message was sent inside the thread.

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.getThreadMessages?tmid=7aDSXtjMA3KPLxLjt
Copied!

Example Result

1
{
2
"messages": [
3
{
4
"_id": "gcGai9bRREqokjyPc",
5
"rid": "GENERAL",
6
"msg": "Test",
7
"ts": "2019-04-08T13:15:52.017Z",
8
"u": {
9
"_id": "p4a8YxvLQEHmiBKTS",
10
"username": "marcos.defendi",
11
"name": "Marcos Defendi"
12
},
13
"_updatedAt": "2019-04-08T14:40:27.789Z",
14
"mentions": [],
15
"channels": [],
16
"replies": [
17
"p4a8YxvLQEHmiBKTS"
18
],
19
"tcount": 5,
20
"tlm": "2019-04-08T14:40:27.724Z"
21
},
22
{
23
"_id": "GfhiiJjcjKFyYMuMY",
24
"rid": "GENERAL",
25
"tmid": "gcGai9bRREqokjyPc",
26
"msg": "This is a test!",
27
"ts": "2019-04-08T13:20:22.238Z",
28
"u": {
29
"_id": "p4a8YxvLQEHmiBKTS",
30
"username": "marcos.defendi",
31
"name": "Marcos Defendi"
32
},
33
"_updatedAt": "2019-04-08T13:20:22.265Z",
34
"mentions": [],
35
"channels": []
36
}
37
],
38
"count": 2,
39
"offset": 0,
40
"total": 2,
41
"success": true
42
}
Copied!

Change Log

Version
Description
1.0.0
Added
Export as PDF
Copy link
Edit on GitHub