# 获取消费组订阅信息
# 基本信息~~~~
Path: /v1/services/:instanceId/consumers/:consumerGroupId
Method: GET
接口描述:
# 请求参数
路径参数
参数名称 | 示例 | 备注 |
---|---|---|
instanceId | ||
consumerGroupId |
# 返回数据
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
host | string | 非必须 | |||
port | integer | 非必须 | |||
vhost | string | 非必须 | |||
queue | string | 非必须 |
# 重置消费组用户名密码
# 基本信息
Path: /v1/services/:instanceId/consumers/:username/reset
Method: PUT
接口描述:
# 请求参数
路径参数
参数名称 | 示例 | 备注 |
---|---|---|
instanceId | ||
username |
Body
无
# 返回数据
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
password | string | 非必须 |
# 创建消费组
# 基本信息
Path: /v1/services/:instanceId/consumers
Method: POST
接口描述:
# 请求参数
路径参数
参数名称 | 示例 | 备注 |
---|---|---|
instanceId |
Body
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
name | string | 必须 |
# 返回数据
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
consumerGroupId | string | 必须 | ^[\u4e00-\u9fa5a-zA-Z0-9\-_]{1,16}$ |
# 删除消费组
# 基本信息
Path: /v1/services/:instanceId/consumers/:consumer_group_id
Method: DELETE
接口描述:
# 请求参数
路径参数
参数名称 | 示例 | 备注 |
---|---|---|
instanceId | ||
consumer_group_id |
Body
无
# 返回数据
无
# 获取消费组列表
# 基本信息
Path: /v1/services/:instanceId/consumers
Method: GET
接口描述:
# 请求参数
路径参数
参数名称 | 示例 | 备注 |
---|---|---|
instanceId |
Query
参数名称 | 是否必须 | 示例 | 备注 |
---|---|---|---|
pageNo | 否 | ||
pageSize | 否 | ||
orderBy | 否 | ||
order | 否 |
# 返回数据
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
totalCount | number | 非必须 | 100 | ||
pageNo | number | 非必须 | 1 | ||
pageSize | number | 非必须 | 10 | ||
result | object [] | 非必须 | item 类型: object | ||
├─ instanceId | string | 非必须 | |||
├─ consumerGroupName | string | 非必须 | mock: @word | ||
├─ consumerGroupId | string | 非必须 | mock: @character | ||
├─ consumerGroupType | string | 非必须 | DEFAULT 预置|CUSTOM 自定义 | 枚举: DEFAULT,CUSTOM | |
├─ createTime | string | 非必须 | |||
├─ updateTime | string | 非必须 |
# 获取订阅列表
# 基本信息
Path: /v1/services/:instanceId/subscriptions
Method: GET
接口描述:
# 请求参数
Headers
参数名称 | 参数值 | 是否必须 | 示例 | 备注 |
---|---|---|---|---|
Content-Type | application/json | 是 |
路径参数
参数名称 | 示例 | 备注 |
---|---|---|
instanceId |
Query
参数名称 | 是否必须 | 示例 | 备注 |
---|---|---|---|
pageNo | 否 | ||
pageSize | 否 | ||
orderBy | 否 | ||
order | 否 |
# 返回数据
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
totalCount | number | 非必须 | |||
pageNo | number | 非必须 | |||
pageSize | number | 非必须 | |||
result | object [] | 非必须 | item 类型: object | ||
├─ instanceId | string | 非必须 | |||
├─ productKey | string | 非必须 | ID | mock: @word | |
├─ productName | string | 非必须 | 名称 | mock: @string | |
├─ deviceType | string | 非必须 | 节点类型,同设备类型 | 枚举: DIRECT,SUBDEVICE,GATEWAY | |
├─ state | boolean | 非必须 | 订阅true,没有订阅false | ||
├─ createTime | string | 非必须 | |||
├─ updateTime | string | 非必须 |
# 修改订阅设置
# 基本信息
Path: /v1/services/:instanceId/:productKey/subscriptions
Method: PUT
接口描述:
# 请求参数
路径参数
参数名称 | 示例 | 备注 |
---|---|---|
instanceId | ||
productKey |
Body
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
consumerGroupIds | string [] | 必须 | item 类型: string | ||
├─ | 非必须 | ||||
messageTypes | string [] | 必须 | 枚举:DEVICE_MESSAGE 设备上报, DEVICE_STATE_CHANGE设备生命周期变更 | item 类型: string | |
├─ | 非必须 |
# 返回数据
无
# 启用/禁用订阅
# 基本信息
Path: /v1/services/:instanceId/:productKey/subscriptions
Method: POST
接口描述:
# 请求参数
路径参数
参数名称 | 示例 | 备注 |
---|---|---|
instanceId | ||
productKey |
Query
参数名称 | 是否必须 | 示例 | 备注 |
---|---|---|---|
state | 是 | false取消订阅,true订阅 |
Body
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
consumerGroupIds | string [] | 必须 | item 类型: string | ||
├─ | 非必须 | ||||
messageTypes | string [] | 必须 | item 类型: string | ||
├─ | 非必须 |
# 返回数据
无
# 推送消息类别及文案列表
# 基本信息
Path: /v1/services/:instanceId/message/type
Method: GET
接口描述:
# 请求参数
Headers
参数名称 | 参数值 | 是否必须 | 示例 | 备注 |
---|---|---|---|---|
Content-Type | application/json | 是 |
路径参数
参数名称 | 示例 | 备注 |
---|---|---|
instanceId |
# 返回数据
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
messageType | object [] | 非必须 | item 类型: object | ||
├─ enumName | string | 非必须 | |||
├─ description | string | 非必须 |
# 获取订阅详情
# 基本信息
Path: /v1/services/:instanceId/:productKey/subscriptions
Method: GET
接口描述:
# 请求参数
路径参数
参数名称 | 示例 | 备注 |
---|---|---|
instanceId | ||
productKey |
# 返回数据
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
updateTime | string | 非必须 | |||
productKey | string | 非必须 | |||
productName | string | 非必须 | |||
instanceId | string | 非必须 | |||
createTime | string | 非必须 | |||
deviceType | string | 非必须 | |||
consumerGroups | object [] | 非必须 | item 类型: object | ||
├─ consumerGroupName | string | 必须 | |||
├─ consumerGroupId | string | 必须 | |||
messageTypes | object [] | 非必须 | Deprecated, 以topics字段为准 | item 类型: object | |
├─ enumName | string | 非必须 | |||
├─ description | string | 非必须 | |||
state | string | 非必须 | 是否开启了订阅 |
# 获取服务组用户名密码
# 基本信息
Path: /v1/services/:instanceId/consumers/user
Method: GET
接口描述:
# 请求参数
路径参数
参数名称 | 示例 | 备注 |
---|---|---|
instanceId |
# 返回数据
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
password | string | 非必须 | |||
username | string | 必须 |