产品事件
更新时间: 2023-04-19
# 修改事件
# 基本信息
Path: /v1/products/:instanceId/:productKey/features/events/:name
Method: PUT
接口描述:
# 请求参数
路径参数
参数名称 | 示例 | 备注 |
---|---|---|
instanceId | ||
productKey | ||
name |
Body
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
dataSchema | object | 非必须 | |||
├─ @type | string | 非必须 | |||
├─ fields | object | 非必须 | |||
├─ field1 | object | 非必须 | |||
├─ @type | string | 非必须 | |||
├─ format | string | 非必须 | |||
├─ min | number | 非必须 | |||
├─ max | number | 非必须 | |||
├─ step | number | 非必须 | |||
├─ pattern | string | 非必须 | |||
├─ minLength | number | 非必须 | |||
├─ maxLength | number | 非必须 | |||
├─ required | string [] | 非必须 | |||
├─ | 非必须 | ||||
displayName | string | 非必须 | |||
description | string | 非必须 | |||
type | string | 非必须 | InfoEvent, AlertEvent, ErrorEvent, LogEvent |
# 返回数据
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
name | string | 非必须 | |||
type | string | 非必须 | |||
dataSchema | object | 非必须 | |||
├─ @type | string | 非必须 | |||
├─ fields | object | 非必须 | |||
├─ field1 | object | 非必须 | |||
├─ @type | string | 非必须 | |||
├─ format | string | 非必须 | |||
├─ min | number | 非必须 | |||
├─ max | number | 非必须 | |||
├─ step | number | 非必须 | |||
├─ pattern | string | 非必须 | |||
├─ minLength | number | 非必须 | |||
├─ maxLength | number | 非必须 | |||
├─ required | string [] | 非必须 | |||
├─ | 非必须 | ||||
displayName | string | 非必须 | |||
description | string | 非必须 | |||
createTime | string | 非必须 | |||
updateTime | string | 非必须 |
# 创建事件
# 基本信息
Path: /v1/products/:instanceId/:productKey/features/events
Method: POST
接口描述:
# 请求参数
路径参数
参数名称 | 示例 | 备注 |
---|---|---|
instanceId | ||
productKey |
Body
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
name | string | 必须 | ^[a-zA-Z](?:[a-zA-Z0-9_]{0,48}[a-zA-Z0-9])?$ | ||
type | string | 必须 | InfoEvent, AlertEvent, ErrorEvent, LogEvent | ||
dataSchema | object | 非必须 | |||
├─ @type | string | 必须 | 只允许object | ||
├─ fields | object | 必须 | 可以有多个field,field名由用户指定 | ||
├─ field1 | object | 非必须 | |||
├─ @type | string | 必须 | |||
├─ format | string | 非必须 | |||
├─ min | number | 非必须 | |||
├─ max | number | 非必须 | |||
├─ step | number | 非必须 | |||
├─ pattern | string | 非必须 | |||
├─ minLength | number | 非必须 | |||
├─ maxLength | number | 非必须 | |||
├─ required | string [] | 非必须 | |||
├─ | 非必须 | ||||
displayName | string | 必须 | "^[\\s\\S]{2,50}$" | ||
description | string | 非必须 | "^[\\s\\S]{0,200}$" |
# 返回数据
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
name | string | 非必须 | |||
type | string | 非必须 | |||
dataSchema | object | 非必须 | |||
├─ @type | string | 非必须 | |||
├─ fields | object | 非必须 | |||
├─ field1 | object | 非必须 | |||
├─ @type | string | 非必须 | |||
├─ format | string | 非必须 | |||
├─ min | number | 非必须 | |||
├─ max | number | 非必须 | |||
├─ step | number | 非必须 | |||
├─ pattern | string | 非必须 | |||
├─ minLength | number | 非必须 | |||
├─ maxLength | number | 非必须 | |||
├─ required | string [] | 非必须 | |||
├─ | 非必须 | ||||
displayName | string | 非必须 | |||
description | string | 非必须 | |||
createTime | string | 非必须 | |||
updateTime | string | 非必须 |
# 删除事件
# 基本信息
Path: /v1/products/:instanceId/:productKey/features/events/:name
Method: DELETE
接口描述:
# 请求参数
路径参数
参数名称 | 示例 | 备注 |
---|---|---|
instanceId | ||
productKey | ||
name |
# 返回数据
无
# 获取事件
# 基本信息
Path: /v1/products/:instanceId/:productKey/features/events/:name
Method: GET
接口描述:
# 请求参数
路径参数
参数名称 | 示例 | 备注 |
---|---|---|
instanceId | ||
productKey | ||
name |
# 返回数据
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
name | string | 非必须 | |||
type | string | 非必须 | |||
dataSchema | object | 非必须 | |||
├─ @type | string | 非必须 | |||
├─ fields | object | 非必须 | |||
├─ field1 | object | 非必须 | |||
├─ @type | string | 非必须 | |||
├─ format | string | 非必须 | |||
├─ min | number | 非必须 | |||
├─ max | number | 非必须 | |||
├─ step | number | 非必须 | |||
├─ pattern | string | 非必须 | |||
├─ minLength | number | 非必须 | |||
├─ maxLength | number | 非必须 | |||
├─ required | string [] | 非必须 | |||
├─ | 非必须 | ||||
displayName | string | 非必须 | |||
description | string | 非必须 | |||
createTime | string | 非必须 | |||
updateTime | string | 非必须 |
# 获取事件列表
# 基本信息
Path: /v1/products/:instanceId/:productKey/features/events
Method: GET
接口描述:
# 请求参数
路径参数
参数名称 | 示例 | 备注 |
---|---|---|
instanceId | ||
productKey |
Query
参数名称 | 是否必须 | 示例 | 备注 |
---|---|---|---|
pageNo | 是 | ||
pageSize | 是 |
# 返回数据
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
totalCount | number | 非必须 | |||
result | object [] | 非必须 | |||
├─ name | string | 非必须 | |||
├─ type | string | 非必须 | |||
├─ dataSchema | object | 非必须 | |||
├─ @type | string | 非必须 | |||
├─ fields | object | 非必须 | |||
├─ field1 | object | 非必须 | |||
├─ @type | string | 非必须 | |||
├─ format | string | 非必须 | |||
├─ min | number | 非必须 | |||
├─ max | number | 非必须 | |||
├─ step | number | 非必须 | |||
├─ pattern | string | 非必须 | |||
├─ minLength | number | 非必须 | |||
├─ maxLength | number | 非必须 | |||
├─ required | string [] | 非必须 | |||
├─ | 非必须 | ||||
├─ displayName | string | 非必须 | |||
├─ description | string | 非必须 | |||
├─ createTime | string | 非必须 | |||
├─ updateTime | string | 非必须 | |||
pageNo | number | 非必须 | |||
pageSize | number | 非必须 |