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

获取仿真任务配置列表

功能介绍

获取仿真任务配置列表。

URI

GET /v2/{project_id}/sim/pm/batch-configs

表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

描述,最大长度256位,支持中文,字母,数字及下划线命名

algorithm_id

Integer

算法ID

algorithm_name

String

算法名称

evaluation_id

Integer

评测ID

evaluation_name

String

评测名称

scenario_set_id

Integer

场景集合ID

builtins_evaluation

Boolean

是否使用内置评测

custom_evaluation_image_id

Integer

自定义评测镜像ID

custom_simulator_image_id

Integer

自定义仿真器镜像ID

limit

Integer

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

offset

Integer

查询偏移量

响应参数

状态码:200

表4 响应Body参数

参数

参数类型

描述

count

Integer

数量信息

next

String

下一页结果集资源地址

previous

String

上一页结果集资源地址

results

Array of BatchConfigListSrlz objects

当前页结果集信息

表5 BatchConfigListSrlz

参数

参数类型

描述

url

String

仿真任务配置的资源地址

id

Integer

仿真任务配置ID

created_at

TimeStamp

创建时间

updated_at

TimeStamp

更新时间

algorithm

String

关联算法资源地址

algorithm_name

String

算法名称

builtins_evaluation

Boolean

是否使用内置评测

custom_evaluation_image

String

关联评测镜像资源地址

custom_simulator_image_id

Integer

镜像管理中的仿真器镜像的版本id

evaluation_info

evaluation_info object

评测配置信息

batch_size

Integer

任务数量

duration

String

子任务最大运行时长

repeat_times

Integer

重复运行次数

passing_score

Integer

融合评测通过分数,默认60

scenario_type

Integer

场景类型

  • 0 - 场景库:从场景库选择场景
  • 1 - 逻辑场景:从泛化任务选择任务
  • 2 – 测试套件:从测试套件选择场景

extensions

Array Of Strings

扩展文件资源地址列表

name

String

仿真任务配置名称

description

String

仿真任务配置描述

simulator_name

String

仿真器名称,如:B

record_mode

Integer

录制模式

  • 0 - 不录制
  • 1 - 录制

priority

Integer

优先级,取值越大,优先级越高。可从如下范围中选择

  • 120 – S:至关重要
  • 100 – A:很重要
  • 80 – B:重要
  • 60 – C:普通

datahub

Boolean

是否使用datahub

scenario_set_id

Int

场景集合 id

traffic

String

交通流量

evaluations

Array of strings

关联评测管理项目列表

表6 evaluation_info

参数

参数类型

描述

image

表7 object

镜像信息

表7 image

参数

参数类型

描述

id

Integer

项目id

name

String

项目名称

image_id

Integer

镜像id

image_version

String

镜像版本

请求示例

获取仿真任务配置列表

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

响应示例

状态码:200

{
{
	"count": 1,
	"next": null,
	"previous": null,
	"results": [
		{
			"url": "/v2/54d37c8f25af42xxxxx4ee9772687bf/sim/pm/batch-configs/360/",
			"id": 360,
			"created_at": 1748249591.709321,
			"updated_at": 1748249591.709342,
			"algorithm": null,
			"algorithm_name": null,
			"builtins_evaluation": false,
			"custom_evaluation_image": "/v2/54d37c8f25af42xxxxx4ee9772687bf/sim/pm/evaluation-images/16/",
			"custom_simulator_image_id": 303973,
			"evaluation_info": {
				"IMAGE": {
					"id": 74,
					"name": "evaluation_xxx",
					"image_id": 16,
					"image_version": "2"
				}
			},
			"batch_size": 0,
			"duration": "00:01:00",
			"repeat_times": 1,
			"passing_score": 60,
			"scenario_type": 0,
			"extensions": [
			],
			"name": "batch-config-xxx",
			"description": "batch-config-xxx",
			"simulator_name": "B",
			"record_mode": 0,
			"priority": 60,
			"datahub": true,
			"scenario_set_id": 155,
			"traffic": null,
			"evaluations": [
				"/v2/54d37c8f25af42xxxxx4ee9772687bf/sim/pm/evaluations/74/"
			]
		}
	]
}

状态码

状态码

描述

200

请求成功

错误码

请参见错误码

相关文档