List messages

GET /list
List messages
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

  • 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.

    enum : ['NORMAL', 'LAST_LIST', 'TIME_DISTANCE', 'SPECIFY_LIST_BEFOR', 'SPECIFY_LIST_AFTER']

  • pagination

    integer

    optional

    (setted if NORMAL == list_mode)The pagination of paging.

    format : int32

  • limit_count

    integer

    optional

    (setted except TIME_DISTANCE == list_mode )The total count of messages.

    format : int32

  • time_start

    integer

    optional

    (setted if TIME_DISTANCE == list_mode)time start

    format : int64

  • time_end

    integer

    optional

    (setted if TIME_DISTANCE == list_mode)time end

    format : int64

  • specify_msg_id

    integer

    optional

    (setted if SPECIFY_LIST_BEFOR == list_mode or SPECIFY_LIST_AFTER == list_mode)The specify message id.

    format : int64

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

    format : int64

  • messages

    array

    Show child attributes

Sample Response

                      
{}
                      
                    

modify message status to readed

POST /update
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • msg_id

    integer

    required

    the message id

    format : int64

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

    minLength: 64

    maxLength: 64

  • pagination

    integer

    optional

    (setted if NORMAL == list_mode)The pagination of paging.

    format : int32

  • 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.

    enum : ['DEFAULT', 'OPTIONAL']

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

    Show child attributes
  • 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

    minLength: 64

    maxLength: 64

  • 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.

    format : int64

  • 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.

    enum : ['NORMAL', 'LAST_LIST', 'TIME_DISTANCE', 'SPECIFY_LIST_BEFOR', 'SPECIFY_LIST_AFTER']

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

    format : int64

Sample Response

                      
{}