blob: a15448f19156fc237e3d5945d40c89ed7307c059 [file] [log] [blame]
Mohamed Abukarb175b942019-05-09 16:30:58 +03001swagger: '2.0'
2info:
3 description: This is a draft API for RIC appmgr
Mohamed Abukar91357512019-06-20 06:37:13 +03004 version: 0.1.5
Mohamed Abukarb175b942019-05-09 16:30:58 +03005 title: RIC appmgr
6 license:
7 name: Apache 2.0
8 url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
9host: hostname
10basePath: /ric/v1
11schemes:
Mohamed Abukarb175b942019-05-09 16:30:58 +030012 - http
13paths:
Abukar Mohamed059775c2019-05-22 14:48:10 +000014 /health/alive :
15 get :
16 summary : Health check of xApp Manager - Liveness probe
17 tags :
Mohamed Abukarb175b942019-05-09 16:30:58 +030018 - health
Abukar Mohamed059775c2019-05-22 14:48:10 +000019 operationId : getHealthAlive
20 responses :
21 '200' :
22 description : Status of xApp Manager is ok
23 /health/ready :
24 get :
25 summary : Readiness check of xApp Manager - Readiness probe
26 tags :
27 - health
28 operationId : getHealthReady
29 responses :
Mohamed Abukarb175b942019-05-09 16:30:58 +030030 '200':
Abukar Mohamed059775c2019-05-22 14:48:10 +000031 description : xApp Manager is ready for service
32 '503':
33 description: xApp Manager is not ready for service
Mohamed Abukarb175b942019-05-09 16:30:58 +030034 /xapps:
35 post:
36 summary: Deploy a xapp
37 tags:
38 - xapp
39 operationId: deployXapp
40 consumes:
41 - application/json
42 produces:
43 - application/json
44 parameters:
45 - name: xAppInfo
46 in: body
47 description: xApp information
48 schema:
49 type: object
50 required:
Abukar Mohamed059775c2019-05-22 14:48:10 +000051 - name
Mohamed Abukarb175b942019-05-09 16:30:58 +030052 properties:
Abukar Mohamed059775c2019-05-22 14:48:10 +000053 name:
Mohamed Abukarb175b942019-05-09 16:30:58 +030054 type: string
Abukar Mohamed059775c2019-05-22 14:48:10 +000055 description: Name of the xApp.
56 example: xapp-dummy
57 configName:
58 type: string
59 description: Name of the xApp configmap. Overrides the value given in Helm chart value file.
60 example: xapp-dummy-configmap
61 namespace:
62 type: string
63 description: Name of the namespace to which xApp is deployed. Overrides the value given in Helm chart value file.
64 example: ricxapps
65 serviceName:
66 type: string
67 description: Name of the service xApp is providing. Overrides the value given in Helm chart value file.
68 example: xapp-dummy-service
69 imageRepo:
70 type: string
71 description: Name of the docker repository xApp is located. Overrides the value given in Helm chart value file.
72 example: xapprepo
73 hostname:
74 type: string
75 description: Hostname for the pod. Used by messaging library. Overrides the value given in Helm chart value file.
Mohamed Abukarb175b942019-05-09 16:30:58 +030076 example: xapp-dummy
77 responses:
78 '201':
79 description: xApp successfully created
80 schema:
81 $ref: '#/definitions/Xapp'
82 '400':
83 description: Invalid input
84 '500':
85 description: Internal error
86 get:
87 summary: Returns the status of all xapps
88 tags:
89 - xapp
90 operationId: getAllXapps
91 produces:
92 - application/json
93 responses:
94 '200':
95 description: successful query of xApps
96 schema:
Mohamed Abukar91357512019-06-20 06:37:13 +030097 $ref: '#/definitions/AllDeployedXapps'
98 '500':
99 description: Internal error
100 '/xapps/list':
101 get:
102 summary: Returns the list of all deployable xapps
103 tags:
104 - xapp
105 operationId: listAllXapps
106 produces:
107 - application/json
108 responses:
109 '200':
110 description: successful list of deployable xApps
111 schema:
112 $ref: '#/definitions/AllDeployableXapps'
Mohamed Abukarb175b942019-05-09 16:30:58 +0300113 '500':
114 description: Internal error
115 '/xapps/{xAppName}':
116 get:
117 summary: Returns the status of a given xapp
118 tags:
119 - xapp
120 operationId: getXappByName
121 produces:
122 - application/json
123 parameters:
124 - name: xAppName
125 in: path
126 description: Name of xApp
127 required: true
128 type: string
129 responses:
130 '200':
131 description: successful operation
132 schema:
133 $ref: '#/definitions/Xapp'
134 '400':
135 description: Invalid ID supplied
136 '404':
137 description: Xapp not found
138 '500':
139 description: Internal error
140 delete:
141 summary: Undeploy an existing xapp
142 tags:
143 - xapp
144 operationId: undeployXapp
145 parameters:
146 - name: xAppName
147 in: path
148 description: Xapp to be undeployed
149 required: true
150 type: string
151 responses:
152 '204':
153 description: Successful deletion of xApp
154 '400':
155 description: Invalid xApp name supplied
156 '500':
157 description: Internal error
158 '/xapps/{xAppName}/instances/{xAppInstanceName}':
159 get:
160 summary: Returns the status of a given xapp
161 tags:
162 - xapp
163 operationId: getXappInstanceByName
164 produces:
165 - application/json
166 parameters:
167 - name: xAppName
168 in: path
169 description: Name of xApp
170 required: true
171 type: string
172 - name: xAppInstanceName
173 in: path
174 description: Name of xApp instance to get information
175 required: true
176 type: string
177 responses:
178 '200':
179 description: successful operation
180 schema:
181 $ref: '#/definitions/XappInstance'
182 '400':
183 description: Invalid name supplied
184 '404':
185 description: Xapp not found
186 '500':
187 description: Internal error
188 /config:
189 post:
190 summary: Create xApp config
191 tags:
192 - xapp
193 operationId: createXappConfig
194 consumes:
195 - application/json
196 produces:
197 - application/json
198 parameters:
Abukar Mohamed059775c2019-05-22 14:48:10 +0000199 - name: XAppConfig
Mohamed Abukarb175b942019-05-09 16:30:58 +0300200 in: body
201 description: xApp config
202 schema:
Abukar Mohamed059775c2019-05-22 14:48:10 +0000203 $ref: '#/definitions/XAppConfig'
Mohamed Abukarb175b942019-05-09 16:30:58 +0300204 responses:
205 '201':
206 description: xApp config successfully created
207 schema:
Abukar Mohamed059775c2019-05-22 14:48:10 +0000208 $ref: '#/definitions/XAppConfig'
Mohamed Abukarb175b942019-05-09 16:30:58 +0300209 '400':
210 description: Invalid input
211 '422':
212 description: Validation of configuration failed
213 '500':
214 description: Internal error
215 put:
216 summary: Modify xApp config
217 tags:
218 - xapp
219 operationId: ModifyXappConfig
220 consumes:
221 - application/json
222 produces:
223 - application/json
224 parameters:
Abukar Mohamed059775c2019-05-22 14:48:10 +0000225 - name: XAppConfig
Mohamed Abukarb175b942019-05-09 16:30:58 +0300226 in: body
227 description: xApp config
228 schema:
Abukar Mohamed059775c2019-05-22 14:48:10 +0000229 $ref: '#/definitions/XAppConfig'
Mohamed Abukarb175b942019-05-09 16:30:58 +0300230 responses:
231 '200':
232 description: xApp config successfully modified
233 schema:
Abukar Mohamed059775c2019-05-22 14:48:10 +0000234 $ref: '#/definitions/XAppConfig'
Mohamed Abukarb175b942019-05-09 16:30:58 +0300235 '400':
236 description: Invalid input
237 '422':
238 description: Validation of configuration failed
239 '500':
240 description: Internal error
241 get:
242 summary: Returns the configuration of all xapps
243 tags:
244 - xapp
245 operationId: getAllXappConfig
246 produces:
247 - application/json
248 responses:
249 '200':
250 description: successful query of xApp config
251 schema:
252 $ref: '#/definitions/AllXappConfig'
253 '500':
254 description: Internal error
255 delete:
256 summary: Delete xApp configuration
257 tags:
258 - xapp
259 operationId: deleteXappConfig
260 parameters:
Abukar Mohamed059775c2019-05-22 14:48:10 +0000261 - name: ConfigMetadata
Mohamed Abukarb175b942019-05-09 16:30:58 +0300262 in: body
263 description: xApp configuration information
264 schema:
Abukar Mohamed059775c2019-05-22 14:48:10 +0000265 $ref: '#/definitions/ConfigMetadata'
Mohamed Abukarb175b942019-05-09 16:30:58 +0300266 responses:
267 '204':
268 description: Successful deletion of xApp
269 '400':
270 description: Invalid parameters supplied
271 '500':
272 description: Internal error
273 /subscriptions:
274 post:
275 summary: Subscribe event
276 tags:
277 - xapp
278 - subscriptions
279 operationId: addSubscription
280 consumes:
281 - application/json
282 produces:
283 - application/json
284 parameters:
285 - name: subscriptionRequest
286 in: body
287 description: New subscription
288 required: true
289 schema:
290 $ref: '#/definitions/subscriptionRequest'
291 responses:
292 '200':
293 description: Subscription successful
294 schema:
295 $ref: '#/definitions/subscriptionResponse'
296 '400':
297 description: Invalid input
298 get:
299 summary: Returns all subscriptions
300 tags:
301 - xapp
302 - subscriptions
303 operationId: getSubscriptions
304 produces:
305 - application/json
306 responses:
307 '200':
308 description: successful query of subscriptions
309 schema:
310 $ref: '#/definitions/allSubscriptions'
311 '/subscriptions/{subscriptionId}':
312 get:
313 summary: Returns the information of subscription
314 tags:
315 - xapp
316 - subscriptions
317 operationId: getSubscriptionById
318 produces:
319 - application/json
320 parameters:
321 - name: subscriptionId
322 in: path
323 description: ID of subscription
324 required: true
Abukar Mohamed059775c2019-05-22 14:48:10 +0000325 type: string
Mohamed Abukarb175b942019-05-09 16:30:58 +0300326 responses:
327 '200':
328 description: successful operation
329 schema:
330 $ref: '#/definitions/subscription'
331 '400':
332 description: Invalid ID supplied
333 '404':
334 description: Subscription not found
335 put:
336 summary: Modify event subscription
337 tags:
338 - xapp
339 - subscriptions
340 operationId: modifySubscription
341 consumes:
342 - application/json
343 produces:
344 - application/json
345 parameters:
346 - name: subscriptionId
347 in: path
348 description: ID of subscription
349 required: true
Abukar Mohamed059775c2019-05-22 14:48:10 +0000350 type: string
Mohamed Abukarb175b942019-05-09 16:30:58 +0300351 - in: body
352 name: subscriptionRequest
353 description: Modified subscription
354 required: true
355 schema:
356 $ref: '#/definitions/subscriptionRequest'
357 responses:
358 '200':
359 description: Subscription modification successful
360 schema:
361 $ref: '#/definitions/subscriptionResponse'
362 '400':
363 description: Invalid input
364 delete:
365 summary: Unsubscribe event
366 tags:
367 - xapp
368 - subscriptions
369 description: ''
370 operationId: deleteSubscription
371 parameters:
372 - name: subscriptionId
373 in: path
374 description: ID of subscription
375 required: true
Abukar Mohamed059775c2019-05-22 14:48:10 +0000376 type: string
Mohamed Abukarb175b942019-05-09 16:30:58 +0300377 responses:
378 '204':
379 description: Successful deletion of subscription
380 '400':
381 description: Invalid subscription supplied
382definitions:
Mohamed Abukar91357512019-06-20 06:37:13 +0300383 AllDeployableXapps:
384 type: array
385 items:
386 type: string
387 example: "xapp-dummy"
388 AllDeployedXapps:
Mohamed Abukarb175b942019-05-09 16:30:58 +0300389 type: array
390 items:
391 $ref: '#/definitions/Xapp'
392 Xapp:
393 type: object
394 required:
395 - name
396 properties:
397 name:
398 type: string
399 example: xapp-dummy
400 status:
401 type: string
402 description: xapp status in the RIC
403 enum:
404 - unknown
405 - deployed
406 - deleted
407 - superseded
408 - failed
409 - deleting
410 version:
411 type: string
412 example: 1.2.3
413 instances:
414 type: array
415 items:
416 $ref: '#/definitions/XappInstance'
417 XappInstance:
418 type: object
419 required:
420 - name
421 properties:
422 name:
423 type: string
424 example: xapp-dummy-6cd577d9-4v255
425 status:
426 type: string
427 description: xapp instance status
428 enum:
429 - pending
430 - running
431 - succeeded
432 - failed
433 - unknown
434 - completed
435 - crashLoopBackOff
436 ip:
437 type: string
438 example: 192.168.0.1
439 port:
440 type: integer
441 example: 32300
442 txMessages:
443 type: array
444 items:
445 type: string
446 example: ControlIndication
447 rxMessages:
448 type: array
449 items:
450 type: string
451 example: LoadIndication
Abukar Mohamed059775c2019-05-22 14:48:10 +0000452 ConfigMetadata:
Mohamed Abukarb175b942019-05-09 16:30:58 +0300453 type: object
454 required:
Abukar Mohamed059775c2019-05-22 14:48:10 +0000455 - name
456 - configName
Mohamed Abukarb175b942019-05-09 16:30:58 +0300457 - namespace
458 properties:
Abukar Mohamed059775c2019-05-22 14:48:10 +0000459 name:
Mohamed Abukarb175b942019-05-09 16:30:58 +0300460 type: string
461 description: Name of the xApp
462 example: xapp-dummy
Abukar Mohamed059775c2019-05-22 14:48:10 +0000463 configName:
Mohamed Abukarb175b942019-05-09 16:30:58 +0300464 type: string
465 description: Name of the config map
466 example: xapp-dummy-config-map
467 namespace:
468 type: string
469 description: Name of the namespace
470 example: ricxapp
Abukar Mohamed059775c2019-05-22 14:48:10 +0000471 XAppConfig:
Mohamed Abukarb175b942019-05-09 16:30:58 +0300472 type: object
473 required:
Abukar Mohamed059775c2019-05-22 14:48:10 +0000474 - metadata
475 - descriptor
476 - config
Mohamed Abukarb175b942019-05-09 16:30:58 +0300477 properties:
Abukar Mohamed059775c2019-05-22 14:48:10 +0000478 metadata:
479 $ref: '#/definitions/ConfigMetadata'
480 descriptor:
Mohamed Abukarb175b942019-05-09 16:30:58 +0300481 type: object
482 description: Schema of configuration in JSON format
Abukar Mohamed059775c2019-05-22 14:48:10 +0000483 config:
Mohamed Abukarb175b942019-05-09 16:30:58 +0300484 type: object
485 description: Configuration in JSON format
486 AllXappConfig:
487 type: array
488 items:
Abukar Mohamed059775c2019-05-22 14:48:10 +0000489 $ref: '#/definitions/XAppConfig'
Mohamed Abukarb175b942019-05-09 16:30:58 +0300490 subscriptionRequest:
491 type: object
492 required:
493 - targetUrl
494 - eventType
495 - maxRetries
496 - retryTimer
497 properties:
498 targetUrl:
499 type: string
500 example: 'http://localhost:11111/apps/webhook/'
501 eventType:
502 type: string
503 description: Event which is subscribed
504 enum:
505 - created
506 - deleted
507 - all
508 maxRetries:
509 type: integer
510 description: Maximum number of retries
511 example: 11
512 retryTimer:
513 type: integer
514 description: Time in seconds to wait before next retry
515 example: 22
516 subscriptionResponse:
517 type: object
518 properties:
519 id:
520 type: string
521 example: 1ILBltYYzEGzWRrVPZKmuUmhwcc
522 version:
523 type: integer
524 example: 2
525 eventType:
526 type: string
527 description: Event which is subscribed
528 enum:
529 - created
530 - deleted
531 - updated
532 - all
533 allSubscriptions:
534 type: array
535 items:
536 $ref: '#/definitions/subscription'
537 subscription:
538 type: object
539 properties:
540 id:
541 type: string
542 example: 1ILBltYYzEGzWRrVPZKmuUmhwcc
543 targetUrl:
544 type: string
545 example: 'http://localhost:11111/apps/webhook/'
546 eventType:
547 type: string
548 description: Event which is subscribed
549 enum:
550 - created
551 - deleted
552 - updated
553 - all
554 maxRetries:
555 type: integer
556 description: Maximum number of retries
557 example: 11
558 retryTimer:
559 type: integer
560 description: Time in seconds to wait before next retry
561 example: 22
562 subscriptionNotification:
563 type: object
564 properties:
565 id:
566 type: string
567 example: 1ILBltYYzEGzWRrVPZKmuUmhwcc
568 version:
569 type: integer
570 example: 2
571 eventType:
572 type: string
573 description: Event to be notified
574 enum:
575 - created
576 - deleted
577 - updated
578 xApps:
Mohamed Abukar91357512019-06-20 06:37:13 +0300579 $ref: '#/definitions/AllDeployedXapps'