blob: 306b15a893b634e5e1af956761ca3491131d5679 [file] [log] [blame]
PatrikBuhr1b8d76d2020-01-30 16:10:19 +01001swagger: '2.0'
2info:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +01003 description: This page lists all the rest apis for the service.
PatrikBuhr1b8d76d2020-01-30 16:10:19 +01004 version: '1.0'
PatrikBuhr6a8a0d52020-03-09 08:01:52 +01005 title: A1 Policy management service
PatrikBuhr1b8d76d2020-01-30 16:10:19 +01006host: 'localhost:8081'
7basePath: /
8tags:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +01009 - name: A1 Policy Management
10 description: Policy Controller
11 - name: Health check
12 description: Status Controller
13 - name: RIC Repository
14 description: Ric Repository Controller
15 - name: Service registry and supervision
16 description: Service Controller
PatrikBuhr1b8d76d2020-01-30 16:10:19 +010017paths:
PatrikBuhr1b8d76d2020-01-30 16:10:19 +010018 /policies:
19 get:
20 tags:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +010021 - A1 Policy Management
PatrikBuhr1b8d76d2020-01-30 16:10:19 +010022 summary: Query policies
23 operationId: getPoliciesUsingGET
24 produces:
25 - '*/*'
26 parameters:
27 - name: ric
28 in: query
29 description: ric
30 required: false
31 type: string
32 - name: service
33 in: query
34 description: service
35 required: false
36 type: string
37 - name: type
38 in: query
39 description: type
40 required: false
41 type: string
42 responses:
43 '200':
44 description: Policies
45 schema:
46 type: array
47 items:
48 $ref: '#/definitions/PolicyInfo'
49 '401':
50 description: Unauthorized
51 '403':
52 description: Forbidden
53 '404':
PatrikBuhr6a8a0d52020-03-09 08:01:52 +010054 description: RIC or type not found
55 schema:
56 type: string
PatrikBuhr1b8d76d2020-01-30 16:10:19 +010057 deprecated: false
58 /policy:
59 get:
60 tags:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +010061 - A1 Policy Management
PatrikBuhr1b8d76d2020-01-30 16:10:19 +010062 summary: Returns a policy configuration
63 operationId: getPolicyUsingGET
64 produces:
65 - '*/*'
66 parameters:
elinuxhenrikf85d5642020-04-03 09:24:52 +020067 - name: id
PatrikBuhr1b8d76d2020-01-30 16:10:19 +010068 in: query
elinuxhenrikf85d5642020-04-03 09:24:52 +020069 description: id
PatrikBuhr1b8d76d2020-01-30 16:10:19 +010070 required: true
71 type: string
72 responses:
73 '200':
74 description: Policy found
75 schema:
76 type: object
PatrikBuhr1b8d76d2020-01-30 16:10:19 +010077 '401':
78 description: Unauthorized
79 '403':
80 description: Forbidden
81 '404':
PatrikBuhr6a8a0d52020-03-09 08:01:52 +010082 description: Policy is not found
PatrikBuhr1b8d76d2020-01-30 16:10:19 +010083 deprecated: false
84 put:
85 tags:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +010086 - A1 Policy Management
PatrikBuhr1b8d76d2020-01-30 16:10:19 +010087 summary: Put a policy
88 operationId: putPolicyUsingPUT
89 consumes:
90 - application/json
91 produces:
92 - '*/*'
93 parameters:
elinuxhenrikf85d5642020-04-03 09:24:52 +020094 - name: id
PatrikBuhr1b8d76d2020-01-30 16:10:19 +010095 in: query
elinuxhenrikf85d5642020-04-03 09:24:52 +020096 description: id
PatrikBuhr1b8d76d2020-01-30 16:10:19 +010097 required: true
98 type: string
99 - in: body
100 name: jsonBody
101 description: jsonBody
102 required: true
103 schema:
104 type: object
105 - name: ric
106 in: query
107 description: ric
108 required: true
109 type: string
110 - name: service
111 in: query
112 description: service
113 required: true
114 type: string
115 - name: type
116 in: query
117 description: type
PatrikBuhr2753ad52020-03-18 13:38:58 +0100118 required: false
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100119 type: string
120 responses:
121 '200':
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100122 description: Policy updated
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100123 schema:
PatrikBuhrc5c25192020-03-11 14:15:50 +0100124 type: object
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100125 '201':
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100126 description: Policy created
127 schema:
PatrikBuhrc5c25192020-03-11 14:15:50 +0100128 type: object
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100129 '401':
130 description: Unauthorized
131 '403':
132 description: Forbidden
133 '404':
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100134 description: RIC or policy type is not found
135 schema:
136 type: string
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100137 '423':
PatrikBuhr2bfc1442020-04-07 14:26:26 +0200138 description: RIC is not operational
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100139 schema:
140 type: string
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100141 deprecated: false
142 delete:
143 tags:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100144 - A1 Policy Management
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100145 summary: Delete a policy
146 operationId: deletePolicyUsingDELETE
147 produces:
148 - '*/*'
149 parameters:
elinuxhenrikf85d5642020-04-03 09:24:52 +0200150 - name: id
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100151 in: query
elinuxhenrikf85d5642020-04-03 09:24:52 +0200152 description: id
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100153 required: true
154 type: string
155 responses:
156 '200':
157 description: OK
158 schema:
159 type: object
160 '204':
161 description: Policy deleted
162 schema:
163 type: object
164 '401':
165 description: Unauthorized
166 '403':
167 description: Forbidden
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100168 '404':
169 description: Policy is not found
170 schema:
171 type: string
172 '423':
PatrikBuhr2bfc1442020-04-07 14:26:26 +0200173 description: RIC is not operational
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100174 schema:
175 type: string
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100176 deprecated: false
PatrikBuhr2753ad52020-03-18 13:38:58 +0100177 /policy_ids:
178 get:
179 tags:
180 - A1 Policy Management
181 summary: 'Query policies, only IDs returned'
182 operationId: getPolicyIdsUsingGET
183 produces:
184 - '*/*'
185 parameters:
186 - name: ric
187 in: query
188 description: ric
189 required: false
190 type: string
191 - name: service
192 in: query
193 description: service
194 required: false
195 type: string
196 - name: type
197 in: query
198 description: type
199 required: false
200 type: string
201 responses:
202 '200':
203 description: Policy ids
204 schema:
205 type: array
206 items:
207 type: string
208 '401':
209 description: Unauthorized
210 '403':
211 description: Forbidden
212 '404':
213 description: RIC or type not found
214 schema:
215 type: string
216 deprecated: false
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100217 /policy_schema:
218 get:
219 tags:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100220 - A1 Policy Management
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100221 summary: Returns one policy type schema definition
222 operationId: getPolicySchemaUsingGET
223 produces:
224 - '*/*'
225 parameters:
226 - name: id
227 in: query
228 description: id
229 required: true
230 type: string
231 responses:
232 '200':
233 description: Policy schema
234 schema:
235 type: object
236 '401':
237 description: Unauthorized
238 '403':
239 description: Forbidden
240 '404':
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100241 description: RIC is not found
242 schema:
243 type: string
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100244 deprecated: false
245 /policy_schemas:
246 get:
247 tags:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100248 - A1 Policy Management
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100249 summary: Returns policy type schema definitions
250 operationId: getPolicySchemasUsingGET
251 produces:
252 - '*/*'
253 parameters:
254 - name: ric
255 in: query
256 description: ric
257 required: false
258 type: string
259 responses:
260 '200':
261 description: Policy schemas
262 schema:
263 type: array
264 items:
PatrikBuhrb40e1b42020-02-07 12:59:09 +0100265 type: object
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100266 '401':
267 description: Unauthorized
268 '403':
269 description: Forbidden
270 '404':
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100271 description: RIC is not found
272 schema:
273 type: string
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100274 deprecated: false
275 /policy_status:
276 get:
277 tags:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100278 - A1 Policy Management
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100279 summary: Returns a policy status
280 operationId: getPolicyStatusUsingGET
281 produces:
282 - '*/*'
283 parameters:
elinuxhenrikf85d5642020-04-03 09:24:52 +0200284 - name: id
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100285 in: query
elinuxhenrikf85d5642020-04-03 09:24:52 +0200286 description: id
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100287 required: true
288 type: string
289 responses:
290 '200':
291 description: Policy status
292 schema:
293 type: object
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100294 '401':
295 description: Unauthorized
296 '403':
297 description: Forbidden
298 '404':
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100299 description: Policy is not found
300 schema:
301 type: string
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100302 deprecated: false
303 /policy_types:
304 get:
305 tags:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100306 - A1 Policy Management
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100307 summary: Query policy type names
308 operationId: getPolicyTypesUsingGET
309 produces:
310 - '*/*'
311 parameters:
312 - name: ric
313 in: query
314 description: ric
315 required: false
316 type: string
317 responses:
318 '200':
319 description: Policy type names
320 schema:
321 type: array
322 items:
323 type: string
324 '401':
325 description: Unauthorized
326 '403':
327 description: Forbidden
328 '404':
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100329 description: RIC is not found
330 schema:
331 type: string
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100332 deprecated: false
333 /ric:
334 get:
335 tags:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100336 - RIC Repository
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100337 summary: Returns the name of a RIC managing one Mananged Element
338 operationId: getRicUsingGET
339 produces:
340 - '*/*'
341 parameters:
342 - name: managedElementId
343 in: query
344 description: managedElementId
PatrikBuhr2bfc1442020-04-07 14:26:26 +0200345 required: true
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100346 type: string
347 responses:
348 '200':
elinuxhenrike0fab9a2020-03-31 17:59:49 +0200349 description: RIC is found
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100350 schema:
351 type: string
352 '401':
353 description: Unauthorized
354 '403':
355 description: Forbidden
356 '404':
elinuxhenrike0fab9a2020-03-31 17:59:49 +0200357 description: RIC is not found
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100358 schema:
359 type: string
360 deprecated: false
361 /rics:
362 get:
363 tags:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100364 - RIC Repository
elinuxhenrike0fab9a2020-03-31 17:59:49 +0200365 summary: Query Near-RT RIC information
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100366 operationId: getRicsUsingGET
367 produces:
368 - '*/*'
369 parameters:
370 - name: policyType
371 in: query
372 description: policyType
373 required: false
374 type: string
375 responses:
376 '200':
377 description: OK
378 schema:
379 type: array
380 items:
381 $ref: '#/definitions/RicInfo'
382 '401':
383 description: Unauthorized
384 '403':
385 description: Forbidden
386 '404':
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100387 description: Policy type is not found
388 schema:
389 type: string
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100390 deprecated: false
391 /service:
392 put:
393 tags:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100394 - Service registry and supervision
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100395 summary: Register a service
396 operationId: putServiceUsingPUT
397 consumes:
398 - application/json
399 produces:
400 - '*/*'
401 parameters:
402 - in: body
403 name: registrationInfo
404 description: registrationInfo
405 required: true
406 schema:
407 $ref: '#/definitions/ServiceRegistrationInfo'
408 responses:
409 '200':
PatrikBuhr643ba182020-03-27 15:44:54 +0100410 description: Service updated
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100411 schema:
412 type: string
413 '201':
PatrikBuhr643ba182020-03-27 15:44:54 +0100414 description: Service created
415 schema:
416 type: string
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100417 '400':
PatrikBuhr2bfc1442020-04-07 14:26:26 +0200418 description: The ServiceRegistrationInfo is not accepted
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100419 schema:
420 type: string
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100421 '401':
422 description: Unauthorized
423 '403':
424 description: Forbidden
425 '404':
426 description: Not Found
427 deprecated: false
428 /services:
429 get:
430 tags:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100431 - Service registry and supervision
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100432 summary: Returns service information
433 operationId: getServicesUsingGET
434 produces:
435 - '*/*'
436 parameters:
437 - name: name
438 in: query
439 description: name
440 required: false
441 type: string
442 responses:
443 '200':
444 description: OK
445 schema:
446 type: array
447 items:
448 $ref: '#/definitions/ServiceStatus'
449 '401':
450 description: Unauthorized
451 '403':
452 description: Forbidden
453 '404':
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100454 description: Service is not found
455 schema:
456 type: string
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100457 deprecated: false
458 delete:
459 tags:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100460 - Service registry and supervision
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100461 summary: Delete a service
462 operationId: deleteServiceUsingDELETE
463 produces:
464 - '*/*'
465 parameters:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100466 - name: name
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100467 in: query
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100468 description: name
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100469 required: true
470 type: string
471 responses:
472 '200':
473 description: OK
474 schema:
475 type: string
476 '204':
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100477 description: OK
478 schema:
479 type: string
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100480 '401':
481 description: Unauthorized
482 '403':
483 description: Forbidden
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100484 '404':
485 description: Service not found
486 schema:
487 type: string
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100488 deprecated: false
489 /services/keepalive:
PatrikBuhr2bfc1442020-04-07 14:26:26 +0200490 put:
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100491 tags:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100492 - Service registry and supervision
PatrikBuhr2753ad52020-03-18 13:38:58 +0100493 summary: Heartbeat from a serice
PatrikBuhr2bfc1442020-04-07 14:26:26 +0200494 operationId: keepAliveServiceUsingPUT
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100495 consumes:
496 - application/json
497 produces:
498 - '*/*'
499 parameters:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100500 - name: name
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100501 in: query
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100502 description: name
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100503 required: true
504 type: string
505 responses:
506 '200':
PatrikBuhr2753ad52020-03-18 13:38:58 +0100507 description: 'Service supervision timer refreshed, OK'
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100508 schema:
509 type: string
510 '201':
511 description: Created
512 '401':
513 description: Unauthorized
514 '403':
515 description: Forbidden
516 '404':
517 description: 'The service is not found, needs re-registration'
518 deprecated: false
519 /status:
520 get:
521 tags:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100522 - Health check
PatrikBuhrb40e1b42020-02-07 12:59:09 +0100523 summary: Returns status and statistics of this service
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100524 operationId: getStatusUsingGET
525 produces:
526 - '*/*'
527 responses:
528 '200':
529 description: Service is living
530 schema:
531 type: string
532 '401':
533 description: Unauthorized
534 '403':
535 description: Forbidden
536 '404':
537 description: Not Found
538 deprecated: false
539definitions:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100540 Mono«ResponseEntity«object»»:
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100541 type: object
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100542 title: Mono«ResponseEntity«object»»
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100543 Mono«ResponseEntity«string»»:
544 type: object
545 title: Mono«ResponseEntity«string»»
546 PolicyInfo:
547 type: object
548 properties:
549 id:
550 type: string
551 description: identity of the policy
552 json:
PatrikBuhrb40e1b42020-02-07 12:59:09 +0100553 type: object
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100554 description: the configuration of the policy
555 lastModified:
556 type: string
557 description: 'timestamp, last modification time'
558 ric:
559 type: string
elinuxhenrike0fab9a2020-03-31 17:59:49 +0200560 description: identity of the target Near-RT RIC
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100561 service:
562 type: string
563 description: the name of the service owning the policy
564 type:
565 type: string
566 description: name of the policy type
567 title: PolicyInfo
568 RicInfo:
569 type: object
570 properties:
571 managedElementIds:
572 type: array
573 description: O1 identities for managed entities
574 items:
575 type: string
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100576 policyTypes:
577 type: array
578 description: supported policy types
579 items:
580 type: string
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100581 ricName:
582 type: string
583 description: identity of the ric
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100584 title: RicInfo
585 ServiceRegistrationInfo:
586 type: object
PatrikBuhrc5c25192020-03-11 14:15:50 +0100587 required:
588 - serviceName
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100589 properties:
590 callbackUrl:
591 type: string
elinuxhenrika2ad32a2020-03-18 10:04:13 +0100592 description: callback for notifying of RIC synchronization
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100593 keepAliveIntervalSeconds:
594 type: integer
595 format: int64
PatrikBuhr2753ad52020-03-18 13:38:58 +0100596 description: 'keep alive interval for the service. This is a heartbeat supervision of the service, which in regular intevals must invoke a ''keepAlive'' REST call. When a service does not invoke this call within the given time, it is considered unavailble. An unavailable service will be automatically deregistered and its policies will be deleted. Value 0 means no timeout supervision.'
PatrikBuhrb40e1b42020-02-07 12:59:09 +0100597 serviceName:
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100598 type: string
599 description: identity of the service
600 title: ServiceRegistrationInfo
601 ServiceStatus:
602 type: object
603 properties:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100604 callbackUrl:
605 type: string
elinuxhenrika2ad32a2020-03-18 10:04:13 +0100606 description: callback for notifying of RIC synchronization
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100607 keepAliveIntervalSeconds:
608 type: integer
609 format: int64
610 description: policy keep alive timeout
PatrikBuhrb40e1b42020-02-07 12:59:09 +0100611 serviceName:
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100612 type: string
613 description: identity of the service
PatrikBuhr2753ad52020-03-18 13:38:58 +0100614 timeSinceLastActivitySeconds:
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100615 type: integer
616 format: int64
617 description: time since last invocation by the service
618 title: ServiceStatus
PatrikBuhr643ba182020-03-27 15:44:54 +0100619