Remove unused mongo db methods from emco code
[multicloud/k8s.git] / docs / swagger.yaml
1 # Copyright 2018 Intel Corporation.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at
5 #     http://www.apache.org/licenses/LICENSE-2.0
6 # Unless required by applicable law or agreed to in writing, software
7 # distributed under the License is distributed on an "AS IS" BASIS,
8 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9 # See the License for the specific language governing permissions and
10 # limitations under the License.
11
12 swagger: "2.0"
13 info:
14   description: "API reference for MultiCloud Kubernetes Plugin."
15   version: "1.0.0"
16   title: "API reference for MultiCloud Kubernetes Plugin."
17   contact:
18     url: "https://wiki.onap.org/display/DW/Support+for+K8S+%28Kubernetes%29+based+Cloud+regions"
19   license:
20     name: "Apache 2.0"
21     url: "http://www.apache.org/licenses/LICENSE-2.0.html"
22 basePath: "/v1.0"
23 schemes:
24 - "http"
25 paths:
26   /vnf_instances:
27     post:
28       tags:
29       - "Deployment of VNF Containers"
30       summary: "Create Kubernetes based VNFs."
31       description: "Endpoint to create Kubernetes based VNFs."
32       consumes:
33       - "application/json"
34       produces:
35       - "application/json"
36       parameters:
37       - in: "body"
38         name: "body"
39         description: "Create new VNF containers"
40         required: true
41         schema:
42           $ref: "#/definitions/POSTRequest"
43       responses:
44         200:
45           description: "successful operation"
46           schema:
47             $ref: "#/definitions/POSTResponse"
48   /vnf_instances/:
49     get:
50       tags:
51       - "Deployment of VNF Containers"
52       summary: "List all Kubernetes based VNFs."
53       description: "Endpoint to list all Kubernetes based VNF."
54       produces:
55       - "application/json"
56       responses:
57         200:
58           description: "successful operation"
59           schema:
60             $ref: "#/definitions/GETSResponse"
61   /vnf_instances/{name}:
62     get:
63       tags:
64       - "Deployment of VNF Containers"
65       summary: "Get details of a Kubernetes based VNFs."
66       description: "Endpoint to get details of a Kubernetes based VNFs."
67       produces:
68       - "application/json"
69       parameters:
70       - name: "name"
71         in: "path"
72         description: "Name used to query"
73         required: true
74         type: "string"
75       responses:
76         200:
77           description: "successful operation"
78           schema:
79             $ref: "#/definitions/GETResponse"
80     patch:
81       tags:
82       - "Deployment of VNF Containers"
83       summary: "Update a Kubernetes based VNFs."
84       description: "Endp to update a Kubernetes based VNFs."
85       produces:
86         - "application/json"
87       parameters:
88         - name: "name"
89           in: "path"
90           description: "Name used to patch"
91           required: true
92           type: "string"
93         - name: "body"
94           in: "body"
95           description: "Patch an existing Kubernetes based VNFs."
96           required: true
97           schema:
98             $ref: "#/definitions/PATCHRequest"
99       responses:
100         200:
101           description: "successful operation"
102           schema:
103             $ref: "#/definitions/PATCHResponse"
104     delete:
105       tags:
106         - "Deployment of VNF Containers"
107       summary: "Delete a Kubernetes based VNFs."
108       description: "Endpoint to delete a Kubernetes based VNFs."
109       produces:
110         - "application/json"
111       parameters:
112         - name: "name"
113           in: "path"
114           description: "Name used to delete"
115           required: true
116           type: "string"
117       responses:
118         200:
119           description: "successful operation"
120           schema:
121             $ref: "#/definitions/DELETEResponse"
122 definitions:
123   POSTRequest:
124     type: "object"
125     properties:
126       cloud_region_id:
127         type: "string"
128       csar_id:
129         type: "string"
130       namespace:
131         type: "string"
132       oof_parameters:
133         items:
134           type: "object"
135           additionalProperties: true
136           example:
137             key1: value1
138             key2: value2
139             key3: {}
140       network_parameters:
141         type: "object"
142         properties:
143           oam_ip_address:
144             type: "object"
145             properties:
146               connection_point:
147                 type: "string"
148               ip_address:
149                 type: "string"
150               workload_name:
151                 type: "string"
152   POSTResponse:
153     type: "object"
154     properties:
155       vnf_id:
156         type: "string"
157       name:
158         type: "string"
159   GETSResponse:
160     type: "object"
161     properties:
162       vnf_list:
163         items:
164           type: "string"
165   GETResponse:
166     type: "object"
167     properties:
168       response:
169         type: "string"
170   PATCHRequest:
171     type: "object"
172     properties:
173       name:
174         type: "string"
175   PATCHResponse:
176     type: "object"
177     properties:
178       response:
179         type: "string"
180   DELETEResponse:
181     type: "object"
182     properties:
183       response:
184         type: "string"