Batch delete agent artifacts¶
Mark specified artifact versions deleted and detach the Catalog file mounts resolved for this operation.
POST https://api.moi.matrixorigin.cn/v5/workspaces/{workspace_id}/agent-artifacts/batch-delete
Before you call this API¶
BASE_URL uses the product API prefix https://api.moi.matrixorigin.cn/v5. For a dedicated deployment, use its corresponding product API address.
Prepare identity, volume privileges, and version references.
Request¶
curl --request POST \
"$BASE_URL/workspaces/$WORKSPACE_ID/agent-artifacts/batch-delete" \
--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 (array of references) |
No |
Up to 100 items. Omitted/null/empty array selects no artifacts. |
|
Body |
string |
Yes |
Artifact ID for this item. |
|
Body |
integer |
Yes |
Positive integer version for this item. |
Confirm target references and impact before execution. HTTP 200 still requires checking succeeded/failed per item. Deletion detaches the current mount and decrements file references; it does not guarantee immediate physical removal, removal of other mounts, or successful repeated deletion. Read results before repeating after an overall error or timeout.
Successful response¶
{
"code": 0,
"data": {
"succeeded": [
{
"artifact_id": "artifact-example",
"version": 1
}
],
"failed": [
{
"artifact_id": "artifact-unavailable",
"version": 1,
"reason": "not_found"
}
]
}
}
Field |
Type |
Description |
|---|---|---|
|
integer |
0 on success; batch operations still require checking each item. |
|
object |
Error response¶
Errors and result confirmation distinguishes overall failures, item failures, and invisible sources.