ZStack Logo

ZStack AIOS

重启模型服务组 (RestartModelServiceGroups)

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

API请求

URLs
PUT zstack/v1/model-service-instance-groups
Headers
Authorization: OAuth the-session-uuid
Body
{
  "restartModelServiceGroups": {
    "uuids": [
      "3727db48ac9c4596ace8a832fc67f3d3"
    ]
  },
  "systemTags": [],
  "userTags": []
}
说明: 上述示例中systemTagsuserTags字段可以省略。列出是为了表示body中可以包含这两个字段。
Curl示例
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"restartModelServiceGroups":{"uuids":["dfbdcb2966d449c4ac0d9fd2548ba648"]}}' \
http://localhost:8080/zstack/v1/model-service-instance-groups
参数列表
名字 类型 位置 描述 可选值 起始版本
uuids List body(包含在restartModelServiceGroups结构中) 模型服务组的uuid 5.3.22
systemTags (可选) List body 系统标签 5.3.22
userTags (可选) List body 用户标签 5.3.22

API返回

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

SDK示例

Java SDK
RestartModelServiceGroupsAction action = new RestartModelServiceGroupsAction();
action.uuids = asList("dc6692c60ebf4df7aef127f6ee994eeb");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
RestartModelServiceGroupsAction.Result res = action.call();
Python SDK
RestartModelServiceGroupsAction action = RestartModelServiceGroupsAction()
action.uuids = ["de23d6ab7b744d44a4d8cdf0aa7f9650"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
RestartModelServiceGroupsAction.Result res = action.call()