退出当前登录状态
Curl示例
curl -H "Content-Type: application/json;charset=UTF-8" \
-X DELETE http://localhost:8080/zstack/v1/accounts/sessions/77b3af8ddd67334ebdec0b2e32d1559b参数列表
| 名字 | 类型 | 位置 | 描述 | 可选值 | 起始版本 |
|---|---|---|---|---|---|
| sessionUuid (可选) | String | url | 会话UUID | 0.6 | |
| clientInfo (可选) | Map | body(包含在logInByAccount结构中) | 客户端信息 | 3.5.0 | |
| systemTags (可选) | List | body | 系统标签 | 0.6 | |
| userTags (可选) | List | body | 用户标签 | 0.6 |
API返回
该API成功时返回一个空的JSON结构{},出错时返回的JSON结构包含一个error字段,例如:
{
"error": {
"code": "SYS.1001",
"description": "A message or a operation timeout",
"details": "Create VM on KVM timeout after 300s"
}
}SDK示例
Java SDK
LogOutAction action = new LogOutAction();
action.sessionId = "0c7e729fb59945938752cd4ec99c2a94";
LogOutAction.Result res = action.call();Python SDK
LogOutAction action = LogOutAction()
action.sessionId = "1cb84b3f5713432aaf42bc230c32aa20"
LogOutAction.Result res = action.call()