Merge "modify VIM INFO"
[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/{ns_instance_id}/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": "ns_instance_id",\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/{ns_instance_id}/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": "ns_instance_id",\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/{ns_instance_id}": {\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         "responses": {\r
260           "200": {\r
261             "description": "successful operation",\r
262             "schema": {\r
263               "$ref": "#/definitions/NsInstanceInfo"\r
264             }\r
265           }\r
266         }\r
267       },\r
268       "delete": {\r
269         "tags": [\r
270           "ns"\r
271         ],\r
272         "summary": "ns delete",\r
273         "description": "ns delete",\r
274         "operationId": "ns_delete",\r
275         "parameters": [\r
276           {\r
277             "required": true,\r
278             "type": "string",\r
279             "description": "Identifier of the NS instance.",\r
280             "name": "ns_instance_id",\r
281             "in": "path"\r
282           }\r
283         ],\r
284         "responses": {\r
285           "204": {\r
286             "description": "The NS instance resource and the associated NS identifier were deleted successfully."\r
287           }\r
288         }\r
289       }\r
290     },\r
291     "/jobs/{jobId}": {\r
292       "get": {\r
293         "tags": [\r
294           "job"\r
295         ],\r
296         "summary": "jobstatus",\r
297         "description": "",\r
298         "operationId": "get_jobstatus",\r
299         "parameters": [\r
300           {\r
301             "required": true,\r
302             "type": "string",\r
303             "description": "job Id",\r
304             "name": "jobId",\r
305             "in": "path"\r
306           },\r
307           {\r
308             "required": true,\r
309             "type": "string",\r
310             "description": "job response message id",\r
311             "name": "responseId",\r
312             "in": "query"\r
313           }\r
314         ],\r
315         "responses": {\r
316           "202": {\r
317             "description": "",\r
318              "schema": {\r
319               "$ref": "#/definitions/JobDetailInfo"\r
320             }\r
321           }\r
322         }\r
323       }\r
324     }\r
325   },\r
326   "definitions": {\r
327     "NsCreateRequest": {\r
328       "type": "object",\r
329       "properties": {\r
330         "context":{\r
331           "type": "object",\r
332            "properties": {\r
333               "globalCustomerId":{\r
334                  "type": "string",\r
335                  "description": "the global customer id"\r
336               },\r
337               "serviceType":{\r
338                  "type": "string",\r
339                  "description": "service type"\r
340               }\r
341             }\r
342         },\r
343         "csarId": {\r
344           "type": "string",\r
345           "description": "the NS package ID"\r
346         },\r
347         "nsName": {\r
348           "type": "string"\r
349         },\r
350         "description": {\r
351           "type": "string"\r
352         }\r
353       }\r
354     },\r
355     "NsCreateResponse": {\r
356       "type": "object",\r
357       "properties": {\r
358         "nsInstanceId": {\r
359           "type": "string"\r
360         }\r
361       }\r
362     },\r
363     "NsInstantiateRequest": {\r
364       "type": "object",\r
365       "properties": {\r
366         "LocationConstraints": {\r
367           "type": "array",\r
368           "items": {\r
369             "$ref": "#/definitions/LocationConstraint"\r
370           }\r
371         },\r
372         "additionalParamForNs": {\r
373           "type": "string"\r
374         }\r
375       }\r
376     },\r
377     "LocationConstraint": {\r
378       "type": "object",\r
379       "properties": {\r
380         "vnfProfileId": {\r
381           "type": "string"\r
382         },\r
383         "locationConstraints": {\r
384           "type": "object",\r
385           "properties": {\r
386             "vimid": {\r
387               "type": "string"\r
388             }\r
389           }\r
390         }\r
391       }\r
392     },\r
393     "NsScaleRequest": {\r
394       "type": "object",\r
395       "properties": {\r
396         "scaleType": {\r
397           "type": "string"\r
398         },\r
399         "scaleNsByStepsData": {\r
400           "$ref": "#/definitions/NsScaleByStepsData"\r
401         }\r
402       }\r
403     },\r
404     "NsScaleByStepsData": {\r
405       "type": "object",\r
406       "properties": {\r
407         "scalingDirection": {\r
408           "type": "string"\r
409         },\r
410         "aspectId": {\r
411           "type": "string"\r
412         },\r
413         "numberOfSteps": {\r
414           "type": "integer"\r
415         }\r
416       }\r
417     },\r
418     "NsHealRequest": {\r
419       "type": "object",\r
420       "properties": {\r
421         "vnfInstanceId": {\r
422           "type": "string"\r
423         },\r
424         "cause": {\r
425           "type": "string"\r
426         },\r
427         "additionalParams": {\r
428           "type": "object",\r
429           "properties": {\r
430             "action": {\r
431               "type": "string"\r
432             },\r
433             "actionvminfo": {\r
434               "type": "object",\r
435               "properties": {\r
436                 "vmid": {\r
437                   "type": "string"\r
438                 },\r
439                 "vmname": {\r
440                   "type": "string"\r
441                 }\r
442               }\r
443             }\r
444           }\r
445         }\r
446       }\r
447     },\r
448     "NsTerminateRequest": {\r
449       "type": "object",\r
450       "properties": {\r
451         "terminationType": {\r
452           "type": "string"\r
453         },\r
454         "gracefulTerminationTimeout": {\r
455           "type": "string"\r
456         }\r
457       }\r
458     },\r
459     "JobInfo": {\r
460       "type": "object",\r
461       "properties": {\r
462         "jobId": {\r
463           "type": "string"\r
464         }\r
465       }\r
466     },\r
467     "NsInstancesInfo":{\r
468       "type": "array",\r
469       "items": {\r
470             "$ref": "#/definitions/NsInstanceInfo"\r
471       }\r
472     },\r
473     "NsInstanceInfo": {\r
474       "type": "object",\r
475       "properties": {\r
476         "nsInstanceId": {\r
477           "type": "string"\r
478         },\r
479         "nsName": {\r
480           "type": "string"\r
481         },\r
482         "description": {\r
483           "type": "string"\r
484         },\r
485         "nsdId": {\r
486           "type": "string"\r
487         },\r
488         "vnfInfo": {\r
489           "type": "array",\r
490           "items": {\r
491             "$ref": "#/definitions/vnfInfo"\r
492           }\r
493         },\r
494         "vlInfo": {\r
495           "type": "array",\r
496           "items": {\r
497             "$ref": "#/definitions/vlInfo"\r
498           }\r
499         },\r
500         "vnffgInfo": {\r
501           "type": "array",\r
502           "items": {\r
503             "$ref": "#/definitions/vnffgInfo"\r
504           }\r
505         },\r
506         "nsState": {\r
507           "type": "string"\r
508         }\r
509       }\r
510     },\r
511     "vnfInfo": {\r
512       "type": "object",\r
513       "properties": {\r
514         "vnfInstanceId": {\r
515           "type": "string"\r
516         },\r
517         "vnfInstanceName": {\r
518           "type": "string"\r
519         },\r
520         "vnfdId": {\r
521           "type": "string"\r
522         }\r
523       }\r
524     },\r
525     "vlInfo": {\r
526       "type": "object",\r
527       "properties": {\r
528         "vlInstanceId": {\r
529           "type": "string"\r
530         },\r
531         "vlInstanceName": {\r
532           "type": "string"\r
533         },\r
534         "vldId": {\r
535           "type": "string"\r
536         },\r
537         "relatedCpInstanceId": {\r
538           "type": "array",\r
539           "items": {\r
540             "$ref": "#/definitions/cpInfo"\r
541           }\r
542         }\r
543       }\r
544     },\r
545     "cpInfo": {\r
546       "type": "object",\r
547       "properties": {\r
548         "cpInstanceId": {\r
549           "type": "string"\r
550         },\r
551         "cpInstanceName": {\r
552           "type": "string"\r
553         },\r
554         "cpdId": {\r
555           "type": "string"\r
556         }\r
557       }\r
558     },\r
559     "vnffgInfo": {\r
560       "type": "object",\r
561       "properties": {\r
562         "vnffgInstanceId": {\r
563           "type": "string"\r
564         },\r
565         "vnfId": {\r
566           "type": "string"\r
567         },\r
568         "pnfId": {\r
569           "type": "string"\r
570         },\r
571         "virtualLinkId": {\r
572           "type": "string"\r
573         },\r
574         "cpId": {\r
575           "type": "string"\r
576         },\r
577         "nfp": {\r
578           "type": "string"\r
579         }\r
580       }\r
581     },\r
582     "jobResponseInfo": {\r
583        "type": "object",\r
584        "properties": {\r
585           "status": {\r
586             "type": "string"\r
587           },\r
588          "progress":{\r
589             "type": "string"\r
590          },\r
591          "statusDescription": {\r
592             "type": "string"\r
593          },\r
594          "errorCode": {\r
595             "type": "string"\r
596          },\r
597          "responseId": {\r
598             "type": "string"\r
599         }\r
600        }\r
601     },\r
602     "JobDetailInfo":{\r
603       "type": "object",\r
604       "properties": {\r
605             "jobId": {\r
606                "type": "string"\r
607              },\r
608             "responseDescriptor":\r
609             {\r
610                 "type":"object",\r
611                 "properties": {\r
612                     "status": {\r
613                        "type": "string"\r
614                     },\r
615                     "progress":{\r
616                        "type": "string"\r
617                     },\r
618                     "statusDescription": {\r
619                        "type": "string"\r
620                     },\r
621                     "errorCode": {\r
622                        "type": "string"\r
623                     },\r
624                     "responseId": {\r
625                        "type": "string"\r
626                     },\r
627                     "responseHistoryList": {\r
628                         "type": "array",\r
629                         "items": {\r
630                            "$ref": "#/definitions/jobResponseInfo"\r
631                         }\r
632                     }\r
633                 }\r
634            }\r
635       }\r
636     }\r
637   }\r
638 }