查看执行详情
更新时间:2026-07-16
描述
该接口用于查看执行详情。
OpenAPI Explorer
去调试
您可以在 OpenAPI Explorer 中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer 可以自动生成 SDK 代码示例。
请求结构
Plain Text
1GET /v{version}/execution?namespace={namespace}&id={id}&withLog={withLog}&locale={locale}
2Host: oos.bj.baidubce.com
3Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
| 参数名称 | 类型 | 是否必需 | 参数位置 | 描述 |
|---|---|---|---|---|
| version | String | 是 | URL参数 | API版本号,当前取值为2 |
| namespace | String | 否 | Query参数 | 名称空间,默认 default |
| id | String | 是 | Query参数 | 执行 ID |
| withLog | String | 否 | Query参数 | 是否返回日志 |
| locale | String | 否 | Query参数 | 语言,默认 zh-cn |
返回头域
除公共头域,无其它特殊头域。
返回参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| success | Boolean | 请求是否成功 |
| msg | String | 失败时返回失败原因,成功时为空字符串 |
| code | Integer | 状态码 |
| result | Execution |
请求示例
Plain Text
1GET /v{version}/execution?namespace={namespace}&id=d-lkzdgP******&withLog={withLog}&locale={locale}
2Host: oos.bj.baidubce.com
3Authorization: authorization string
返回示例
Plain Text
1200 Success
2
3{
4 "success" : true,
5 "msg" : "",
6 "code" : 200,
7 "result" : {
8 "id" : "d-7fxxxxxx",
9 "description" : "描述",
10 "template" : {
11 "name" : "BCE-BCC-BulkyRunCommand",
12 "labelI18n" : { },
13 "type" : "GLOBAL",
14 "description" : "批量在BCC实例上运行命令",
15 "descriptionI18n" : { },
16 "linear" : true,
17 "parallelism" : 0,
18 "operators" : [ {
19 "name" : "execute_shell",
20 "description" : "用户虚机执行脚本",
21 "descriptionI18n" : { },
22 "operator" : "BCE::Agent::ExecuteShell",
23 "label" : "",
24 "labelI18n" : { },
25 "retries" : 0,
26 "retryInterval" : 0,
27 "timeout" : 3600000,
28 "parallelismRatio" : 0,
29 "parallelismCount" : 0,
30 "allowedFailureRatio" : 0,
31 "allowedFailureCount" : 0,
32 "manually" : false,
33 "scheduleDelayMilli" : 0,
34 "waitOnAgentMilli" : 0,
35 "pauseOnFailure" : false,
36 "triggerRule" : "ALL_SUCCESS",
37 "loopWindowType" : "SLICING",
38 "properties" : {
39 "__workerSelectors__" : [ {
40 "instanceId" : "i-EAxxxxx"
41 }, {
42 "instanceId" : "i-4Dxxxxx"
43 } ],
44 "content" : "hostname",
45 "execUser" : "root",
46 "instances" : [ {
47 "instanceId" : "i-EAxxxxx"
48 }, {
49 "instanceId" : "i-4Dxxxxx"
50 } ],
51 "timeoutSecond" : 3600,
52 "user" : "root",
53 "userId" : "2dcxxxxxxxxxxxxxxx",
54 "workDir" : "/"
55 }
56 } ],
57 "links" : [ ],
58 "properties" : [ ]
59 },
60 "templateDeleted" : false,
61 "parallelism" : 0,
62 "revision" : 15193125,
63 "manually" : false,
64 "createdTimestamp" : 1782718407906,
65 "updatedTimestamp" : 1782718408137,
66 "finishedTimestamp" : 1782718408137,
67 "state" : "SUCCESS",
68 "properties" : {
69 "__SubUserId__" : "2dcxxxxxxxxxxxxxxx"
70 },
71 "tasks" : [ {
72 "id" : "t-RVxxxxxxxxxxx",
73 "namespace" : "OOS/2dcxxxxxxxxxxxxxxx/default",
74 "dag" : {
75 "id" : "d-7fCXdAPEZHh0",
76 "revision" : 0,
77 "createdTimestamp" : 0,
78 "updatedTimestamp" : 0,
79 "finishedTimestamp" : 0,
80 "initContext" : { },
81 "parallelism" : 0,
82 "manually" : false,
83 "workerSelectors" : [ ],
84 "tasks" : [ ],
85 "operatorActions" : { },
86 "dagActions" : {
87 "pause" : false,
88 "resume" : false
89 },
90 "initOperators" : [ ]
91 },
92 "dags" : [ ],
93 "revision" : 15193124,
94 "createdTimestamp" : 1782718407907,
95 "updatedTimestamp" : 1782718408135,
96 "finishedTimestamp" : 1782718408135,
97 "state" : "SUCCESS",
98 "operator" : {
99 "name" : "execute_shell",
100 "description" : "用户虚机执行脚本",
101 "tags" : { },
102 "operator" : "BCE::Agent::ExecuteShell",
103 "inline" : false,
104 "retries" : 0,
105 "retryInterval" : 0,
106 "timeout" : 3600000,
107 "initContext" : {
108 "__workerSelectors__" : [ {
109 "instanceId" : "i-EAxxxxx"
110 }, {
111 "instanceId" : "i-4Dxxxxx"
112 } ],
113 "content" : "hostname",
114 "execUser" : "root",
115 "instances" : [ {
116 "instanceId" : "i-EAxxxxx"
117 }, {
118 "instanceId" : "i-4Dxxxxx"
119 } ],
120 "timeoutSecond" : 3600,
121 "user" : "root",
122 "userId" : "2dcxxxxxxxxxxxxxxx",
123 "workDir" : "/"
124 },
125 "loops" : [ {
126 "initContext" : {
127 "__worker__" : {
128 "instanceId" : "i-EAxxxxx"
129 }
130 }
131 }, {
132 "initContext" : {
133 "__worker__" : {
134 "instanceId" : "i-4Dxxxxx"
135 }
136 }
137 } ],
138 "parallelismRatio" : 0,
139 "parallelismCount" : 0,
140 "allowedFailureRatio" : 0,
141 "allowedFailureCount" : 0,
142 "manually" : false,
143 "pauseOnFailure" : false,
144 "scheduleDelayMilli" : 0,
145 "waitOnAgentMilli" : 0,
146 "triggerRule" : "ALL_SUCCESS",
147 "loopWindowType" : "SLICING",
148 "workerSelectors" : [ ],
149 "events" : [ {
150 "properties" : {
151 "resource" : {
152 "id" : {
153 "Fn::Join" : [ ",", {
154 "Ref" : "instances[*].instanceId"
155 } ]
156 },
157 "type" : "bccInstance"
158 }
159 }
160 } ],
161 "byBsmAgent" : true
162 },
163 "initContext" : {
164 "__workerSelectors__" : [ {
165 "instanceId" : "i-EAxxxxxx"
166 }, {
167 "instanceId" : "i-4Dxxxxxx"
168 } ],
169 "content" : "hostname",
170 "execUser" : "root",
171 "instances" : [ {
172 "instanceId" : "i-EAxxxxxx"
173 }, {
174 "instanceId" : "i-4Dxxxxxx"
175 } ],
176 "timeoutSecond" : 3600,
177 "user" : "root",
178 "userId" : "2dcxxxxxxxxxxxxxxxxxxxxxxx",
179 "workDir" : "/"
180 },
181 "context" : {
182 "__SubUserId__" : "2dcxxxxxxxxxxxxxxxxxxxxxxx"
183 },
184 "outputContext" : { },
185 "tries" : 0,
186 "children" : [ {
187 "loopIndex" : 0,
188 "dags" : [ ],
189 "revision" : 0,
190 "createdTimestamp" : 0,
191 "updatedTimestamp" : 0,
192 "finishedTimestamp" : 0,
193 "state" : "SUCCESS",
194 "initContext" : { },
195 "context" : { },
196 "outputContext" : { },
197 "tries" : 0,
198 "children" : [ ]
199 }, {
200 "loopIndex" : 1,
201 "dags" : [ ],
202 "revision" : 0,
203 "createdTimestamp" : 0,
204 "updatedTimestamp" : 0,
205 "finishedTimestamp" : 0,
206 "state" : "SUCCESS",
207 "initContext" : { },
208 "context" : { },
209 "outputContext" : { },
210 "tries" : 0,
211 "children" : [ ]
212 } ]
213 } ],
214 "tags" : [ ],
215 "operatorActions" : {
216 "execute_shell" : {
217 "runManually" : false,
218 "ignore" : false,
219 "clear" : true
220 }
221 },
222 "executionActions" : {
223 "pause" : false,
224 "resume" : false
225 },
226 "trigger" : "MANUAL"
227 }
228}
评价此篇文章
