blob: d744539a7e04cd5b5e923967bfc5723a628fd18d [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 Abukaraca8f3c2020-01-14 11:10:16 +02004 version: 0.3.3
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:
Mohamed Abukar34e43832019-11-13 17:57:15 +020045 - name: XappDescriptor
Mohamed Abukarb175b942019-05-09 16:30:58 +030046 in: body
Mohamed Abukar34e43832019-11-13 17:57:15 +020047 description: xApp deployment info
Mohamed Abukarb175b942019-05-09 16:30:58 +030048 schema:
Mohamed Abukar34e43832019-11-13 17:57:15 +020049 $ref: '#/definitions/XappDescriptor'
Mohamed Abukarb175b942019-05-09 16:30:58 +030050 responses:
51 '201':
52 description: xApp successfully created
53 schema:
54 $ref: '#/definitions/Xapp'
55 '400':
56 description: Invalid input
57 '500':
58 description: Internal error
59 get:
60 summary: Returns the status of all xapps
61 tags:
62 - xapp
63 operationId: getAllXapps
64 produces:
65 - application/json
66 responses:
67 '200':
68 description: successful query of xApps
69 schema:
Mohamed Abukar91357512019-06-20 06:37:13 +030070 $ref: '#/definitions/AllDeployedXapps'
71 '500':
72 description: Internal error
Mohamed Abukar34e43832019-11-13 17:57:15 +020073 /xapps/list:
Mohamed Abukar91357512019-06-20 06:37:13 +030074 get:
75 summary: Returns the list of all deployable xapps
76 tags:
77 - xapp
Mohamed Abukar34e43832019-11-13 17:57:15 +020078 operationId: listAllXapps
Mohamed Abukar91357512019-06-20 06:37:13 +030079 produces:
80 - application/json
81 responses:
82 '200':
83 description: successful list of deployable xApps
84 schema:
85 $ref: '#/definitions/AllDeployableXapps'
Mohamed Abukarb175b942019-05-09 16:30:58 +030086 '500':
87 description: Internal error
Mohamed Abukar34e43832019-11-13 17:57:15 +020088 /xapps/{xAppName}:
Mohamed Abukarb175b942019-05-09 16:30:58 +030089 get:
90 summary: Returns the status of a given xapp
91 tags:
92 - xapp
93 operationId: getXappByName
94 produces:
95 - application/json
96 parameters:
97 - name: xAppName
98 in: path
99 description: Name of xApp
100 required: true
101 type: string
102 responses:
103 '200':
104 description: successful operation
105 schema:
106 $ref: '#/definitions/Xapp'
107 '400':
108 description: Invalid ID supplied
109 '404':
110 description: Xapp not found
111 '500':
112 description: Internal error
113 delete:
114 summary: Undeploy an existing xapp
115 tags:
116 - xapp
117 operationId: undeployXapp
118 parameters:
119 - name: xAppName
120 in: path
121 description: Xapp to be undeployed
122 required: true
123 type: string
124 responses:
125 '204':
126 description: Successful deletion of xApp
127 '400':
128 description: Invalid xApp name supplied
129 '500':
130 description: Internal error
Mohamed Abukar34e43832019-11-13 17:57:15 +0200131 /xapps/{xAppName}/instances/{xAppInstanceName}:
Mohamed Abukarb175b942019-05-09 16:30:58 +0300132 get:
133 summary: Returns the status of a given xapp
134 tags:
135 - xapp
136 operationId: getXappInstanceByName
137 produces:
138 - application/json
139 parameters:
140 - name: xAppName
141 in: path
142 description: Name of xApp
143 required: true
144 type: string
145 - name: xAppInstanceName
146 in: path
147 description: Name of xApp instance to get information
148 required: true
149 type: string
150 responses:
151 '200':
152 description: successful operation
153 schema:
154 $ref: '#/definitions/XappInstance'
155 '400':
156 description: Invalid name supplied
157 '404':
158 description: Xapp not found
159 '500':
160 description: Internal error
161 /config:
Mohamed Abukarb175b942019-05-09 16:30:58 +0300162 put:
163 summary: Modify xApp config
164 tags:
165 - xapp
166 operationId: ModifyXappConfig
167 consumes:
168 - application/json
169 produces:
170 - application/json
171 parameters:
Abukar Mohamed059775c2019-05-22 14:48:10 +0000172 - name: XAppConfig
Mohamed Abukarb175b942019-05-09 16:30:58 +0300173 in: body
174 description: xApp config
175 schema:
Abukar Mohamed059775c2019-05-22 14:48:10 +0000176 $ref: '#/definitions/XAppConfig'
Mohamed Abukarb175b942019-05-09 16:30:58 +0300177 responses:
178 '200':
179 description: xApp config successfully modified
180 schema:
Mohamed Abukar34e43832019-11-13 17:57:15 +0200181 $ref: '#/definitions/ConfigValidationErrors'
Mohamed Abukarb175b942019-05-09 16:30:58 +0300182 '400':
183 description: Invalid input
184 '422':
185 description: Validation of configuration failed
186 '500':
187 description: Internal error
188 get:
189 summary: Returns the configuration of all xapps
190 tags:
191 - xapp
192 operationId: getAllXappConfig
193 produces:
194 - application/json
195 responses:
196 '200':
197 description: successful query of xApp config
198 schema:
199 $ref: '#/definitions/AllXappConfig'
200 '500':
201 description: Internal error
Mohamed Abukaraca8f3c2020-01-14 11:10:16 +0200202 /config/{element}:
Mohamed Abukar34e43832019-11-13 17:57:15 +0200203 get:
Mohamed Abukaraca8f3c2020-01-14 11:10:16 +0200204 summary: Returns the given element of the configuration
Mohamed Abukar34e43832019-11-13 17:57:15 +0200205 tags:
206 - xapp
Mohamed Abukaraca8f3c2020-01-14 11:10:16 +0200207 operationId: GetConfigElement
Mohamed Abukar34e43832019-11-13 17:57:15 +0200208 produces:
209 - application/json
210 parameters:
Mohamed Abukaraca8f3c2020-01-14 11:10:16 +0200211 - name: element
Mohamed Abukar34e43832019-11-13 17:57:15 +0200212 in: path
Mohamed Abukaraca8f3c2020-01-14 11:10:16 +0200213 description: Name of configuration element
Mohamed Abukar34e43832019-11-13 17:57:15 +0200214 required: true
215 type: string
216 responses:
217 '200':
Mohamed Abukaraca8f3c2020-01-14 11:10:16 +0200218 description: successful query of config elements
Mohamed Abukar34e43832019-11-13 17:57:15 +0200219 schema:
Mohamed Abukaraca8f3c2020-01-14 11:10:16 +0200220 $ref: '#/definitions/AllXappConfig'
Mohamed Abukar34e43832019-11-13 17:57:15 +0200221 '500':
222 description: Internal error
Mohamed Abukarb175b942019-05-09 16:30:58 +0300223 /subscriptions:
224 post:
225 summary: Subscribe event
226 tags:
227 - xapp
228 - subscriptions
229 operationId: addSubscription
230 consumes:
231 - application/json
232 produces:
233 - application/json
234 parameters:
235 - name: subscriptionRequest
236 in: body
237 description: New subscription
238 required: true
239 schema:
240 $ref: '#/definitions/subscriptionRequest'
241 responses:
Mohamed Abukar7959da32019-07-05 16:21:18 +0300242 '201':
243 description: Subscription successfully created
Mohamed Abukarb175b942019-05-09 16:30:58 +0300244 schema:
245 $ref: '#/definitions/subscriptionResponse'
246 '400':
247 description: Invalid input
248 get:
249 summary: Returns all subscriptions
250 tags:
251 - xapp
252 - subscriptions
253 operationId: getSubscriptions
254 produces:
255 - application/json
256 responses:
257 '200':
258 description: successful query of subscriptions
259 schema:
260 $ref: '#/definitions/allSubscriptions'
Mohamed Abukar34e43832019-11-13 17:57:15 +0200261 /subscriptions/{subscriptionId}:
Mohamed Abukarb175b942019-05-09 16:30:58 +0300262 get:
263 summary: Returns the information of subscription
264 tags:
265 - xapp
266 - subscriptions
267 operationId: getSubscriptionById
268 produces:
269 - application/json
270 parameters:
271 - name: subscriptionId
272 in: path
273 description: ID of subscription
274 required: true
Abukar Mohamed059775c2019-05-22 14:48:10 +0000275 type: string
Mohamed Abukarb175b942019-05-09 16:30:58 +0300276 responses:
277 '200':
278 description: successful operation
279 schema:
280 $ref: '#/definitions/subscription'
281 '400':
282 description: Invalid ID supplied
283 '404':
284 description: Subscription not found
285 put:
286 summary: Modify event subscription
287 tags:
288 - xapp
289 - subscriptions
290 operationId: modifySubscription
291 consumes:
292 - application/json
293 produces:
294 - application/json
295 parameters:
296 - name: subscriptionId
297 in: path
298 description: ID of subscription
299 required: true
Abukar Mohamed059775c2019-05-22 14:48:10 +0000300 type: string
Mohamed Abukarb175b942019-05-09 16:30:58 +0300301 - in: body
302 name: subscriptionRequest
303 description: Modified subscription
304 required: true
305 schema:
306 $ref: '#/definitions/subscriptionRequest'
307 responses:
308 '200':
309 description: Subscription modification successful
310 schema:
311 $ref: '#/definitions/subscriptionResponse'
312 '400':
313 description: Invalid input
314 delete:
315 summary: Unsubscribe event
316 tags:
317 - xapp
318 - subscriptions
319 description: ''
320 operationId: deleteSubscription
321 parameters:
322 - name: subscriptionId
323 in: path
324 description: ID of subscription
325 required: true
Abukar Mohamed059775c2019-05-22 14:48:10 +0000326 type: string
Mohamed Abukarb175b942019-05-09 16:30:58 +0300327 responses:
328 '204':
329 description: Successful deletion of subscription
330 '400':
331 description: Invalid subscription supplied
332definitions:
Mohamed Abukar91357512019-06-20 06:37:13 +0300333 AllDeployableXapps:
334 type: array
335 items:
336 type: string
Mohamed Abukar91357512019-06-20 06:37:13 +0300337 AllDeployedXapps:
Mohamed Abukarb175b942019-05-09 16:30:58 +0300338 type: array
339 items:
340 $ref: '#/definitions/Xapp'
341 Xapp:
342 type: object
343 required:
344 - name
345 properties:
346 name:
347 type: string
Mohamed Abukarb175b942019-05-09 16:30:58 +0300348 status:
349 type: string
350 description: xapp status in the RIC
351 enum:
352 - unknown
353 - deployed
354 - deleted
355 - superseded
356 - failed
357 - deleting
358 version:
359 type: string
Mohamed Abukarb175b942019-05-09 16:30:58 +0300360 instances:
361 type: array
362 items:
363 $ref: '#/definitions/XappInstance'
364 XappInstance:
365 type: object
366 required:
367 - name
368 properties:
369 name:
370 type: string
Mohamed Abukarb175b942019-05-09 16:30:58 +0300371 status:
372 type: string
373 description: xapp instance status
374 enum:
375 - pending
376 - running
377 - succeeded
378 - failed
379 - unknown
380 - completed
381 - crashLoopBackOff
382 ip:
383 type: string
Mohamed Abukarb175b942019-05-09 16:30:58 +0300384 port:
385 type: integer
Mohamed Abukarb175b942019-05-09 16:30:58 +0300386 txMessages:
387 type: array
388 items:
389 type: string
Mohamed Abukarb175b942019-05-09 16:30:58 +0300390 rxMessages:
391 type: array
392 items:
393 type: string
Mohamed Abukare71a5a52019-12-05 08:26:30 +0200394 policies:
395 type: array
396 items:
397 type: integer
Mohamed Abukar34e43832019-11-13 17:57:15 +0200398 XappDescriptor:
399 type: object
400 required:
401 - xappName
402 properties:
403 xappName:
404 type: string
405 description: Name of the xApp in helm chart
406 helmVersion:
407 type: string
408 description: The exact xapp helm chart version to install
409 releaseName:
410 type: string
411 description: Name of the xapp to be visible in Kubernetes
412 namespace:
413 type: string
414 description: Name of the namespace to which xApp is deployed. Overrides the value given in Helm chart value file.
415 overrideFile:
416 type: object
417 description: JSON string of override file for 'helm install' command
418 XappDescriptorList:
419 type: array
420 items:
421 $ref: '#/definitions/XappDescriptor'
Abukar Mohamed059775c2019-05-22 14:48:10 +0000422 ConfigMetadata:
Mohamed Abukarb175b942019-05-09 16:30:58 +0300423 type: object
424 required:
Mohamed Abukaraca8f3c2020-01-14 11:10:16 +0200425 - xappName
426 - namespace
Mohamed Abukarb175b942019-05-09 16:30:58 +0300427 properties:
Mohamed Abukaraca8f3c2020-01-14 11:10:16 +0200428 xappName:
Mohamed Abukarb175b942019-05-09 16:30:58 +0300429 type: string
430 description: Name of the xApp
Mohamed Abukarb175b942019-05-09 16:30:58 +0300431 namespace:
432 type: string
433 description: Name of the namespace
Mohamed Abukar34e43832019-11-13 17:57:15 +0200434 ConfigValidationError:
435 type: object
436 required:
437 - field
438 - error
439 properties:
440 field:
441 type: string
442 description: Name of the parameter
443 error:
444 type: string
445 description: Description of validation error
446 ConfigValidationErrors:
447 type: array
448 items:
449 $ref: '#/definitions/ConfigValidationError'
Abukar Mohamed059775c2019-05-22 14:48:10 +0000450 XAppConfig:
Mohamed Abukarb175b942019-05-09 16:30:58 +0300451 type: object
452 required:
Abukar Mohamed059775c2019-05-22 14:48:10 +0000453 - metadata
Abukar Mohamed059775c2019-05-22 14:48:10 +0000454 - config
Mohamed Abukarb175b942019-05-09 16:30:58 +0300455 properties:
Abukar Mohamed059775c2019-05-22 14:48:10 +0000456 metadata:
457 $ref: '#/definitions/ConfigMetadata'
Abukar Mohamed059775c2019-05-22 14:48:10 +0000458 config:
Mohamed Abukarb175b942019-05-09 16:30:58 +0300459 type: object
460 description: Configuration in JSON format
461 AllXappConfig:
462 type: array
463 items:
Abukar Mohamed059775c2019-05-22 14:48:10 +0000464 $ref: '#/definitions/XAppConfig'
Mohamed Abukar34e43832019-11-13 17:57:15 +0200465 EventType:
466 type: string
467 description: Event which is subscribed
468 enum:
469 - deployed
470 - undeployed
471 - created
472 - modified
473 - deleted
474 - restarted
475 - all
476 SubscriptionData:
Mohamed Abukarb175b942019-05-09 16:30:58 +0300477 type: object
478 required:
479 - targetUrl
480 - eventType
481 - maxRetries
482 - retryTimer
483 properties:
484 targetUrl:
485 type: string
486 example: 'http://localhost:11111/apps/webhook/'
487 eventType:
Mohamed Abukar34e43832019-11-13 17:57:15 +0200488 $ref: '#/definitions/EventType'
Mohamed Abukarb175b942019-05-09 16:30:58 +0300489 maxRetries:
490 type: integer
491 description: Maximum number of retries
Mohamed Abukarb175b942019-05-09 16:30:58 +0300492 retryTimer:
493 type: integer
494 description: Time in seconds to wait before next retry
Mohamed Abukar34e43832019-11-13 17:57:15 +0200495 subscriptionRequest:
496 type: object
497 required:
498 - data
499 properties:
500 data:
501 $ref: '#/definitions/SubscriptionData'
Mohamed Abukarb175b942019-05-09 16:30:58 +0300502 subscriptionResponse:
503 type: object
504 properties:
505 id:
506 type: string
Mohamed Abukarb175b942019-05-09 16:30:58 +0300507 version:
508 type: integer
Mohamed Abukarb175b942019-05-09 16:30:58 +0300509 eventType:
Mohamed Abukar34e43832019-11-13 17:57:15 +0200510 $ref: '#/definitions/EventType'
Mohamed Abukarb175b942019-05-09 16:30:58 +0300511 allSubscriptions:
512 type: array
513 items:
514 $ref: '#/definitions/subscription'
515 subscription:
516 type: object
517 properties:
518 id:
519 type: string
Mohamed Abukar34e43832019-11-13 17:57:15 +0200520 data:
521 $ref: '#/definitions/SubscriptionData'
Mohamed Abukarb175b942019-05-09 16:30:58 +0300522 subscriptionNotification:
523 type: object
524 properties:
525 id:
526 type: string
Mohamed Abukarb175b942019-05-09 16:30:58 +0300527 version:
528 type: integer
Mohamed Abukarb175b942019-05-09 16:30:58 +0300529 eventType:
Mohamed Abukar34e43832019-11-13 17:57:15 +0200530 $ref: '#/definitions/EventType'
Mohamed Abukarb175b942019-05-09 16:30:58 +0300531 xApps:
Mohamed Abukar91357512019-06-20 06:37:13 +0300532 $ref: '#/definitions/AllDeployedXapps'