List messages
GET
/list
List messages
Path parameters
-
access_token
string
required
token to be passed as a header -
sender_extension
string
required
The sender extension id. -
receiver_extension
string
required
The receiver extension id. -
list_mode
string
required
The list mode NORMAL : set the optional param $pagination $limit_count , LAST_LIST: LastList , TIME_DISTANCE : set the optional param $time_start $time_end , SPECIFY_LIST_BEFOR : set the optional param $specify_msg_id, SPECIFY_LIST_AFTER : set the optional param $specify_msg_id. -
pagination
integer
optional
(setted if NORMAL == list_mode)The pagination of paging. -
limit_count
integer
optional
(setted except TIME_DISTANCE == list_mode )The total count of messages. -
time_start
integer
optional
(setted if TIME_DISTANCE == list_mode)time start -
time_end
integer
optional
(setted if TIME_DISTANCE == list_mode)time end -
specify_msg_id
integer
optional
(setted if SPECIFY_LIST_BEFOR == list_mode or SPECIFY_LIST_AFTER == list_mode)The specify message id.
Sample Request
curl -v -X GET http://127.0.0.1:8990/api/comm_message/list \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
Responses
200
Successful operation
application/json
-
count
integer
show the count -
messages
array
Sample Response
{}
modify message status to readed
POST
/update
Path parameters
-
access_token
string
required
token to be passed as a header
Request body
application/json
-
msg_id
integer
required
the message id
Sample Request
curl -v -X POST http://127.0.0.1:8990/api/comm_message/update \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
-d '{}'
Responses
200
Updated message status
Sample Response
List messages
GET
/contact_list
List messages
Path parameters
-
access_token
string
required
token to be passed as a header -
pagination
integer
optional
(setted if NORMAL == list_mode)The pagination of paging. -
pagesize
integer
required
The size of paging. -
sort_by
string
optional
Default value will be used when user does not specify value for this field.
Sample Request
curl -v -X GET http://127.0.0.1:8990/api/comm_message/contact_list \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
Responses
200
Successful operation
application/json
-
pagesize
integer
-
count
integer
-
extensions
array
-
pagination
integer
-
sort_by
string
Sample Response
{
"pagesize": 10,
"count": 100,
"pagination": 8,
"sort_by": "DEFAULT"
}
Retrieve unread Message count
GET
/unread_count/show
Retrieve unread Message count
Path parameters
-
access_token
string
required
token to be passed as a header -
sender_extension
string
required
The sender extension id. -
receiver_extension
string
required
The receiver extension id. -
specify_msg_id
integer
optional
(setted if SPECIFY_LIST_BEFOR == list_mode or SPECIFY_LIST_AFTER == list_mode)The specify message id. -
list_mode
string
required
The list mode NORMAL : set the optional param $pagination $limit_count , LAST_LIST: LastList , TIME_DISTANCE : set the optional param $time_start $time_end , SPECIFY_LIST_BEFOR : set the optional param $specify_msg_id, SPECIFY_LIST_AFTER : set the optional param $specify_msg_id.
Sample Request
curl -v -X GET http://127.0.0.1:8990/api/comm_message/unread_count/show \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
Responses
200
Successful operation
application/json
-
count
integer
show the unread count
Sample Response
{}