获取任务执行明细

接口说明

面向政企版租户开放获取任务执行明细 业务逻辑:可根据执行结果搜索定时任务的执行明细 限流:根据租户实现用户级别的限流,限制为100次每秒


推荐使用API Explorer调试

API Explorer支持接口在线可视化调用,同时自动生成动态代码示例,搭配OpenAPI SDK无需计算签名实现接口快速集成。

URL

POST https://ecloud.10086.cn/api/Computer_api/cem_openapi/ccacem/api/v1/resource-policy/getTaskRecordList

请求参数

Body

参数名称
类型
必填
描述
reqDto
查询任务执行记录
是

请求入参

currentPage
integer(int32)
否

当前页

pageSize
integer(int32)
否

分页大小

taskType
string
是

任务类型 关机:shutdown 重启:restart 开机:available

recordId
string
是

定时任务执行记录主键id

policyId
string
是

定时任务执行策略主键id

status
string
否

执行结果 成功:success 失败:fail 执行中:processing 待执行:waiting

请求示例

POST https://ecloud.10086.cn/api/Computer_api/cem_openapi/ccacem/api/v1/resource-policy/getTaskRecordList
{
	"currentPage":1,
	"pageSize":10,
	"taskType":"available",
	"recordId":"1911661947999064065",
	"policyId":"1910616576153718785",
	"status":"fail"
}

返回参数

返回码:200
OK
参数名称
类型
描述
body
PageReturnEntity«QueryResourceTaskRecordApiResp»

请求成功时返回的数据

data
<QueryResourceTaskRecordApiResp> array

数据

instanceId
string

资源实例id

machineId
string

桌面id

machineName
string

桌面名称

policyUid
string

策略id

taskType
string

任务类型

executeTime
string

执行时间

status
string

执行结果

modifiedTime
string

修改时间

poolName
string

资源池名称

poolCode
string

资源池编码

createdTime
string

创建时间

totalCount
integer(int32)

总行数

errorCode
string

统一错误码

errorMessage
string

错误码提示信息

requestId
string

每个请求的序列号

state
enum(OK,ERROR,EXCEPTION,FORBIDDEN,REMAINING,TIMEOUT)

返回状态码;返回正常:OK,返回错误:ERROR,返回异常:EXCEPTION,需要告警实现的:ALARM,禁止访问:FORBIDDEN

返回示例

返回码:200
OK
{
	"state":"OK",
	"body":{
		"data":[
			{
				"instanceId":"CCA-b4af70ef36574263ab80a2887c416b7a",
				"machineId":"ed7d4db2-33d7-454c-981d-4f2762f1311c",
				"policyUid":"ro-e4c7847bf8654408880e8578d718da26",
				"taskType":"available",
				"executeTime":"2025-04-14 14:10:00",
				"status":"fail",
				"machineName":"我的电脑",
				"modifiedTime":"2025-04-14 14:10:06",
				"poolName":"华东-苏州",
				"poolCode":"CIDC-RP-25",
				"createdTime":"2025-04-14 14:05:00"
			}
		],
		"totalCount":1
	},
	"errorCode":"200",
	"errorMessage":"",
	"requestId":"af388d20d0e76479"
}
本文档内容整理自移动云官方帮助中心(查看原文),仅供参考。