更新时间:2025-06-18 GMT+08:00
分享

获取仿真任务列表

功能介绍

获取仿真任务列表。

URI

GET /v2/{project_id}/sim/pm/batches

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

项目ID,获取方法请参见获取项目ID

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token,通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)

表3 Query参数

参数

是否必选

参数类型

描述

id

Integer

仿真任务ID

name

String

仿真任务名称,最大长度64位,支持中文,字母,数字及下划线命名

description

String

描述

algorithm_image_version

String

算法镜像版本

algorithm_name

String

算法名称

batch_config_id

Integer

仿真任务配置ID

status

Integer

任务状态

limit

Integer

返回个数上限,最大值为100,默认值为10

offset

Integer

查询偏移量

响应参数

状态码:200

表4 响应Body参数

参数

参数类型

描述

count

Integer

数量信息

next

String

下一页结果集资源地址

previous

String

上一页结果集资源地址

results

Array of BatchListSrlz objects

当前页结果集信息

表5 BatchListSrlz

参数

参数类型

描述

url

String

场景资源地址

id

Integer

场景ID

created_at

TimeStamp

创建时间

updated_at

TimeStamp

更新时间

passing_score

Integer

融合评测通过分数

algorithm_name

String

算法名称

algorithm_image

String

算法镜像资源地址

algorithm_image_version

String

算法镜像版本

started_at

TimeStamp

任务开始时间

ended_at

TimeStamp

任务结束时间

success

Integer

子任务成功数量

fail

Integer

子任务失败数量

simulation_size

Integer

子任务数量

name

String

名称

description

String

文本描述

status

Integer

任务状态

  • 0 - Success 成功
  • 1 - Pending 等待中
  • 2 - Scheduling 调度中
  • 3 - Running 运行中
  • 4 - Canceled 已取消
  • 5 - All Fail 全部失败
  • 6 - Partial Fail 部分成功
  • 7 - Start Fail 启动失败
  • 8 - K8S Conflict 任务冲突
  • 10 - Not Run 未运行
  • 11 - Cpu Not Enough CPU不足
  • 12 - Mem Not Enough 内存不足
  • 13 - Gpu Not Enough GPU不足
  • 14 - Init K8S Fail 初始化集群失败
  • 31 - Timeout 超时
  • 32 - Unknown 未知
  • 100 - Init 初始化
  • 101 - Init Fail 初始化失败
  • 102 - Task Lost 任务中断
  • 103 - FEEDBACK FAILED 反馈失败
  • 104 - Queue 排队中
  • 105 - Alg Img Not Found 算法镜像丢失
  • 106 - Eva Img Not Found 评测镜像丢失
  • 107 - Sim Img Not Found 仿真器镜像丢失

designated_simulation_ids

Array of Integers

用户指定重跑子任务ID列表

batch_config

String

仿真任务配置ID

请求示例

获取仿真任务列表

GET https://{endpoint}/v2/{project_id}/sim/pm/batches?offset=0&limit=10

响应示例

状态码:200

{
	"count": 1,
	"next": null,
	"previous": null,
	"results": [
		{
			"url": "/v2/54d37c8f25af42xxxx9772687bf/sim/pm/batches/988/",
			"id": 988,
			"created_at": 1748309503.834751,
			"updated_at": 1748309577.768622,
			"passing_score": 60,
			"algorithm_name": "algorithm_xxx",
			"algorithm_image": "/v2/54d37c8f25af42xxxxx9772687bf/sim/pm/algorithm-images/63/",
			"algorithm_image_version": "3",
			"started_at": 1748309506.263967,
			"ended_at": 1748309577.765106,
			"success": 1,
			"fail": 0,
			"simulation_size": 1,
			"name": "v1",
			"description": "",
			"status": 0,
			"user_id": "5ffa2cb76313xxxxxx284af7dc4",
			"designated_simulation_ids": null,
			"batch_config": "/v2/54d37c8f25af42xxxxxx9772687bf/sim/pm/batch-configs/361/"
		}
	]
}

状态码

状态码

描述

200

请求成功

错误码

请参见错误码

相关文档