ZStack Logo

ZStack AIOS

批量删除模型 (DeleteModels)

面向开发者的 API 使用规范、SDK 调用方式和 AIOS 相关接口说明。

API请求

URLs
DELETE zstack/v1/ai/models
Headers
Authorization: OAuth the-session-uuid
Body
{
  "uuids": [
    "dde540ca510b465ebc9aefcedd6132f1",
    "6dbeab73e2454fd195eb2c5ec013c053"
  ],
  "deleteMode": "Permissive"
}
Curl示例
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X DELETE -d '{"uuids":["dde540ca510b465ebc9aefcedd6132f1","6dbeab73e2454fd195eb2c5ec013c053"],"deleteMode":"Permissive"}' \
http://localhost:8080/zstack/v1/ai/models
参数列表
名字 类型 位置 描述 可选值 起始版本
uuids List body 要删除的模型uuid列表 5.2.1
deleteMode (可选) String body 删除模式(Permissive / Enforcing,Permissive) 5.2.1
systemTags (可选) List body 系统标签 5.2.1
userTags (可选) List body 用户标签 5.2.1

API返回

返回示例
{
  "results": [
    {
      "uuid": "1516e53731354f5c9521e88091b40bd0",
      "success": true,
      "error": null
    }
  ]
}
名字 类型 描述 起始版本
results List 批量删除结果 5.2.1
uuid String 资源UUID 5.2.1
success boolean 操作是否成功 5.2.1
error ErrorCode 错误码。操作成功时该字段为null。 5.2.1

SDK示例

Java SDK
DeleteModelsAction action = new DeleteModelsAction();
action.uuids = asList("dde540ca510b465ebc9aefcedd6132f1","6dbeab73e2454fd195eb2c5ec013c053");
action.deleteMode = "Permissive";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
DeleteModelsAction.Result res = action.call();
Python SDK
DeleteModelsAction action = DeleteModelsAction()
action.uuids = ["9f67fbcf79d34ab1a7440803f2db362e", "a900fc464ce140b4b6c9c70356eaddc4"]
action.deleteMode = "Permissive"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
DeleteModelsAction.Result res = action.call()