GET /api/v4/subscriptions

    Query String Parameters:

    在 4.1 版本后,支持多条件和模糊查询:

    NameTypeDescription
    clientidString客户端标识符
    topicString主题,全等查询
    qosEnum可取值为:0,1,
    shareString共享订阅的组名称
    _match_topicString主题,匹配查询

    Success Response Body (JSON):

    NameTypeDescription
    codeInteger0
    dataArray of Objects所有订阅信息
    data[0].nodeString节点名称
    data[0].clientidString客户端标识符
    data[0].topicString订阅主题
    data[0].qosIntegerQoS 等级
    metaObject/api/v4/clients

    Examples:

    注:在 4.1 后,返回的 meta 内容做了修改:

    • count:仍表示总数,但在 多条件/模糊查询 时,固定为 -1。

    GET /api/v4/subscriptions/{clientid}

    Path Parameters:

    Success Response Body (JSON):

    NameTypeDescription
    codeInteger0
    dataObject所有订阅信息
    data.nodeString节点名称
    data.clientidString客户端标识符
    data.topicString订阅主题
    data.qosIntegerQoS 等级

    Examples:

    GET /api/v4/nodes/{node}/subscriptions

    类似 ,返回指定节点下的所有订阅信息,支持分页机制。

    Query String Parameters:

    NameTypeRequiredDefaultDescription
    _pageIntegerFalse1页码
    _limitIntegerFalse10000每页显示的数据条数,未指定时由 emqx-management 插件的配置项 max_row_limit 决定

    Examples:

    GET /api/v4/nodes/{node}/subscriptions/{clientid}

    类似 GET /api/v4/subscriptions/{clientid},在指定节点下,查询某 clientid 的所有订阅信息,支持分页机制。

    Path Parameters:

    NameTypeRequiredDescription
    clientidStringTrueClientID

    Success Response Body (JSON):

    NameTypeDescription
    codeInteger0
    dataObject所有订阅信息
    data.nodeString节点名称
    data.clientidString客户端标识符
    data.topicString订阅主题
    data.qosIntegerQoS 等级

    Examples: