Add 404 error in the swagger
[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         "csarId": {\r
331           "type": "string",\r
332           "description": "the NS package ID"\r
333         },\r
334         "nsName": {\r
335           "type": "string"\r
336         },\r
337         "description": {\r
338           "type": "string"\r
339         }\r
340       }\r
341     },\r
342     "NsCreateResponse": {\r
343       "type": "object",\r
344       "properties": {\r
345         "nsInstanceId": {\r
346           "type": "string"\r
347         }\r
348       }\r
349     },\r
350     "NsInstantiateRequest": {\r
351       "type": "object",\r
352       "properties": {\r
353         "LocationConstraints": {\r
354           "type": "array",\r
355           "items": {\r
356             "$ref": "#/definitions/LocationConstraint"\r
357           }\r
358         },\r
359         "additionalParamForNs": {\r
360           "type": "string"\r
361         }\r
362       }\r
363     },\r
364     "LocationConstraint": {\r
365       "type": "object",\r
366       "properties": {\r
367         "vnfProfileId": {\r
368           "type": "string"\r
369         },\r
370         "locationConstraints": {\r
371           "type": "object",\r
372           "properties": {\r
373             "vimid": {\r
374               "type": "string"\r
375             }\r
376           }\r
377         }\r
378       }\r
379     },\r
380     "NsScaleRequest": {\r
381       "type": "object",\r
382       "properties": {\r
383         "scaleType": {\r
384           "type": "string"\r
385         },\r
386         "scaleNsByStepsData": {\r
387           "$ref": "#/definitions/NsScaleByStepsData"\r
388         }\r
389       }\r
390     },\r
391     "NsScaleByStepsData": {\r
392       "type": "object",\r
393       "properties": {\r
394         "scalingDirection": {\r
395           "type": "string"\r
396         },\r
397         "aspectId": {\r
398           "type": "string"\r
399         },\r
400         "numberOfSteps": {\r
401           "type": "integer"\r
402         }\r
403       }\r
404     },\r
405     "NsHealRequest": {\r
406       "type": "object",\r
407       "properties": {\r
408         "vnfInstanceId": {\r
409           "type": "string"\r
410         },\r
411         "cause": {\r
412           "type": "string"\r
413         },\r
414         "additionalParams": {\r
415           "type": "object",\r
416           "properties": {\r
417             "action": {\r
418               "type": "string"\r
419             },\r
420             "actionvminfo": {\r
421               "type": "object",\r
422               "properties": {\r
423                 "vmid": {\r
424                   "type": "string"\r
425                 },\r
426                 "vmname": {\r
427                   "type": "string"\r
428                 }\r
429               }\r
430             }\r
431           }\r
432         }\r
433       }\r
434     },\r
435     "NsTerminateRequest": {\r
436       "type": "object",\r
437       "properties": {\r
438         "terminationType": {\r
439           "type": "string"\r
440         },\r
441         "gracefulTerminationTimeout": {\r
442           "type": "string"\r
443         }\r
444       }\r
445     },\r
446     "JobInfo": {\r
447       "type": "object",\r
448       "properties": {\r
449         "jobId": {\r
450           "type": "string"\r
451         }\r
452       }\r
453     },\r
454     "NsInstancesInfo":{\r
455       "type": "array",\r
456       "items": {\r
457             "$ref": "#/definitions/NsInstanceInfo"\r
458       }\r
459     },\r
460     "NsInstanceInfo": {\r
461       "type": "object",\r
462       "properties": {\r
463         "nsInstanceId": {\r
464           "type": "string"\r
465         },\r
466         "nsName": {\r
467           "type": "string"\r
468         },\r
469         "description": {\r
470           "type": "string"\r
471         },\r
472         "nsdId": {\r
473           "type": "string"\r
474         },\r
475         "vnfInfo": {\r
476           "type": "array",\r
477           "items": {\r
478             "$ref": "#/definitions/vnfInfo"\r
479           }\r
480         },\r
481         "vlInfo": {\r
482           "type": "array",\r
483           "items": {\r
484             "$ref": "#/definitions/vlInfo"\r
485           }\r
486         },\r
487         "vnffgInfo": {\r
488           "type": "array",\r
489           "items": {\r
490             "$ref": "#/definitions/vnffgInfo"\r
491           }\r
492         },\r
493         "nsState": {\r
494           "type": "string"\r
495         }\r
496       }\r
497     },\r
498     "vnfInfo": {\r
499       "type": "object",\r
500       "properties": {\r
501         "vnfInstanceId": {\r
502           "type": "string"\r
503         },\r
504         "vnfInstanceName": {\r
505           "type": "string"\r
506         },\r
507         "vnfdId": {\r
508           "type": "string"\r
509         }\r
510       }\r
511     },\r
512     "vlInfo": {\r
513       "type": "object",\r
514       "properties": {\r
515         "vlInstanceId": {\r
516           "type": "string"\r
517         },\r
518         "vlInstanceName": {\r
519           "type": "string"\r
520         },\r
521         "vldId": {\r
522           "type": "string"\r
523         },\r
524         "relatedCpInstanceId": {\r
525           "type": "array",\r
526           "items": {\r
527             "$ref": "#/definitions/cpInfo"\r
528           }\r
529         }\r
530       }\r
531     },\r
532     "cpInfo": {\r
533       "type": "object",\r
534       "properties": {\r
535         "cpInstanceId": {\r
536           "type": "string"\r
537         },\r
538         "cpInstanceName": {\r
539           "type": "string"\r
540         },\r
541         "cpdId": {\r
542           "type": "string"\r
543         }\r
544       }\r
545     },\r
546     "vnffgInfo": {\r
547       "type": "object",\r
548       "properties": {\r
549         "vnffgInstanceId": {\r
550           "type": "string"\r
551         },\r
552         "vnfId": {\r
553           "type": "string"\r
554         },\r
555         "pnfId": {\r
556           "type": "string"\r
557         },\r
558         "virtualLinkId": {\r
559           "type": "string"\r
560         },\r
561         "cpId": {\r
562           "type": "string"\r
563         },\r
564         "nfp": {\r
565           "type": "string"\r
566         }\r
567       }\r
568     },\r
569     "jobResponseInfo": {\r
570        "type": "object",\r
571        "properties": {\r
572           "status": {\r
573             "type": "string"\r
574           },\r
575          "progress":{\r
576             "type": "string"\r
577          },\r
578          "statusDescription": {\r
579             "type": "string"\r
580          },\r
581          "errorCode": {\r
582             "type": "string"\r
583          },\r
584          "responseId": {\r
585             "type": "string"\r
586         }\r
587        }\r
588     },\r
589     "JobDetailInfo":{\r
590       "type": "object",\r
591       "properties": {\r
592             "jobId": {\r
593                "type": "string"\r
594              },\r
595             "responseDescriptor": \r
596             {\r
597                 "type":"object",\r
598                 "properties": {\r
599                     "status": {\r
600                        "type": "string"\r
601                     },\r
602                     "progress":{\r
603                        "type": "string"\r
604                     },\r
605                     "statusDescription": {\r
606                        "type": "string"\r
607                     },\r
608                     "errorCode": {\r
609                        "type": "string"\r
610                     },\r
611                     "responseId": {\r
612                        "type": "string"\r
613                     },\r
614                     "responseHistoryList": {\r
615                         "type": "array",\r
616                         "items": {\r
617                            "$ref": "#/definitions/jobResponseInfo"\r
618                         }\r
619                     }\r
620                 }\r
621            }\r
622       }\r
623     }\r
624   }\r
625 }