Merge "Update sdc env in config.py"
[vfc/nfvo/catalog.git] / catalog / swagger / vfc.catalog.swagger.json
1 {\r
2   "swagger": "2.0",\r
3   "info": {\r
4     "version": "1.0.0",\r
5     "title": "ONAP VFC Catalog Rest API",\r
6     "description": "VFC Catalog Management 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/catalog"\r
11     }\r
12   },\r
13   "basePath": "/api/catalog/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     "/nspackages": {\r
26       "get": {\r
27         "tags": [\r
28           "nspackage"\r
29         ],\r
30         "summary": "query ns packages info",\r
31         "description": "query ns packages info",\r
32         "operationId": "query_ns_packages",\r
33         "parameters": [],\r
34         "responses": {\r
35           "200": {\r
36             "description": "successful operation",\r
37             "schema": {\r
38               "$ref": "#/definitions/NsPkgListInfo"\r
39             }\r
40           },\r
41           "500": {\r
42             "description": "internal error"\r
43           }\r
44         }\r
45       },\r
46       "post": {\r
47         "tags": [\r
48           "nspackage"\r
49         ],\r
50         "summary": "ns package distribute",\r
51         "description": "ns package distribute",\r
52         "operationId": "ns_pkg_distribute",\r
53         "parameters": [\r
54           {\r
55             "in": "body",\r
56             "name": "body",\r
57             "description": "distribute request param",\r
58             "required": true,\r
59             "schema": {\r
60               "$ref": "#/definitions/NsPkgDistributeRequest"\r
61             }\r
62           }\r
63         ],\r
64         "responses": {\r
65           "202": {\r
66             "description": "",\r
67             "schema": {\r
68               "$ref": "#/definitions/NsPkgDistributeResponse"\r
69             }\r
70           },\r
71           "500": {\r
72             "description": "internal error"\r
73           }\r
74         }\r
75       }\r
76     },\r
77     "/nspackages/{csarId}": {\r
78       "get": {\r
79         "tags": [\r
80           "nspackage"\r
81         ],\r
82         "summary": "query ns package info",\r
83         "description": "query ns package info via ns package csarId",\r
84         "operationId": "query_ns_package",\r
85         "consumes": [\r
86           "application/json"\r
87         ],\r
88         "produces": [\r
89           "application/json"\r
90         ],\r
91         "parameters": [\r
92           {\r
93             "name": "csarId",\r
94             "in": "path",\r
95             "description": "csar id of ns package",\r
96             "required": true,\r
97             "type": "string"\r
98           }\r
99         ],\r
100         "responses": {\r
101           "200": {\r
102             "description": "successful operation",\r
103             "schema": {\r
104               "$ref": "#/definitions/NsPkgDetailInfo"\r
105             }\r
106           },\r
107           "500": {\r
108             "description": "internal error"\r
109           }\r
110         }\r
111       },\r
112       "delete": {\r
113         "tags": [\r
114           "nspackage"\r
115         ],\r
116         "summary": "delete ns pkg",\r
117         "description": "delete ns pkg",\r
118         "operationId": "delete_ns_pkg",\r
119         "consumes": [\r
120           "application/json"\r
121         ],\r
122         "produces": [\r
123           "application/json"\r
124         ],\r
125         "parameters": [\r
126           {\r
127             "name": "csarId",\r
128             "in": "path",\r
129             "description": "csar id of ns package",\r
130             "required": true,\r
131             "type": "string"\r
132           }\r
133         ],\r
134         "responses": {\r
135           "202": {\r
136             "description": "",\r
137             "schema": {\r
138               "$ref": "#/definitions/NsPkgDelResponse"\r
139             }\r
140           },\r
141           "500": {\r
142             "description": "internal error"\r
143           }\r
144         }\r
145       }\r
146     },\r
147     "/parsernsd": {\r
148       "post": {\r
149         "tags": [\r
150           "model"\r
151         ],\r
152         "summary": "ns package model",\r
153         "description": "ns package model",\r
154         "operationId": "ms_model_parser",\r
155         "consumes": [\r
156           "application/json"\r
157         ],\r
158         "produces": [\r
159           "application/json"\r
160         ],\r
161         "parameters": [\r
162           {\r
163             "in": "body",\r
164             "name": "body",\r
165             "description": "distribute request param",\r
166             "required": true,\r
167             "schema": {\r
168               "$ref": "#/definitions/modelParserRequest"\r
169             }\r
170           }\r
171         ],\r
172         "responses": {\r
173           "202": {\r
174             "description": "",\r
175             "schema": {\r
176               "$ref": "#/definitions/modelParserResponse"\r
177             }\r
178           },\r
179           "500": {\r
180             "description": "internal error"\r
181           }\r
182         }\r
183       }\r
184      },\r
185     "/vnfpackages": {\r
186       "get": {\r
187         "tags": [\r
188           "vnfpackage"\r
189         ],\r
190         "summary": "query vnf packages info",\r
191         "description": "query vnf packages info",\r
192         "operationId": "query_vnf_packages",\r
193         "consumes": [\r
194           "application/json"\r
195         ],\r
196         "produces": [\r
197           "application/json"\r
198         ],\r
199         "parameters": [],\r
200         "responses": {\r
201           "200": {\r
202             "description": "successful operation",\r
203             "schema": {\r
204               "$ref": "#/definitions/VnfPkgListInfo"\r
205             }\r
206           },\r
207           "500": {\r
208             "description": "internal error"\r
209           }\r
210         }\r
211       },\r
212       "post": {\r
213         "tags": [\r
214           "vnfpackage"\r
215         ],\r
216         "summary": "vnf package distribute",\r
217         "description": "vnf package distribute",\r
218         "operationId": "vnf_pkg_distribute",\r
219         "consumes": [\r
220           "application/json"\r
221         ],\r
222         "produces": [\r
223           "application/json"\r
224         ],\r
225         "parameters": [\r
226           {\r
227             "in": "body",\r
228             "name": "body",\r
229             "description": "distribute request param",\r
230             "required": true,\r
231             "schema": {\r
232               "$ref": "#/definitions/VnfPkgDistributeRequest"\r
233             }\r
234           }\r
235         ],\r
236         "responses": {\r
237           "202": {\r
238             "description": "",\r
239             "schema": {\r
240               "$ref": "#/definitions/VnfPkgDistributeResponse"\r
241             }\r
242           },\r
243           "500": {\r
244             "description": "internal error"\r
245           }\r
246         }\r
247       }\r
248     },\r
249     "/vnfpackages/{csarId}": {\r
250       "get": {\r
251         "tags": [\r
252           "vnfpackage"\r
253         ],\r
254         "summary": "query vnf package info",\r
255         "description": "query one vnf package info via vnf package csarId",\r
256         "operationId": "query_vnf_package",\r
257         "consumes": [\r
258           "application/json"\r
259         ],\r
260         "produces": [\r
261           "application/json"\r
262         ],\r
263         "parameters": [\r
264           {\r
265             "name": "csarId",\r
266             "in": "path",\r
267             "description": "csar id of vnf package",\r
268             "required": true,\r
269             "type": "string"\r
270           }\r
271         ],\r
272         "responses": {\r
273           "200": {\r
274             "description": "successful operation",\r
275             "schema": {\r
276               "$ref": "#/definitions/VnfPkgDetailInfo"\r
277             }\r
278           },\r
279           "500": {\r
280             "description": "internal error"\r
281           }\r
282         }\r
283       },\r
284       "delete": {\r
285         "tags": [\r
286           "vnfpackage"\r
287         ],\r
288         "summary": "delete vnf package",\r
289         "description": "delete vnf package",\r
290         "operationId": "delete_vnf_package",\r
291         "consumes": [\r
292           "application/json"\r
293         ],\r
294         "produces": [\r
295           "application/json"\r
296         ],\r
297         "parameters": [\r
298           {\r
299             "name": "csarId",\r
300             "in": "path",\r
301             "description": "csar id of vnf package",\r
302             "required": true,\r
303             "type": "string"\r
304           }\r
305         ],\r
306         "responses": {\r
307           "202": {\r
308             "description": "",\r
309             "schema": {\r
310               "$ref": "#/definitions/VnfPkgDelResponse"\r
311             }\r
312           },\r
313           "500": {\r
314             "description": "internal error"\r
315           }\r
316         }\r
317       }\r
318     },\r
319     "/parservnfd": {\r
320       "post": {\r
321         "tags": [\r
322           "model"\r
323         ],\r
324         "summary": "vnf package model",\r
325         "description": "vnf package model",\r
326         "operationId": "vnf_model_parser",\r
327         "consumes": [\r
328           "application/json"\r
329         ],\r
330         "produces": [\r
331           "application/json"\r
332         ],\r
333         "parameters": [\r
334           {\r
335             "in": "body",\r
336             "name": "body",\r
337             "description": "distribute request param",\r
338             "required": true,\r
339             "schema": {\r
340               "$ref": "#/definitions/modelParserRequest"\r
341             }\r
342           }\r
343         ],\r
344         "responses": {\r
345           "202": {\r
346             "description": "",\r
347             "schema": {\r
348               "$ref": "#/definitions/modelParserResponse"\r
349             }\r
350           },\r
351           "500": {\r
352             "description": "internal error"\r
353           }\r
354         }\r
355       }\r
356      }\r
357   },\r
358   "definitions": {\r
359     "NsPkgDistributeRequest": {\r
360       "type": "object",\r
361       "properties": {\r
362         "csarId": {\r
363           "type": "string",\r
364           "description": "network service package id, UUID"\r
365         }\r
366       }\r
367     },\r
368     "NsPkgDistributeResponse": {\r
369       "type": "object",\r
370       "properties": {\r
371         "status": {\r
372           "type": "string",\r
373           "description": "Operation status. value is success or failed"\r
374         },\r
375         "statusDescription": {\r
376           "type": "string",\r
377           "description": "description about the operation result"\r
378         },\r
379         "errorCode": {\r
380           "type": "string",\r
381           "description": "If the status is failed, the errorcode will be returned"\r
382         }\r
383       }\r
384     },\r
385     "NsPkgDelResponse": {\r
386       "type": "object",\r
387       "properties": {\r
388         "status": {\r
389           "type": "string",\r
390           "description": "Operation status. value is success or failed"\r
391         },\r
392         "statusDescription": {\r
393           "type": "string",\r
394           "description": "description about the operation result"\r
395         },\r
396         "errorCode": {\r
397           "type": "string",\r
398           "description": "If the status is failed, the errorcode will be returned"\r
399         }\r
400       }\r
401     },\r
402     "NsPkgListInfo": {\r
403       "type": "array",\r
404       "items": {\r
405         "$ref": "#/definitions/NsPkgInfo"\r
406       }\r
407     },\r
408     "NsPkgDetailInfo": {\r
409       "type": "object",\r
410       "properties": {\r
411         "csarId": {\r
412           "type": "string"\r
413         },\r
414         "NsPackageInfo": {\r
415           "$ref": "#/definitions/NsPkgInfo"\r
416         },\r
417         "NsInstanceInfo": {\r
418           "$ref": "#/definitions/NsInstListInfo"\r
419         }\r
420       }\r
421     },\r
422     "NsPkgInfo": {\r
423       "type": "object",\r
424       "properties": {\r
425         "csarId": {\r
426           "type": "string",\r
427           "description": "network service package id, UUID"\r
428         },\r
429         "nsdId": {\r
430           "type": "string",\r
431           "description": "network service descriptor ID"\r
432         },\r
433         "nsdProvider": {\r
434           "type": "string",\r
435           "description": "network service designer name"\r
436         },\r
437         "nsdVersion": {\r
438           "type": "string",\r
439           "description": "network service descriptor version"\r
440         }\r
441       }\r
442     },\r
443     "NsInstListInfo": {\r
444       "type": "array",\r
445       "items": {\r
446         "$ref": "#/definitions/NsInstInfo"\r
447       }\r
448     },\r
449     "NsInstInfo": {\r
450       "type": "object",\r
451       "properties": {\r
452         "nsInstanceId": {\r
453           "type": "string",\r
454           "description": "network service instance ID"\r
455         },\r
456         "nsInstanceName": {\r
457           "type": "string",\r
458           "description": "network service instance name"\r
459         }\r
460       }\r
461     },\r
462     "VnfPkgDistributeRequest": {\r
463       "type": "object",\r
464       "properties": {\r
465         "csarId": {\r
466           "type": "string",\r
467           "description": "vnf package id, UUID"\r
468         }\r
469       }\r
470     },\r
471     "VnfPkgDistributeResponse": {\r
472       "type": "object",\r
473       "properties": {\r
474         "jobId": {\r
475           "type": "string",\r
476           "description": "VNF package distribute job ID"\r
477         }\r
478       }\r
479     },\r
480     "VnfPkgDelResponse": {\r
481       "type": "object",\r
482       "properties": {\r
483         "status": {\r
484           "type": "string",\r
485           "description": "Operation status. value is success or failed"\r
486         },\r
487         "statusDescription": {\r
488           "type": "string",\r
489           "description": "description about the operation result"\r
490         },\r
491         "errorCode": {\r
492           "type": "string",\r
493           "description": "If the status is failed, the errorcode will be returned"\r
494         }\r
495       }\r
496     },\r
497     "VnfPkgListInfo": {\r
498       "type": "array",\r
499       "items": {\r
500         "$ref": "#/definitions/VnfPkgInfo"\r
501       }\r
502     },\r
503     "VnfPkgDetailInfo": {\r
504       "type": "object",\r
505       "properties": {\r
506         "csarId": {\r
507           "type": "string",\r
508           "description": "vnf package id, UUID"\r
509         },\r
510         "packageInfo": {\r
511           "$ref": "#/definitions/VnfPkgInfo"\r
512         },\r
513         "imageInfo": {\r
514           "$ref": "#/definitions/VnfPkgImgListInfo"\r
515         },\r
516         "vnfInstanceInfo": {\r
517           "$ref": "#/definitions/VnfInstListInfo"\r
518         }\r
519       }\r
520     },\r
521     "VnfPkgInfo": {\r
522       "type": "object",\r
523       "description": "vnf package infomation",\r
524       "properties": {\r
525         "csarId": {\r
526           "type": "string",\r
527           "description": "vnf package id, UUID"\r
528         },\r
529         "vnfdId": {\r
530           "type": "string",\r
531           "description": "VNF descriptor ID"\r
532         },\r
533         "vnfdProvider": {\r
534           "type": "string",\r
535           "description": "VNF descriptor vendor ID"\r
536         },\r
537         "vnfdVersion": {\r
538           "type": "string",\r
539           "description": "VNF descriptor version"\r
540         },\r
541         "vnfVersion": {\r
542           "type": "string",\r
543           "description": "VNF Software version"\r
544         },\r
545         "downloadUri":{\r
546           "type": "string",\r
547           "description": "The download uri of VNF package"\r
548         }\r
549       }\r
550     },\r
551     "VnfInstListInfo": {\r
552       "type": "array",\r
553       "items": {\r
554         "$ref": "#/definitions/VnfInstInfo"\r
555       }\r
556     },\r
557     "VnfInstInfo": {\r
558       "type": "object",\r
559       "properties": {\r
560         "vnfInstanceId": {\r
561           "type": "string",\r
562           "description": "VNF instance ID"\r
563         },\r
564         "vnfInstanceName": {\r
565           "type": "string",\r
566           "description": "VNF instance name"\r
567         }\r
568       }\r
569     },\r
570     "VnfPkgImgListInfo": {\r
571       "type": "array",\r
572       "items": {\r
573         "$ref": "#/definitions/VnfPkgImgInfo"\r
574       }\r
575     },\r
576     "VnfPkgImgInfo": {\r
577       "type": "object",\r
578       "properties": {\r
579         "fileName": {\r
580           "type": "string",\r
581           "description": "image file name"\r
582         },\r
583         "imageUrl": {\r
584           "type": "string",\r
585           "description": "image file path in the csar or image url in external repository"\r
586         }\r
587       }\r
588     },\r
589     "modelParserRequest":{\r
590       "type": "object",\r
591       "properties": {\r
592         "csarId": {\r
593           "type": "string",\r
594           "description": "csar Package Id"\r
595         },\r
596         "inputs": {\r
597           "type": "object",\r
598           "description": "csar package json inputs"\r
599         }\r
600       }\r
601     },\r
602     "modelParserResponse":{\r
603       "type": "object",\r
604       "properties": {\r
605         "model": {\r
606           "type": "object",\r
607           "description": "csar model json data"\r
608         }\r
609       }\r
610     }\r
611 \r
612   }\r
613 }