PowerCenter REST API
版本
1.7.0.1
4.2.3 重启
重启虚机
接口URI
/vm/{vmname}/state
访问方法
HTTP方法
PUT
参数
路径参数(Path Parameter)
说明
数据类型
vmname
虚机的名字
字符串(String)类型,必须,无缺省值。
消息体
{
"action":"reboot"
}
元素说明
元素
说明
数据类型
action
对虚机的操作
字符串(String)类型,必须,无缺省值。
返回结果
状态码(code)
0000:重启成功
1001:用户token不正确
1002:用户权限不足
3001:重启失败
3006:虚机不存在
消息头
Status Code: 200 OK
.....
消息体
{
"code": "0000"
"msg": "Success"
}
元素说明
元素
说明
数据类型
code
状态码
字符串(String)类型
msg
响应消息
字符串(String)类型
应用举例
重启虚机linux
请求
PUT http://192.168.137.25:8080/rest/vm/linux/state
Accept:application/json
Content-Type:application/json;charset=utf-8
Token:77c3a272ec31c3e3129a0f4a8cfbf140
... ...
{
"action":"reboot"
}
响应
Status Code: 200 OK
{
"code": "0000"
"msg": "Success"
}