ThingsKit物联网平台API文档-规则引擎(数据流转)

添加或修改转换配置

接口地址:/api/yt/convert/config

请求方式:POST

请求数据类型:application/x-www-form-urlencoded,application/json

响应数据类型:*/*

请求示例:

{
  "configuration": {},
  "name": ""
}

请求参数:

参数名称参数说明请求类型是否必须数据类型
convertConfigDTOConvertConfigDTObodytrueConvertConfigDTO
additionalInfo附加信息falseJsonNode
configuration配置参数trueJsonNode
createTime创建时间falsestring(date-time)
creator创建用户falsestring
datasourceContent数据源内容falseJsonNode
datasourceType数据源类型,可用值:ALL,DEVICES,PRODUCTSfalsestring
defaultConfig租户默认配置falsestring
description租户描述falsestring
enabled租户状态:启用/禁用falseboolean
icon租户图标falsestring
idIDfalsestring
name数据转换配置名称truestring
nodeTypefalseinteger(int32)
remarkfalsestring
roleIds租户角色列表falsearray
status配置状态falseinteger(int32)
tenantExpireTime租户到期时间falsestring(date-time)
tenantId租户IDfalsestring
tenantProfileId租户配置falsestring
tenantStatus可用值:DISABLED,EXPIRED,NORMALfalsestring
type数据转换类型falsestring
updateTime更新时间falsestring(date-time)
updater更新用户falsestring

响应参数:

参数名称参数说明类型
additionalInfo附加信息JsonNode
configuration配置参数JsonNode
createTime创建时间string(date-time)
creator创建用户string
datasourceContent数据源内容JsonNode
datasourceType数据源类型,可用值:ALL,DEVICES,PRODUCTSstring
defaultConfig租户默认配置string
description租户描述string
enabled租户状态:启用/禁用boolean
icon租户图标string
idIDstring
name数据转换配置名称string
nodeTypeinteger(int32)
remarkstring
roleIds租户角色列表array
status配置状态integer(int32)
tenantExpireTime租户到期时间string(date-time)
tenantId租户IDstring
tenantProfileId租户配置string
tenantStatus可用值:DISABLED,EXPIRED,NORMALstring
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/config

请求方式:DELETE

请求数据类型:application/x-www-form-urlencoded,application/json

响应数据类型:*/*

请求示例:

{
  "ids": [],
  "tenantId": ""
}

请求参数:

参数名称参数说明请求类型是否必须数据类型
deleteDTODeleteDTObodytrueDeleteDTO
ids删除ID列表truearray
tenantId租户IDfalsestring

启用或禁用配置

接口地址:/api/yt/convert/update/config

请求方式:POST

请求数据类型:application/x-www-form-urlencoded,application/json

响应数据类型:*/*

请求示例:

{
  "convertIds": [],
  "nodeType": 0,
  "status": 0
}

请求参数:

参数名称参数说明请求类型是否必须数据类型
convertConfigReqDTOConvertConfigReqDTObodytrueConvertConfigReqDTO
convertIds数据转换IDStruearray
nodeType类型:0:数据转换脚本 1:数据流转trueinteger(int32)
status状态:0禁用 1启用trueinteger(int32)

响应参数:

参数名称参数说明类型
connectionsList of JSON objects that represent connections between rule nodesarray
fromIndexIndex of rule node in the ‘nodes’ array of the RuleChainMetaData. Indicates the ‘from’ part of the connection.integer(int32)
toIndexIndex of rule node in the ‘nodes’ array of the RuleChainMetaData. Indicates the ‘to’ part of the connection.integer(int32)
typeType of the relation. Typically indicated the result of processing by the ‘from’ rule node. For example, ‘Success’ or ‘Failure’string
firstNodeIndexIndex of the first rule node in the ‘nodes’ listinteger(int32)
nodesList of rule node JSON objectsarray
additionalInfoAdditional parameters of the rule node. Contains ‘layoutX’ and ‘layoutY’ properties for visualization.JsonNode
configurationJSON with the rule node configuration. Structure depends on the rule node implementation.JsonNode
createdTimeTimestamp of the rule node creation, in millisecondsinteger(int64)
debugModeEnable/disable debug.boolean
idJSON 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
entityTypestring,可用值:RULE_NODEstring
idID of the entity, time-based UUID v1string
nameUser defined name of the rule node. Used on UI and for logging.string
ruleChainIdJSON object with the Rule Chain Id.RuleChainId
entityTypestring,可用值:RULE_CHAINstring
idID of the entity, time-based UUID v1string
typeFull Java Class Name of the rule node implementation.string
ruleChainConnectionsList of JSON objects that represent connections between rule nodes and other rule chains.array
additionalInfoJSON object with the additional information about the connection.JsonNode
fromIndexIndex of rule node in the ‘nodes’ array of the RuleChainMetaData. Indicates the ‘from’ part of the connection.integer(int32)
targetRuleChainIdJSON object with the Rule Chain Id.RuleChainId
entityTypestring,可用值:RULE_CHAINstring
idID of the entity, time-based UUID v1string
typeType of the relation. Typically indicated the result of processing by the ‘from’ rule node. For example, ‘Success’ or ‘Failure’string
ruleChainIdJSON object with Rule Chain Id.RuleChainId
entityTypestring,可用值:RULE_CHAINstring
idID of the entity, time-based UUID v1string(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": ""
		}
	]
}

接口地址:/api/yt/convert/{id}

请求方式:GET

请求数据类型:application/x-www-form-urlencoded

响应数据类型:*/*

请求参数:

参数名称参数说明请求类型是否必须数据类型
ididpathtruestring

响应参数:

参数名称参数说明类型
additionalInfo附加信息JsonNode
configuration配置参数JsonNode
createTime创建时间string(date-time)
creator创建用户string
datasourceContent数据源内容JsonNode
datasourceType数据源类型,可用值:ALL,DEVICES,PRODUCTSstring
defaultConfig租户默认配置string
description租户描述string
enabled租户状态:启用/禁用boolean
icon租户图标string
idIDstring
name数据转换配置名称string
nodeTypeinteger(int32)
remarkstring
roleIds租户角色列表array
status配置状态integer(int32)
tenantExpireTime租户到期时间string(date-time)
tenantId租户IDstring
tenantProfileId租户配置string
tenantStatus可用值:DISABLED,EXPIRED,NORMALstring
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{?name,nodeType,orderFiled,orderType,page,pageSize,status}

请求方式:GET

请求数据类型:application/x-www-form-urlencoded

响应数据类型:*/*

请求参数:

参数名称参数说明是否必须数据类型
pagepagetrueint
pageSizepageSizetrueint
nodeType0:转换脚本 1:数据流转trueinteger(int32)
namenamefalsestring
statusstatusfalseinteger(int32)
orderFiledorderFiledfalsestring
orderTypeorderType,可用值:ASC,DESCfalsestring

响应参数:

参数名称参数说明类型
itemsarray
additionalInfo附加信息JsonNode
configuration配置参数JsonNode
createTime创建时间string(date-time)
creator创建用户string
datasourceContent数据源内容JsonNode
datasourceType数据源类型,可用值:ALL,DEVICES,PRODUCTSstring
defaultConfig租户默认配置string
description租户描述string
enabled租户状态:启用/禁用boolean
icon租户图标string
idIDstring
name数据转换配置名称string
nodeTypeinteger(int32)
remarkstring
roleIds租户角色列表array
status配置状态integer(int32)
tenantExpireTime租户到期时间string(date-time)
tenantId租户IDstring
tenantProfileId租户配置string
tenantStatus可用值:DISABLED,EXPIRED,NORMALstring
type数据转换类型string
updateTime更新时间string(date-time)
updater更新用户string
totalinteger(int32)

响应示例:

{
	"items": [
		{
			"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": ""
		}
	],
	"total": 0
}

获取详情

接口地址:/api/yt/convert/{id}

请求方式:GET

请求数据类型:application/x-www-form-urlencoded

响应数据类型:*/*

请求参数:

参数名称参数说明请求类型是否必须数据类型
ididpathtruestring

响应参数:

参数名称参数说明类型
additionalInfo附加信息JsonNode
configuration配置参数JsonNode
createTime创建时间string(date-time)
creator创建用户string
datasourceContent数据源内容JsonNode
datasourceType数据源类型,可用值:ALL,DEVICES,PRODUCTSstring
defaultConfig租户默认配置string
description租户描述string
enabled租户状态:启用/禁用boolean
icon租户图标string
idIDstring
name数据转换配置名称string
nodeTypeinteger(int32)
remarkstring
roleIds租户角色列表array
status配置状态integer(int32)
tenantExpireTime租户到期时间string(date-time)
tenantId租户IDstring
tenantProfileId租户配置string
tenantStatus可用值:DISABLED,EXPIRED,NORMALstring
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": ""
}