获取制品版本元数据
curl --request GET \
--url http://localhost:8000/apps/{app_name}/users/{user_id}/sessions/{session_id}/artifacts/{artifact_name}/versions/{version_id}/metadata \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:8000/apps/{app_name}/users/{user_id}/sessions/{session_id}/artifacts/{artifact_name}/versions/{version_id}/metadata"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:8000/apps/{app_name}/users/{user_id}/sessions/{session_id}/artifacts/{artifact_name}/versions/{version_id}/metadata', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"version": 123,
"canonicalUri": "<string>",
"customMetadata": {},
"createTime": 123,
"mimeType": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}制品
获取制品版本元数据
返回指定版本的 URI、创建时间、MIME 类型与自定义元数据
GET
/
apps
/
{app_name}
/
users
/
{user_id}
/
sessions
/
{session_id}
/
artifacts
/
{artifact_name}
/
versions
/
{version_id}
/
metadata
获取制品版本元数据
curl --request GET \
--url http://localhost:8000/apps/{app_name}/users/{user_id}/sessions/{session_id}/artifacts/{artifact_name}/versions/{version_id}/metadata \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:8000/apps/{app_name}/users/{user_id}/sessions/{session_id}/artifacts/{artifact_name}/versions/{version_id}/metadata"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:8000/apps/{app_name}/users/{user_id}/sessions/{session_id}/artifacts/{artifact_name}/versions/{version_id}/metadata', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"version": 123,
"canonicalUri": "<string>",
"customMetadata": {},
"createTime": 123,
"mimeType": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}授权
本地未配置网关时可不提供;云部署使用 Runtime API Key 或部署要求的用户池 JWT,不能使用模型 API Key
路径参数
应用名称,CLI 部署版为 harness_agent
用户 ID
会话 ID
制品名称
制品版本号
最后修改于 2026年9月19日