更新评测用例
curl --request PUT \
--url http://localhost:8000/dev/apps/{app_name}/eval-sets/{eval_set_id}/eval-cases/{eval_case_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"evalId": "case-001"
}
'import requests
url = "http://localhost:8000/dev/apps/{app_name}/eval-sets/{eval_set_id}/eval-cases/{eval_case_id}"
payload = { "evalId": "case-001" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({evalId: 'case-001'})
};
fetch('http://localhost:8000/dev/apps/{app_name}/eval-sets/{eval_set_id}/eval-cases/{eval_case_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));null{
"detail": "<string>"
}{
"detail": "<string>"
}{
"error": "CONTENT_LENGTH_REQUIRED"
}{
"error": "REQUEST_TOO_LARGE"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}开发评测
更新评测用例
替换已有用例;请求体的 evalId 不得与路径用例 ID 冲突;成功返回 JSON null
此接口由所核验的 SDK/ADK 版本提供,仅用于受信任的开发和调试。路径随安装的 ADK 版本变化,不应作为公共业务入口
PUT
/
dev
/
apps
/
{app_name}
/
eval-sets
/
{eval_set_id}
/
eval-cases
/
{eval_case_id}
更新评测用例
curl --request PUT \
--url http://localhost:8000/dev/apps/{app_name}/eval-sets/{eval_set_id}/eval-cases/{eval_case_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"evalId": "case-001"
}
'import requests
url = "http://localhost:8000/dev/apps/{app_name}/eval-sets/{eval_set_id}/eval-cases/{eval_case_id}"
payload = { "evalId": "case-001" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({evalId: 'case-001'})
};
fetch('http://localhost:8000/dev/apps/{app_name}/eval-sets/{eval_set_id}/eval-cases/{eval_case_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));null{
"detail": "<string>"
}{
"detail": "<string>"
}{
"error": "CONTENT_LENGTH_REQUIRED"
}{
"error": "REQUEST_TOO_LARGE"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}此操作替换已有评测用例,不是局部更新。先读取并保存需要保留的用例内容,再提交完整的新用例
evalId 必须与路径中的 eval_case_id 一致。ID 冲突返回 400,目标不存在返回 404;成功返回 JSON null授权
本地未配置网关时可不提供;云部署使用 Runtime API Key 或部署要求的用户池 JWT,不能使用模型 API Key
路径参数
应用名称,CLI 部署版为 harness_agent
评测集 ID
评测用例 ID
请求体
application/json
评测用例 ID
评测使用的对话调用序列
Show child attributes
Show child attributes
Show child attributes
Show child attributes
评测会话的应用、用户与初始状态
Show child attributes
Show child attributes
创建时间,Unix 时间戳,单位为秒
Show child attributes
Show child attributes
用于核对的最终会话状态
响应
请求成功
最后修改于 2026年9月19日