blob: f9e84341a15c7d3fe1e58506b3a017036e78e5d7 [file] [log] [blame]
subhash kumar singha54c7922022-08-03 08:04:17 +00001# ==================================================================================
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
20swagger: '2.0'
21info:
22 description: APIs for RIC-DMS
23 title: RIC DMS
24 version: '1.0'
25basePath: /api/v1
26host: localhost:8000
27schemes:
28 - http
29paths:
30 /charts:
31 get:
32 produces:
33 - application/json
34 parameters: []
35 responses:
36 '200':
37 description: Get helm chart list
38 schema:
39 type: object
40 '500':
41 description: Get helm chart list failed
42 schema:
43 $ref: '#/definitions/error_message'
44 tags:
45 - charts
46 operationId: get_charts_list
47 summary: Returns the list of xApp helm charts that have been onboarded
48 '/charts/xApp/download/{xApp_name}/ver/{version}':
49 get:
50 produces:
51 - application/zip
subhash kumar singha54c7922022-08-03 08:04:17 +000052 parameters:
53 - in: path
54 name: xApp_name
55 required: true
56 type: string
57 - in: path
58 name: version
59 required: true
60 type: string
61 responses:
62 '200':
63 description: Download helm chart OK
64 schema:
subhash kumar singh41f03632022-10-19 15:02:13 +000065 type: file
subhash kumar singha54c7922022-08-03 08:04:17 +000066 '500':
67 description: Get helm chart values.yaml failed
68 schema:
69 $ref: '#/definitions/error_message'
70 tags:
71 - charts
72 description: Download helm chart.
73 operationId: download_helm_chart
74 summary: Download helm chart
75 '/charts/xApp/{xApp_name}':
76 get:
77 produces:
78 - application/json
79 parameters:
80 - in: path
81 name: xApp_name
82 required: true
83 type: string
84 responses:
85 '200':
86 description: Get helm chart
87 schema:
subhash kumar singhe3ac46a2022-10-12 11:58:52 +000088 type: array
89 items:
90 type: object
subhash kumar singha54c7922022-08-03 08:04:17 +000091 '500':
92 description: Get helm chart failed
93 schema:
94 $ref: '#/definitions/error_message'
95 tags:
96 - charts
97 operationId: get_chart
98 summary: Returns the helm chart for the specified xApp
99 '/charts/xApp/{xApp_name}/ver/{version}':
100 delete:
101 produces:
102 - application/json
103 - application/gzip
104 parameters:
105 - in: path
106 name: xApp_name
107 required: true
108 type: string
109 - in: path
110 name: version
111 required: true
112 type: string
113 responses:
114 '200':
115 description: Deleted specified helm chart
116 schema:
117 type: object
118 '500':
119 description: Delete helm chart failed
120 schema:
121 $ref: '#/definitions/error_message'
122 tags:
123 - charts
124 operationId: delete_chart
125 summary: Delete helm chart for the specified xApp and version
126 get:
127 produces:
128 - application/json
subhash kumar singha54c7922022-08-03 08:04:17 +0000129 parameters:
130 - in: path
131 name: xApp_name
132 required: true
133 type: string
134 - in: path
135 name: version
136 required: true
137 type: string
138 responses:
139 '200':
subhash kumar singhd8d204f2022-10-12 18:07:44 +0000140 description: Get helm chart details OK
subhash kumar singha54c7922022-08-03 08:04:17 +0000141 schema:
subhash kumar singhd8d204f2022-10-12 18:07:44 +0000142 type: object
subhash kumar singha54c7922022-08-03 08:04:17 +0000143 '500':
subhash kumar singhd8d204f2022-10-12 18:07:44 +0000144 description: Get helm chart details failed
subhash kumar singha54c7922022-08-03 08:04:17 +0000145 schema:
146 $ref: '#/definitions/error_message'
147 tags:
148 - charts
149 operationId: get_charts_fetcher
150 summary: get the helm chart for the specified xApp and version
151 '/charts/xApp/{xApp_name}/ver/{version}/values.yaml':
152 get:
153 produces:
154 - application/json
155 - text/json
156 parameters:
157 - in: path
158 name: xApp_name
159 required: true
160 type: string
161 - in: path
162 name: version
163 required: true
164 type: string
165 responses:
166 '200':
167 description: Get helm chart values.yaml OK
168 schema:
169 type: object
170 '500':
171 description: Get helm chart values.yaml failed
172 schema:
173 $ref: '#/definitions/error_message'
174 tags:
175 - charts
176 description: yaml file of the specified xApp and version.
177 operationId: get_values_yaml_fetcher
178 summary: Returns the helm values
179 /deploy:
180 delete:
181 consumes:
182 - application/json
183 produces:
184 - application/json
185 parameters:
186 - description: Input for the xApp deploy
187 in: body
188 name: body
189 required: true
190 schema:
191 $ref: '#/definitions/deleteDeploymentDesc'
192 responses:
193 '201':
194 description: successful un-deploy xApp
195 schema:
196 type: object
subhash kumar singhc39ef832022-11-18 12:05:59 +0000197 '500':
subhash kumar singha54c7922022-08-03 08:04:17 +0000198 description: un-deployment failed
199 schema:
200 $ref: '#/definitions/error_message'
201 tags:
202 - deploy
203 summary: Undeploy xApp
204 post:
205 consumes:
206 - application/json
207 produces:
208 - application/json
209 parameters:
210 - description: Input for the xApp deployment
211 in: body
212 name: body
213 required: true
214 schema:
215 $ref: '#/definitions/deploymentDesc'
216 responses:
217 '201':
218 description: successful deployment of xApp
219 schema:
220 type: object
subhash kumar singhf95c1d32022-11-10 09:57:57 +0000221 '500':
subhash kumar singha54c7922022-08-03 08:04:17 +0000222 description: deployment failed
223 schema:
224 $ref: '#/definitions/error_message'
225 tags:
226 - deploy
227 summary: deploy xApp
228 put:
229 consumes:
230 - application/json
231 produces:
232 - application/json
233 parameters:
234 - description: Input for the xApp deploy
235 in: body
236 name: body
237 required: true
238 schema:
239 $ref: '#/definitions/updateDeploymentDesc'
240 responses:
241 '201':
242 description: successful updated xApp
243 schema:
244 type: object
245 '501':
246 description: un-deployment failed
247 schema:
248 $ref: '#/definitions/error_message'
249 tags:
250 - deploy
251 summary: update xApp
252 /health:
253 get:
254 produces:
255 - application/json
256 parameters: []
257 responses:
258 '200':
259 description: Health check OK
260 schema:
261 $ref: '#/definitions/status'
262 '500':
263 description: ric-dms is not ready
264 schema:
265 $ref: '#/definitions/error_message'
266 tags:
267 - health
268 operationId: get_health_check
269 summary: Returns the health condition of ric dms
270 '/healthcheck/xApp/{xApp_name}/namespace/{namespace}':
271 get:
272 produces:
273 - application/json
274 parameters:
275 - in: path
276 name: xApp_name
277 required: true
278 type: string
279 - in: path
280 name: namespace
281 required: true
282 type: string
283 responses:
284 '200':
285 description: Health check OK
286 schema:
287 $ref: '#/definitions/status'
288 '500':
289 description: xApp onboarder is not ready
290 schema:
291 $ref: '#/definitions/error_message'
292 tags:
293 - health
294 summary: Return status of xApp deployment
295 /onboarder:
296 delete:
297 consumes:
298 - application/json
299 produces:
300 - application/json
301 parameters:
302 - in: body
303 name: body
304 schema:
305 properties:
306 appname:
307 type: string
308 version:
309 type: string
310 required:
311 - appname
312 type: object
313 responses:
314 '201':
315 description: xApp onboard successfully.
316 schema:
317 $ref: '#/definitions/status'
318 '400':
319 description: xApp descriptor format error
320 schema:
321 $ref: '#/definitions/error_message'
322 '500':
323 description: xApp onboarder is not ready
324 schema:
325 $ref: '#/definitions/error_message'
326 tags:
327 - onboard
328 operationId: delete_onboardx_apps
329 summary: offload xApp using the xApp name and version
330 x-codegen-request-body-name: payload
331 post:
332 consumes:
333 - application/json
334 produces:
335 - application/json
336 parameters:
337 - in: body
338 name: body
339 required: true
340 schema:
341 $ref: '#/definitions/descriptor'
342 responses:
343 '201':
344 description: xApp onboard successfully.
345 schema:
346 $ref: '#/definitions/status'
347 '400':
348 description: xApp descriptor format error
349 schema:
350 $ref: '#/definitions/error_message'
351 '500':
352 description: xApp onboarder is not ready
353 schema:
354 $ref: '#/definitions/error_message'
355 tags:
356 - onboard
357 operationId: post_onboardx_apps
358 summary: >-
359 Onboard xApp using the xApp descriptor and schema or URL of descriptor
360 and schema.
361 x-codegen-request-body-name: payload
362definitions:
363 deleteDeploymentDesc:
364 properties:
365 namespace:
366 description: namespace to deploy xApp
367 type: string
368 version:
369 type: string
370 xAppname:
371 type: string
372 required:
373 - xAppname
374 - version
375 type: object
376 deploymentDesc:
377 properties:
378 namespace:
379 description: namespace to deploy xApp
380 type: string
381 overridefile:
382 description: override file
383 type: string
384 version:
385 type: string
386 xAppname:
387 type: string
388 required:
389 - namespace
390 type: object
391 descriptor:
392 properties:
393 config:
394 description: represents content of config file for xApp onboarding.
subhash kumar singh04897e62022-09-28 10:22:56 +0000395 type: object
subhash kumar singha54c7922022-08-03 08:04:17 +0000396 config-file_url:
397 description: specify url of config-file.
398 type: string
399 schema:
400 description: represents conent of schema file for xApp onboarding.
subhash kumar singh04897e62022-09-28 10:22:56 +0000401 type: object
subhash kumar singha54c7922022-08-03 08:04:17 +0000402 schema-file_url:
403 description: specify url of schema-file.
404 type: string
405 type: object
406 error_message:
407 properties:
408 error_message:
409 description: source of the error
410 type: string
411 error_source:
412 description: source of the error
413 type: string
414 status:
415 description: http response message
416 type: string
417 required:
418 - error_message
419 - error_source
420 - status
421 type: object
422 name:
423 properties:
424 property:
425 type: integer
426 type: object
427 status:
428 properties:
429 status:
430 description: status of the service
431 type: string
432 required:
433 - status
434 type: object
435 updateDeploymentDesc:
436 properties:
437 namespace:
438 description: namespace to deploy xApp
439 type: string
440 newVersion:
441 type: string
442 oldVersion:
443 type: string
444 operation:
445 enum:
446 - rollback
447 - upgrade
448 type: string
449 xAppname:
450 type: string
451 required:
452 - namespace
453 type: object
454tags:
455 - description: onboard xApps
456 name: onboard
457 - description: health check
458 name: health
459 - description: Managing helm charts
460 name: charts
461 - description: Managing deployment
462 name: deploy
463x-components: {}