ThingsKit物联网平台API文档-数据中心(报表导出)

报表分页

接口地址:/api/yt/report_form/config{?endTime,name,orderFiled,orderType,organizationId,page,pageSize,startTime,status}

请求方式:GET

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

响应数据类型:*/*

请求参数:

参数名称参数说明是否必须数据类型
pagepagetrueint
pageSizepageSizetrueint
namenamefalsestring
organizationIdorganizationIdfalsestring
statusstatusfalseinteger(int32)
startTimestartTimefalseinteger(int64)
endTimeendTimefalseinteger(int64)
orderFiledorderFiledfalsestring
orderTypeorderType,可用值:ASC,DESCfalsestring

响应参数:

参数名称参数说明类型
itemsarray
createTime创建时间string(date-time)
createUserName创建用户名称string
creator创建用户string
cycle周期参数CycleParameterDTO
currentCycle当前周期string
cycleTime时间string
cycleType周期类型:0每日 1每周 2每月integer
dataType数据类型:0原始数据 1聚合数据integer(int32)
defaultConfig租户默认配置string
description租户描述string
enabled租户状态:启用/禁用boolean
executeAttributes执行设备及属性array
attributes执行属性array
device执行设备string
name设备名称string
executeContentcron表达式string
executeWay执行方式:0立即执行 1定时执行integer(int32)
icon租户图标string
idIDstring
name报表配置名称string
organizationDTO组织信息OrganizationDTO
children子集array
createTime创建时间string
creator创建用户string
defaultConfig租户默认配置string
description租户描述string
enabled租户状态:启用/禁用boolean
icon租户图标string
idIDstring
name组织名称string
parentId组织父IDstring
remark备注string
roleIds租户角色列表array
sort排序integer
tenantExpireTime租户到期时间string
tenantId租户IDstring
tenantProfileId租户配置string
tenantStatus可用值:DISABLED,EXPIRED,NORMALstring
updateTime更新时间string
updater更新用户string
organizationId组织IDstring
queryCondition查询条件查询条件
agg聚合条件:AVG, COUNT, MAX, MIN, NONE, SUM,可用值:AVG,COUNT,MAX,MIN,NONE,SUMstring
endTs结束时间:单位毫秒integer
interval聚合间隔:单位毫秒,默认0integer
limit查询的最大数量:该参数仅在’agg’参数设置为’NONE’的情况下使用,默认100integer
orderBy排序:ASC, DESC 默认DESCstring
queryMode查询方式:0 周期查询 1自定查询integer
startTs开始时间:单位毫秒integer
useStrictDataTypes启用/禁用遥测值到字符串的转换。默认情况下启用转换。设置参数为’true’以禁用转换boolean
remark配置状态:0禁用 1启用string
roleIds租户角色列表array
status配置状态:0禁用 1启用integer(int32)
tenantExpireTime租户到期时间string(date-time)
tenantId租户IDstring
tenantProfileId租户配置string
tenantStatus可用值:DISABLED,EXPIRED,NORMALstring
updateTime更新时间string(date-time)
updater更新用户string
totalinteger(int32)

响应示例:

{
	"items": [
		{
			"createTime": "",
			"createUserName": "",
			"creator": "",
			"cycle": {
				"currentCycle": "",
				"cycleTime": "",
				"cycleType": 0
			},
			"dataType": 0,
			"defaultConfig": "",
			"description": "",
			"enabled": false,
			"executeAttributes": [
				{
					"attributes": [],
					"device": "",
					"name": ""
				}
			],
			"executeContent": "",
			"executeWay": 0,
			"icon": "",
			"id": "",
			"name": "",
			"organizationDTO": {
				"children": [
					{
						"children": [
							{}
						],
						"createTime": "",
						"creator": "",
						"defaultConfig": "",
						"description": "",
						"enabled": false,
						"icon": "",
						"id": "",
						"name": "",
						"parentId": "",
						"remark": "",
						"roleIds": [],
						"sort": 0,
						"tenantExpireTime": "",
						"tenantId": "",
						"tenantProfileId": "",
						"tenantStatus": "",
						"updateTime": "",
						"updater": ""
					}
				],
				"createTime": "",
				"creator": "",
				"defaultConfig": "",
				"description": "",
				"enabled": false,
				"icon": "",
				"id": "",
				"name": "",
				"parentId": "",
				"remark": "",
				"roleIds": [],
				"sort": 0,
				"tenantExpireTime": "",
				"tenantId": "",
				"tenantProfileId": "",
				"tenantStatus": "",
				"updateTime": "",
				"updater": ""
			},
			"organizationId": "",
			"queryCondition": {
				"agg": "",
				"endTs": 0,
				"interval": 0,
				"limit": 0,
				"orderBy": "",
				"queryMode": 0,
				"startTs": 0,
				"useStrictDataTypes": false
			},
			"remark": "",
			"roleIds": [],
			"status": 0,
			"tenantExpireTime": "",
			"tenantId": "",
			"tenantProfileId": "",
			"tenantStatus": "",
			"updateTime": "",
			"updater": ""
		}
	],
	"total": 0
}

报表导出删除

接口地址:/api/yt/report/generate/record

请求方式:DELETE

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

响应数据类型:*/*

请求示例:

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

请求参数:

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

响应参数:

参数名称参数说明类型
codeinteger(int32)
databoolean
messagestring

响应示例:

{
	"code": 0,
	"data": true,
	"message": ""
}

报表导出分页

接口地址:/api/yt/report/generate/record{?endTime,executeStatus,orderFiled,orderType,page,pageSize,reportConfigName,startTime}

请求方式:GET

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

响应数据类型:*/*

请求参数:

参数名称参数说明是否必须数据类型
pagepagetrueint
pageSizepageSizetrueint
reportConfigNamereportConfigNamefalsestring
executeStatusexecuteStatusfalseinteger(int32)
startTimestartTimefalseinteger(int64)
endTimeendTimefalseinteger(int64)
orderFiledorderFiledfalsestring
orderTypeorderType,可用值:ASC,DESCfalsestring

响应参数:

参数名称参数说明类型
itemsarray
createTime创建时间string(date-time)
creator创建用户string
dataCompare数据对比:0历史数据 1环比 2同比integer(int32)
defaultConfig租户默认配置string
description租户描述string
enabled租户状态:启用/禁用boolean
executeCondition执行条件JsonNode
executeStatus执行状态:0失败 1成功 2执行中integer(int32)
executeTime执行时间string(date-time)
executeWay执行方式:0立即执行 1定时执行integer(int32)
icon租户图标string
idIDstring
jobId定时任务IDstring
name租户名称string
organizationId组织IDstring
organizationName组织名称string
reportConfigName报表配置名称string
reportPath报表导出地址string
roleIds租户角色列表array
tenantExpireTime租户到期时间string(date-time)
tenantId租户IDstring
tenantProfileId租户配置string
tenantStatus可用值:DISABLED,EXPIRED,NORMALstring
updateTime更新时间string(date-time)
updater更新用户string
totalinteger(int32)

响应示例:

{
	"items": [
		{
			"createTime": "",
			"creator": "",
			"dataCompare": 0,
			"defaultConfig": "",
			"description": "",
			"enabled": false,
			"executeCondition": {},
			"executeStatus": 0,
			"executeTime": "",
			"executeWay": 0,
			"icon": "",
			"id": "",
			"jobId": "",
			"name": "",
			"organizationId": "",
			"organizationName": "",
			"reportConfigName": "",
			"reportPath": "",
			"roleIds": [],
			"tenantExpireTime": "",
			"tenantId": "",
			"tenantProfileId": "",
			"tenantStatus": "",
			"updateTime": "",
			"updater": ""
		}
	],
	"total": 0
}