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