查询实例运行状态 - ListFactoryTaskOverview
功能介绍
此接口可以查询实例运行状态,包括当天、昨天、前天以及近7天的实例状态情况。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。
授权信息
账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权,具体权限要求请参见权限和授权项。
- 如果使用身份策略授权,当前API调用无需身份策略权限。
URI
- 参数说明
表1 URI参数说明 参数名
是否必选
参数类型
说明
project_id
是
String
项目编号,获取方法请参见项目ID和账号ID。
表2 Query参数 参数
是否必选
参数类型
描述
is_own
否
String
是否查询当前用户的实例,默认为false,表示查询全部用户实例,为true时,表示查询当前用户的实例。
query_days
否
String
查询的天数,取值范围为:today、yesterday、before_yesterday、all,默认为today,表示查询今天的数据,支持查询近7天的数据。
today:查询当天的实例状态数量。
yesterday:查询昨天的实例状态数量。
before_yesterday:查询前天的实例状态数量。
all查询7天前到当天的实例状态总量。
请求参数
参数名 | 是否必选 | 参数类型 | 说明 |
|---|---|---|---|
workspace | 否 | String | 工作空间id。
|
X-Auth-Token | 否 | String | IAM Token 最小长度:0 最大长度:4096 |
响应参数
参数名 | 是否必选 | 参数类型 | 说明 |
|---|---|---|---|
fail_count | 否 | Integer | 失败的实例数量 |
force_success_count | 否 | Integer | 强制成功的实例数量 |
freeze_count | 否 | Integer | 冻结的实例数量 |
ignore_success_count | 否 | Integer | 忽略失败的实例数量 |
manual_stop_count | 否 | Integer | 取消的实例数量 |
pause_count | 否 | Integer | 暂停的实例数量 |
running_count | 否 | Integer | 运行中的实例数量 |
running_exception_count | 否 | Integer | 异常的实例数量。 |
skip_count | 否 | Integer | 跳过的实例数量 |
success_count | 否 | Integer | 运行成功的实例数量 |
waiting_confirm_count | 否 | Integer | 待确认执行的实例数量 |
waiting_count | 否 | Integer | 等待运行的实例数量 |
total_count | 否 | Integer | 实例总数 |
请求示例
GET /v2/b384b9e9ab9b4ee8994c8633aabc9505/factory/monitor/task-statistics-overview?is_own=false&query_days=today
响应示例
- 成功响应
{ "fail_count": 0, "force_success_count": 0, "freeze_count": 0, "ignore_success_count": 0, "manual_stop_count": 0, "pause_count": 0, "running_count": 0, "running_exception_count": 0, "skip_count": 0, "success_count": 1, "total_count": 1, "waiting_confirm_count": 0, "waiting_count": 0 } - 失败响应
{ "error_code": "DLF.21113", "error_msg": "The task query parameters [today2] are incorrect. Currently, the supported types of parameters are today, yesterday, before_yesterday, and all." }

