请求示例:

    返回数据:

    1. {
    2. "code": 0,
    3. "data": [
    4. {
    5. "clean_start": true,
    6. "client_id": "mosquitto_mqtt",
    7. "conn_mod": "emqx_connection",
    8. "connected_at": "2019-04-29 11:05:01",
    9. "heap_size": 2586,
    10. "ipaddress": "127.0.0.1",
    11. "is_bridge": false,
    12. "keepalive": 60,
    13. "mailbox_len": 0,
    14. "node": "emqx@127.0.0.1",
    15. "peercert": "nossl",
    16. "port": 64899,
    17. "proto_name": "MQIsdp",
    18. "proto_ver": 3,
    19. "recv_cnt": 2,
    20. "recv_msg": 0,
    21. "recv_oct": 47,
    22. "recv_pkt": 2,
    23. "reductions": 3588,
    24. "send_cnt": 2,
    25. "send_msg": 0,
    26. "send_oct": 9,
    27. "send_pend": 0,
    28. "send_pkt": 2,
    29. "username": "undefined",
    30. "zone": "external"
    31. }
    32. ],
    33. "meta": {
    34. "limit": 10000,
    35. "count": 1
    36. }

    API 定义:

    1. GET api/v3/nodes/${node}/connections/

    请求示例:

    1. GET api/v3/nodes/emqx@127.0.0.1/connections/?_page=1&_limit=10000

    API 定义:

    1. GET api/v3/connections/${clientid}

    请求示例:

    1. GET api/v3/connections/mosquitto_mqtt

    返回数据:

    1. {
    2. "code": 0,
    3. "data": [
    4. {
    5. "clean_start": true,
    6. "client_id": "mosquitto_mqtt",
    7. "conn_mod": "emqx_connection",
    8. "connected_at": "2019-04-29 11:05:01",
    9. "heap_size": 610,
    10. "ipaddress": "127.0.0.1",
    11. "is_bridge": false,
    12. "keepalive": 60,
    13. "mailbox_len": 0,
    14. "node": "emqx@127.0.0.1",
    15. "peercert": "nossl",
    16. "port": 64899,
    17. "proto_name": "MQIsdp",
    18. "proto_ver": 3,
    19. "recv_cnt": 8,
    20. "recv_msg": 0,
    21. "recv_oct": 59,
    22. "recv_pkt": 8,
    23. "reductions": 8560,
    24. "send_cnt": 8,
    25. "send_msg": 0,
    26. "send_oct": 21,
    27. "send_pend": 0,
    28. "send_pkt": 8,
    29. "username": "undefined",
    30. "zone": "external"
    31. }
    32. }

    API 定义:

    返回数据:

    1. {
    2. "code": 0,
    3. "data": [
    4. {
    5. "clean_start": true,
    6. "client_id": "mosquitto_mqtt",
    7. "conn_mod": "emqx_connection",
    8. "connected_at": "2019-04-29 11:05:01",
    9. "heap_size": 610,
    10. "ipaddress": "127.0.0.1",
    11. "is_bridge": false,
    12. "keepalive": 60,
    13. "mailbox_len": 0,
    14. "node": "emqx@127.0.0.1",
    15. "peercert": "nossl",
    16. "port": 64899,
    17. "proto_name": "MQIsdp",
    18. "proto_ver": 3,
    19. "recv_cnt": 14,
    20. "recv_msg": 0,
    21. "recv_oct": 71,
    22. "recv_pkt": 14,
    23. "reductions": 13534,
    24. "send_cnt": 14,
    25. "send_msg": 0,
    26. "send_oct": 33,
    27. "send_pend": 0,
    28. "send_pkt": 14,
    29. "username": "undefined",
    30. "zone": "external"
    31. }
    32. ]
    33. }

    API 定义:

    1. DELETE api/v3/connections/${clientid}

    请求示例:

    1. DELETE api/v3/connections/mosquitto_mqtt

    返回数据:

    1. {
    2. "code": 0