Optimize docker file of VFC-catalog
[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     "/vnfpackages": {\r
148       "get": {\r
149         "tags": [\r
150           "vnfpackage"\r
151         ],\r
152         "summary": "query vnf packages info",\r
153         "description": "query vnf packages info",\r
154         "operationId": "query_vnf_packages",\r
155         "consumes": [\r
156           "application/json"\r
157         ],\r
158         "produces": [\r
159           "application/json"\r
160         ],\r
161         "parameters": [],\r
162         "responses": {\r
163           "200": {\r
164             "description": "successful operation",\r
165             "schema": {\r
166               "$ref": "#/definitions/VnfPkgListInfo"\r
167             }\r
168           },\r
169           "500": {\r
170             "description": "internal error"\r
171           }\r
172         }\r
173       },\r
174       "post": {\r
175         "tags": [\r
176           "vnfpackage"\r
177         ],\r
178         "summary": "vnf package distribute",\r
179         "description": "vnf package distribute",\r
180         "operationId": "vnf_pkg_distribute",\r
181         "consumes": [\r
182           "application/json"\r
183         ],\r
184         "produces": [\r
185           "application/json"\r
186         ],\r
187         "parameters": [\r
188           {\r
189             "in": "body",\r
190             "name": "body",\r
191             "description": "distribute request param",\r
192             "required": true,\r
193             "schema": {\r
194               "$ref": "#/definitions/VnfPkgDistributeRequest"\r
195             }\r
196           }\r
197         ],\r
198         "responses": {\r
199           "202": {\r
200             "description": "",\r
201             "schema": {\r
202               "$ref": "#/definitions/VnfPkgDistributeResponse"\r
203             }\r
204           },\r
205           "500": {\r
206             "description": "internal error"\r
207           }\r
208         }\r
209       }\r
210     },\r
211     "/vnfpackages/{csarId}": {\r
212       "get": {\r
213         "tags": [\r
214           "vnfpackage"\r
215         ],\r
216         "summary": "query vnf package info",\r
217         "description": "query one vnf package info via vnf package csarId",\r
218         "operationId": "query_vnf_package",\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             "name": "csarId",\r
228             "in": "path",\r
229             "description": "csar id of vnf package",\r
230             "required": true,\r
231             "type": "string"\r
232           }\r
233         ],\r
234         "responses": {\r
235           "200": {\r
236             "description": "successful operation",\r
237             "schema": {\r
238               "$ref": "#/definitions/VnfPkgDetailInfo"\r
239             }\r
240           },\r
241           "500": {\r
242             "description": "internal error"\r
243           }\r
244         }\r
245       },\r
246       "delete": {\r
247         "tags": [\r
248           "vnfpackage"\r
249         ],\r
250         "summary": "delete vnf package",\r
251         "description": "delete vnf package",\r
252         "operationId": "delete_vnf_package",\r
253         "consumes": [\r
254           "application/json"\r
255         ],\r
256         "produces": [\r
257           "application/json"\r
258         ],\r
259         "parameters": [\r
260           {\r
261             "name": "csarId",\r
262             "in": "path",\r
263             "description": "csar id of vnf package",\r
264             "required": true,\r
265             "type": "string"\r
266           }\r
267         ],\r
268         "responses": {\r
269           "202": {\r
270             "description": "",\r
271             "schema": {\r
272               "$ref": "#/definitions/VnfPkgDelResponse"\r
273             }\r
274           },\r
275           "500": {\r
276             "description": "internal error"\r
277           }\r
278         }\r
279       }\r
280     }\r
281   },\r
282   "definitions": {\r
283     "NsPkgDistributeRequest": {\r
284       "type": "object",\r
285       "properties": {\r
286         "csarId": {\r
287           "type": "string",\r
288           "description": "network service package id, UUID"\r
289         }\r
290       }\r
291     },\r
292     "NsPkgDistributeResponse": {\r
293       "type": "object",\r
294       "properties": {\r
295         "status": {\r
296           "type": "string",\r
297           "description": "Operation status. value is success or failed"\r
298         },\r
299         "statusDescription": {\r
300           "type": "string",\r
301           "description": "description about the operation result"\r
302         },\r
303         "errorCode": {\r
304           "type": "string",\r
305           "description": "If the status is failed, the errorcode will be returned"\r
306         }\r
307       }\r
308     },\r
309     "NsPkgDelResponse": {\r
310       "type": "object",\r
311       "properties": {\r
312         "status": {\r
313           "type": "string",\r
314           "description": "Operation status. value is success or failed"\r
315         },\r
316         "statusDescription": {\r
317           "type": "string",\r
318           "description": "description about the operation result"\r
319         },\r
320         "errorCode": {\r
321           "type": "string",\r
322           "description": "If the status is failed, the errorcode will be returned"\r
323         }\r
324       }\r
325     },\r
326     "NsPkgListInfo": {\r
327       "type": "array",\r
328       "items": {\r
329         "$ref": "#/definitions/NsPkgInfo"\r
330       }\r
331     },\r
332     "NsPkgDetailInfo": {\r
333       "type": "object",\r
334       "properties": {\r
335         "csarId": {\r
336           "type": "string"\r
337         },\r
338         "NsPackageInfo": {\r
339           "$ref": "#/definitions/NsPkgInfo"\r
340         },\r
341         "NsInstanceInfo": {\r
342           "$ref": "#/definitions/NsInstListInfo"\r
343         }\r
344       }\r
345     },\r
346     "NsPkgInfo": {\r
347       "type": "object",\r
348       "properties": {\r
349         "csarId": {\r
350           "type": "string",\r
351           "description": "network service package id, UUID"\r
352         },\r
353         "nsdId": {\r
354           "type": "string",\r
355           "description": "network service descriptor ID"\r
356         },\r
357         "nsdProvider": {\r
358           "type": "string",\r
359           "description": "network service designer name"\r
360         },\r
361         "nsdVersion": {\r
362           "type": "string",\r
363           "description": "network service descriptor version"\r
364         }\r
365       }\r
366     },\r
367     "NsInstListInfo": {\r
368       "type": "array",\r
369       "items": {\r
370         "$ref": "#/definitions/NsInstInfo"\r
371       }\r
372     },\r
373     "NsInstInfo": {\r
374       "type": "object",\r
375       "properties": {\r
376         "nsInstanceId": {\r
377           "type": "string",\r
378           "description": "network service instance ID"\r
379         },\r
380         "nsInstanceName": {\r
381           "type": "string",\r
382           "description": "network service instance name"\r
383         }\r
384       }\r
385     },\r
386     "VnfPkgDistributeRequest": {\r
387       "type": "object",\r
388       "properties": {\r
389         "csarId": {\r
390           "type": "string",\r
391           "description": "vnf package id, UUID"\r
392         }\r
393       }\r
394     },\r
395     "VnfPkgDistributeResponse": {\r
396       "type": "object",\r
397       "properties": {\r
398         "jobId": {\r
399           "type": "string",\r
400           "description": "VNF package distribute job ID"\r
401         }\r
402       }\r
403     },\r
404     "VnfPkgDelResponse": {\r
405       "type": "object",\r
406       "properties": {\r
407         "status": {\r
408           "type": "string",\r
409           "description": "Operation status. value is success or failed"\r
410         },\r
411         "statusDescription": {\r
412           "type": "string",\r
413           "description": "description about the operation result"\r
414         },\r
415         "errorCode": {\r
416           "type": "string",\r
417           "description": "If the status is failed, the errorcode will be returned"\r
418         }\r
419       }\r
420     },\r
421     "VnfPkgListInfo": {\r
422       "type": "array",\r
423       "items": {\r
424         "$ref": "#/definitions/VnfPkgInfo"\r
425       }\r
426     },\r
427     "VnfPkgDetailInfo": {\r
428       "type": "object",\r
429       "properties": {\r
430         "csarId": {\r
431           "type": "string",\r
432           "description": "vnf package id, UUID"\r
433         },\r
434         "packageInfo": {\r
435           "$ref": "#/definitions/VnfPkgInfo"\r
436         },\r
437         "imageInfo": {\r
438           "$ref": "#/definitions/VnfPkgImgListInfo"\r
439         },\r
440         "vnfInstanceInfo": {\r
441           "$ref": "#/definitions/VnfInstListInfo"\r
442         }\r
443       }\r
444     },\r
445     "VnfPkgInfo": {\r
446       "type": "object",\r
447       "description": "vnf package infomation",\r
448       "properties": {\r
449         "csarId": {\r
450           "type": "string",\r
451           "description": "vnf package id, UUID"\r
452         },\r
453         "vnfdId": {\r
454           "type": "string",\r
455           "description": "VNF descriptor ID"\r
456         },\r
457         "vnfdProvider": {\r
458           "type": "string",\r
459           "description": "VNF descriptor vendor ID"\r
460         },\r
461         "vnfdVersion": {\r
462           "type": "string",\r
463           "description": "VNF descriptor version"\r
464         },\r
465         "vnfVersion": {\r
466           "type": "string",\r
467           "description": "VNF Software version"\r
468         }\r
469       }\r
470     },\r
471     "VnfInstListInfo": {\r
472       "type": "array",\r
473       "items": {\r
474         "$ref": "#/definitions/VnfInstInfo"\r
475       }\r
476     },\r
477     "VnfInstInfo": {\r
478       "type": "object",\r
479       "properties": {\r
480         "vnfInstanceId": {\r
481           "type": "string",\r
482           "description": "VNF instance ID"\r
483         },\r
484         "vnfInstanceName": {\r
485           "type": "string",\r
486           "description": "VNF instance name"\r
487         }\r
488       }\r
489     },\r
490     "VnfPkgImgListInfo": {\r
491       "type": "array",\r
492       "items": {\r
493         "$ref": "#/definitions/VnfPkgImgInfo"\r
494       }\r
495     },\r
496     "VnfPkgImgInfo": {\r
497       "type": "object",\r
498       "properties": {\r
499         "fileName": {\r
500           "type": "string",\r
501           "description": "image file name"\r
502         },\r
503         "imageUrl": {\r
504           "type": "string",\r
505           "description": "image file path in the csar or image url in external repository"\r
506         }\r
507       }\r
508     }\r
509   }\r
510 }