根据指定的{command_id
}获取指令执行信息
/api/v1/command/{command_id
}
GET
参数名 | 风格 | 类型 | 是否必须 | 示例 | 描述 |
---|---|---|---|---|---|
command_id | 路径(不参与签名计算) | String | 是 | dcb2a050-8f5e-4217-8447-602ec167d693 | 指令ID |
accesskey | 参数 | String | 是 | t9xuit3pt202ou09 | 用户accessKey |
timestamp | 参数 | String | 是 | 18223784 | 当前时间戳(从1970.1.1到此刻的毫秒数) |
{ "code": "0", "message": "success", "data": { "commandId": "4c45bee0-7003-41e8-91bb-076a88531f73", "name": "node_upload_start", "status": "DONE", "result": "200", "resultMsg": "", "createTime": "2016-06-27 20:07:05", "endTime": "2016-06-27 20:07:24", "activitys": [ { "commandId": "4c45bee0-7003-41e8-91bb-076a88531f73", "name": "PrepareParams", "code": "200", "steps": [ { "stepName": "启动模式: docker start", "status": "200", "msg": "" }, { "stepName": "网络模式: HOST", "status": "200", "msg": "" }, { "stepName": "设置容器规格: CPU=共享, 内存=共享", "status": "200", "msg": "" }, { "stepName": "网络模式: HOST", "status": "200", "msg": "" }, { "stepName": "开始获得代码包下载地址", "status": "200", "msg": "" }, { "stepName": "健康检查模式: URI", "status": "200", "msg": "" } ], "createTime": "2016-06-27 20:07:05", "endTime": "2016-06-27 20:07:05" }, { "commandId": "4c45bee0-7003-41e8-91bb-076a88531f73", "name": "StartContainer", "code": "200", "steps": [ { "stepName": "解除接入层(TENGINX)", "status": "200" }, { "stepName": "关闭容器监控", "status": "200", "msg": "success" }, { "stepName": "提交指令", "status": "200", "msg": "" }, { "stepName": "打开容器监控", "status": "200", "msg": "success" }, { "stepName": "容器启动成功, 耗时: 18秒", "status": "200", "msg": "" }, { "stepName": "绑定接入层:[containerId=16797]", "status": "200", "msg": "" }, { "stepName": "绑定接入层(TENGINX)", "status": "200" } ], "createTime": "2016-06-27 20:07:05", "endTime": "2016-06-27 20:07:24" }, { "commandId": "4c45bee0-7003-41e8-91bb-076a88531f73", "name": "ResultAnalysis", "code": "200", "steps": [ { "stepName": "统计结果 :\r\n 容器总数 1\r\n 操作总数 1\r\n 成功总数 1\r\n 失败总数 0", "status": "200", "msg": "" } ], "createTime": "2016-06-27 20:07:24", "endTime": "2016-06-27 20:07:24" } ] } }
字段 | 类型 | 描述 |
---|---|---|
code | String | 响应状态码 |
message | String | 响应消息 |
data->commandId | String | 指令ID |
data->name | String | 指令名字 |
data->status | String | 指令状态: 1. CREATED : 已经写入但还没有发布指令 2. PUBLISHED :发布指令成功 3. PUBLISH_FAILED : 发布指令失败 4. RUNNING 指令运行中 5. DONE 运行结束 |
data->result | String | 指定执行结果 200 :表示成功 500 :未知错误 504 :超时 100 :客户端错误 400 :Workstation错误 |
data->resultMsg | String | 指令执行结果消息 |
data->createTime | String | 指令创建时间 |
data->endTime | String | 指令执行结束时间 |
data->activitys->commandId | String | activity所在指令ID |
data->activitys->PrepareParams | String | activity名字 |
data->activitys->code | String | activity状态码 200 :表示成功 500 :未知错误 504 :超时 100 :客户端错误 400 :Workstation错误 |
data->activitys->steps->stepName | String | step名字 |
data->activitys->steps->status | String | step状态码 200 :表示成功 500 :未知错误 504 :超时 100 :客户端错误 400 :Workstation错误 |
data->activitys->steps->msg | String | step状态码信息 |
data->activitys->createTime | String | activity启动时间 |
data->activitys->endTime | String | activity结束时间 |