blob: f3dd06c67f6fa295248f8fc2ec875c905153a936 [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
PatrikBuhr4db5e7d2020-05-13 10:55:14 +0200115 - name: transient
116 in: query
117 description: transient
118 required: false
119 type: boolean
120 default: false
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100121 - name: type
122 in: query
123 description: type
PatrikBuhr2753ad52020-03-18 13:38:58 +0100124 required: false
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100125 type: string
126 responses:
127 '200':
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100128 description: Policy updated
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100129 schema:
PatrikBuhrc5c25192020-03-11 14:15:50 +0100130 type: object
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100131 '201':
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100132 description: Policy created
133 schema:
PatrikBuhrc5c25192020-03-11 14:15:50 +0100134 type: object
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100135 '401':
136 description: Unauthorized
137 '403':
138 description: Forbidden
139 '404':
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100140 description: RIC or policy type is not found
141 schema:
142 type: string
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100143 '423':
PatrikBuhr2bfc1442020-04-07 14:26:26 +0200144 description: RIC is not operational
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100145 schema:
146 type: string
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100147 deprecated: false
148 delete:
149 tags:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100150 - A1 Policy Management
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100151 summary: Delete a policy
152 operationId: deletePolicyUsingDELETE
153 produces:
154 - '*/*'
155 parameters:
elinuxhenrikf85d5642020-04-03 09:24:52 +0200156 - name: id
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100157 in: query
elinuxhenrikf85d5642020-04-03 09:24:52 +0200158 description: id
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100159 required: true
160 type: string
161 responses:
162 '200':
163 description: OK
164 schema:
165 type: object
166 '204':
167 description: Policy deleted
168 schema:
169 type: object
170 '401':
171 description: Unauthorized
172 '403':
173 description: Forbidden
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100174 '404':
175 description: Policy is not found
176 schema:
177 type: string
178 '423':
PatrikBuhr2bfc1442020-04-07 14:26:26 +0200179 description: RIC is not operational
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100180 schema:
181 type: string
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100182 deprecated: false
PatrikBuhr2753ad52020-03-18 13:38:58 +0100183 /policy_ids:
184 get:
185 tags:
186 - A1 Policy Management
187 summary: 'Query policies, only IDs returned'
188 operationId: getPolicyIdsUsingGET
189 produces:
190 - '*/*'
191 parameters:
192 - name: ric
193 in: query
194 description: ric
195 required: false
196 type: string
197 - name: service
198 in: query
199 description: service
200 required: false
201 type: string
202 - name: type
203 in: query
204 description: type
205 required: false
206 type: string
207 responses:
208 '200':
209 description: Policy ids
210 schema:
211 type: array
212 items:
213 type: string
214 '401':
215 description: Unauthorized
216 '403':
217 description: Forbidden
218 '404':
219 description: RIC or type not found
220 schema:
221 type: string
222 deprecated: false
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100223 /policy_schema:
224 get:
225 tags:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100226 - A1 Policy Management
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100227 summary: Returns one policy type schema definition
228 operationId: getPolicySchemaUsingGET
229 produces:
230 - '*/*'
231 parameters:
232 - name: id
233 in: query
234 description: id
235 required: true
236 type: string
237 responses:
238 '200':
239 description: Policy schema
240 schema:
241 type: object
242 '401':
243 description: Unauthorized
244 '403':
245 description: Forbidden
246 '404':
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100247 description: RIC is not found
248 schema:
249 type: string
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100250 deprecated: false
251 /policy_schemas:
252 get:
253 tags:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100254 - A1 Policy Management
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100255 summary: Returns policy type schema definitions
256 operationId: getPolicySchemasUsingGET
257 produces:
258 - '*/*'
259 parameters:
260 - name: ric
261 in: query
262 description: ric
263 required: false
264 type: string
265 responses:
266 '200':
267 description: Policy schemas
268 schema:
269 type: array
270 items:
PatrikBuhrb40e1b42020-02-07 12:59:09 +0100271 type: object
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100272 '401':
273 description: Unauthorized
274 '403':
275 description: Forbidden
276 '404':
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100277 description: RIC is not found
278 schema:
279 type: string
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100280 deprecated: false
281 /policy_status:
282 get:
283 tags:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100284 - A1 Policy Management
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100285 summary: Returns a policy status
286 operationId: getPolicyStatusUsingGET
287 produces:
288 - '*/*'
289 parameters:
elinuxhenrikf85d5642020-04-03 09:24:52 +0200290 - name: id
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100291 in: query
elinuxhenrikf85d5642020-04-03 09:24:52 +0200292 description: id
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100293 required: true
294 type: string
295 responses:
296 '200':
297 description: Policy status
298 schema:
299 type: object
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100300 '401':
301 description: Unauthorized
302 '403':
303 description: Forbidden
304 '404':
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100305 description: Policy is not found
306 schema:
307 type: string
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100308 deprecated: false
309 /policy_types:
310 get:
311 tags:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100312 - A1 Policy Management
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100313 summary: Query policy type names
314 operationId: getPolicyTypesUsingGET
315 produces:
316 - '*/*'
317 parameters:
318 - name: ric
319 in: query
320 description: ric
321 required: false
322 type: string
323 responses:
324 '200':
325 description: Policy type names
326 schema:
327 type: array
328 items:
329 type: string
330 '401':
331 description: Unauthorized
332 '403':
333 description: Forbidden
334 '404':
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100335 description: RIC is not found
336 schema:
337 type: string
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100338 deprecated: false
339 /ric:
340 get:
341 tags:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100342 - RIC Repository
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100343 summary: Returns the name of a RIC managing one Mananged Element
344 operationId: getRicUsingGET
345 produces:
346 - '*/*'
347 parameters:
348 - name: managedElementId
349 in: query
350 description: managedElementId
PatrikBuhr2bfc1442020-04-07 14:26:26 +0200351 required: true
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100352 type: string
353 responses:
354 '200':
elinuxhenrike0fab9a2020-03-31 17:59:49 +0200355 description: RIC is found
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100356 schema:
357 type: string
358 '401':
359 description: Unauthorized
360 '403':
361 description: Forbidden
362 '404':
elinuxhenrike0fab9a2020-03-31 17:59:49 +0200363 description: RIC is not found
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100364 schema:
365 type: string
366 deprecated: false
367 /rics:
368 get:
369 tags:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100370 - RIC Repository
elinuxhenrike0fab9a2020-03-31 17:59:49 +0200371 summary: Query Near-RT RIC information
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100372 operationId: getRicsUsingGET
373 produces:
374 - '*/*'
375 parameters:
376 - name: policyType
377 in: query
378 description: policyType
379 required: false
380 type: string
381 responses:
382 '200':
383 description: OK
384 schema:
385 type: array
386 items:
387 $ref: '#/definitions/RicInfo'
388 '401':
389 description: Unauthorized
390 '403':
391 description: Forbidden
392 '404':
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100393 description: Policy type is not found
394 schema:
395 type: string
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100396 deprecated: false
397 /service:
398 put:
399 tags:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100400 - Service registry and supervision
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100401 summary: Register a service
402 operationId: putServiceUsingPUT
403 consumes:
404 - application/json
405 produces:
406 - '*/*'
407 parameters:
408 - in: body
409 name: registrationInfo
410 description: registrationInfo
411 required: true
412 schema:
413 $ref: '#/definitions/ServiceRegistrationInfo'
414 responses:
415 '200':
PatrikBuhr643ba182020-03-27 15:44:54 +0100416 description: Service updated
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100417 schema:
418 type: string
419 '201':
PatrikBuhr643ba182020-03-27 15:44:54 +0100420 description: Service created
421 schema:
422 type: string
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100423 '400':
PatrikBuhr2bfc1442020-04-07 14:26:26 +0200424 description: The ServiceRegistrationInfo is not accepted
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100425 schema:
426 type: string
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100427 '401':
428 description: Unauthorized
429 '403':
430 description: Forbidden
431 '404':
432 description: Not Found
433 deprecated: false
434 /services:
435 get:
436 tags:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100437 - Service registry and supervision
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100438 summary: Returns service information
439 operationId: getServicesUsingGET
440 produces:
441 - '*/*'
442 parameters:
443 - name: name
444 in: query
445 description: name
446 required: false
447 type: string
448 responses:
449 '200':
450 description: OK
451 schema:
452 type: array
453 items:
454 $ref: '#/definitions/ServiceStatus'
455 '401':
456 description: Unauthorized
457 '403':
458 description: Forbidden
459 '404':
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100460 description: Service is not found
461 schema:
462 type: string
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100463 deprecated: false
464 delete:
465 tags:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100466 - Service registry and supervision
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100467 summary: Delete a service
468 operationId: deleteServiceUsingDELETE
469 produces:
470 - '*/*'
471 parameters:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100472 - name: name
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100473 in: query
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100474 description: name
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100475 required: true
476 type: string
477 responses:
478 '200':
479 description: OK
480 schema:
481 type: string
482 '204':
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100483 description: OK
484 schema:
485 type: string
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100486 '401':
487 description: Unauthorized
488 '403':
489 description: Forbidden
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100490 '404':
491 description: Service not found
492 schema:
493 type: string
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100494 deprecated: false
495 /services/keepalive:
PatrikBuhr2bfc1442020-04-07 14:26:26 +0200496 put:
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100497 tags:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100498 - Service registry and supervision
PatrikBuhr2753ad52020-03-18 13:38:58 +0100499 summary: Heartbeat from a serice
PatrikBuhr2bfc1442020-04-07 14:26:26 +0200500 operationId: keepAliveServiceUsingPUT
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100501 consumes:
502 - application/json
503 produces:
504 - '*/*'
505 parameters:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100506 - name: name
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100507 in: query
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100508 description: name
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100509 required: true
510 type: string
511 responses:
512 '200':
PatrikBuhr2753ad52020-03-18 13:38:58 +0100513 description: 'Service supervision timer refreshed, OK'
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100514 schema:
515 type: string
516 '201':
517 description: Created
518 '401':
519 description: Unauthorized
520 '403':
521 description: Forbidden
522 '404':
523 description: 'The service is not found, needs re-registration'
524 deprecated: false
525 /status:
526 get:
527 tags:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100528 - Health check
PatrikBuhrb40e1b42020-02-07 12:59:09 +0100529 summary: Returns status and statistics of this service
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100530 operationId: getStatusUsingGET
531 produces:
532 - '*/*'
533 responses:
534 '200':
535 description: Service is living
536 schema:
537 type: string
538 '401':
539 description: Unauthorized
540 '403':
541 description: Forbidden
542 '404':
543 description: Not Found
544 deprecated: false
545definitions:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100546 Mono«ResponseEntity«object»»:
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100547 type: object
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100548 title: Mono«ResponseEntity«object»»
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100549 Mono«ResponseEntity«string»»:
550 type: object
551 title: Mono«ResponseEntity«string»»
552 PolicyInfo:
553 type: object
554 properties:
555 id:
556 type: string
557 description: identity of the policy
558 json:
PatrikBuhrb40e1b42020-02-07 12:59:09 +0100559 type: object
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100560 description: the configuration of the policy
561 lastModified:
562 type: string
563 description: 'timestamp, last modification time'
564 ric:
565 type: string
elinuxhenrike0fab9a2020-03-31 17:59:49 +0200566 description: identity of the target Near-RT RIC
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100567 service:
568 type: string
569 description: the name of the service owning the policy
570 type:
571 type: string
572 description: name of the policy type
573 title: PolicyInfo
574 RicInfo:
575 type: object
576 properties:
577 managedElementIds:
578 type: array
579 description: O1 identities for managed entities
580 items:
581 type: string
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100582 policyTypes:
583 type: array
584 description: supported policy types
585 items:
586 type: string
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100587 ricName:
588 type: string
589 description: identity of the ric
elinuxhenrike0efbee2020-04-09 09:28:07 +0200590 state:
591 type: string
592 description: state info
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100593 title: RicInfo
594 ServiceRegistrationInfo:
595 type: object
PatrikBuhrc5c25192020-03-11 14:15:50 +0100596 required:
597 - serviceName
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100598 properties:
599 callbackUrl:
600 type: string
elinuxhenrika2ad32a2020-03-18 10:04:13 +0100601 description: callback for notifying of RIC synchronization
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100602 keepAliveIntervalSeconds:
603 type: integer
604 format: int64
PatrikBuhr2753ad52020-03-18 13:38:58 +0100605 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 +0100606 serviceName:
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100607 type: string
608 description: identity of the service
609 title: ServiceRegistrationInfo
610 ServiceStatus:
611 type: object
612 properties:
PatrikBuhr6a8a0d52020-03-09 08:01:52 +0100613 callbackUrl:
614 type: string
elinuxhenrika2ad32a2020-03-18 10:04:13 +0100615 description: callback for notifying of RIC synchronization
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100616 keepAliveIntervalSeconds:
617 type: integer
618 format: int64
619 description: policy keep alive timeout
PatrikBuhrb40e1b42020-02-07 12:59:09 +0100620 serviceName:
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100621 type: string
622 description: identity of the service
PatrikBuhr2753ad52020-03-18 13:38:58 +0100623 timeSinceLastActivitySeconds:
PatrikBuhr1b8d76d2020-01-30 16:10:19 +0100624 type: integer
625 format: int64
626 description: time since last invocation by the service
627 title: ServiceStatus
PatrikBuhr643ba182020-03-27 15:44:54 +0100628