- OASIS SIM(废弃)
- sensors
- dynamics
- cars
- car_models
- jobs
- tasks
- scenarios
- scenario_groups
- scenario_elements
- maps
- test_cases
- scores
- traffic_flows
- controllers
- weathers
- lights
- logs(废弃)
- emails
- users
- evaluates
- file_operator
- trashes(已废弃)
- configs
- licenses
- 查询tokenGET
更新测试用例场景权重
开发中
PUT
/testcases/{test_case_id}/weights
"scenario_ids": [
422,423,424
]
}
新增场景参数,在原有的场景ID的基础上新增新的场景ID,例如要新增场景425,就在后面加上,425
请求参数
Path 参数
test_case_id
integer
必需
示例值:
1
Header 参数
Authorization
string
必需
示例值:
bearer {{token}}
Content-Type
string
必需
示例值:
application/json
User-Agent
string
可选
示例值:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36
Body 参数application/json
name
string
必需
name_en
string
必需
desc
string
必需
desc_en
string
必需
render_mode
string
必需
controller
integer
必需
controller_version
integer
必需
car_id
integer
必需
view_record
boolean
必需
test_model
string
必需
viz_record_flag
boolean
必需
sensor_data_record_enable
boolean
必需
show_game_window
boolean
必需
scenario_ids
array[integer]
必需
data_record
boolean
必需
record_mode
string
必需
frequency
integer
必需
bev
boolean
必需
示例
{
"calculation_rules": 1,
"weights": [
{
"scenario_id": 9205,
"weight": 1.0
},
{
"scenario_id": 9206,
"weight": 2.0
},
{
"scenario_id": 9207,
"weight": 2.1
},
{
"scenario_id": 9209,
"weight": 2.3
}
]
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request PUT '/testcases/1/weights' \
--header 'Authorization: bearer {{token}}' \
--header 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36' \
--header 'Content-Type: application/json' \
--data-raw '{
"calculation_rules": 1,
"weights": [
{
"scenario_id": 9205,
"weight": 1.0
},
{
"scenario_id": 9206,
"weight": 2.0
},
{
"scenario_id": 9207,
"weight": 2.1
},
{
"scenario_id": 9209,
"weight": 2.3
}
]
}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
en
string
必需
result
null
必需
示例
{
"code": 200,
"result": [
{
"remark": null,
"weight": 2.1,
"created_at": "2024-08-27 17:21:33",
"invalid": 0,
"scores": 0,
"id": 5,
"test_case_id": 1,
"modified_at": "2024-08-27 17:21:33",
"scenario_id": 9207
},
{
"remark": null,
"weight": 2,
"created_at": "2024-08-27 17:21:33",
"invalid": 0,
"scores": 0,
"id": 4,
"test_case_id": 1,
"modified_at": "2024-08-27 17:21:33",
"scenario_id": 9206
},
{
"remark": null,
"weight": 2.3,
"created_at": "2024-08-27 17:21:33",
"invalid": 0,
"scores": 0,
"id": 3,
"test_case_id": 1,
"modified_at": "2024-08-27 17:21:33",
"scenario_id": 9208
},
{
"remark": null,
"weight": 1,
"created_at": "2024-08-27 16:21:36",
"invalid": 0,
"scores": 0,
"id": 2,
"test_case_id": 1,
"modified_at": "2024-08-27 16:21:36",
"scenario_id": 9205
}
],
"message": ""
}
修改于 2024-08-27 09:46:03