Resolve agent artifact file references¶
Resolve artifact IDs and versions to currently accessible file and placement identifiers.
POST https://api.moi.matrixorigin.cn/v5/workspaces/{workspace_id}/agent-artifacts/resolve
Before you call this API¶
Set BASE_URL to the product API prefix https://api.moi.matrixorigin.cn/v5. For private deployments, use the corresponding product API URL.
Prepare identity, volume permissions, and version references.
Request¶
curl --request POST \
"$BASE_URL/workspaces/$WORKSPACE_ID/agent-artifacts/resolve" \
--header "X-API-Key: $MOI_KEY" \
--header "X-Workspace-ID: $WORKSPACE_ID" \
--header "Content-Type: application/json" \
--data '{"items":[{"artifact_id":"artifact-example","version":1},{"artifact_id":"artifact-unavailable","version":1}]}'
Parameter |
Location |
Type |
Required |
Description |
|---|---|---|---|---|
|
Path |
string |
Yes |
Workspace ID in the current environment. |
|
Body |
array (references) |
No |
Version references to resolve. Omission/null/an empty array selects no artifacts. |
|
Body |
string |
Yes |
Artifact ID. |
|
Body |
integer |
Yes |
Positive integer version. |
Use the result’s current file/volume/placement identifiers to call the corresponding file APIs. This does not generate content, rerun tasks, or repair artifacts. HTTP200 may still include failed. The same 100-item limit as deletion has not been verified for this API; do not assume it applies.
Successful response¶
{
"code": 0,
"data": {
"items": [
{
"artifact_id": "artifact-example",
"version": 1,
"file_id": "file-example",
"volume_id": 10,
"placement_id": 23,
"file_name": "summary.txt",
"content_type": "text/plain",
"size": 128,
"status": "completed"
}
],
"failed": [
{
"artifact_id": "artifact-unavailable",
"version": 1,
"reason": "not_found"
}
]
}
}
Field |
Type |
Description |
|---|---|---|
|
integer |
0 on success; batch operations still require checking each item result. |
|
object |
Error responses¶
Errors and result confirmation distinguishes whole-request failure, per-item failure, and invisible sources.