ThingsKit物联网平台API文档-规则引擎(场景联动)

新增场景联动

接口地址:/api/yt/scene_linkage

请求方式:POST

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

响应数据类型:*/*

请求示例:

{
  "createTime": "",
  "creator": "",
  "creatorName": "",
  "defaultConfig": "",
  "description": "",
  "enabled": false,
  "icon": "",
  "id": "",
  "name": ""
}

请求参数:

参数名称参数说明请求类型是否必须数据类型
sceneLinkageDTOReqSceneLinkageDTOReqbodytrueSceneLinkageDTOReq
createTime创建时间falsestring(date-time)
creator创建用户falsestring
creatorName创建用户falsestring
defaultConfig租户默认配置falsestring
description描述falsestring
doActions执行动作falsearray
alarmProfileId输出目标为告警才进行配置falsestring
callType调用类型:sync同步/async异步,可用值:ASYNC,SYNCfalsestring
commandType命令类型:0自定义 1服务falseinteger
createTime创建时间falsestring
creator创建用户falsestring
defaultConfig租户默认配置falsestring
description租户描述falsestring
deviceId所属设备idfalsearray
deviceProfileId设备配置IDfalsestring
deviceType设备类型,可用值:DIRECT_CONNECTION,GATEWAY,SENSORfalsestring
doContext场景联动内容falseJsonNode
enabled租户状态:启用/禁用falseboolean
entityType取值范围,可用值:ALL,PARTfalsestring
icon租户图标falsestring
idIDfalsestring
name租户名称falsestring
outTarget输出目标:设备,告警,其他,可用值:DEVICE_OUT,MSG_NOTIFY,SCENE_ACTfalsestring
roleIds租户角色列表falsearray
sceneLinkageId场景联动idfalsestring
tenantExpireTime租户到期时间falsestring
tenantId租户IDfalsestring
tenantProfileId租户配置falsestring
tenantStatus可用值:DISABLED,EXPIRED,NORMALfalsestring
thingsModelId服务模型IDfalsestring
updateTime更新时间falsestring
updater更新用户falsestring
doConditions执行条件falsearray
createTime创建时间falsestring
creator创建用户falsestring
defaultConfig租户默认配置falsestring
description租户描述falsestring
deviceProfileId设备配置IDfalsestring
deviceType设备类型,可用值:DIRECT_CONNECTION,GATEWAY,SENSORfalsestring
enabled租户状态:启用/禁用falseboolean
entityIdentityId列表falsearray
entityType触发器关联实体,可用值:ALL,PARTfalsestring
icon租户图标falsestring
idIDfalsestring
name租户名称falsestring
roleIds租户角色列表falsearray
sceneLinkageId场景联动idfalsestring
tenantExpireTime租户到期时间falsestring
tenantId租户IDfalsestring
tenantProfileId租户配置falsestring
tenantStatus可用值:DISABLED,EXPIRED,NORMALfalsestring
triggerCondition触发条件falseAlarmRuleReq
alarmDetailsString value representing the additional details for an alarm rulefalsestring
conditionJSON object representing the alarm rule conditionfalseAlarmConditionReq
conditionJSON array of alarm condition filtersfalsearray
keyJSON object for specifying alarm condition by specific keyfalseAlarmConditionFilterKeyReq
keyString value representing the keyfalsestring
typeThe key type,可用值:ATTRIBUTE,CONSTANT,ENTITY_FIELD,TIME_SERIESfalsestring
predicateJSON object representing filter conditionfalseKeyFilterPredicate
valueValue used in Constant comparison. For other types, such as TIME_SERIES or ATTRIBUTE, the predicate condition is usedfalseobject
valueTypeString representation of the type of the value,可用值:BOOLEAN,DATE_TIME,NUMERIC,STRINGfalsestring
specJSON object representing alarm condition typefalseAlarmConditionSpec
dashboardIdJSON object with the dashboard Id representing the reference to alarm details dashboard used by mobile applicationfalseDashboardIdReq
idID of the entity, time-based UUID v1truestring
scheduleJSON object representing time interval during which the rule is activefalseAlarmScheduleReq
triggerType触发器类型,可用值:DEVICE_TRIGGER,HAND_ACT,SCENE_TRIGGER,SCHEDULE_TRIGGERfalsestring
updateTime更新时间falsestring
updater更新用户falsestring
enabled租户状态:启用/禁用falseboolean
icon租户图标falsestring
idIDfalsestring
name场景联动名称truestring
organizationId所属组织idtruestring
roleIds租户角色列表falsearray
status状态:0表示已停用,1表示启用falseinteger(int32)
tenantExpireTime租户到期时间falsestring(date-time)
tenantId租户IDfalsestring
tenantProfileId租户配置falsestring
tenantStatus可用值:DISABLED,EXPIRED,NORMALfalsestring
triggers触发器falsearray
createTime创建时间falsestring
creator创建用户falsestring
defaultConfig租户默认配置falsestring
description租户描述falsestring
deviceProfileId设备配置IDfalsestring
deviceType设备类型,可用值:DIRECT_CONNECTION,GATEWAY,SENSORfalsestring
enabled租户状态:启用/禁用falseboolean
entityId实体IDfalsearray
entityType触发器关联实体,例如:设备ID、场景联动ID、定时任务CRON表达式,可用值:ALL,PARTfalsestring
icon租户图标falsestring
idIDfalsestring
name租户名称falsestring
roleIds租户角色列表falsearray
sceneLinkageId场景联动idfalsestring
tenantExpireTime租户到期时间falsestring
tenantId租户IDfalsestring
tenantProfileId租户配置falsestring
tenantStatus可用值:DISABLED,EXPIRED,NORMALfalsestring
triggerCondition触发条件falseAlarmRuleReq
alarmDetailsString value representing the additional details for an alarm rulefalsestring
conditionJSON object representing the alarm rule conditionfalseAlarmConditionReq
conditionJSON array of alarm condition filtersfalsearray
keyJSON object for specifying alarm condition by specific keyfalseAlarmConditionFilterKeyReq
keyString value representing the keyfalsestring
typeThe key type,可用值:ATTRIBUTE,CONSTANT,ENTITY_FIELD,TIME_SERIESfalsestring
predicateJSON object representing filter conditionfalseKeyFilterPredicate
valueValue used in Constant comparison. For other types, such as TIME_SERIES or ATTRIBUTE, the predicate condition is usedfalseobject
valueTypeString representation of the type of the value,可用值:BOOLEAN,DATE_TIME,NUMERIC,STRINGfalsestring
specJSON object representing alarm condition typefalseAlarmConditionSpec
dashboardIdJSON object with the dashboard Id representing the reference to alarm details dashboard used by mobile applicationfalseDashboardIdReq
idID of the entity, time-based UUID v1truestring
scheduleJSON object representing time interval during which the rule is activefalseAlarmScheduleReq
triggerType触发器类型,可用值:DEVICE_TRIGGER,HAND_ACT,SCENE_TRIGGER,SCHEDULE_TRIGGERfalsestring
updateTime更新时间falsestring
updater更新用户falsestring
updateTime更新时间falsestring(date-time)
updater更新用户falsestring

响应参数:

参数名称参数说明类型
createTime创建时间string(date-time)
creator创建用户string
creatorName创建用户string
defaultConfig租户默认配置string
description描述string
doActions执行动作array
alarmProfileId输出目标为告警才进行配置string
callType调用类型:sync同步/async异步,可用值:ASYNC,SYNCstring
commandType命令类型:0自定义 1服务integer(int32)
createTime创建时间string(date-time)
creator创建用户string
defaultConfig租户默认配置string
description租户描述string
deviceId所属设备idarray
deviceProfileId设备配置IDstring
deviceType设备类型,可用值:DIRECT_CONNECTION,GATEWAY,SENSORstring
doContext场景联动内容JsonNode
enabled租户状态:启用/禁用boolean
entityType取值范围,可用值:ALL,PARTstring
icon租户图标string
idIDstring
name租户名称string
outTarget输出目标:设备,告警,其他,可用值:DEVICE_OUT,MSG_NOTIFY,SCENE_ACTstring
roleIds租户角色列表array
sceneLinkageId场景联动idstring
tenantExpireTime租户到期时间string(date-time)
tenantId租户IDstring
tenantProfileId租户配置string
tenantStatus可用值:DISABLED,EXPIRED,NORMALstring
thingsModelId服务模型IDstring
updateTime更新时间string(date-time)
updater更新用户string
doConditions执行条件array
createTime创建时间string(date-time)
creator创建用户string
defaultConfig租户默认配置string
description租户描述string
deviceProfileId设备配置IDstring
deviceType设备类型,可用值:DIRECT_CONNECTION,GATEWAY,SENSORstring
enabled租户状态:启用/禁用boolean
entityIdentityId列表array
entityType触发器关联实体,可用值:ALL,PARTstring
icon租户图标string
idIDstring
name租户名称string
roleIds租户角色列表array
sceneLinkageId场景联动idstring
tenantExpireTime租户到期时间string(date-time)
tenantId租户IDstring
tenantProfileId租户配置string
tenantStatus可用值:DISABLED,EXPIRED,NORMALstring
triggerCondition触发条件AlarmRuleRes
alarmDetailsString value representing the additional details for an alarm rulestring
conditionJSON object representing the alarm rule conditionAlarmConditionRes
conditionJSON array of alarm condition filtersarray
keyJSON object for specifying alarm condition by specific keyAlarmConditionFilterKeyRes
keyString value representing the keystring
typeThe key type,可用值:ATTRIBUTE,CONSTANT,ENTITY_FIELD,TIME_SERIESstring
predicateJSON object representing filter conditionKeyFilterPredicate
valueValue used in Constant comparison. For other types, such as TIME_SERIES or ATTRIBUTE, the predicate condition is usedobject
valueTypeString representation of the type of the value,可用值:BOOLEAN,DATE_TIME,NUMERIC,STRINGstring
specJSON object representing alarm condition typeAlarmConditionSpec
dashboardIdJSON object with the dashboard Id representing the reference to alarm details dashboard used by mobile applicationDashboardIdRes
entityTypestring,可用值:DASHBOARDstring
idID of the entity, time-based UUID v1string
scheduleJSON object representing time interval during which the rule is activeAlarmScheduleRes
type可用值:ANY_TIME,CUSTOM,SPECIFIC_TIMEstring
triggerType触发器类型,可用值:DEVICE_TRIGGER,HAND_ACT,SCENE_TRIGGER,SCHEDULE_TRIGGERstring
updateTime更新时间string(date-time)
updater更新用户string
enabled租户状态:启用/禁用boolean
icon租户图标string
idIDstring
name场景联动名称string
organizationId所属组织idstring
roleIds租户角色列表array
status状态:0表示已停用,1表示启用integer(int32)
tenantExpireTime租户到期时间string(date-time)
tenantId租户IDstring
tenantProfileId租户配置string
tenantStatus可用值:DISABLED,EXPIRED,NORMALstring
triggers触发器array
createTime创建时间string(date-time)
creator创建用户string
defaultConfig租户默认配置string
description租户描述string
deviceProfileId设备配置IDstring
deviceType设备类型,可用值:DIRECT_CONNECTION,GATEWAY,SENSORstring
enabled租户状态:启用/禁用boolean
entityId实体IDarray
entityType触发器关联实体,例如:设备ID、场景联动ID、定时任务CRON表达式,可用值:ALL,PARTstring
icon租户图标string
idIDstring
name租户名称string
roleIds租户角色列表array
sceneLinkageId场景联动idstring
tenantExpireTime租户到期时间string(date-time)
tenantId租户IDstring
tenantProfileId租户配置string
tenantStatus可用值:DISABLED,EXPIRED,NORMALstring
triggerCondition触发条件AlarmRuleRes
alarmDetailsString value representing the additional details for an alarm rulestring
conditionJSON object representing the alarm rule conditionAlarmConditionRes
conditionJSON array of alarm condition filtersarray
keyJSON object for specifying alarm condition by specific keyAlarmConditionFilterKeyRes
keyString value representing the keystring
typeThe key type,可用值:ATTRIBUTE,CONSTANT,ENTITY_FIELD,TIME_SERIESstring
predicateJSON object representing filter conditionKeyFilterPredicate
valueValue used in Constant comparison. For other types, such as TIME_SERIES or ATTRIBUTE, the predicate condition is usedobject
valueTypeString representation of the type of the value,可用值:BOOLEAN,DATE_TIME,NUMERIC,STRINGstring
specJSON object representing alarm condition typeAlarmConditionSpec
dashboardIdJSON object with the dashboard Id representing the reference to alarm details dashboard used by mobile applicationDashboardIdRes
entityTypestring,可用值:DASHBOARDstring
idID of the entity, time-based UUID v1string
scheduleJSON object representing time interval during which the rule is activeAlarmScheduleRes
type可用值:ANY_TIME,CUSTOM,SPECIFIC_TIMEstring
triggerType触发器类型,可用值:DEVICE_TRIGGER,HAND_ACT,SCENE_TRIGGER,SCHEDULE_TRIGGERstring
updateTime更新时间string(date-time)
updater更新用户string
updateTime更新时间string(date-time)
updater更新用户string

响应示例:

{
	"createTime": "",
	"creator": "",
	"creatorName": "",
	"defaultConfig": "",
	"description": "",
	"doActions": [
		{
			"alarmProfileId": "",
			"callType": "",
			"commandType": 0,
			"createTime": "",
			"creator": "",
			"defaultConfig": "",
			"description": "",
			"deviceId": [],
			"deviceProfileId": "",
			"deviceType": "",
			"doContext": {},
			"enabled": false,
			"entityType": "",
			"icon": "",
			"id": "",
			"name": "",
			"outTarget": "",
			"roleIds": [],
			"sceneLinkageId": "",
			"tenantExpireTime": "",
			"tenantId": "",
			"tenantProfileId": "",
			"tenantStatus": "",
			"thingsModelId": "",
			"updateTime": "",
			"updater": ""
		}
	],
	"doConditions": [
		{
			"createTime": "",
			"creator": "",
			"defaultConfig": "",
			"description": "",
			"deviceProfileId": "",
			"deviceType": "",
			"enabled": false,
			"entityId": [],
			"entityType": "",
			"icon": "",
			"id": "",
			"name": "",
			"roleIds": [],
			"sceneLinkageId": "",
			"tenantExpireTime": "",
			"tenantId": "",
			"tenantProfileId": "",
			"tenantStatus": "",
			"triggerCondition": {
				"alarmDetails": "",
				"condition": {
					"condition": [
						{
							"key": {
								"key": "temp",
								"type": "TIME_SERIES"
							},
							"predicate": {},
							"value": {},
							"valueType": "NUMERIC"
						}
					],
					"spec": {}
				},
				"dashboardId": {
					"entityType": "DASHBOARD",
					"id": "784f394c-42b6-435a-983c-b7beff2784f9"
				},
				"schedule": {
					"type": ""
				}
			},
			"triggerType": "",
			"updateTime": "",
			"updater": ""
		}
	],
	"enabled": false,
	"icon": "",
	"id": "",
	"name": "",
	"organizationId": "",
	"roleIds": [],
	"status": 0,
	"tenantExpireTime": "",
	"tenantId": "",
	"tenantProfileId": "",
	"tenantStatus": "",
	"triggers": [
		{
			"createTime": "",
			"creator": "",
			"defaultConfig": "",
			"description": "",
			"deviceProfileId": "",
			"deviceType": "",
			"enabled": false,
			"entityId": [],
			"entityType": "",
			"icon": "",
			"id": "",
			"name": "",
			"roleIds": [],
			"sceneLinkageId": "",
			"tenantExpireTime": "",
			"tenantId": "",
			"tenantProfileId": "",
			"tenantStatus": "",
			"triggerCondition": {
				"alarmDetails": "",
				"condition": {
					"condition": [
						{
							"key": {
								"key": "temp",
								"type": "TIME_SERIES"
							},
							"predicate": {},
							"value": {},
							"valueType": "NUMERIC"
						}
					],
					"spec": {}
				},
				"dashboardId": {
					"entityType": "DASHBOARD",
					"id": "784f394c-42b6-435a-983c-b7beff2784f9"
				},
				"schedule": {
					"type": ""
				}
			},
			"triggerType": "",
			"updateTime": "",
			"updater": ""
		}
	],
	"updateTime": "",
	"updater": ""
}

删除

接口地址:/api/yt/scene_linkage

请求方式:DELETE

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

响应数据类型:*/*

请求示例:

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

请求参数:

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

组织的设备集合

接口地址:/api/yt/scene_linkage/device{?organizationId}

请求方式:GET

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

响应数据类型:*/*

请求参数:

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

编辑

接口地址:/api/yt/scene_linkage/update

请求方式:POST

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

响应数据类型:*/*

请求示例:

{
  "createTime": "",
  "creator": "",
  "creatorName": "",
  "defaultConfig": "",
  "description": "",
  "enabled": false,
  "icon": "",
  "id": "",
  "name": "",
  "organizationId": "",
  "roleIds": [],
  "status": 0,
  "tenantExpireTime": "",
  "tenantId": "",
  "tenantProfileId": "",
  "tenantStatus": ""
}

请求参数:

参数名称参数说明请求类型是否必须数据类型
sceneLinkageDTOReqSceneLinkageDTOReqbodytrueSceneLinkageDTOReq
createTime创建时间falsestring(date-time)
creator创建用户falsestring
creatorName创建用户falsestring
defaultConfig租户默认配置falsestring
description描述falsestring
doActions执行动作falsearray
alarmProfileId输出目标为告警才进行配置falsestring
callType调用类型:sync同步/async异步,可用值:ASYNC,SYNCfalsestring
commandType命令类型:0自定义 1服务falseinteger
createTime创建时间falsestring
creator创建用户falsestring
defaultConfig租户默认配置falsestring
description租户描述falsestring
deviceId所属设备idfalsearray
deviceProfileId设备配置IDfalsestring
deviceType设备类型,可用值:DIRECT_CONNECTION,GATEWAY,SENSORfalsestring
doContext场景联动内容falseJsonNode
enabled租户状态:启用/禁用falseboolean
entityType取值范围,可用值:ALL,PARTfalsestring
icon租户图标falsestring
idIDfalsestring
name租户名称falsestring
outTarget输出目标:设备,告警,其他,可用值:DEVICE_OUT,MSG_NOTIFY,SCENE_ACTfalsestring
roleIds租户角色列表falsearray
sceneLinkageId场景联动idfalsestring
tenantExpireTime租户到期时间falsestring
tenantId租户IDfalsestring
tenantProfileId租户配置falsestring
tenantStatus可用值:DISABLED,EXPIRED,NORMALfalsestring
thingsModelId服务模型IDfalsestring
updateTime更新时间falsestring
updater更新用户falsestring
doConditions执行条件falsearray
createTime创建时间falsestring
creator创建用户falsestring
defaultConfig租户默认配置falsestring
description租户描述falsestring
deviceProfileId设备配置IDfalsestring
deviceType设备类型,可用值:DIRECT_CONNECTION,GATEWAY,SENSORfalsestring
enabled租户状态:启用/禁用falseboolean
entityIdentityId列表falsearray
entityType触发器关联实体,可用值:ALL,PARTfalsestring
icon租户图标falsestring
idIDfalsestring
name租户名称falsestring
roleIds租户角色列表falsearray
sceneLinkageId场景联动idfalsestring
tenantExpireTime租户到期时间falsestring
tenantId租户IDfalsestring
tenantProfileId租户配置falsestring
tenantStatus可用值:DISABLED,EXPIRED,NORMALfalsestring
triggerCondition触发条件falseAlarmRuleReq
alarmDetailsString value representing the additional details for an alarm rulefalsestring
conditionJSON object representing the alarm rule conditionfalseAlarmConditionReq
conditionJSON array of alarm condition filtersfalsearray
keyJSON object for specifying alarm condition by specific keyfalseAlarmConditionFilterKeyReq
keyString value representing the keyfalsestring
typeThe key type,可用值:ATTRIBUTE,CONSTANT,ENTITY_FIELD,TIME_SERIESfalsestring
predicateJSON object representing filter conditionfalseKeyFilterPredicate
valueValue used in Constant comparison. For other types, such as TIME_SERIES or ATTRIBUTE, the predicate condition is usedfalseobject
valueTypeString representation of the type of the value,可用值:BOOLEAN,DATE_TIME,NUMERIC,STRINGfalsestring
specJSON object representing alarm condition typefalseAlarmConditionSpec
dashboardIdJSON object with the dashboard Id representing the reference to alarm details dashboard used by mobile applicationfalseDashboardIdReq
idID of the entity, time-based UUID v1truestring
scheduleJSON object representing time interval during which the rule is activefalseAlarmScheduleReq
triggerType触发器类型,可用值:DEVICE_TRIGGER,HAND_ACT,SCENE_TRIGGER,SCHEDULE_TRIGGERfalsestring
updateTime更新时间falsestring
updater更新用户falsestring
enabled租户状态:启用/禁用falseboolean
icon租户图标falsestring
idIDfalsestring
name场景联动名称truestring
organizationId所属组织idtruestring
roleIds租户角色列表falsearray
status状态:0表示已停用,1表示启用falseinteger(int32)
tenantExpireTime租户到期时间falsestring(date-time)
tenantId租户IDfalsestring
tenantProfileId租户配置falsestring
tenantStatus可用值:DISABLED,EXPIRED,NORMALfalsestring
triggers触发器falsearray
createTime创建时间falsestring
creator创建用户falsestring
defaultConfig租户默认配置falsestring
description租户描述falsestring
deviceProfileId设备配置IDfalsestring
deviceType设备类型,可用值:DIRECT_CONNECTION,GATEWAY,SENSORfalsestring
enabled租户状态:启用/禁用falseboolean
entityId实体IDfalsearray
entityType触发器关联实体,例如:设备ID、场景联动ID、定时任务CRON表达式,可用值:ALL,PARTfalsestring
icon租户图标falsestring
idIDfalsestring
name租户名称falsestring
roleIds租户角色列表falsearray
sceneLinkageId场景联动idfalsestring
tenantExpireTime租户到期时间falsestring
tenantId租户IDfalsestring
tenantProfileId租户配置falsestring
tenantStatus可用值:DISABLED,EXPIRED,NORMALfalsestring
triggerCondition触发条件falseAlarmRuleReq
alarmDetailsString value representing the additional details for an alarm rulefalsestring
conditionJSON object representing the alarm rule conditionfalseAlarmConditionReq
conditionJSON array of alarm condition filtersfalsearray
keyJSON object for specifying alarm condition by specific keyfalseAlarmConditionFilterKeyReq
keyString value representing the keyfalsestring
typeThe key type,可用值:ATTRIBUTE,CONSTANT,ENTITY_FIELD,TIME_SERIESfalsestring
predicateJSON object representing filter conditionfalseKeyFilterPredicate
valueValue used in Constant comparison. For other types, such as TIME_SERIES or ATTRIBUTE, the predicate condition is usedfalseobject
valueTypeString representation of the type of the value,可用值:BOOLEAN,DATE_TIME,NUMERIC,STRINGfalsestring
specJSON object representing alarm condition typefalseAlarmConditionSpec
dashboardIdJSON object with the dashboard Id representing the reference to alarm details dashboard used by mobile applicationfalseDashboardIdReq
idID of the entity, time-based UUID v1truestring
scheduleJSON object representing time interval during which the rule is activefalseAlarmScheduleReq
triggerType触发器类型,可用值:DEVICE_TRIGGER,HAND_ACT,SCENE_TRIGGER,SCHEDULE_TRIGGERfalsestring
updateTime更新时间falsestring
updater更新用户falsestring
updateTime更新时间falsestring(date-time)
updater更新用户falsestring

响应参数:

参数名称参数说明类型
createTime创建时间string(date-time)
creator创建用户string
creatorName创建用户string
defaultConfig租户默认配置string
description描述string
doActions执行动作array
alarmProfileId输出目标为告警才进行配置string
callType调用类型:sync同步/async异步,可用值:ASYNC,SYNCstring
commandType命令类型:0自定义 1服务integer(int32)
createTime创建时间string(date-time)
creator创建用户string
defaultConfig租户默认配置string
description租户描述string
deviceId所属设备idarray
deviceProfileId设备配置IDstring
deviceType设备类型,可用值:DIRECT_CONNECTION,GATEWAY,SENSORstring
doContext场景联动内容JsonNode
enabled租户状态:启用/禁用boolean
entityType取值范围,可用值:ALL,PARTstring
icon租户图标string
idIDstring
name租户名称string
outTarget输出目标:设备,告警,其他,可用值:DEVICE_OUT,MSG_NOTIFY,SCENE_ACTstring
roleIds租户角色列表array
sceneLinkageId场景联动idstring
tenantExpireTime租户到期时间string(date-time)
tenantId租户IDstring
tenantProfileId租户配置string
tenantStatus可用值:DISABLED,EXPIRED,NORMALstring
thingsModelId服务模型IDstring
updateTime更新时间string(date-time)
updater更新用户string
doConditions执行条件array
createTime创建时间string(date-time)
creator创建用户string
defaultConfig租户默认配置string
description租户描述string
deviceProfileId设备配置IDstring
deviceType设备类型,可用值:DIRECT_CONNECTION,GATEWAY,SENSORstring
enabled租户状态:启用/禁用boolean
entityIdentityId列表array
entityType触发器关联实体,可用值:ALL,PARTstring
icon租户图标string
idIDstring
name租户名称string
roleIds租户角色列表array
sceneLinkageId场景联动idstring
tenantExpireTime租户到期时间string(date-time)
tenantId租户IDstring
tenantProfileId租户配置string
tenantStatus可用值:DISABLED,EXPIRED,NORMALstring
triggerCondition触发条件AlarmRuleRes
alarmDetailsString value representing the additional details for an alarm rulestring
conditionJSON object representing the alarm rule conditionAlarmConditionRes
conditionJSON array of alarm condition filtersarray
keyJSON object for specifying alarm condition by specific keyAlarmConditionFilterKeyRes
keyString value representing the keystring
typeThe key type,可用值:ATTRIBUTE,CONSTANT,ENTITY_FIELD,TIME_SERIESstring
predicateJSON object representing filter conditionKeyFilterPredicate
valueValue used in Constant comparison. For other types, such as TIME_SERIES or ATTRIBUTE, the predicate condition is usedobject
valueTypeString representation of the type of the value,可用值:BOOLEAN,DATE_TIME,NUMERIC,STRINGstring
specJSON object representing alarm condition typeAlarmConditionSpec
dashboardIdJSON object with the dashboard Id representing the reference to alarm details dashboard used by mobile applicationDashboardIdRes
entityTypestring,可用值:DASHBOARDstring
idID of the entity, time-based UUID v1string
scheduleJSON object representing time interval during which the rule is activeAlarmScheduleRes
type可用值:ANY_TIME,CUSTOM,SPECIFIC_TIMEstring
triggerType触发器类型,可用值:DEVICE_TRIGGER,HAND_ACT,SCENE_TRIGGER,SCHEDULE_TRIGGERstring
updateTime更新时间string(date-time)
updater更新用户string
enabled租户状态:启用/禁用boolean
icon租户图标string
idIDstring
name场景联动名称string
organizationId所属组织idstring
roleIds租户角色列表array
status状态:0表示已停用,1表示启用integer(int32)
tenantExpireTime租户到期时间string(date-time)
tenantId租户IDstring
tenantProfileId租户配置string
tenantStatus可用值:DISABLED,EXPIRED,NORMALstring
triggers触发器array
createTime创建时间string(date-time)
creator创建用户string
defaultConfig租户默认配置string
description租户描述string
deviceProfileId设备配置IDstring
deviceType设备类型,可用值:DIRECT_CONNECTION,GATEWAY,SENSORstring
enabled租户状态:启用/禁用boolean
entityId实体IDarray
entityType触发器关联实体,例如:设备ID、场景联动ID、定时任务CRON表达式,可用值:ALL,PARTstring
icon租户图标string
idIDstring
name租户名称string
roleIds租户角色列表array
sceneLinkageId场景联动idstring
tenantExpireTime租户到期时间string(date-time)
tenantId租户IDstring
tenantProfileId租户配置string
tenantStatus可用值:DISABLED,EXPIRED,NORMALstring
triggerCondition触发条件AlarmRuleRes
alarmDetailsString value representing the additional details for an alarm rulestring
conditionJSON object representing the alarm rule conditionAlarmConditionRes
conditionJSON array of alarm condition filtersarray
keyJSON object for specifying alarm condition by specific keyAlarmConditionFilterKeyRes
keyString value representing the keystring
typeThe key type,可用值:ATTRIBUTE,CONSTANT,ENTITY_FIELD,TIME_SERIESstring
predicateJSON object representing filter conditionKeyFilterPredicate
valueValue used in Constant comparison. For other types, such as TIME_SERIES or ATTRIBUTE, the predicate condition is usedobject
valueTypeString representation of the type of the value,可用值:BOOLEAN,DATE_TIME,NUMERIC,STRINGstring
specJSON object representing alarm condition typeAlarmConditionSpec
dashboardIdJSON object with the dashboard Id representing the reference to alarm details dashboard used by mobile applicationDashboardIdRes
entityTypestring,可用值:DASHBOARDstring
idID of the entity, time-based UUID v1string
scheduleJSON object representing time interval during which the rule is activeAlarmScheduleRes
type可用值:ANY_TIME,CUSTOM,SPECIFIC_TIMEstring
triggerType触发器类型,可用值:DEVICE_TRIGGER,HAND_ACT,SCENE_TRIGGER,SCHEDULE_TRIGGERstring
updateTime更新时间string(date-time)
updater更新用户string
updateTime更新时间string(date-time)
updater更新用户string

响应示例:

{
	"createTime": "",
	"creator": "",
	"creatorName": "",
	"defaultConfig": "",
	"description": "",
	"doActions": [
		{
			"alarmProfileId": "",
			"callType": "",
			"commandType": 0,
			"createTime": "",
			"creator": "",
			"defaultConfig": "",
			"description": "",
			"deviceId": [],
			"deviceProfileId": "",
			"deviceType": "",
			"doContext": {},
			"enabled": false,
			"entityType": "",
			"icon": "",
			"id": "",
			"name": "",
			"outTarget": "",
			"roleIds": [],
			"sceneLinkageId": "",
			"tenantExpireTime": "",
			"tenantId": "",
			"tenantProfileId": "",
			"tenantStatus": "",
			"thingsModelId": "",
			"updateTime": "",
			"updater": ""
		}
	],
	"doConditions": [
		{
			"createTime": "",
			"creator": "",
			"defaultConfig": "",
			"description": "",
			"deviceProfileId": "",
			"deviceType": "",
			"enabled": false,
			"entityId": [],
			"entityType": "",
			"icon": "",
			"id": "",
			"name": "",
			"roleIds": [],
			"sceneLinkageId": "",
			"tenantExpireTime": "",
			"tenantId": "",
			"tenantProfileId": "",
			"tenantStatus": "",
			"triggerCondition": {
				"alarmDetails": "",
				"condition": {
					"condition": [
						{
							"key": {
								"key": "temp",
								"type": "TIME_SERIES"
							},
							"predicate": {},
							"value": {},
							"valueType": "NUMERIC"
						}
					],
					"spec": {}
				},
				"dashboardId": {
					"entityType": "DASHBOARD",
					"id": "784f394c-42b6-435a-983c-b7beff2784f9"
				},
				"schedule": {
					"type": ""
				}
			},
			"triggerType": "",
			"updateTime": "",
			"updater": ""
		}
	],
	"enabled": false,
	"icon": "",
	"id": "",
	"name": "",
	"organizationId": "",
	"roleIds": [],
	"status": 0,
	"tenantExpireTime": "",
	"tenantId": "",
	"tenantProfileId": "",
	"tenantStatus": "",
	"triggers": [
		{
			"createTime": "",
			"creator": "",
			"defaultConfig": "",
			"description": "",
			"deviceProfileId": "",
			"deviceType": "",
			"enabled": false,
			"entityId": [],
			"entityType": "",
			"icon": "",
			"id": "",
			"name": "",
			"roleIds": [],
			"sceneLinkageId": "",
			"tenantExpireTime": "",
			"tenantId": "",
			"tenantProfileId": "",
			"tenantStatus": "",
			"triggerCondition": {
				"alarmDetails": "",
				"condition": {
					"condition": [
						{
							"key": {
								"key": "temp",
								"type": "TIME_SERIES"
							},
							"predicate": {},
							"value": {},
							"valueType": "NUMERIC"
						}
					],
					"spec": {}
				},
				"dashboardId": {
					"entityType": "DASHBOARD",
					"id": "784f394c-42b6-435a-983c-b7beff2784f9"
				},
				"schedule": {
					"type": ""
				}
			},
			"triggerType": "",
			"updateTime": "",
			"updater": ""
		}
	],
	"updateTime": "",
	"updater": ""
}

查询(分页列表)

接口地址:/api/yt/scene_linkage{?name,organizationId,page,pageSize,status,triggers}

请求方式:GET

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

响应数据类型:*/*

请求参数:

参数名称参数说明是否必须数据类型
pagepagetrueint
pageSizepageSizetrueint
namenamefalsestring
statusstatusfalseinteger(int32)
organizationIdorganizationIdfalsestring
triggerstriggersfalsestring

响应参数:

参数名称参数说明类型
itemsarray
createTime创建时间string(date-time)
creator创建用户string
creatorName创建用户string
defaultConfig租户默认配置string
description描述string
doActions执行动作array
alarmProfileId输出目标为告警才进行配置string
callType调用类型:sync同步/async异步,可用值:ASYNC,SYNCstring
commandType命令类型:0自定义 1服务integer
createTime创建时间string
creator创建用户string
defaultConfig租户默认配置string
description租户描述string
deviceId所属设备idarray
deviceProfileId设备配置IDstring
deviceType设备类型,可用值:DIRECT_CONNECTION,GATEWAY,SENSORstring
doContext场景联动内容JsonNode
enabled租户状态:启用/禁用boolean
entityType取值范围,可用值:ALL,PARTstring
icon租户图标string
idIDstring
name租户名称string
outTarget输出目标:设备,告警,其他,可用值:DEVICE_OUT,MSG_NOTIFY,SCENE_ACTstring
roleIds租户角色列表array
sceneLinkageId场景联动idstring
tenantExpireTime租户到期时间string
tenantId租户IDstring
tenantProfileId租户配置string
tenantStatus可用值:DISABLED,EXPIRED,NORMALstring
thingsModelId服务模型IDstring
updateTime更新时间string
updater更新用户string
doConditions执行条件array
createTime创建时间string
creator创建用户string
defaultConfig租户默认配置string
description租户描述string
deviceProfileId设备配置IDstring
deviceType设备类型,可用值:DIRECT_CONNECTION,GATEWAY,SENSORstring
enabled租户状态:启用/禁用boolean
entityIdentityId列表array
entityType触发器关联实体,可用值:ALL,PARTstring
icon租户图标string
idIDstring
name租户名称string
roleIds租户角色列表array
sceneLinkageId场景联动idstring
tenantExpireTime租户到期时间string
tenantId租户IDstring
tenantProfileId租户配置string
tenantStatus可用值:DISABLED,EXPIRED,NORMALstring
triggerCondition触发条件AlarmRuleRes
alarmDetailsString value representing the additional details for an alarm rulestring
conditionJSON object representing the alarm rule conditionAlarmConditionRes
conditionJSON array of alarm condition filtersarray
keyJSON object for specifying alarm condition by specific keyAlarmConditionFilterKeyRes
keyString value representing the keystring
typeThe key type,可用值:ATTRIBUTE,CONSTANT,ENTITY_FIELD,TIME_SERIESstring
predicateJSON object representing filter conditionKeyFilterPredicate
valueValue used in Constant comparison. For other types, such as TIME_SERIES or ATTRIBUTE, the predicate condition is usedobject
valueTypeString representation of the type of the value,可用值:BOOLEAN,DATE_TIME,NUMERIC,STRINGstring
specJSON object representing alarm condition typeAlarmConditionSpec
dashboardIdJSON object with the dashboard Id representing the reference to alarm details dashboard used by mobile applicationDashboardIdRes
entityTypestring,可用值:DASHBOARDstring
idID of the entity, time-based UUID v1string
scheduleJSON object representing time interval during which the rule is activeAlarmScheduleRes
type可用值:ANY_TIME,CUSTOM,SPECIFIC_TIMEstring
triggerType触发器类型,可用值:DEVICE_TRIGGER,HAND_ACT,SCENE_TRIGGER,SCHEDULE_TRIGGERstring
updateTime更新时间string
updater更新用户string
enabled租户状态:启用/禁用boolean
icon租户图标string
idIDstring
name场景联动名称string
organizationId所属组织idstring
roleIds租户角色列表array
status状态:0表示已停用,1表示启用integer(int32)
tenantExpireTime租户到期时间string(date-time)
tenantId租户IDstring
tenantProfileId租户配置string
tenantStatus可用值:DISABLED,EXPIRED,NORMALstring
triggers触发器array
createTime创建时间string
creator创建用户string
defaultConfig租户默认配置string
description租户描述string
deviceProfileId设备配置IDstring
deviceType设备类型,可用值:DIRECT_CONNECTION,GATEWAY,SENSORstring
enabled租户状态:启用/禁用boolean
entityId实体IDarray
entityType触发器关联实体,例如:设备ID、场景联动ID、定时任务CRON表达式,可用值:ALL,PARTstring
icon租户图标string
idIDstring
name租户名称string
roleIds租户角色列表array
sceneLinkageId场景联动idstring
tenantExpireTime租户到期时间string
tenantId租户IDstring
tenantProfileId租户配置string
tenantStatus可用值:DISABLED,EXPIRED,NORMALstring
triggerCondition触发条件AlarmRuleRes
alarmDetailsString value representing the additional details for an alarm rulestring
conditionJSON object representing the alarm rule conditionAlarmConditionRes
conditionJSON array of alarm condition filtersarray
keyJSON object for specifying alarm condition by specific keyAlarmConditionFilterKeyRes
keyString value representing the keystring
typeThe key type,可用值:ATTRIBUTE,CONSTANT,ENTITY_FIELD,TIME_SERIESstring
predicateJSON object representing filter conditionKeyFilterPredicate
valueValue used in Constant comparison. For other types, such as TIME_SERIES or ATTRIBUTE, the predicate condition is usedobject
valueTypeString representation of the type of the value,可用值:BOOLEAN,DATE_TIME,NUMERIC,STRINGstring
specJSON object representing alarm condition typeAlarmConditionSpec
dashboardIdJSON object with the dashboard Id representing the reference to alarm details dashboard used by mobile applicationDashboardIdRes
entityTypestring,可用值:DASHBOARDstring
idID of the entity, time-based UUID v1string
scheduleJSON object representing time interval during which the rule is activeAlarmScheduleRes
type可用值:ANY_TIME,CUSTOM,SPECIFIC_TIMEstring
triggerType触发器类型,可用值:DEVICE_TRIGGER,HAND_ACT,SCENE_TRIGGER,SCHEDULE_TRIGGERstring
updateTime更新时间string
updater更新用户string
updateTime更新时间string(date-time)
updater更新用户string
totalinteger(int32)

响应示例:

{
	"items": [
		{
			"createTime": "",
			"creator": "",
			"creatorName": "",
			"defaultConfig": "",
			"description": "",
			"doActions": [
				{
					"alarmProfileId": "",
					"callType": "",
					"commandType": 0,
					"createTime": "",
					"creator": "",
					"defaultConfig": "",
					"description": "",
					"deviceId": [],
					"deviceProfileId": "",
					"deviceType": "",
					"doContext": {},
					"enabled": false,
					"entityType": "",
					"icon": "",
					"id": "",
					"name": "",
					"outTarget": "",
					"roleIds": [],
					"sceneLinkageId": "",
					"tenantExpireTime": "",
					"tenantId": "",
					"tenantProfileId": "",
					"tenantStatus": "",
					"thingsModelId": "",
					"updateTime": "",
					"updater": ""
				}
			],
			"doConditions": [
				{
					"createTime": "",
					"creator": "",
					"defaultConfig": "",
					"description": "",
					"deviceProfileId": "",
					"deviceType": "",
					"enabled": false,
					"entityId": [],
					"entityType": "",
					"icon": "",
					"id": "",
					"name": "",
					"roleIds": [],
					"sceneLinkageId": "",
					"tenantExpireTime": "",
					"tenantId": "",
					"tenantProfileId": "",
					"tenantStatus": "",
					"triggerCondition": {
						"alarmDetails": "",
						"condition": {
							"condition": [
								{
									"key": {
										"key": "temp",
										"type": "TIME_SERIES"
									},
									"predicate": {},
									"value": {},
									"valueType": "NUMERIC"
								}
							],
							"spec": {}
						},
						"dashboardId": {
							"entityType": "DASHBOARD",
							"id": "784f394c-42b6-435a-983c-b7beff2784f9"
						},
						"schedule": {
							"type": ""
						}
					},
					"triggerType": "",
					"updateTime": "",
					"updater": ""
				}
			],
			"enabled": false,
			"icon": "",
			"id": "",
			"name": "",
			"organizationId": "",
			"roleIds": [],
			"status": 0,
			"tenantExpireTime": "",
			"tenantId": "",
			"tenantProfileId": "",
			"tenantStatus": "",
			"triggers": [
				{
					"createTime": "",
					"creator": "",
					"defaultConfig": "",
					"description": "",
					"deviceProfileId": "",
					"deviceType": "",
					"enabled": false,
					"entityId": [],
					"entityType": "",
					"icon": "",
					"id": "",
					"name": "",
					"roleIds": [],
					"sceneLinkageId": "",
					"tenantExpireTime": "",
					"tenantId": "",
					"tenantProfileId": "",
					"tenantStatus": "",
					"triggerCondition": {
						"alarmDetails": "",
						"condition": {
							"condition": [
								{
									"key": {
										"key": "temp",
										"type": "TIME_SERIES"
									},
									"predicate": {},
									"value": {},
									"valueType": "NUMERIC"
								}
							],
							"spec": {}
						},
						"dashboardId": {
							"entityType": "DASHBOARD",
							"id": "784f394c-42b6-435a-983c-b7beff2784f9"
						},
						"schedule": {
							"type": ""
						}
					},
					"triggerType": "",
					"updateTime": "",
					"updater": ""
				}
			],
			"updateTime": "",
			"updater": ""
		}
	],
	"total": 0
}

启用或禁用场景联动

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

请求方式:POST

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

响应数据类型:*/*

请求示例:

{
  "configuration": {},
  "id": "",
  "status": 0
}

请求参数:

参数名称参数说明请求类型是否必须数据类型
convertReqDTOConvertReqDTObodytrueConvertReqDTO
configurationfalseJsonNode
ididtruestring
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": ""
		}
	]
}