update link to upper-constraints.txt
[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": "string"\r
382         }\r
383       }\r
384     },\r
385     "LocationConstraint": {\r
386       "type": "object",\r
387       "properties": {\r
388         "vnfProfileId": {\r
389           "type": "string"\r
390         },\r
391         "locationConstraints": {\r
392           "type": "object",\r
393           "properties": {\r
394             "vimid": {\r
395               "type": "string"\r
396             }\r
397           }\r
398         }\r
399       }\r
400     },\r
401     "NsScaleRequest": {\r
402       "type": "object",\r
403       "properties": {\r
404         "scaleType": {\r
405           "type": "string"\r
406         },\r
407         "scaleNsByStepsData": {\r
408           "$ref": "#/definitions/NsScaleByStepsData"\r
409         }\r
410       }\r
411     },\r
412     "NsScaleByStepsData": {\r
413       "type": "object",\r
414       "properties": {\r
415         "scalingDirection": {\r
416           "type": "string"\r
417         },\r
418         "aspectId": {\r
419           "type": "string"\r
420         },\r
421         "numberOfSteps": {\r
422           "type": "integer"\r
423         }\r
424       }\r
425     },\r
426     "NsHealRequest": {\r
427       "type": "object",\r
428       "properties": {\r
429         "vnfInstanceId": {\r
430           "type": "string"\r
431         },\r
432         "cause": {\r
433           "type": "string"\r
434         },\r
435         "additionalParams": {\r
436           "type": "object",\r
437           "properties": {\r
438             "action": {\r
439               "type": "string"\r
440             },\r
441             "actionvminfo": {\r
442               "type": "object",\r
443               "properties": {\r
444                 "vmid": {\r
445                   "type": "string"\r
446                 },\r
447                 "vmname": {\r
448                   "type": "string"\r
449                 }\r
450               }\r
451             }\r
452           }\r
453         }\r
454       }\r
455     },\r
456     "NsTerminateRequest": {\r
457       "type": "object",\r
458       "properties": {\r
459         "terminationType": {\r
460           "type": "string"\r
461         },\r
462         "gracefulTerminationTimeout": {\r
463           "type": "string"\r
464         }\r
465       }\r
466     },\r
467     "JobInfo": {\r
468       "type": "object",\r
469       "properties": {\r
470         "jobId": {\r
471           "type": "string"\r
472         }\r
473       }\r
474     },\r
475     "NsInstancesInfo":{\r
476       "type": "array",\r
477       "items": {\r
478             "$ref": "#/definitions/NsInstanceInfo"\r
479       }\r
480     },\r
481     "NsInstanceInfo": {\r
482       "type": "object",\r
483       "properties": {\r
484         "nsInstanceId": {\r
485           "type": "string"\r
486         },\r
487         "nsName": {\r
488           "type": "string"\r
489         },\r
490         "description": {\r
491           "type": "string"\r
492         },\r
493         "nsdId": {\r
494           "type": "string"\r
495         },\r
496         "vnfInfo": {\r
497           "type": "array",\r
498           "items": {\r
499             "$ref": "#/definitions/vnfInfo"\r
500           }\r
501         },\r
502         "vlInfo": {\r
503           "type": "array",\r
504           "items": {\r
505             "$ref": "#/definitions/vlInfo"\r
506           }\r
507         },\r
508         "vnffgInfo": {\r
509           "type": "array",\r
510           "items": {\r
511             "$ref": "#/definitions/vnffgInfo"\r
512           }\r
513         },\r
514         "nsState": {\r
515           "type": "string"\r
516         }\r
517       }\r
518     },\r
519     "vnfInfo": {\r
520       "type": "object",\r
521       "properties": {\r
522         "vnfInstanceId": {\r
523           "type": "string"\r
524         },\r
525         "vnfInstanceName": {\r
526           "type": "string"\r
527         },\r
528         "vnfdId": {\r
529           "type": "string"\r
530         }\r
531       }\r
532     },\r
533     "vlInfo": {\r
534       "type": "object",\r
535       "properties": {\r
536         "vlInstanceId": {\r
537           "type": "string"\r
538         },\r
539         "vlInstanceName": {\r
540           "type": "string"\r
541         },\r
542         "vldId": {\r
543           "type": "string"\r
544         },\r
545         "relatedCpInstanceId": {\r
546           "type": "array",\r
547           "items": {\r
548             "$ref": "#/definitions/cpInfo"\r
549           }\r
550         }\r
551       }\r
552     },\r
553     "cpInfo": {\r
554       "type": "object",\r
555       "properties": {\r
556         "cpInstanceId": {\r
557           "type": "string"\r
558         },\r
559         "cpInstanceName": {\r
560           "type": "string"\r
561         },\r
562         "cpdId": {\r
563           "type": "string"\r
564         }\r
565       }\r
566     },\r
567     "vnffgInfo": {\r
568       "type": "object",\r
569       "properties": {\r
570         "vnffgInstanceId": {\r
571           "type": "string"\r
572         },\r
573         "vnfId": {\r
574           "type": "string"\r
575         },\r
576         "pnfId": {\r
577           "type": "string"\r
578         },\r
579         "virtualLinkId": {\r
580           "type": "string"\r
581         },\r
582         "cpId": {\r
583           "type": "string"\r
584         },\r
585         "nfp": {\r
586           "type": "string"\r
587         }\r
588       }\r
589     },\r
590     "jobResponseInfo": {\r
591        "type": "object",\r
592        "properties": {\r
593           "status": {\r
594             "type": "string"\r
595           },\r
596          "progress":{\r
597             "type": "string"\r
598          },\r
599          "statusDescription": {\r
600             "type": "string"\r
601          },\r
602          "errorCode": {\r
603             "type": "string"\r
604          },\r
605          "responseId": {\r
606             "type": "string"\r
607         }\r
608        }\r
609     },\r
610     "JobDetailInfo":{\r
611       "type": "object",\r
612       "properties": {\r
613             "jobId": {\r
614                "type": "string"\r
615              },\r
616             "responseDescriptor":\r
617             {\r
618                 "type":"object",\r
619                 "properties": {\r
620                     "status": {\r
621                        "type": "string"\r
622                     },\r
623                     "progress":{\r
624                        "type": "string"\r
625                     },\r
626                     "statusDescription": {\r
627                        "type": "string"\r
628                     },\r
629                     "errorCode": {\r
630                        "type": "string"\r
631                     },\r
632                     "responseId": {\r
633                        "type": "string"\r
634                     },\r
635                     "responseHistoryList": {\r
636                         "type": "array",\r
637                         "items": {\r
638                            "$ref": "#/definitions/jobResponseInfo"\r
639                         }\r
640                     }\r
641                 }\r
642            }\r
643       }\r
644     }\r
645   }\r
646 }