Removal of a committer
[ric-plt/ricdms.git] / api / ric-dms-api-2.0.yaml
1 # ==================================================================================
2 #   Copyright (c) 2022 Samsung.
3 #
4 #   Licensed under the Apache License, Version 2.0 (the "License");
5 #   you may not use this file except in compliance with the License.
6 #   You may obtain a copy of the License at
7 #
8 #          http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #   Unless required by applicable law or agreed to in writing, software
11 #   distributed under the License is distributed on an "AS IS" BASIS,
12 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #   See the License for the specific language governing permissions and
14 #   limitations under the License.
15 #
16 #   This source code is part of the near-RT RIC (RAN Intelligent Controller)
17 #   platform project (RICP).
18 # ==================================================================================
19
20 swagger: '2.0'
21 info:
22   description: APIs for RIC-DMS
23   title: RIC DMS
24   version: '1.0'
25 basePath: /api/v1
26 host: localhost:8000
27 schemes:
28   - http
29 paths:
30   /custom-onboard:
31     post:
32       summary: onboard helm pkg (custom onboarding)
33       consumes:
34         - multipart/form-data
35       parameters:
36         - in: formData
37           name: helmpkg
38           type: file
39           description: This file represents the helm chart.
40       responses:
41         '200':
42           description: successfully onboarded helmchart
43         '500':
44           description: helmchart onboard  failed
45           schema:
46             $ref: '#/definitions/error_message'
47       tags:
48         - experiment
49   /charts:
50     get:
51       produces:
52         - application/json
53       parameters: []
54       responses:
55         '200':
56           description: Get helm chart list
57           schema:
58             type: object
59         '500':
60           description: Get helm chart list failed
61           schema:
62             $ref: '#/definitions/error_message'
63       tags:
64         - charts
65       operationId: get_charts_list
66       summary: Returns the list of xApp helm charts that have been onboarded
67   '/charts/xApp/download/{xApp_name}/ver/{version}':
68     get:
69       produces:
70         - application/zip
71       parameters:
72         - in: path
73           name: xApp_name
74           required: true
75           type: string
76         - in: path
77           name: version
78           required: true
79           type: string
80       responses:
81         '200':
82           description: Download helm chart OK
83           schema:
84             type: file
85         '500':
86           description: Get helm chart values.yaml failed
87           schema:
88             $ref: '#/definitions/error_message'
89       tags:
90         - charts
91       description: Download helm chart.
92       operationId: download_helm_chart
93       summary: Download helm chart
94   '/charts/xApp/{xApp_name}':
95     get:
96       produces:
97         - application/json
98       parameters:
99         - in: path
100           name: xApp_name
101           required: true
102           type: string
103       responses:
104         '200':
105           description: Get helm chart
106           schema:
107             type: array
108             items:
109               type: object
110         '500':
111           description: Get helm chart failed
112           schema:
113             $ref: '#/definitions/error_message'
114       tags:
115         - charts
116       operationId: get_chart
117       summary: Returns the helm chart for the specified xApp
118   '/charts/xApp/{xApp_name}/ver/{version}':
119     delete:
120       produces:
121         - application/json
122         - application/gzip
123       parameters:
124         - in: path
125           name: xApp_name
126           required: true
127           type: string
128         - in: path
129           name: version
130           required: true
131           type: string
132       responses:
133         '200':
134           description: Deleted specified helm chart
135           schema:
136             type: object
137         '500':
138           description: Delete helm chart failed
139           schema:
140             $ref: '#/definitions/error_message'
141       tags:
142         - charts
143       operationId: delete_chart
144       summary: Delete helm chart for the specified xApp and version
145     get:
146       produces:
147         - application/json
148       parameters:
149         - in: path
150           name: xApp_name
151           required: true
152           type: string
153         - in: path
154           name: version
155           required: true
156           type: string
157       responses:
158         '200':
159           description: Get helm chart details OK
160           schema:
161             type: object
162         '500':
163           description: Get helm chart details failed
164           schema:
165             $ref: '#/definitions/error_message'
166       tags:
167         - charts
168       operationId: get_charts_fetcher
169       summary: get the helm chart for the specified xApp and version
170   '/charts/xApp/{xApp_name}/ver/{version}/values.yaml':
171     get:
172       produces:
173         - application/json
174         - text/json
175       parameters:
176         - in: path
177           name: xApp_name
178           required: true
179           type: string
180         - in: path
181           name: version
182           required: true
183           type: string
184       responses:
185         '200':
186           description: Get helm chart values.yaml OK
187           schema:
188             type: object
189         '500':
190           description: Get helm chart values.yaml failed
191           schema:
192             $ref: '#/definitions/error_message'
193       tags:
194         - charts
195       description: yaml file of the specified xApp and version.
196       operationId: get_values_yaml_fetcher
197       summary: Returns the helm values
198   /deploy:
199     delete:
200       consumes:
201         - application/json
202       produces:
203         - application/json
204       parameters:
205         - description: Input for the xApp deploy
206           in: body
207           name: body
208           required: true
209           schema:
210             $ref: '#/definitions/deleteDeploymentDesc'
211       responses:
212         '201':
213           description: successful un-deploy xApp
214           schema:
215             type: object
216         '500':
217           description: un-deployment failed
218           schema:
219             $ref: '#/definitions/error_message'
220       tags:
221         - deploy
222       summary: Undeploy xApp
223     post:
224       consumes:
225         - application/json
226       produces:
227         - application/json
228       parameters:
229         - description: Input for the xApp deployment
230           in: body
231           name: body
232           required: true
233           schema:
234             $ref: '#/definitions/deploymentDesc'
235       responses:
236         '201':
237           description: successful deployment of xApp
238           schema:
239             type: object
240         '500':
241           description: deployment failed
242           schema:
243             $ref: '#/definitions/error_message'
244       tags:
245         - deploy
246       summary: deploy xApp
247     put:
248       consumes:
249         - application/json
250       produces:
251         - application/json
252       parameters:
253         - description: Input for the xApp deploy
254           in: body
255           name: body
256           required: true
257           schema:
258             $ref: '#/definitions/updateDeploymentDesc'
259       responses:
260         '201':
261           description: successful updated xApp
262           schema:
263             type: object
264         '501':
265           description: un-deployment failed
266           schema:
267             $ref: '#/definitions/error_message'
268       tags:
269         - deploy
270       summary: update xApp
271   /health:
272     get:
273       produces:
274         - application/json
275       parameters: []
276       responses:
277         '200':
278           description: Health check OK
279           schema:
280             $ref: '#/definitions/status'
281         '500':
282           description: ric-dms is not ready
283           schema:
284             $ref: '#/definitions/error_message'
285       tags:
286         - health
287       operationId: get_health_check
288       summary: Returns the health condition of ric dms
289   '/healthcheck/xApp/{xApp_name}/namespace/{namespace}':
290     get:
291       produces:
292         - application/json
293       parameters:
294         - in: path
295           name: xApp_name
296           required: true
297           type: string
298         - in: path
299           name: namespace
300           required: true
301           type: string
302       responses:
303         '200':
304           description: Health check OK
305           schema:
306             $ref: '#/definitions/status'
307         '500':
308           description: xApp onboarder is not ready
309           schema:
310             $ref: '#/definitions/error_message'
311       tags:
312         - health
313       summary: Return status of xApp deployment
314   /onboarder:
315     delete:
316       consumes:
317         - application/json
318       produces:
319         - application/json
320       parameters:
321         - in: body
322           name: body
323           schema:
324             properties:
325               appname:
326                 type: string
327               version:
328                 type: string
329             required:
330               - appname
331             type: object
332       responses:
333         '201':
334           description: xApp onboard successfully.
335           schema:
336             $ref: '#/definitions/status'
337         '400':
338           description: xApp descriptor format error
339           schema:
340             $ref: '#/definitions/error_message'
341         '500':
342           description: xApp onboarder is not ready
343           schema:
344             $ref: '#/definitions/error_message'
345       tags:
346         - onboard
347       operationId: delete_onboardx_apps
348       summary: offload xApp using the xApp name and version
349       x-codegen-request-body-name: payload
350     post:
351       consumes:
352         - application/json
353       produces:
354         - application/json
355       parameters:
356         - in: body
357           name: body
358           required: true
359           schema:
360             $ref: '#/definitions/descriptor'
361       responses:
362         '201':
363           description: xApp onboard successfully.
364           schema:
365             $ref: '#/definitions/status'
366         '400':
367           description: xApp descriptor format error
368           schema:
369             $ref: '#/definitions/error_message'
370         '500':
371           description: xApp onboarder is not ready
372           schema:
373             $ref: '#/definitions/error_message'
374       tags:
375         - onboard
376       operationId: post_onboardx_apps
377       summary: >-
378         Onboard xApp using the xApp descriptor and schema or URL of descriptor
379         and schema.
380       x-codegen-request-body-name: payload
381 definitions:
382   deleteDeploymentDesc:
383     properties:
384       namespace:
385         description: namespace to deploy xApp
386         type: string
387       version:
388         type: string
389       xAppname:
390         type: string
391     required:
392       - xAppname
393       - version
394     type: object
395   deploymentDesc:
396     properties:
397       namespace:
398         description: namespace to deploy xApp
399         type: string
400       overridefile:
401         description: override file
402         type: string
403       version:
404         type: string
405       xAppname:
406         type: string
407     required:
408       - namespace
409     type: object
410   descriptor:
411     properties:
412       config:
413         description: represents content of config file for xApp onboarding.
414         type: object
415       config-file_url:
416         description: specify url of config-file.
417         type: string
418       schema:
419         description: represents conent of schema file for xApp onboarding.
420         type: object
421       schema-file_url:
422         description: specify url of schema-file.
423         type: string
424     type: object
425   error_message:
426     properties:
427       error_message:
428         description: source of the error
429         type: string
430       error_source:
431         description: source of the error
432         type: string
433       status:
434         description: http response message
435         type: string
436     required:
437       - error_message
438       - error_source
439       - status
440     type: object
441   name:
442     properties:
443       property:
444         type: integer
445     type: object
446   status:
447     properties:
448       status:
449         description: status of the service
450         type: string
451     required:
452       - status
453     type: object
454   updateDeploymentDesc:
455     properties:
456       namespace:
457         description: namespace to deploy xApp
458         type: string
459       newVersion:
460         type: string
461       oldVersion:
462         type: string
463       operation:
464         enum:
465           - rollback
466           - upgrade
467         type: string
468       xAppname:
469         type: string
470     required:
471       - namespace
472     type: object
473 tags:
474   - description: onboard xApps
475     name: onboard
476   - description: health check
477     name: health
478   - description: Managing helm charts
479     name: charts
480   - description: Managing deployment
481     name: deploy
482 x-components: {}