# 修改命令
# 基本信息
Path: /v1/products/:instanceId/:productKey/features/commands/:name
Method: PUT
接口描述:
# 请求参数
Headers
参数名称 | 参数值 | 是否必须 | 示例 | 备注 |
---|---|---|---|---|
Content-Type | application/json | 是 |
路径参数
参数名称 | 示例 | 备注 |
---|---|---|
instanceId | ||
productKey | ||
name |
Body
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
input | 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 [] | 非必须 | item 类型: string | ||
├─ | 非必须 | ||||
output | 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 [] | 非必须 | item 类型: string | ||
├─ | 非必须 | ||||
displayName | string | 非必须 | |||
description | string | 非必须 |
# 返回数据
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
name | string | 非必须 | |||
input | 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 [] | 非必须 | item 类型: string | ||
├─ | 非必须 | ||||
output | 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 [] | 非必须 | item 类型: string | ||
├─ | 非必须 | ||||
displayName | string | 非必须 | |||
description | string | 非必须 | |||
createTime | string | 非必须 | |||
updateTime | string | 非必须 |
# 创建命令
# 基本信息
Path: /v1/products/:instanceId/:productKey/features/commands
Method: POST
接口描述:
# 请求参数
Headers
参数名称 | 参数值 | 是否必须 | 示例 | 备注 |
---|---|---|---|---|
Content-Type | application/json | 是 |
路径参数
参数名称 | 示例 | 备注 |
---|---|---|
instanceId | ||
productKey |
Body
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
name | string | 必须 | ^[a-zA-Z](?:[a-zA-Z0-9_]{0,48}[a-zA-Z0-9])?$ | ||
input | 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 [] | 非必须 | item 类型: string | ||
├─ | 非必须 | ||||
output | object | 非必须 | |||
├─ @type | string | 必须 | 只能为object | ||
├─ fields | object | 非必须 | |||
├─ field1 | object | 非必须 | |||
├─ @type | string | 必须 | |||
├─ format | string | 非必须 | |||
├─ min | number | 非必须 | |||
├─ max | number | 非必须 | |||
├─ step | number | 非必须 | |||
├─ pattern | string | 非必须 | |||
├─ minLength | number | 非必须 | |||
├─ maxLength | number | 非必须 | |||
├─ required | string [] | 非必须 | item 类型: string | ||
├─ | 非必须 | ||||
displayName | string | 必须 | ^[\\s\\S]{2,50}$ | ||
description | string | 非必须 | "^[\\s\\S]{0,200}$" |
# 返回数据
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
name | string | 非必须 | |||
input | 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 [] | 非必须 | item 类型: string | ||
├─ | 非必须 | ||||
output | 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 [] | 非必须 | item 类型: string | ||
├─ | 非必须 | ||||
displayName | string | 非必须 | |||
description | string | 非必须 | |||
createTime | string | 非必须 | |||
updateTime | string | 非必须 |
# 删除命令
# 基本信息
Path: /v1/products/:instanceId/:productKey/features/commands/:name
Method: DELETE
接口描述:
# 请求参数
Headers
参数名称 | 参数值 | 是否必须 | 示例 | 备注 |
---|---|---|---|---|
Content-Type | application/x-www-form-urlencoded | 是 |
路径参数
参数名称 | 示例 | 备注 |
---|---|---|
instanceId | ||
productKey | ||
name |
# 返回数据
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|
# 获取命令
# 基本信息
Path: /v1/products/:instanceId/:productKey/features/commands/:name
Method: GET
接口描述:
# 请求参数
路径参数
参数名称 | 示例 | 备注 |
---|---|---|
instanceId | ||
productKey | ||
name |
# 返回数据
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
name | string | 非必须 | mock: @word | ||
input | object | 非必须 | |||
├─ @type | string | 非必须 | 枚举: enum,string,float,enum,array,object,timestamp,dateTime | ||
├─ fields | object | 非必须 | |||
├─ field1 | object | 非必须 | |||
├─ @type | string | 非必须 | string | 枚举: string,float,timestamp,dateTime,integer | |
├─ format | string | 非必须 | |||
├─ min | string | 非必须 | 枚举: 1,2,3,4,5,6 mock: @natural | ||
├─ max | string | 非必须 | 枚举: 1,2,3,4,5,6 | ||
├─ step | string | 非必须 | 枚举: -200,-12.3,3.4,5.8,10,20 | ||
├─ pattern | string | 非必须 | |||
├─ minLength | number | 非必须 | |||
├─ maxLength | number | 非必须 | |||
├─ field2 | object | 必须 | |||
├─ @type | string | 必须 | 枚举: string,float,timestamp,dateTime | ||
├─ min | number | 必须 | mock: @integer | ||
├─ required | string [] | 非必须 | item 类型: string | ||
├─ | 非必须 | ||||
output | 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 [] | 非必须 | item 类型: string | ||
├─ | 非必须 | ||||
displayName | string | 非必须 | mock: @word | ||
description | string | 非必须 | mock: @word | ||
createTime | string | 非必须 | |||
updateTime | string | 非必须 |
# 获取命令列表
# 基本信息
Path: /v1/products/:instanceId/:productKey/features/commands
Method: GET
接口描述:
# 请求参数
路径参数
参数名称 | 示例 | 备注 |
---|---|---|
instanceId | ||
productKey |
Query
参数名称 | 是否必须 | 示例 | 备注 |
---|---|---|---|
pageNo | 是 | ||
pageSize | 是 |
# 返回数据
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
totalCount | number | 非必须 | 100 | ||
result | object [] | 非必须 | item 类型: object | ||
├─ name | string | 非必须 | |||
├─ input | object | 非必须 | |||
├─ @type | string | 非必须 | |||
├─ fields | object | 非必须 | |||
├─ field1 | object | 非必须 | |||
├─ @type | string | 非必须 | 枚举: string,float,timestamp,dateTime | ||
├─ format | string | 非必须 | |||
├─ min | number | 非必须 | |||
├─ max | number | 非必须 | |||
├─ step | number | 非必须 | |||
├─ pattern | string | 非必须 | |||
├─ minLength | number | 非必须 | |||
├─ maxLength | number | 非必须 | |||
├─ required | string [] | 非必须 | item 类型: string | ||
├─ | 非必须 | ||||
├─ output | 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 [] | 非必须 | item 类型: string | ||
├─ | 非必须 | ||||
├─ displayName | string | 非必须 | |||
├─ description | string | 非必须 | |||
├─ createTime | string | 非必须 | |||
├─ updateTime | string | 非必须 | |||
pageNo | number | 非必须 | 10 | ||
pageSize | number | 非必须 | 10 |