读取最新制品
curl --request GET \
--url http://localhost:8000/apps/{app_name}/users/{user_id}/sessions/{session_id}/artifacts/{artifact_name} \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:8000/apps/{app_name}/users/{user_id}/sessions/{session_id}/artifacts/{artifact_name}"
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}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"mediaResolution": {
"level": "MEDIA_RESOLUTION_UNSPECIFIED",
"numTokens": 123
},
"codeExecutionResult": {
"outcome": "OUTCOME_UNSPECIFIED",
"output": "<string>",
"id": "<string>"
},
"executableCode": {
"code": "<string>",
"language": "LANGUAGE_UNSPECIFIED",
"id": "<string>"
},
"fileData": {
"displayName": "<string>",
"fileUri": "<string>",
"mimeType": "<string>"
},
"functionCall": {
"id": "<string>",
"args": {},
"name": "<string>",
"partialArgs": [
{
"boolValue": true,
"jsonPath": "<string>",
"nullValue": "NULL_VALUE",
"numberValue": 123,
"stringValue": "<string>",
"willContinue": true
}
],
"willContinue": true
},
"functionResponse": {
"willContinue": true,
"scheduling": "SCHEDULING_UNSPECIFIED",
"parts": [
{
"inlineData": {
"mimeType": "<string>",
"data": "<string>",
"displayName": "<string>"
},
"fileData": {
"fileUri": "<string>",
"mimeType": "<string>",
"displayName": "<string>"
}
}
],
"id": "<string>",
"name": "<string>",
"response": {}
},
"inlineData": {
"data": "<string>",
"displayName": "<string>",
"mimeType": "<string>"
},
"text": "<string>",
"thought": true,
"thoughtSignature": "<string>",
"videoMetadata": {
"endOffset": "<string>",
"fps": 123,
"startOffset": "<string>"
},
"toolCall": {
"id": "<string>",
"toolType": "TOOL_TYPE_UNSPECIFIED",
"args": {}
},
"toolResponse": {
"id": "<string>",
"toolType": "TOOL_TYPE_UNSPECIFIED",
"response": {}
},
"partMetadata": {}
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}制品
读取最新制品
省略 version 时返回最新版本的 Part,提供 version 查询参数时返回指定版本;制品或版本不存在时返回 404
GET
/
apps
/
{app_name}
/
users
/
{user_id}
/
sessions
/
{session_id}
/
artifacts
/
{artifact_name}
读取最新制品
curl --request GET \
--url http://localhost:8000/apps/{app_name}/users/{user_id}/sessions/{session_id}/artifacts/{artifact_name} \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:8000/apps/{app_name}/users/{user_id}/sessions/{session_id}/artifacts/{artifact_name}"
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}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"mediaResolution": {
"level": "MEDIA_RESOLUTION_UNSPECIFIED",
"numTokens": 123
},
"codeExecutionResult": {
"outcome": "OUTCOME_UNSPECIFIED",
"output": "<string>",
"id": "<string>"
},
"executableCode": {
"code": "<string>",
"language": "LANGUAGE_UNSPECIFIED",
"id": "<string>"
},
"fileData": {
"displayName": "<string>",
"fileUri": "<string>",
"mimeType": "<string>"
},
"functionCall": {
"id": "<string>",
"args": {},
"name": "<string>",
"partialArgs": [
{
"boolValue": true,
"jsonPath": "<string>",
"nullValue": "NULL_VALUE",
"numberValue": 123,
"stringValue": "<string>",
"willContinue": true
}
],
"willContinue": true
},
"functionResponse": {
"willContinue": true,
"scheduling": "SCHEDULING_UNSPECIFIED",
"parts": [
{
"inlineData": {
"mimeType": "<string>",
"data": "<string>",
"displayName": "<string>"
},
"fileData": {
"fileUri": "<string>",
"mimeType": "<string>",
"displayName": "<string>"
}
}
],
"id": "<string>",
"name": "<string>",
"response": {}
},
"inlineData": {
"data": "<string>",
"displayName": "<string>",
"mimeType": "<string>"
},
"text": "<string>",
"thought": true,
"thoughtSignature": "<string>",
"videoMetadata": {
"endOffset": "<string>",
"fps": 123,
"startOffset": "<string>"
},
"toolCall": {
"id": "<string>",
"toolType": "TOOL_TYPE_UNSPECIFIED",
"args": {}
},
"toolResponse": {
"id": "<string>",
"toolType": "TOOL_TYPE_UNSPECIFIED",
"response": {}
},
"partMetadata": {}
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}省略
version 查询参数时读取最新版本,也可通过 ?version=0 指定版本。版本号来自保存响应或制品版本列表,不是文件名的一部分
响应为 Part 对象。内容可能位于 text 或 inlineData;读取二进制内容时应按 mimeType 解释解码后的数据,不要将整个响应直接保存为原文件授权
本地未配置网关时可不提供;云部署使用 Runtime API Key 或部署要求的用户池 JWT,不能使用模型 API Key
路径参数
应用名称,CLI 部署版为 harness_agent
用户 ID
会话 ID
制品名称
查询参数
可选版本号;省略时读取最新版本
响应
Part · object | null
请求成功
Show child attributes
Show child attributes
代码执行结果
Show child attributes
Show child attributes
可执行代码
Show child attributes
Show child attributes
通过 URI 引用的文件内容
Show child attributes
Show child attributes
模型请求执行的函数调用
Show child attributes
Show child attributes
函数执行结果
Show child attributes
Show child attributes
内嵌二进制内容,data 使用 Base64 编码
Show child attributes
Show child attributes
文本内容
是否为思考内容
用于后续调用的思考签名
视频元数据
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
最后修改于 2026年9月19日