blob: 04a227b6a4bb70b7c88903bfea53844b20ce114a [file] [log] [blame]
Chris Donley107e10b2018-02-01 16:01:47 -08001{
2 "swagger": "2.0",
3 "info": {
4 "description": "These are the APIs for the ONAP VNFSDK Marketplace. VNFSDK helps to package and validate VNFs for onboarding into ONAP. You can find out more about VNFSDK at [http://onap.readthedocs.io](http://onap.readthedocs.io/en/latest/submodules/vnfsdk/model.git/docs/files/vnfsdk-apis.html).",
5 "version": "1.0.0",
6 "title": "ONAP VNFSDK",
7 "contact": {
8 "email": "onap-discuss@lists.onap.org"
9 },
10 "license": {
11 "name": "Apache 2.0",
12 "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
13 }
14 },
15 "host": "onap.readthedocs.io",
16 "basePath": "/onapapi/marketplace/v1",
17 "tags": [
18 {
19 "name": "csars",
20 "description": "VNF CSAR information",
21 "externalDocs": {
22 "description": "Find out more",
23 "url": "http://wiki.onap.org"
24 }
25 }
26 ],
27 "schemes": [
28 "http"
29 ],
30 "paths": {
31 "/csars": {
32 "get": {
33 "summary": "Query VNF Package by conditions",
34 "description": "Query VNF package",
35 "operationId": "queryVnf",
36 "produces": [
37 "application/json"
38 ],
39 "tags": [
40 "VNF package"
41 ],
42 "parameters": [
43 {
44 "name": "conditions",
45 "in": "query",
46 "description": "Conditions that need to be considered for filter",
47 "required": true,
48 "type": "array",
49 "items": {
50 "type": "string"
51 },
52 "collectionFormat": "multi"
53 }
54 ],
55 "responses": {
56 "200": {
57 "description": "successful operation",
58 "schema": {
59 "type": "array",
60 "items": {
61 "$ref": "#/definitions/Csars"
62 }
63 }
64 },
65 "400": {
66 "description": "Invalid status value"
67 }
68 }
69 },
70 "post": {
71 "summary": "Upload/Re-Upload VNF Package",
72 "description": "",
73 "operationId": "addVnf",
74 "consumes": [
75 "multipart/form-data"
76 ],
77 "produces": [
78 "application/json"
79 ],
80 "tags": [
81 "VNF package"
82 ],
83 "parameters": [
84 {
85 "in": "body",
86 "name": "body",
87 "description": "VNF objects to add to the Marketplace",
88 "required": true,
89 "schema": {
90 "$ref": "#/definitions/Csars"
91 }
92 }
93 ],
94 "responses": {
95 "200": {
96 "description": "successful operation",
97 "schema": {
98 "$ref": "#/definitions/ApiResponse"
99 }
100 }
101 }
102 }
103 },
104 "/csars/{csarId}": {
105 "get": {
106 "tags": [
107 "csarId"
108 ],
109 "summary": "Find vnf by CSAR ID",
110 "description": "Returns a single vnf",
111 "operationId": "getVnfByCsarId",
112 "produces": [
113 "application/xml",
114 "application/json"
115 ],
116 "parameters": [
117 {
118 "name": "csarId",
119 "in": "path",
120 "description": "CSAR ID of VNF to return",
121 "required": true,
122 "type": "string"
123 }
124 ],
125 "responses": {
126 "200": {
127 "description": "successful operation",
128 "schema": {
129 "$ref": "#/definitions/Csars"
130 }
131 },
132 "400": {
133 "description": "Invalid ID supplied"
134 },
135 "404": {
136 "description": "VNF not found"
137 }
138 }
139 },
140 "post": {
141 "tags": [
142 "csarId"
143 ],
144 "summary": "Updates a VNF in the Marketplace with form data",
145 "description": "",
146 "operationId": "updateCsar",
147 "consumes": [
148 "application/x-www-form-urlencoded"
149 ],
150 "produces": [
151 "application/xml",
152 "application/json"
153 ],
154 "parameters": [
155 {
156 "name": "csarId",
157 "in": "path",
158 "description": "CSAR ID of VNF that needs to be updated",
159 "required": true,
160 "type": "string"
161 },
162 {
163 "name": "name",
164 "in": "formData",
165 "description": "Updated name of the VNF",
166 "required": false,
167 "type": "string"
168 },
169 {
170 "name": "fileNamee",
171 "in": "formData",
172 "description": "Updated filename of the csar",
173 "required": false,
174 "type": "string"
175 }
176 ],
177 "responses": {
178 "405": {
179 "description": "Invalid input"
180 }
181 }
182 },
183 "delete": {
184 "tags": [
185 "csarId"
186 ],
187 "summary": "Deletes a VNF",
188 "description": "",
189 "operationId": "deleteVnf",
190 "produces": [
191 "application/xml",
192 "application/json"
193 ],
194 "parameters": [
195 {
196 "name": "csarId",
197 "in": "path",
198 "description": "VNF CSAR ID to delete",
199 "required": true,
200 "type": "string"
201 }
202 ],
203 "responses": {
204 "400": {
205 "description": "Invalid ID supplied"
206 }
207 }
208 }
209 },
210 "/csars/{csarId}/files": {
211 "get": {
212 "tags": [
213 "csarId"
214 ],
215 "summary": "Download vnf",
216 "description": "Download a single vnf",
217 "operationId": "downloadVnf",
218 "produces": [
219 "application/xml",
220 "application/json"
221 ],
222 "parameters": [
223 {
224 "name": "csarId",
225 "in": "path",
226 "description": "CSAR ID of VNF to return",
227 "required": true,
228 "type": "string"
229 }
230 ],
231 "responses": {
232 "200": {
233 "description": "successful operation",
234 "schema": {
235 "$ref": "#/definitions/Csars"
236 }
237 },
238 "400": {
239 "description": "Invalid ID supplied"
240 },
241 "404": {
242 "description": "VNF not found"
243 }
244 }
245 }
246 }
247 },
248 "definitions": {
249 "Csars": {
250 "type": "object",
251 "required": [
252 "csarId"
253 ],
254 "properties": {
255 "type": {
256 "type": "string",
257 "example": "CSAR"
258 },
259 "name": {
260 "type": "string",
261 "example": "NanocellGateway"
262 },
263 "fileName": {
264 "type": "string"
265 },
266 "creationDate": {
267 "type": "string"
268 },
269 "modificationDate": {
270 "type": "string"
271 },
272 "readDate": {
273 "type": "string"
274 },
275 "size": {
276 "type": "string",
277 "example": "37 MB"
278 },
279 "provider": {
280 "type": "string",
281 "example": "XYZ"
282 },
283 "version": {
284 "type": "string",
285 "example": "v1.0.0"
286 },
287 "createTime": {
288 "type": "string"
289 },
290 "modifyTime": {
291 "type": "string"
292 },
293 "downloadUri": {
294 "type": "string",
295 "example": "http://msb_ip:msb_port/files/marketplace/CSAR/XYZ/NanocellGW/v1.0"
296 },
297 "shortdesc": {
298 "type": "string",
299 "example": "XYZ Nanocell Gateway VNF"
300 },
301 "details": {
302 "type": "string"
303 },
304 "csarId": {
305 "type": "string",
306 "example": "78ede6f3-66cc-46ab-b748-38a6c010d272"
307 },
308 "parameters": {
309 "type": "array",
310 "xml": {
311 "name": "parameters",
312 "wrapped": true
313 },
314 "items": {
315 "type": "string"
316 }
317 }
318 },
319 "xml": {
320 "name": "Csars"
321 }
322 },
323 "ApiResponse": {
324 "type": "object",
325 "properties": {
326 "code": {
327 "type": "integer",
328 "format": "int32"
329 },
330 "type": {
331 "type": "string"
332 },
333 "message": {
334 "type": "string"
335 }
336 }
337 }
338 },
339 "externalDocs": {
340 "description": "Find out more about VNFSDK",
341 "url": "https://onap.readthedocs.io/en/latest/submodules/vnfsdk/model.git/docs/index.html"
342 }
343}