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