Add INFO.yaml file
[vfc/nfvo/lcm.git] / lcm / swagger / vfc.nslcm.swagger.json
1 {\r
2   "swagger": "2.0",\r
3   "info": {\r
4     "version": "1.0.0",\r
5     "title": "ONAP VFC Network Service Lifecycle Management API",\r
6     "description": "VFC Network Service Lifecycle Management Rest API.",\r
7     "contact": {\r
8       "name": "ONAP VFC team",\r
9       "email": "onap-discuss@lists.onap.org",\r
10       "url": "https://gerrit.onap.org/r/#/admin/projects/vfc/nfvo/lcm"\r
11     }\r
12   },\r
13   "basePath": "/api/nslcm/v1",\r
14   "schemes": [\r
15     "http",\r
16     "https"\r
17   ],\r
18   "consumes": [\r
19     "application/json"\r
20   ],\r
21   "produces": [\r
22     "application/json"\r
23   ],\r
24   "paths": {\r
25     "/ns": {\r
26       "post": {\r
27         "tags": [\r
28           "ns"\r
29         ],\r
30         "summary": "ns create",\r
31         "description": "ns create",\r
32         "operationId": "ns_create",\r
33         "parameters": [\r
34           {\r
35             "in": "body",\r
36             "name": "NSCreateRequest",\r
37             "description": "NS Instance Create Request",\r
38             "required": true,\r
39             "schema": {\r
40               "$ref": "#/definitions/NsCreateRequest"\r
41             }\r
42           }\r
43         ],\r
44         "responses": {\r
45           "200": {\r
46             "description": "successful operation",\r
47             "schema": {\r
48               "$ref": "#/definitions/NsCreateResponse"\r
49             }\r
50           },\r
51           "404": {\r
52             "description": "URL not found"\r
53           }\r
54         }\r
55       },\r
56       "get": {\r
57         "tags": [\r
58           "ns"\r
59         ],\r
60         "summary": "ns get",\r
61         "description": "ns get",\r
62         "operationId": "ns_instantces_get",\r
63         "parameters": [\r
64           {\r
65             "required": true,\r
66             "type": "string",\r
67             "description": "job response message id",\r
68             "name": "csarId",\r
69             "in": "query"\r
70           }\r
71         ],\r
72         "responses": {\r
73           "200": {\r
74             "description": "successful operation",\r
75             "schema": {\r
76               "$ref": "#/definitions/NsInstancesInfo"\r
77             }\r
78           },\r
79           "404": {\r
80             "description": "URL not found"\r
81           }\r
82         }\r
83       }\r
84     },\r
85     "/ns/{nsInstanceId}/Instantiate": {\r
86       "post": {\r
87         "tags": [\r
88           "ns"\r
89         ],\r
90         "summary": "ns Instantiate",\r
91         "description": "ns Instantiate",\r
92         "operationId": "ns_Instantiate",\r
93         "parameters": [\r
94           {\r
95             "required": true,\r
96             "type": "string",\r
97             "description": "",\r
98             "name": "nsInstanceId",\r
99             "in": "path"\r
100           },\r
101           {\r
102             "in": "body",\r
103             "name": "NSInstantiateRequest",\r
104             "description": "NS Instantiate Request Body",\r
105             "required": true,\r
106             "schema": {\r
107               "$ref": "#/definitions/NsInstantiateRequest"\r
108             }\r
109           }\r
110         ],\r
111         "responses": {\r
112           "200": {\r
113             "description": "",\r
114             "schema": {\r
115               "$ref": "#/definitions/JobInfo"\r
116             }\r
117           },\r
118           "201": {\r
119             "description": "Invalid Request"\r
120           },\r
121           "404": {\r
122             "description": "URL not found"\r
123           }\r
124         }\r
125       }\r
126     },\r
127     "/ns/{nsInstanceId}/scale": {\r
128       "post": {\r
129         "tags": [\r
130           "ns"\r
131         ],\r
132         "summary": "ns scale",\r
133         "description": "ns scale",\r
134         "operationId": "ns_scale",\r
135         "parameters": [\r
136           {\r
137             "required": true,\r
138             "type": "string",\r
139             "description": "",\r
140             "name": "nsInstanceId",\r
141             "in": "path"\r
142           },\r
143           {\r
144             "in": "body",\r
145             "name": "ScaleNSRequest",\r
146             "description": "Scale NS Request Body",\r
147             "required": true,\r
148             "schema": {\r
149               "$ref": "#/definitions/NsScaleRequest"\r
150             }\r
151           }\r
152         ],\r
153         "responses": {\r
154           "200": {\r
155             "description": "",\r
156             "schema": {\r
157               "$ref": "#/definitions/JobInfo"\r
158             }\r
159           },\r
160           "201": {\r
161             "description": "Invalid Request"\r
162           },\r
163           "404": {\r
164             "description": "URL not found"\r
165           }\r
166         }\r
167       }\r
168     },\r
169     "/ns/{nsInstanceId}/heal": {\r
170       "post": {\r
171         "tags": [\r
172           "ns"\r
173         ],\r
174         "summary": "ns heal",\r
175         "description": "ns heal",\r
176         "operationId": "ns_heal",\r
177         "parameters": [\r
178           {\r
179             "required": true,\r
180             "type": "string",\r
181             "description": "Identifier of the NS instance.",\r
182             "name": "nsInstanceId",\r
183             "in": "path"\r
184           },\r
185           {\r
186             "in": "body",\r
187             "name": "healVnfData",\r
188             "description": "healVnfData",\r
189             "required": true,\r
190             "schema": {\r
191               "$ref": "#/definitions/NsHealRequest"\r
192             }\r
193           }\r
194         ],\r
195         "responses": {\r
196           "202": {\r
197             "description": "",\r
198             "schema": {\r
199               "$ref": "#/definitions/JobInfo"\r
200             }\r
201           },\r
202           "404": {\r
203             "description": "URL not found"\r
204           },\r
205           "500": {\r
206             "description": "the url is invalid"\r
207           }\r
208         }\r
209       }\r
210     },\r
211     "/ns/{nsInstanceId}/terminate": {\r
212       "post": {\r
213         "tags": [\r
214           "ns"\r
215         ],\r
216         "summary": "ns terminate",\r
217         "description": "ns terminate",\r
218         "operationId": "ns_terminate",\r
219         "parameters": [\r
220           {\r
221             "required": true,\r
222             "type": "string",\r
223             "description": "Identifier of the NS instance.",\r
224             "name": "nsInstanceId",\r
225             "in": "path"\r
226           },\r
227           {\r
228             "in": "body",\r
229             "name": "NsTerminateRequest",\r
230             "description": "NsTerminateRequest",\r
231             "required": true,\r
232             "schema": {\r
233               "$ref": "#/definitions/NsTerminateRequest"\r
234             }\r
235           }\r
236         ],\r
237         "responses": {\r
238           "202": {\r
239             "description": "",\r
240             "schema": {\r
241               "$ref": "#/definitions/JobInfo"\r
242             }\r
243           },\r
244           "500": {\r
245             "description": "the url is invalid"\r
246           }\r
247         }\r
248       }\r
249     },\r
250     "/ns/{nsInstanceId}": {\r
251       "get": {\r
252         "tags": [\r
253           "ns"\r
254         ],\r
255         "summary": "ns get",\r
256         "description": "ns get",\r
257         "operationId": "ns_instance_get",\r
258         "parameters": [\r
259           {\r
260             "required": true,\r
261             "type": "string",\r
262             "description": "Identifier of the NS instance.",\r
263             "name": "nsInstanceId",\r
264             "in": "path"\r
265           }\r
266         ],\r
267         "responses": {\r
268           "200": {\r
269             "description": "successful operation",\r
270             "schema": {\r
271               "$ref": "#/definitions/NsInstanceInfo"\r
272             }\r
273           }\r
274         }\r
275       },\r
276       "delete": {\r
277         "tags": [\r
278           "ns"\r
279         ],\r
280         "summary": "ns delete",\r
281         "description": "ns delete",\r
282         "operationId": "ns_delete",\r
283         "parameters": [\r
284           {\r
285             "required": true,\r
286             "type": "string",\r
287             "description": "Identifier of the NS instance.",\r
288             "name": "nsInstanceId",\r
289             "in": "path"\r
290           }\r
291         ],\r
292         "responses": {\r
293           "204": {\r
294             "description": "The NS instance resource and the associated NS identifier were deleted successfully."\r
295           }\r
296         }\r
297       }\r
298     },\r
299     "/jobs/{jobId}": {\r
300       "get": {\r
301         "tags": [\r
302           "job"\r
303         ],\r
304         "summary": "jobstatus",\r
305         "description": "",\r
306         "operationId": "get_jobstatus",\r
307         "parameters": [\r
308           {\r
309             "required": true,\r
310             "type": "string",\r
311             "description": "job Id",\r
312             "name": "jobId",\r
313             "in": "path"\r
314           },\r
315           {\r
316             "required": true,\r
317             "type": "string",\r
318             "description": "job response message id",\r
319             "name": "responseId",\r
320             "in": "query"\r
321           }\r
322         ],\r
323         "responses": {\r
324           "202": {\r
325             "description": "",\r
326              "schema": {\r
327               "$ref": "#/definitions/JobDetailInfo"\r
328             }\r
329           }\r
330         }\r
331       }\r
332     }\r
333   },\r
334   "definitions": {\r
335     "NsCreateRequest": {\r
336       "type": "object",\r
337       "properties": {\r
338         "context":{\r
339           "type": "object",\r
340            "properties": {\r
341               "globalCustomerId":{\r
342                  "type": "string",\r
343                  "description": "the global customer id"\r
344               },\r
345               "serviceType":{\r
346                  "type": "string",\r
347                  "description": "service type"\r
348               }\r
349             }\r
350         },\r
351         "csarId": {\r
352           "type": "string",\r
353           "description": "the NS package ID"\r
354         },\r
355         "nsName": {\r
356           "type": "string"\r
357         },\r
358         "description": {\r
359           "type": "string"\r
360         }\r
361       }\r
362     },\r
363     "NsCreateResponse": {\r
364       "type": "object",\r
365       "properties": {\r
366         "nsInstanceId": {\r
367           "type": "string"\r
368         }\r
369       }\r
370     },\r
371     "NsInstantiateRequest": {\r
372       "type": "object",\r
373       "properties": {\r
374         "LocationConstraints": {\r
375           "type": "array",\r
376           "items": {\r
377             "$ref": "#/definitions/LocationConstraint"\r
378           }\r
379         },\r
380         "additionalParamForNs": {\r
381           "type": "object",\r
382           "additionalProperties" : {\r
383              "type" : "string"\r
384           }\r
385         }\r
386       }\r
387     },\r
388     "LocationConstraint": {\r
389       "type": "object",\r
390       "properties": {\r
391         "vnfProfileId": {\r
392           "type": "string"\r
393         },\r
394         "locationConstraints": {\r
395           "type": "object",\r
396           "properties": {\r
397             "vimid": {\r
398               "type": "string"\r
399             }\r
400           }\r
401         }\r
402       }\r
403     },\r
404     "NsScaleRequest": {\r
405       "type": "object",\r
406       "properties": {\r
407         "scaleType": {\r
408           "type": "string"\r
409         },\r
410         "scaleNsByStepsData": {\r
411           "$ref": "#/definitions/NsScaleByStepsData"\r
412         }\r
413       }\r
414     },\r
415     "NsScaleByStepsData": {\r
416       "type": "object",\r
417       "properties": {\r
418         "scalingDirection": {\r
419           "type": "string"\r
420         },\r
421         "aspectId": {\r
422           "type": "string"\r
423         },\r
424         "numberOfSteps": {\r
425           "type": "integer"\r
426         }\r
427       }\r
428     },\r
429     "NsHealRequest": {\r
430       "type": "object",\r
431       "properties": {\r
432         "vnfInstanceId": {\r
433           "type": "string"\r
434         },\r
435         "cause": {\r
436           "type": "string"\r
437         },\r
438         "additionalParams": {\r
439           "type": "object",\r
440           "properties": {\r
441             "action": {\r
442               "type": "string"\r
443             },\r
444             "actionvminfo": {\r
445               "type": "object",\r
446               "properties": {\r
447                 "vmid": {\r
448                   "type": "string"\r
449                 },\r
450                 "vmname": {\r
451                   "type": "string"\r
452                 }\r
453               }\r
454             }\r
455           }\r
456         }\r
457       }\r
458     },\r
459     "NsTerminateRequest": {\r
460       "type": "object",\r
461       "properties": {\r
462         "terminationType": {\r
463           "type": "string"\r
464         },\r
465         "gracefulTerminationTimeout": {\r
466           "type": "string"\r
467         }\r
468       }\r
469     },\r
470     "JobInfo": {\r
471       "type": "object",\r
472       "properties": {\r
473         "jobId": {\r
474           "type": "string"\r
475         }\r
476       }\r
477     },\r
478     "NsInstancesInfo":{\r
479       "type": "array",\r
480       "items": {\r
481             "$ref": "#/definitions/NsInstanceInfo"\r
482       }\r
483     },\r
484     "NsInstanceInfo": {\r
485       "type": "object",\r
486       "properties": {\r
487         "nsInstanceId": {\r
488           "type": "string"\r
489         },\r
490         "nsName": {\r
491           "type": "string"\r
492         },\r
493         "description": {\r
494           "type": "string"\r
495         },\r
496         "nsdId": {\r
497           "type": "string"\r
498         },\r
499         "vnfInfo": {\r
500           "type": "array",\r
501           "items": {\r
502             "$ref": "#/definitions/vnfInfo"\r
503           }\r
504         },\r
505         "vlInfo": {\r
506           "type": "array",\r
507           "items": {\r
508             "$ref": "#/definitions/vlInfo"\r
509           }\r
510         },\r
511         "vnffgInfo": {\r
512           "type": "array",\r
513           "items": {\r
514             "$ref": "#/definitions/vnffgInfo"\r
515           }\r
516         },\r
517         "nsState": {\r
518           "type": "string"\r
519         }\r
520       }\r
521     },\r
522     "vnfInfo": {\r
523       "type": "object",\r
524       "properties": {\r
525         "vnfInstanceId": {\r
526           "type": "string"\r
527         },\r
528         "vnfInstanceName": {\r
529           "type": "string"\r
530         },\r
531         "vnfdId": {\r
532           "type": "string"\r
533         }\r
534       }\r
535     },\r
536     "vlInfo": {\r
537       "type": "object",\r
538       "properties": {\r
539         "vlInstanceId": {\r
540           "type": "string"\r
541         },\r
542         "vlInstanceName": {\r
543           "type": "string"\r
544         },\r
545         "vldId": {\r
546           "type": "string"\r
547         },\r
548         "relatedCpInstanceId": {\r
549           "type": "array",\r
550           "items": {\r
551             "$ref": "#/definitions/cpInfo"\r
552           }\r
553         }\r
554       }\r
555     },\r
556     "cpInfo": {\r
557       "type": "object",\r
558       "properties": {\r
559         "cpInstanceId": {\r
560           "type": "string"\r
561         },\r
562         "cpInstanceName": {\r
563           "type": "string"\r
564         },\r
565         "cpdId": {\r
566           "type": "string"\r
567         }\r
568       }\r
569     },\r
570     "vnffgInfo": {\r
571       "type": "object",\r
572       "properties": {\r
573         "vnffgInstanceId": {\r
574           "type": "string"\r
575         },\r
576         "vnfId": {\r
577           "type": "string"\r
578         },\r
579         "pnfId": {\r
580           "type": "string"\r
581         },\r
582         "virtualLinkId": {\r
583           "type": "string"\r
584         },\r
585         "cpId": {\r
586           "type": "string"\r
587         },\r
588         "nfp": {\r
589           "type": "string"\r
590         }\r
591       }\r
592     },\r
593     "jobResponseInfo": {\r
594        "type": "object",\r
595        "properties": {\r
596           "status": {\r
597             "type": "string"\r
598           },\r
599          "progress":{\r
600             "type": "string"\r
601          },\r
602          "statusDescription": {\r
603             "type": "string"\r
604          },\r
605          "errorCode": {\r
606             "type": "string"\r
607          },\r
608          "responseId": {\r
609             "type": "string"\r
610         }\r
611        }\r
612     },\r
613     "JobDetailInfo":{\r
614       "type": "object",\r
615       "properties": {\r
616             "jobId": {\r
617                "type": "string"\r
618              },\r
619             "responseDescriptor":\r
620             {\r
621                 "type":"object",\r
622                 "properties": {\r
623                     "status": {\r
624                        "type": "string"\r
625                     },\r
626                     "progress":{\r
627                        "type": "string"\r
628                     },\r
629                     "statusDescription": {\r
630                        "type": "string"\r
631                     },\r
632                     "errorCode": {\r
633                        "type": "string"\r
634                     },\r
635                     "responseId": {\r
636                        "type": "string"\r
637                     },\r
638                     "responseHistoryList": {\r
639                         "type": "array",\r
640                         "items": {\r
641                            "$ref": "#/definitions/jobResponseInfo"\r
642                         }\r
643                     }\r
644                 }\r
645            }\r
646       }\r
647     }\r
648   }\r
649 }\r