添加或修改转换脚本
接口地址:/api/yt/convert/js
请求方式:POST
请求数据类型:application/x-www-form-urlencoded,application/json
响应数据类型:*/*
请求示例:
{
"configuration": {},
"name": ""
}
请求参数:
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 |
convertConfigDTO | ConvertConfigDTO | body | true | ConvertConfigDTO |
additionalInfo | 附加信息 | false | JsonNode | |
configuration | 配置参数 | true | JsonNode | |
createTime | 创建时间 | false | string(date-time) | |
creator | 创建用户 | false | string | |
datasourceContent | 数据源内容 | false | JsonNode | |
datasourceType | 数据源类型,可用值:ALL,DEVICES,PRODUCTS | false | string | |
defaultConfig | 租户默认配置 | false | string | |
description | 租户描述 | false | string | |
enabled | 租户状态:启用/禁用 | false | boolean | |
icon | 租户图标 | false | string | |
id | ID | false | string | |
name | 数据转换配置名称 | true | string | |
nodeType | false | integer(int32) | ||
remark | false | string | ||
roleIds | 租户角色列表 | false | array | |
status | 配置状态 | false | integer(int32) | |
tenantExpireTime | 租户到期时间 | false | string(date-time) | |
tenantId | 租户ID | false | string | |
tenantProfileId | 租户配置 | false | string | |
tenantStatus | 可用值:DISABLED,EXPIRED,NORMAL | false | string | |
type | 数据转换类型 | false | string | |
updateTime | 更新时间 | false | string(date-time) | |
updater | 更新用户 | false | string |
响应参数:
参数名称 | 参数说明 | 类型 |
additionalInfo | 附加信息 | JsonNode |
configuration | 配置参数 | JsonNode |
createTime | 创建时间 | string(date-time) |
creator | 创建用户 | string |
datasourceContent | 数据源内容 | JsonNode |
datasourceType | 数据源类型,可用值:ALL,DEVICES,PRODUCTS | string |
defaultConfig | 租户默认配置 | string |
description | 租户描述 | string |
enabled | 租户状态:启用/禁用 | boolean |
icon | 租户图标 | string |
id | ID | string |
name | 数据转换配置名称 | string |
nodeType | integer(int32) | |
remark | string | |
roleIds | 租户角色列表 | array |
status | 配置状态 | integer(int32) |
tenantExpireTime | 租户到期时间 | string(date-time) |
tenantId | 租户ID | string |
tenantProfileId | 租户配置 | string |
tenantStatus | 可用值:DISABLED,EXPIRED,NORMAL | string |
type | 数据转换类型 | string |
updateTime | 更新时间 | string(date-time) |
updater | 更新用户 | string |
响应示例:
{
"additionalInfo": {},
"configuration": {},
"createTime": "",
"creator": "",
"datasourceContent": {},
"datasourceType": "",
"defaultConfig": "",
"description": "",
"enabled": false,
"icon": "",
"id": "",
"name": "",
"nodeType": 0,
"remark": "",
"roleIds": [],
"status": 0,
"tenantExpireTime": "",
"tenantId": "",
"tenantProfileId": "",
"tenantStatus": "",
"type": "",
"updateTime": "",
"updater": ""
}
删除转换脚本
接口地址:/api/yt/convert/js
请求方式:DELETE
请求数据类型:application/x-www-form-urlencoded,application/json
响应数据类型:*/*
请求示例:
{
"ids": [],
"tenantId": ""
}
请求参数:
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 |
deleteDTO | DeleteDTO | body | true | DeleteDTO |
ids | 删除ID列表 | true | array | |
tenantId | 租户ID | false | string |
启用或禁用转换脚本
接口地址:/api/yt/convert/update/js
请求方式:POST
请求数据类型:application/x-www-form-urlencoded,application/json
响应数据类型:*/*
请求示例:
{
"configuration": {},
"id": "",
"status": 0
}
请求参数:
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 |
convertReqDTO | ConvertReqDTO | body | true | ConvertReqDTO |
configuration | false | JsonNode | ||
id | id | true | string | |
status | 状态:0禁用 1启用 | true | integer(int32) |
响应参数:
参数名称 | 参数说明 | 类型 |
connections | List of JSON objects that represent connections between rule nodes | array |
fromIndex | Index of rule node in the ‘nodes’ array of the RuleChainMetaData. Indicates the ‘from’ part of the connection. | integer(int32) |
toIndex | Index of rule node in the ‘nodes’ array of the RuleChainMetaData. Indicates the ‘to’ part of the connection. | integer(int32) |
type | Type of the relation. Typically indicated the result of processing by the ‘from’ rule node. For example, ‘Success’ or ‘Failure’ | string |
firstNodeIndex | Index of the first rule node in the ‘nodes’ list | integer(int32) |
nodes | List of rule node JSON objects | array |
additionalInfo | Additional parameters of the rule node. Contains ‘layoutX’ and ‘layoutY’ properties for visualization. | JsonNode |
configuration | JSON with the rule node configuration. Structure depends on the rule node implementation. | JsonNode |
createdTime | Timestamp of the rule node creation, in milliseconds | integer(int64) |
debugMode | Enable/disable debug. | boolean |
id | JSON object with the Rule Node Id. Specify this field to update the Rule Node. Referencing non-existing Rule Node Id will cause error. Omit this field to create new rule node. | RuleNodeId |
entityType | string,可用值:RULE_NODE | string |
id | ID of the entity, time-based UUID v1 | string |
name | User defined name of the rule node. Used on UI and for logging. | string |
ruleChainId | JSON object with the Rule Chain Id. | RuleChainId |
entityType | string,可用值:RULE_CHAIN | string |
id | ID of the entity, time-based UUID v1 | string |
type | Full Java Class Name of the rule node implementation. | string |
ruleChainConnections | List of JSON objects that represent connections between rule nodes and other rule chains. | array |
additionalInfo | JSON object with the additional information about the connection. | JsonNode |
fromIndex | Index of rule node in the ‘nodes’ array of the RuleChainMetaData. Indicates the ‘from’ part of the connection. | integer(int32) |
targetRuleChainId | JSON object with the Rule Chain Id. | RuleChainId |
entityType | string,可用值:RULE_CHAIN | string |
id | ID of the entity, time-based UUID v1 | string |
type | Type of the relation. Typically indicated the result of processing by the ‘from’ rule node. For example, ‘Success’ or ‘Failure’ | string |
ruleChainId | JSON object with Rule Chain Id. | RuleChainId |
entityType | string,可用值:RULE_CHAIN | string |
id | ID of the entity, time-based UUID v1 | string(uuid) |
响应示例:
{
"connections": [
{
"fromIndex": 0,
"toIndex": 0,
"type": ""
}
],
"firstNodeIndex": 0,
"nodes": [
{
"additionalInfo": {},
"configuration": {},
"debugMode": false,
"id": {
"entityType": "RULE_NODE",
"id": "784f394c-42b6-435a-983c-b7beff2784f9"
},
"name": "Process sensor reading",
"type": "com.mycompany.iot.rule.engine.ProcessingNode"
}
],
"ruleChainConnections": [
{
"additionalInfo": {},
"fromIndex": 0,
"targetRuleChainId": {
"entityType": "RULE_CHAIN",
"id": "784f394c-42b6-435a-983c-b7beff2784f9"
},
"type": ""
}
]
}