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.

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

                      
{}
                      
                    

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

    string

  • pagesize

    integer

  • pagination

    integer

  • extensions

    array

    Show child attributes
  • count

    integer

Sample Response

                      
{
    "sort_by": "DEFAULT",
    "pagesize": 10,
    "pagination": 8,
    "count": 100
}
                      
                    

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

    array

    Show child attributes
  • count

    integer

    show the count

    format : int64

Sample Response

                      
{}