blob: f72cc183bc0720dbd7c52fce4fb3b42d3b89c3c3 [file] [log] [blame]
Eric Debeau1af30532019-05-14 17:45:22 +00001{
2 "swagger": "2.0",
3 "info": {
VENKATESH KUMARe64d2d62020-04-06 18:55:10 -04004 "version": "4.3.0",
Eric Debeau1af30532019-05-14 17:45:22 +00005 "title": "deployment-handler API",
6 "license": {
7 "name": "Apache 2.0",
8 "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
9 },
10 "description": "High-level API for deploying/undeploying composed DCAE services using Cloudify Manager.\n"
11 },
12 "tags": [
13 {
14 "name": "info",
15 "description": "version and links"
16 },
17 {
18 "name": "dcae-deployments",
19 "description": "operations on dcae-deployments"
20 },
21 {
22 "name": "policy",
23 "description": "policy update API consumed by policy-handler and debug API to find policies on components"
24 }
25 ],
26 "paths": {
27 "/": {
28 "get": {
29 "tags": [
30 "info"
31 ],
32 "description": "Returns version information and links to API operations",
33 "produces": [
34 "application/json"
35 ],
36 "responses": {
37 "200": {
38 "description": "Success",
39 "schema": {
40 "title": "DispatcherInfo",
41 "type": "object",
42 "properties": {
43 "apiVersion": {
44 "type": "string",
45 "description": "version of API supported by this server\n"
46 },
47 "serverVersion": {
48 "type": "string",
49 "description": "version of software running on this server\n"
50 },
51 "links": {
52 "type": "object",
53 "description": "Links to API resources\n",
54 "properties": {
55 "info": {
56 "type": "string",
57 "description": "path for the server information endpoint\n"
58 },
59 "events": {
60 "type": "string",
61 "description": "path for the events endpoint\n"
62 }
63 }
64 }
65 }
66 }
67 }
68 }
69 }
70 },
71 "/dcae-deployments": {
72 "get": {
73 "tags": [
74 "dcae-deployments"
75 ],
76 "description": "List service deployments known to the orchestrator, optionally restricted to a single service type\n",
77 "parameters": [
78 {
79 "name": "serviceTypeId",
80 "description": "Service type identifier for the type whose deployments are to be listed\n",
81 "type": "string",
82 "in": "query",
83 "required": false
84 }
85 ],
86 "responses": {
87 "200": {
88 "description": "Success. (Note that if no matching deployments are found, the request is still a success; the\ndeployments array is empty in that case.)\n",
89 "schema": {
90 "$ref": "#/definitions/DCAEDeploymentsListResponse"
91 }
92 },
93 "500": {
94 "description": "Problem on the server side. See the message\nin the response for more details.\n",
95 "schema": {
96 "$ref": "#/definitions/DCAEErrorResponse"
97 }
98 },
99 "502": {
100 "description": "Error reported to the dispatcher by a downstream system. See the message\nin the response for more details.\n",
101 "schema": {
102 "$ref": "#/definitions/DCAEErrorResponse"
103 }
104 },
105 "504": {
106 "description": "Error communicating with a downstream system. See the message\nin the response for more details.\n",
107 "schema": {
108 "$ref": "#/definitions/DCAEErrorResponse"
109 }
110 }
111 }
112 }
113 },
114 "/dcae-deployments/{deploymentId}": {
115 "put": {
116 "tags": [
117 "dcae-deployments"
118 ],
119 "description": "Request deployment of a DCAE service\n",
120 "consumes": [
121 "application/json"
122 ],
123 "produces": [
124 "application/json"
125 ],
126 "parameters": [
127 {
128 "name": "deploymentId",
129 "description": "Unique deployment identifier assigned by the API client.\n",
130 "in": "path",
131 "type": "string",
132 "required": true
133 },
134 {
135 "name": "body",
136 "in": "body",
137 "schema": {
138 "$ref": "#/definitions/DCAEDeploymentRequest"
139 },
140 "required": true
141 }
142 ],
143 "responses": {
144 "202": {
145 "description": "Success: The content that was posted is valid, the dispatcher has\n found the needed blueprint, created an instance of the topology in the orchestrator,\n and started an installation workflow.\n",
146 "schema": {
147 "$ref": "#/definitions/DCAEDeploymentResponse"
148 }
149 },
150 "400": {
151 "description": "Bad request: See the message in the response for details.\n",
152 "schema": {
153 "$ref": "#/definitions/DCAEErrorResponse"
154 }
155 },
156 "409": {
157 "description": "A service with the specified deployment Id already exists. Using PUT to update the service is not a supported operation.\n",
158 "schema": {
159 "$ref": "#/definitions/DCAEErrorResponse"
160 }
161 },
162 "415": {
163 "description": "Bad request: The Content-Type header does not indicate that the content is\n'application/json'\n",
164 "schema": {
165 "$ref": "#/definitions/DCAEErrorResponse"
166 }
167 },
168 "500": {
169 "description": "Problem on the server side. See the message\nin the response for more details.\n",
170 "schema": {
171 "$ref": "#/definitions/DCAEErrorResponse"
172 }
173 },
174 "502": {
175 "description": "Error reported to the dispatcher by a downstream system. See the message\nin the response for more details.\n",
176 "schema": {
177 "$ref": "#/definitions/DCAEErrorResponse"
178 }
179 },
180 "504": {
181 "description": "Error communicating with a downstream system. See the message\nin the response for more details.\n",
182 "schema": {
183 "$ref": "#/definitions/DCAEErrorResponse"
184 }
185 }
186 }
187 },
188 "delete": {
189 "tags": [
190 "dcae-deployments"
191 ],
192 "description": "Uninstall the DCAE service and remove all associated data from the orchestrator.\n",
193 "parameters": [
194 {
195 "name": "deploymentId",
196 "description": "Deployment identifier for the service to be uninstalled.\n",
197 "in": "path",
198 "type": "string",
199 "required": true
200 }
201 ],
202 "responses": {
203 "202": {
204 "description": "Success: The dispatcher has initiated the uninstall operation.\n",
205 "schema": {
206 "$ref": "#/definitions/DCAEDeploymentResponse"
207 }
208 },
209 "400": {
210 "description": "Bad request: See the message in the response for details.\n",
211 "schema": {
212 "$ref": "#/definitions/DCAEErrorResponse"
213 }
214 },
215 "500": {
216 "description": "Problem on the server side. See the message\nin the response for more details.\n",
217 "schema": {
218 "$ref": "#/definitions/DCAEErrorResponse"
219 }
220 },
221 "502": {
222 "description": "Error reported to the dispatcher by a downstream system. See the message\nin the response for more details.\n",
223 "schema": {
224 "$ref": "#/definitions/DCAEErrorResponse"
225 }
226 },
227 "504": {
228 "description": "Error communicating with a downstream system. See the message\nin the response for more details.\n",
229 "schema": {
230 "$ref": "#/definitions/DCAEErrorResponse"
231 }
232 }
233 }
234 }
235 },
236 "/dcae-deployments/{deploymentId}/operation/{operationId}": {
237 "get": {
238 "tags": [
239 "dcae-deployments"
240 ],
241 "description": "Get status of a deployment operation\n",
242 "parameters": [
243 {
244 "name": "deploymentId",
245 "in": "path",
246 "type": "string",
247 "required": true
248 },
249 {
250 "name": "operationId",
251 "in": "path",
252 "type": "string",
253 "required": true
254 }
255 ],
256 "responses": {
257 "200": {
258 "description": "Status information retrieved successfully",
259 "schema": {
260 "$ref": "#/definitions/DCAEOperationStatusResponse"
261 }
262 },
263 "404": {
264 "description": "The operation information does not exist (possibly because the service has been uninstalled and deleted).",
265 "schema": {
266 "$ref": "#/definitions/DCAEErrorResponse"
267 }
268 },
269 "500": {
270 "description": "Problem on the server side. See the message\nin the response for more details.\n",
271 "schema": {
272 "$ref": "#/definitions/DCAEErrorResponse"
273 }
274 },
275 "502": {
276 "description": "Error reported to the dispatcher by a downstream system. See the message\nin the response for more details.\n",
277 "schema": {
278 "$ref": "#/definitions/DCAEErrorResponse"
279 }
280 },
281 "504": {
282 "description": "Error communicating with a downstream system. See the message\nin the response for more details.\n",
283 "schema": {
284 "$ref": "#/definitions/DCAEErrorResponse"
285 }
286 }
287 }
288 }
289 },
290 "/policy": {
291 "post": {
292 "tags": [
293 "policy"
294 ],
295 "description": "policy update API consumed by policy-handler",
296 "consumes": [
297 "application/json"
298 ],
299 "produces": [
300 "application/json"
301 ],
302 "parameters": [
303 {
304 "name": "body",
305 "in": "body",
306 "schema": {
307 "$ref": "#/definitions/DCAEPolicyRequest"
308 },
309 "required": true
310 }
311 ],
312 "responses": {
313 "200": {
314 "description": "deployment-handler always responds with ok to /policy before processing the request"
315 }
316 }
317 }
318 },
319 "/policy/components": {
320 "get": {
321 "tags": [
322 "policy"
323 ],
324 "description": "debug API to find policies on components",
325 "produces": [
326 "application/json"
327 ],
328 "responses": {
329 "200": {
330 "description": "deployment-handler found components with or without policies in cloudify"
331 }
332 }
333 }
334 }
335 },
336 "definitions": {
337 "DCAEDeploymentRequest": {
338 "description": "Request for deploying a DCAE service.\n",
339 "type": "object",
340 "required": [
341 "serviceTypeId"
342 ],
343 "properties": {
344 "serviceTypeId": {
345 "description": "The service type identifier (a unique ID assigned by DCAE inventory) for the service to be deployed.\n",
346 "type": "string"
347 },
348 "inputs": {
349 "description": "Object containing inputs needed by the service blueprint to create an instance of the service.\nContent of the object depends on the service being deployed.\n",
350 "type": "object"
351 }
352 }
353 },
354 "DCAEDeploymentResponse": {
355 "description": "Response body for a PUT or DELETE to /dcae-deployments/{deploymentId}\n",
356 "type": "object",
357 "required": [
358 "requestId",
359 "links"
360 ],
361 "properties": {
362 "requestId": {
363 "type": "string",
364 "description": "Unique identifier for the request\n"
365 },
366 "links": {
367 "description": "Links that the API client can access.\n",
368 "type": "object",
369 "properties": {
370 "self": {
371 "type": "string",
372 "description": "Link used to retrieve information about the service being deployed\n"
373 },
374 "status": {
375 "type": "string",
376 "description": "Link used to retrieve information about the status of the installation workflow"
377 }
378 }
379 }
380 }
381 },
382 "DCAEOperationStatusResponse": {
383 "description": "Response body for a request for status of an installation or uninstallation operation.\n",
384 "type": "object",
385 "required": [
386 "requestId",
387 "operationType",
388 "status"
389 ],
390 "properties": {
391 "requestId": {
392 "type": "string",
393 "description": "A unique identifier assigned to the request. Useful for tracing a request through logs.\n"
394 },
395 "operationType": {
396 "description": "Type of operation being reported on. (\"install\" or \"uninstall\")\n",
397 "type": "string"
398 },
399 "status": {
400 "description": "Status of the installation or uninstallation operation. Possible values are \"processing\",\n\"succeeded\", and \"failed\"\n",
401 "type": "string"
402 },
403 "error": {
404 "description": "If status is \"failed\", this field will be present and contain additional information about the reason the operation failed.\n",
405 "type": "string"
406 },
407 "links": {
408 "description": "If the operation succeeded, links that the client can follow to take further action. Note that a successful \"uninstall\" operation removes the DCAE service instance completely, so there are no possible further actions, and no links.\n",
409 "type": "object",
410 "properties": {
411 "self": {
412 "type": "string",
413 "description": "Link used to retrieve information about the service.\n"
414 },
415 "uninstall": {
416 "type": "string",
417 "description": "Link used to trigger an \"uninstall\" operation for the service. (Use the DELETE method.)"
418 }
419 }
420 }
421 }
422 },
423 "DCAEErrorResponse": {
424 "description": "Object reporting an error.\n",
425 "type": "object",
426 "required": [
427 "status"
428 ],
429 "properties": {
430 "status": {
431 "description": "HTTP status code for the response",
432 "type": "integer"
433 },
434 "message": {
435 "description": "Human-readable description of the reason for the error",
436 "type": "string"
437 }
438 }
439 },
440 "DCAEDeploymentsListResponse": {
441 "description": "Object providing a list of deployments\n",
442 "type": "object",
443 "required": [
444 "requestId",
445 "deployments"
446 ],
447 "properties": {
448 "requestId": {
449 "type": "string",
450 "description": "Unique identifier for the request\n"
451 },
452 "deployments": {
453 "type": "array",
454 "items": {
455 "type": "object",
456 "properties": {
457 "href": {
458 "type": "string",
459 "description": "URL for the service deployment\n"
460 }
461 }
462 }
463 }
464 }
465 },
466 "DCAEPolicyBody": {
467 "description": "policy_body - the whole object received from policy-engine",
468 "type": "object",
469 "required": [
470 "policyName",
471 "policyVersion",
472 "config"
473 ],
474 "properties": {
475 "policyName": {
476 "description": "unique policy name that contains the version and extension",
477 "type": "string"
478 },
479 "policyVersion": {
480 "description": "stringified int that is autoincremented by policy-engine",
481 "type": "string"
482 },
483 "config": {
484 "description": "the policy-config - the config data provided by policy owner",
485 "type": "object"
486 }
487 }
488 },
489 "DCAEPolicy": {
490 "description": "policy object",
491 "type": "object",
492 "required": [
493 "policy_id",
494 "policy_body"
495 ],
496 "properties": {
497 "policy_id": {
498 "description": "unique identifier of policy regardless of its version",
499 "type": "string"
500 },
501 "policy_body": {
502 "$ref": "#/definitions/DCAEPolicyBody"
503 }
504 }
505 },
506 "DCAEPolicyRequest": {
507 "description": "request to update policies on DCAE components.",
508 "type": "object",
509 "required": [
510 "catch_up",
511 "latest_policies",
512 "removed_policies"
513 ],
514 "properties": {
515 "catch_up": {
516 "description": "flag to indicate whether the request contains all the policies in PDP or not",
517 "type": "boolean",
518 "default": false
519 },
520 "latest_policies": {
521 "description": "dictionary of (policy_id -> DCAEPolicy object).\nIn example: replace additionalProp1,2,3 with policy_id1,2,3 values\n",
522 "type": "object",
523 "default": {},
524 "additionalProperties": {
525 "$ref": "#/definitions/DCAEPolicy"
526 }
527 },
528 "removed_policies": {
529 "description": "whether policy was removed from policy-engine.\ndictionary of (policy_id -> true).\nIn example: replace additionalProp1,2,3 with policy_id1,2,3 values\n",
530 "type": "object",
531 "default": {},
532 "additionalProperties": {
533 "type": "boolean"
534 }
535 },
536 "errored_policies": {
537 "description": "whether policy-engine returned an error on the policy.\ndictionary of (policy_id -> true).\nIn example: replace additionalProp1,2,3 with policy_id1,2,3 values\n",
538 "type": "object",
539 "default": {},
540 "additionalProperties": {
541 "type": "boolean"
542 }
543 },
544 "errored_scopes": {
545 "description": "on cartchup - list of policy scope_prefix values on wchich the policy-engine experienced an error other than not-found data.\n",
546 "type": "array",
547 "items": {
548 "type": "string"
549 }
550 },
551 "scope_prefixes": {
552 "description": "on catchup - list of all scope_prefixes used by the policy-handler to retrieve the policies from policy-engine.\n",
553 "type": "array",
554 "items": {
555 "type": "string"
556 }
557 }
558 }
559 }
560 }
561}