132746225e47a30abc88a11fc946fd8b2bc51635
[modeling/etsicatalog.git] / genericparser / swagger / vfc.catalog.swagger.json
1 {
2   "swagger": "2.0",
3   "info": {
4     "version": "1.0.0",
5     "title": "ONAP VFC Catalog Rest API",
6     "description": "VFC Catalog Management API.",
7     "contact": {
8       "name": "ONAP VFC team",
9       "email": "onap-discuss@lists.onap.org",
10       "url": "https://gerrit.onap.org/r/#/admin/projects/vfc/nfvo/catalog"
11     }
12   },
13   "basePath": "/api/catalog/v1",
14   "schemes": [
15     "http",
16     "https"
17   ],
18   "consumes": [
19     "application/json"
20   ],
21   "produces": [
22     "application/json"
23   ],
24   "paths": {
25     "/nspackages": {
26       "get": {
27         "tags": [
28           "nspackage"
29         ],
30         "summary": "query ns packages info",
31         "description": "query ns packages info",
32         "operationId": "query_ns_packages",
33         "parameters": [],
34         "responses": {
35           "200": {
36             "description": "successful operation",
37             "schema": {
38               "$ref": "#/definitions/NsPkgListInfo"
39             }
40           },
41           "404": {
42             "description": "URL not found"
43           },
44           "500": {
45             "description": "internal error"
46           }
47         }
48       },
49       "post": {
50         "tags": [
51           "nspackage"
52         ],
53         "summary": "ns package distribute",
54         "description": "ns package distribute",
55         "operationId": "ns_pkg_distribute",
56         "parameters": [
57           {
58             "in": "body",
59             "name": "body",
60             "description": "distribute request param",
61             "required": true,
62             "schema": {
63               "$ref": "#/definitions/NsPkgDistributeRequest"
64             }
65           }
66         ],
67         "responses": {
68           "202": {
69             "description": "",
70             "schema": {
71               "$ref": "#/definitions/NsPkgDistributeResponse"
72             }
73           },
74           "404": {
75             "description": "URL not found"
76           },
77           "500": {
78             "description": "internal error"
79           }
80         }
81       }
82     },
83     "/nspackages/{csarId}": {
84       "get": {
85         "tags": [
86           "nspackage"
87         ],
88         "summary": "query ns package info",
89         "description": "query ns package info via ns package csarId",
90         "operationId": "query_ns_package",
91         "consumes": [
92           "application/json"
93         ],
94         "produces": [
95           "application/json"
96         ],
97         "parameters": [
98           {
99             "name": "csarId",
100             "in": "path",
101             "description": "csar id of ns package",
102             "required": true,
103             "type": "string"
104           }
105         ],
106         "responses": {
107           "200": {
108             "description": "successful operation",
109             "schema": {
110               "$ref": "#/definitions/NsPkgDetailInfo"
111             }
112           },
113           "404": {
114             "description": "URL not found"
115           },
116           "500": {
117             "description": "internal error"
118           }
119         }
120       },
121       "delete": {
122         "tags": [
123           "nspackage"
124         ],
125         "summary": "delete ns pkg",
126         "description": "delete ns pkg",
127         "operationId": "delete_ns_pkg",
128         "consumes": [
129           "application/json"
130         ],
131         "produces": [
132           "application/json"
133         ],
134         "parameters": [
135           {
136             "name": "csarId",
137             "in": "path",
138             "description": "csar id of ns package",
139             "required": true,
140             "type": "string"
141           }
142         ],
143         "responses": {
144           "200": {
145             "description": "Delete NS Package Response",
146             "schema": {
147               "$ref": "#/definitions/NsPkgDelResponse"
148             }
149           },
150           "404": {
151             "description": "URL not found"
152           },
153           "500": {
154             "description": "internal error"
155           }
156         }
157       }
158     },
159     "/parsernsd": {
160       "post": {
161         "tags": [
162           "model"
163         ],
164         "summary": "ns package model",
165         "description": "ns package model",
166         "operationId": "ms_model_parser",
167         "consumes": [
168           "application/json"
169         ],
170         "produces": [
171           "application/json"
172         ],
173         "parameters": [
174           {
175             "in": "body",
176             "name": "body",
177             "description": "distribute request param",
178             "required": true,
179             "schema": {
180               "$ref": "#/definitions/modelParserRequest"
181             }
182           }
183         ],
184         "responses": {
185           "202": {
186             "description": "",
187             "schema": {
188               "$ref": "#/definitions/modelParserResponse"
189             }
190           },
191           "404": {
192             "description": "URL not found"
193           },
194           "500": {
195             "description": "internal error"
196           }
197         }
198       }
199      },
200     "/vnfpackages": {
201       "get": {
202         "tags": [
203           "vnfpackage"
204         ],
205         "summary": "query vnf packages info",
206         "description": "query vnf packages info",
207         "operationId": "query_vnf_packages",
208         "consumes": [
209           "application/json"
210         ],
211         "produces": [
212           "application/json"
213         ],
214         "parameters": [],
215         "responses": {
216           "200": {
217             "description": "successful operation",
218             "schema": {
219               "$ref": "#/definitions/VnfPkgListInfo"
220             }
221           },
222           "404": {
223             "description": "URL not found"
224           },
225           "500": {
226             "description": "internal error"
227           }
228         }
229       },
230       "post": {
231         "tags": [
232           "vnfpackage"
233         ],
234         "summary": "vnf package distribute",
235         "description": "vnf package distribute",
236         "operationId": "vnf_pkg_distribute",
237         "consumes": [
238           "application/json"
239         ],
240         "produces": [
241           "application/json"
242         ],
243         "parameters": [
244           {
245             "in": "body",
246             "name": "body",
247             "description": "distribute request param",
248             "required": true,
249             "schema": {
250               "$ref": "#/definitions/VnfPkgDistributeRequest"
251             }
252           }
253         ],
254         "responses": {
255           "202": {
256             "description": "",
257             "schema": {
258               "$ref": "#/definitions/VnfPkgDistributeResponse"
259             }
260           },
261           "404": {
262             "description": "URL not found"
263           },
264           "500": {
265             "description": "internal error"
266           }
267         }
268       }
269     },
270     "/vnfpackages/{csarId}": {
271       "get": {
272         "tags": [
273           "vnfpackage"
274         ],
275         "summary": "query vnf package info",
276         "description": "query one vnf package info via vnf package csarId",
277         "operationId": "query_vnf_package",
278         "consumes": [
279           "application/json"
280         ],
281         "produces": [
282           "application/json"
283         ],
284         "parameters": [
285           {
286             "name": "csarId",
287             "in": "path",
288             "description": "csar id of vnf package",
289             "required": true,
290             "type": "string"
291           }
292         ],
293         "responses": {
294           "200": {
295             "description": "successful operation",
296             "schema": {
297               "$ref": "#/definitions/VnfPkgDetailInfo"
298             }
299           },
300           "404": {
301             "description": "URL not found"
302           },
303           "500": {
304             "description": "internal error"
305           }
306         }
307       },
308       "delete": {
309         "tags": [
310           "vnfpackage"
311         ],
312         "summary": "delete vnf package",
313         "description": "delete vnf package",
314         "operationId": "delete_vnf_package",
315         "consumes": [
316           "application/json"
317         ],
318         "produces": [
319           "application/json"
320         ],
321         "parameters": [
322           {
323             "name": "csarId",
324             "in": "path",
325             "description": "csar id of vnf package",
326             "required": true,
327             "type": "string"
328           }
329         ],
330         "responses": {
331           "202": {
332             "description": "Delete VNF Pakcage Response",
333             "schema": {
334               "$ref": "#/definitions/VnfPkgDelResponse"
335             }
336           },
337           "404": {
338             "description": "URL not found"
339           },
340           "500": {
341             "description": "internal error"
342           }
343         }
344       }
345     },
346     "/parservnfd": {
347       "post": {
348         "tags": [
349           "model"
350         ],
351         "summary": "vnf package model",
352         "description": "vnf package model",
353         "operationId": "vnf_model_parser",
354         "consumes": [
355           "application/json"
356         ],
357         "produces": [
358           "application/json"
359         ],
360         "parameters": [
361           {
362             "in": "body",
363             "name": "body",
364             "description": "distribute request param",
365             "required": true,
366             "schema": {
367               "$ref": "#/definitions/modelParserRequest"
368             }
369           }
370         ],
371         "responses": {
372           "202": {
373             "description": "",
374             "schema": {
375               "$ref": "#/definitions/modelParserResponse"
376             }
377           },
378           "404": {
379             "description": "URL not found"
380           },
381           "500": {
382             "description": "internal error"
383           }
384         }
385       }
386      },
387      "/jobs/{jobId}": {
388        "get": {
389         "tags": [
390           "job"
391         ],
392         "summary": "jobstatus",
393         "description": "Get Job Status",
394         "operationId": "get_jobstatus",
395         "parameters": [
396           {
397             "required": true,
398             "type": "string",
399             "description": "job Id",
400             "name": "jobId",
401             "in": "path"
402           },
403           {
404             "required": true,
405             "type": "string",
406             "description": "job response message id",
407             "name": "responseId",
408             "in": "query"
409           }
410         ],
411         "responses": {
412           "200": {
413             "description": "",
414              "schema": {
415               "$ref": "#/definitions/JobDetailInfo"
416             }
417           }
418         }
419       },
420        "post": {
421         "tags": [
422           "job"
423         ],
424         "summary": "Update Job Status",
425         "description": "Update Job Status",
426         "operationId": "post_jobstatus",
427         "parameters": [
428           {
429             "required": true,
430             "type": "string",
431             "description": "job Id",
432             "name": "jobId",
433             "in": "path"
434           },
435           {
436             "required": true,
437             "schema": {
438               "$ref": "#/definitions/PostJobRequest"
439             },
440             "description": "job status",
441             "name": "responseId",
442             "in": "body"
443           }
444         ],
445         "responses": {
446           "200": {
447             "description": "",
448              "schema": {
449               "$ref": "#/definitions/JobDetailInfo"
450             }
451           }
452         }
453       }
454     }
455   },
456   "definitions": {
457     "NsPkgDistributeRequest": {
458       "type": "object",
459       "properties": {
460         "csarId": {
461           "type": "string",
462           "description": "network service package id, UUID"
463         }
464       }
465     },
466     "NsPkgDistributeResponse": {
467       "type": "object",
468       "properties": {
469         "status": {
470           "type": "string",
471           "description": "Operation status. value is success or failed"
472         },
473         "statusDescription": {
474           "type": "string",
475           "description": "description about the operation result"
476         },
477         "errorCode": {
478           "type": "string",
479           "description": "If the status is failed, the errorcode will be returned"
480         }
481       }
482     },
483     "NsPkgDelResponse": {
484       "type": "object",
485       "properties": {
486         "status": {
487           "type": "string",
488           "description": "Operation status. value is success or failed"
489         },
490         "statusDescription": {
491           "type": "string",
492           "description": "description about the operation result"
493         },
494         "errorCode": {
495           "type": "string",
496           "description": "If the status is failed, the errorcode will be returned"
497         }
498       }
499     },
500     "NsPkgListInfo": {
501       "type": "array",
502       "items": {
503         "$ref": "#/definitions/NsPkgDetailInfo"
504       }
505     },
506     "NsPkgDetailInfo": {
507       "type": "object",
508       "properties": {
509         "csarId": {
510           "type": "string"
511         },
512         "packageInfo": {
513           "$ref": "#/definitions/NsPkgInfo"
514         }
515       }
516     },
517     "NsPkgInfo": {
518       "type": "object",
519       "properties": {
520         "nsPackageId": {
521           "type": "string",
522           "description": "network service package id, UUID, csarId"
523         },
524         "nsdId": {
525           "type": "string",
526           "description": "network service descriptor ID"
527         },
528         "nsdProvider": {
529           "type": "string",
530           "description": "network service designer name"
531         },
532         "nsdVersion": {
533           "type": "string",
534           "description": "network service descriptor version"
535         },
536         "csarName": {
537           "type": "string",
538           "description": "network service package name"
539         },
540         "nsdModel": {
541           "type": "string",
542           "description": "ns JSON string parsed and transformed by parser"
543         },
544         "downloadUrl": {
545           "type": "string",
546           "description": "download url of network service package"
547         }
548       }
549     },
550     "NsInstListInfo": {
551       "type": "array",
552       "items": {
553         "$ref": "#/definitions/NsInstInfo"
554       }
555     },
556     "NsInstInfo": {
557       "type": "object",
558       "properties": {
559         "nsInstanceId": {
560           "type": "string",
561           "description": "network service instance ID"
562         },
563         "nsInstanceName": {
564           "type": "string",
565           "description": "network service instance name"
566         }
567       }
568     },
569     "VnfPkgDistributeRequest": {
570       "type": "object",
571       "properties": {
572         "csarId": {
573           "type": "string",
574           "description": "vnf package id, UUID"
575         }
576       }
577     },
578     "VnfPkgDistributeResponse": {
579       "type": "object",
580       "properties": {
581         "jobId": {
582           "type": "string",
583           "description": "VNF package distribute job ID"
584         }
585       }
586     },
587     "VnfPkgDelResponse": {
588       "type": "object",
589       "properties": {
590         "status": {
591           "type": "string",
592           "description": "Operation status. value is success or failed"
593         },
594         "statusDescription": {
595           "type": "string",
596           "description": "description about the operation result"
597         },
598         "errorCode": {
599           "type": "string",
600           "description": "If the status is failed, the errorcode will be returned"
601         }
602       }
603     },
604     "VnfPkgListInfo": {
605       "type": "array",
606       "items": {
607         "$ref": "#/definitions/VnfPkgDetailInfo"
608       }
609     },
610     "VnfPkgDetailInfo": {
611       "type": "object",
612       "properties": {
613         "csarId": {
614           "type": "string",
615           "description": "vnf package id, UUID"
616         },
617         "packageInfo": {
618           "$ref": "#/definitions/VnfPkgInfo"
619         },
620         "imageInfo": {
621           "$ref": "#/definitions/VnfPkgImgListInfo"
622         }
623       }
624     },
625     "VnfPkgInfo": {
626       "type": "object",
627       "description": "vnf package infomation",
628       "properties": {
629         "vnfPackageId": {
630           "type": "string",
631           "description": "vnf package id (csarId)"
632         },
633         "csarName": {
634           "type": "string",
635           "description": "The name of the csar"
636         },
637         "vnfdId": {
638           "type": "string",
639           "description": "VNF descriptor ID"
640         },
641         "vnfdProvider": {
642           "type": "string",
643           "description": "VNF descriptor vendor ID"
644         },
645         "vnfdModel": {
646           "type": "string",
647           "description": "The model of the VNF (JSON) encoded to string"
648         },
649         "vnfdVersion": {
650           "type": "string",
651           "description": "VNF descriptor version"
652         },
653         "vnfVersion": {
654           "type": "string",
655           "description": "VNF Software version"
656         },
657         "downloadUrl":{
658           "type": "string",
659           "description": "The URL from which the VNF package can be downloaded"
660         }
661       }
662     },
663     "VnfInstListInfo": {
664       "type": "array",
665       "items": {
666         "$ref": "#/definitions/VnfInstInfo"
667       }
668     },
669     "VnfInstInfo": {
670       "type": "object",
671       "properties": {
672         "vnfInstanceId": {
673           "type": "string",
674           "description": "VNF instance ID"
675         },
676         "vnfInstanceName": {
677           "type": "string",
678           "description": "VNF instance name"
679         }
680       }
681     },
682     "VnfPkgImgListInfo": {
683       "type": "array",
684       "items": {
685         "$ref": "#/definitions/VnfPkgImgInfo"
686       }
687     },
688     "VnfPkgImgInfo": {
689       "type": "object",
690       "properties": {
691         "fileName": {
692           "type": "string",
693           "description": "image file name"
694         },
695         "imageUrl": {
696           "type": "string",
697           "description": "image file path in the csar or image url in external repository"
698         }
699       }
700     },
701     "modelParserRequest":{
702       "type": "object",
703       "properties": {
704         "csarId": {
705           "type": "string",
706           "description": "csar Package Id"
707         },
708         "inputs": {
709           "type": "object",
710           "description": "csar package json inputs"
711         }
712       }
713     },
714     "modelParserResponse":{
715       "type": "object",
716       "properties": {
717         "model": {
718           "type": "object",
719           "description": "csar model json data"
720         }
721       }
722     },
723     "jobResponseInfo": {
724        "type": "object",
725        "properties": {
726           "status": {
727             "type": "string"
728           },
729          "progress":{
730             "type": "string"
731          },
732          "statusDescription": {
733             "type": "string"
734          },
735          "errorCode": {
736             "type": "string"
737          },
738          "responseId": {
739             "type": "string"
740         }
741        }
742     },
743     "PostJobRequest": {
744       "type": "object",
745       "properties": {
746         "progress": {
747           "type": "string"
748         },
749         "desc": {
750           "type": "string"
751         },
752         "errcode": {
753           "type": "string"
754         }
755       }
756     },
757     "JobDetailInfo":{
758       "type": "object",
759       "properties": {
760             "jobId": {
761                "type": "string"
762              },
763             "responseDescriptor":
764             {
765                 "type":"object",
766                 "properties": {
767                     "status": {
768                        "type": "string"
769                     },
770                     "progress":{
771                        "type": "string"
772                     },
773                     "statusDescription": {
774                        "type": "string"
775                     },
776                     "errorCode": {
777                        "type": "string"
778                     },
779                     "responseId": {
780                        "type": "string"
781                     },
782                     "responseHistoryList": {
783                         "type": "array",
784                         "items": {
785                            "$ref": "#/definitions/jobResponseInfo"
786                         }
787                     }
788                 }
789            }
790       }
791     }
792   }
793 }