blob: d34e94bef568e5fcea475c596439a3ca64cd3271 [file] [log] [blame]
PatrikBuhr1122b012021-01-20 12:21:52 +01001{
PatrikBuhrfee99552021-02-02 14:06:44 +01002 "components": {"schemas": {
PatrikBuhr1122b012021-01-20 12:21:52 +01003 "error_information": {
4 "description": "Problem as defined in https://tools.ietf.org/html/rfc7807",
5 "type": "object",
PatrikBuhr1122b012021-01-20 12:21:52 +01006 "properties": {
7 "detail": {
8 "description": " A human-readable explanation specific to this occurrence of the problem.",
9 "type": "string",
10 "example": "Policy type not found"
11 },
12 "status": {
13 "format": "int32",
14 "description": "The HTTP status code generated by the origin server for this occurrence of the problem. ",
15 "type": "integer",
16 "example": 503
17 }
18 }
19 },
PatrikBuhrfee99552021-02-02 14:06:44 +010020 "void": {
21 "description": "Void/empty",
22 "type": "object"
23 },
PatrikBuhr1122b012021-01-20 12:21:52 +010024 "status_info_v2": {
25 "type": "object",
PatrikBuhr1122b012021-01-20 12:21:52 +010026 "properties": {"status": {
27 "description": "status text",
28 "type": "string"
29 }}
30 },
31 "policy_info_v1": {
32 "type": "object",
PatrikBuhr1122b012021-01-20 12:21:52 +010033 "properties": {
34 "service": {
35 "description": "the name of the service owning the policy",
36 "type": "string"
37 },
38 "json": {
39 "description": "the configuration of the policy",
40 "type": "object"
41 },
42 "id": {
43 "description": "identity of the policy",
44 "type": "string"
45 },
46 "lastModified": {
47 "description": "timestamp, last modification time",
48 "type": "string"
49 },
50 "type": {
51 "description": "name of the policy type",
52 "type": "string"
53 },
54 "ric": {
55 "description": "identity of the target Near-RT RIC",
56 "type": "string"
57 }
58 }
59 },
PatrikBuhr1122b012021-01-20 12:21:52 +010060 "service_registration_info_v1": {
61 "type": "object",
PatrikBuhr1122b012021-01-20 12:21:52 +010062 "properties": {
63 "keepAliveIntervalSeconds": {
64 "format": "int64",
65 "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.",
66 "type": "integer"
67 },
68 "callbackUrl": {
69 "description": "callback for notifying of RIC synchronization",
70 "type": "string"
71 },
72 "serviceName": {"type": "string"}
73 }
74 },
PatrikBuhrfee99552021-02-02 14:06:44 +010075 "ric_info_v2": {
76 "description": "Information for a Near-RT RIC",
PatrikBuhr1122b012021-01-20 12:21:52 +010077 "type": "object",
PatrikBuhrfee99552021-02-02 14:06:44 +010078 "properties": {
79 "ric_id": {
80 "description": "identity of the Near-RT RIC",
81 "type": "string"
82 },
83 "managed_element_ids": {
84 "description": "O1 identities for managed entities",
85 "type": "array",
86 "items": {
87 "description": "O1 identities for managed entities",
88 "type": "string"
89 }
90 },
91 "state": {
92 "description": "Represents the states for a Near-RT RIC",
93 "type": "string",
94 "enum": [
95 "UNAVAILABLE",
96 "AVAILABLE",
97 "SYNCHRONIZING",
98 "CONSISTENCY_CHECK"
99 ]
100 },
101 "policytype_ids": {
102 "description": "supported policy types",
103 "type": "array",
104 "items": {
105 "description": "supported policy types",
106 "type": "string"
107 }
108 }
109 }
PatrikBuhr1122b012021-01-20 12:21:52 +0100110 },
111 "service_registration_info_v2": {
112 "description": "Information for one service",
113 "type": "object",
PatrikBuhr1122b012021-01-20 12:21:52 +0100114 "required": ["service_id"],
115 "properties": {
116 "callback_url": {
117 "description": "callback for notifying of Near-RT RIC state changes",
118 "type": "string"
119 },
120 "service_id": {
121 "description": "identity of the service",
122 "type": "string"
123 },
124 "keep_alive_interval_seconds": {
125 "format": "int64",
PatrikBuhrfee99552021-02-02 14:06:44 +0100126 "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.",
PatrikBuhr1122b012021-01-20 12:21:52 +0100127 "type": "integer"
128 }
129 }
130 },
PatrikBuhrfee99552021-02-02 14:06:44 +0100131 "policy_info_list_v2": {
132 "description": "List of policy information",
133 "type": "object",
134 "properties": {"policies": {
135 "description": "List of policy information",
136 "type": "array",
137 "items": {"$ref": "#/components/schemas/policy_info_v2"}
138 }}
139 },
PatrikBuhr1122b012021-01-20 12:21:52 +0100140 "ric_info_v1": {
141 "type": "object",
PatrikBuhr1122b012021-01-20 12:21:52 +0100142 "properties": {
143 "managedElementIds": {
144 "description": "O1 identities for managed entities",
145 "type": "array",
PatrikBuhrfee99552021-02-02 14:06:44 +0100146 "items": {
147 "description": "O1 identities for managed entities",
148 "type": "string"
149 }
PatrikBuhr1122b012021-01-20 12:21:52 +0100150 },
151 "policyTypes": {
152 "description": "supported policy types",
153 "type": "array",
PatrikBuhrfee99552021-02-02 14:06:44 +0100154 "items": {
155 "description": "supported policy types",
156 "type": "string"
157 }
PatrikBuhr1122b012021-01-20 12:21:52 +0100158 },
159 "state": {
160 "description": "state info",
161 "type": "string"
162 },
163 "ricName": {
164 "description": "identity of the Near-RT RIC",
165 "type": "string"
166 }
167 }
168 },
PatrikBuhrfee99552021-02-02 14:06:44 +0100169 "service_status_v1": {
170 "type": "object",
171 "properties": {
172 "keepAliveIntervalSeconds": {
173 "format": "int64",
174 "description": "policy keep alive timeout",
175 "type": "integer"
176 },
177 "timeSinceLastActivitySeconds": {
178 "format": "int64",
179 "description": "time since last invocation by the service",
180 "type": "integer"
181 },
182 "callbackUrl": {
183 "description": "callback for notifying of RIC synchronization",
184 "type": "string"
185 },
186 "serviceName": {
187 "description": "identity of the service",
188 "type": "string"
189 }
190 }
191 },
PatrikBuhr1122b012021-01-20 12:21:52 +0100192 "policy_status_info_v2": {
193 "description": "Status for one A1-P Policy",
194 "type": "object",
PatrikBuhr1122b012021-01-20 12:21:52 +0100195 "properties": {
196 "last_modified": {
197 "description": "timestamp, last modification time",
198 "type": "string"
199 },
200 "status": {
201 "description": "the Policy status",
202 "type": "object"
203 }
204 }
205 },
PatrikBuhr1122b012021-01-20 12:21:52 +0100206 "service_status_v2": {
PatrikBuhrfee99552021-02-02 14:06:44 +0100207 "description": "List of service information",
PatrikBuhr1122b012021-01-20 12:21:52 +0100208 "type": "object",
PatrikBuhr1122b012021-01-20 12:21:52 +0100209 "properties": {
210 "callback_url": {
211 "description": "callback for notifying of RIC synchronization",
212 "type": "string"
213 },
214 "service_id": {
215 "description": "identity of the service",
216 "type": "string"
217 },
218 "keep_alive_interval_seconds": {
219 "format": "int64",
220 "description": "policy keep alive timeout",
221 "type": "integer"
222 },
223 "time_since_last_activity_seconds": {
224 "format": "int64",
225 "description": "time since last invocation by the service",
226 "type": "integer"
227 }
228 }
229 },
PatrikBuhrfee99552021-02-02 14:06:44 +0100230 "ric_info_list_v2": {
231 "description": "List of Near-RT RIC information",
232 "type": "object",
233 "properties": {"rics": {
234 "description": "List of Near-RT RIC information",
235 "type": "array",
236 "items": {"$ref": "#/components/schemas/ric_info_v2"}
237 }}
238 },
PatrikBuhr1122b012021-01-20 12:21:52 +0100239 "policytype_v2": {
240 "description": "Policy type",
241 "type": "object",
PatrikBuhr1122b012021-01-20 12:21:52 +0100242 "properties": {"policy_schema": {
243 "description": "Policy type json scema. The schema is a json object following http://json-schema.org/draft-07/schema",
244 "type": "object"
245 }}
246 },
PatrikBuhr1122b012021-01-20 12:21:52 +0100247 "policytype_id_list_v2": {
248 "description": "Information about policy types",
249 "type": "object",
PatrikBuhr1122b012021-01-20 12:21:52 +0100250 "properties": {"policytype_ids": {
251 "description": "Policy type identities",
252 "type": "array",
PatrikBuhrfee99552021-02-02 14:06:44 +0100253 "items": {
254 "description": "Policy type identities",
255 "type": "string"
256 }
PatrikBuhr1122b012021-01-20 12:21:52 +0100257 }}
258 },
259 "policy_info_v2": {
260 "description": "Information for one A1-P Policy",
261 "type": "object",
PatrikBuhr1122b012021-01-20 12:21:52 +0100262 "required": [
263 "policy_data",
264 "policy_id",
265 "policytype_id",
266 "ric_id",
267 "service_id"
268 ],
269 "properties": {
270 "ric_id": {
271 "description": "identity of the target Near-RT RIC",
272 "type": "string"
273 },
274 "policy_id": {
275 "description": "identity of the policy",
276 "type": "string"
277 },
278 "transient": {
279 "description": "if true, the policy is deleted at RIC restart. If false, its value is maintained by this service until explicitly deleted. Default false.",
280 "type": "boolean"
281 },
282 "service_id": {
283 "description": "the name of the service owning the policy",
284 "type": "string"
285 },
286 "policy_data": {
287 "description": "the configuration of the policy",
288 "type": "object"
289 },
290 "status_notification_uri": {
291 "description": "Callback URI for policy status updates",
292 "type": "string"
293 },
294 "policytype_id": {
295 "description": "identity of the policy type",
296 "type": "string"
297 }
298 }
299 },
PatrikBuhrfee99552021-02-02 14:06:44 +0100300 "policy_id_list_v2": {
301 "description": "A list of policy identities",
302 "type": "object",
303 "properties": {"policy_ids": {
304 "description": "Policy identities",
305 "type": "array",
306 "items": {
307 "description": "Policy identities",
308 "type": "string"
309 }
310 }}
311 },
PatrikBuhr1122b012021-01-20 12:21:52 +0100312 "service_list_v2": {
313 "description": "List of service information",
314 "type": "object",
PatrikBuhr1122b012021-01-20 12:21:52 +0100315 "properties": {"service_list": {
316 "description": "List of service information",
317 "type": "array",
PatrikBuhrfee99552021-02-02 14:06:44 +0100318 "items": {"$ref": "#/components/schemas/service_status_v2"}
PatrikBuhr1122b012021-01-20 12:21:52 +0100319 }}
320 },
321 "service_callback_info_v2": {
322 "description": "Information transferred as in Service callbacks (callback_url)",
323 "type": "object",
PatrikBuhr1122b012021-01-20 12:21:52 +0100324 "required": [
325 "event_type",
326 "ric_id"
327 ],
328 "properties": {
329 "ric_id": {
330 "description": "identity of a Near-RT RIC",
331 "type": "string"
332 },
333 "event_type": {
334 "description": "values:\nAVAILABLE: the Near-RT RIC has become available for A1 Policy management",
335 "type": "string",
336 "enum": ["AVAILABLE"]
337 }
338 }
339 }
PatrikBuhrfee99552021-02-02 14:06:44 +0100340 }},
341 "openapi": "3.0.1",
342 "paths": {
343 "/policy_types": {"get": {
344 "summary": "Query policy type names",
345 "operationId": "getPolicyTypes",
346 "responses": {
347 "200": {
348 "description": "Policy type names",
349 "content": {"*/*": {"schema": {
350 "type": "array",
351 "items": {"type": "string"}
352 }}}
353 },
354 "404": {
355 "description": "Near-RT RIC is not found",
356 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
357 }
358 },
359 "parameters": [{
360 "schema": {"type": "string"},
361 "in": "query",
362 "name": "ric",
363 "description": "The name of the Near-RT RIC to get types for.",
364 "required": false
365 }],
366 "tags": ["A1 Policy Management V1.0"]
367 }},
368 "/a1-policy/v2/policy-instances": {"get": {
369 "summary": "Query for A1 policy instances",
370 "description": "Returns a list of A1 policies matching given search criteria. <br>If several query parameters are defined, the policies matching all conditions are returned.",
371 "operationId": "getPolicyInstances",
372 "responses": {
373 "200": {
374 "description": "Policies",
375 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/policy_info_list_v2"}}}
376 },
377 "404": {
378 "description": "Near-RT RIC, policy type or service not found",
379 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
380 }
381 },
382 "parameters": [
383 {
384 "schema": {"type": "string"},
385 "in": "query",
386 "name": "policytype_id",
387 "description": "The identity of the policy type to get policies for.",
388 "required": false
389 },
390 {
391 "schema": {"type": "string"},
392 "in": "query",
393 "name": "ric_id",
394 "description": "The identity of the Near-RT RIC to get policies for.",
395 "required": false
396 },
397 {
398 "schema": {"type": "string"},
399 "in": "query",
400 "name": "service_id",
401 "description": "The identity of the service to get policies for.",
402 "required": false
403 }
404 ],
405 "tags": ["A1 Policy Management"]
406 }},
407 "/a1-policy/v2/status": {"get": {
408 "summary": "Returns status and statistics of this service",
409 "operationId": "getStatus_1",
410 "responses": {"200": {
411 "description": "Service is living",
412 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/status_info_v2"}}}
413 }},
414 "tags": ["Health Check"]
415 }},
416 "/services": {
417 "get": {
418 "summary": "Returns service information",
419 "operationId": "getServices",
420 "responses": {
421 "200": {
422 "description": "OK",
423 "content": {"*/*": {"schema": {
424 "type": "array",
425 "items": {"$ref": "#/components/schemas/service_status_v1"}
426 }}}
427 },
428 "404": {
429 "description": "Service is not found",
430 "content": {"*/*": {"schema": {"type": "string"}}}
431 }
432 },
433 "parameters": [{
434 "schema": {"type": "string"},
435 "in": "query",
436 "name": "name",
437 "description": "The name of the service",
438 "required": false
439 }],
440 "tags": ["A1 Policy Management V1.0"]
441 },
442 "delete": {
PatrikBuhrb28e8112021-04-14 20:16:35 +0200443 "summary": "Unregister a service",
PatrikBuhrfee99552021-02-02 14:06:44 +0100444 "operationId": "deleteService",
445 "responses": {
446 "204": {
PatrikBuhrb28e8112021-04-14 20:16:35 +0200447 "description": "Service unregistered",
PatrikBuhrfee99552021-02-02 14:06:44 +0100448 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/void"}}}
449 },
450 "404": {
451 "description": "Service not found",
452 "content": {"*/*": {"schema": {"type": "string"}}}
453 }
454 },
455 "parameters": [{
456 "schema": {"type": "string"},
457 "in": "query",
458 "name": "name",
459 "description": "The name of the service",
460 "required": true
461 }],
462 "tags": ["A1 Policy Management V1.0"]
463 }
PatrikBuhr1122b012021-01-20 12:21:52 +0100464 },
PatrikBuhrfee99552021-02-02 14:06:44 +0100465 "/a1-policy/v2/rics/ric": {"get": {
466 "summary": "Returns info for one Near-RT RIC",
467 "description": "Either a Near-RT RIC identity or a Mananged Element identity can be specified.<br>The intention with Mananged Element identity is the ID used in O1 for accessing the traffical element (such as the ID of CU).",
468 "operationId": "getRic_1",
469 "responses": {
470 "200": {
471 "description": "Near-RT RIC is found",
472 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ric_info_v2"}}}
473 },
474 "404": {
475 "description": "Near-RT RIC is not found",
476 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
477 }
478 },
479 "parameters": [
480 {
481 "schema": {"type": "string"},
482 "in": "query",
483 "name": "managed_element_id",
484 "description": "The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned.",
485 "required": false
486 },
487 {
488 "schema": {"type": "string"},
489 "in": "query",
490 "name": "ric_id",
491 "description": "The identity of a Near-RT RIC to get information for.",
492 "required": false
493 }
494 ],
495 "tags": ["NearRT-RIC Repository"]
496 }},
497 "/a1-policy/v2/policy-types": {"get": {
498 "summary": "Query policy type identities",
499 "operationId": "getPolicyTypes_1",
500 "responses": {
501 "200": {
502 "description": "Policy type IDs",
503 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/policytype_id_list_v2"}}}
504 },
505 "404": {
506 "description": "Near-RT RIC is not found",
507 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
508 }
509 },
510 "parameters": [{
511 "schema": {"type": "string"},
512 "in": "query",
513 "name": "ric_id",
514 "description": "The identity of the Near-RT RIC to get types for.",
515 "required": false
516 }],
517 "tags": ["A1 Policy Management"]
518 }},
519 "/a1-policy/v2/policies/{policy_id}": {
520 "get": {
521 "summary": "Returns a policy",
522 "operationId": "getPolicy_1",
523 "responses": {
524 "200": {
525 "description": "Policy found",
526 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/policy_info_v2"}}}
527 },
528 "404": {
529 "description": "Policy is not found",
530 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
531 }
532 },
533 "parameters": [{
534 "schema": {"type": "string"},
535 "in": "path",
536 "name": "policy_id",
537 "required": true
538 }],
539 "tags": ["A1 Policy Management"]
540 },
541 "delete": {
542 "summary": "Delete a policy",
543 "operationId": "deletePolicy_1",
544 "responses": {
545 "200": {
546 "description": "Not used",
547 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/void"}}}
548 },
549 "423": {
550 "description": "Near-RT RIC is not operational",
551 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
552 },
553 "204": {
554 "description": "Policy deleted",
555 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/void"}}}
556 },
557 "404": {
558 "description": "Policy is not found",
559 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
560 }
561 },
562 "parameters": [{
563 "schema": {"type": "string"},
564 "in": "path",
565 "name": "policy_id",
566 "required": true
567 }],
568 "tags": ["A1 Policy Management"]
569 }
570 },
571 "/a1-policy/v2/configuration": {
572 "get": {
573 "summary": "Returns the contents of the configuration file",
574 "description": "Note that the file contents is not relevant if the Consul is used.",
575 "operationId": "getConfiguration",
576 "responses": {
577 "200": {
578 "description": "Configuration",
579 "content": {"application/json": {"schema": {"type": "object"}}}
580 },
581 "404": {
582 "description": "File is not found or readable",
583 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
584 }
585 },
586 "tags": ["Management of configuration"]
587 },
588 "put": {
589 "summary": "Replace the current configuration file with the given configuration",
590 "requestBody": {
591 "content": {"application/json": {"schema": {"type": "object"}}},
592 "required": true
593 },
594 "description": "Note that the file is ignored if the Consul is used.",
595 "operationId": "putConfiguration",
596 "responses": {
597 "200": {
598 "description": "Configuration updated",
599 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/void"}}}
600 },
601 "400": {
602 "description": "Invalid configuration provided",
603 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
604 },
605 "500": {
606 "description": "Something went wrong when replacing the configuration. Try again.",
607 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
608 }
609 },
610 "tags": ["Management of configuration"]
611 }
612 },
613 "/policy": {
614 "get": {
615 "summary": "Returns a policy configuration",
616 "operationId": "getPolicy",
617 "responses": {
618 "200": {
619 "description": "Policy found",
620 "content": {"*/*": {"schema": {"type": "object"}}}
621 },
622 "404": {
623 "description": "Policy is not found",
624 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
625 }
626 },
627 "parameters": [{
628 "schema": {"type": "string"},
629 "in": "query",
630 "name": "id",
631 "description": "The identity of the policy instance.",
632 "required": true
633 }],
634 "tags": ["A1 Policy Management V1.0"]
635 },
636 "delete": {
637 "summary": "Delete a policy",
638 "operationId": "deletePolicy",
639 "responses": {
640 "200": {
641 "description": "Not used",
642 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/void"}}}
643 },
644 "423": {
645 "description": "Near-RT RIC is not operational",
646 "content": {"*/*": {"schema": {"type": "string"}}}
647 },
648 "204": {
649 "description": "Policy deleted",
650 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/void"}}}
651 },
652 "404": {
653 "description": "Policy is not found",
654 "content": {"*/*": {"schema": {"type": "string"}}}
655 }
656 },
657 "parameters": [{
658 "schema": {"type": "string"},
659 "in": "query",
660 "name": "id",
661 "description": "The identity of the policy instance.",
662 "required": true
663 }],
664 "tags": ["A1 Policy Management V1.0"]
665 },
666 "put": {
667 "summary": "Put a policy",
668 "requestBody": {
669 "content": {"application/json": {"schema": {"type": "object"}}},
670 "required": true
671 },
672 "operationId": "putPolicy",
673 "responses": {
674 "200": {
675 "description": "Policy updated",
676 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/void"}}}
677 },
678 "201": {
679 "description": "Policy created",
680 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/void"}}}
681 },
682 "423": {
683 "description": "Near-RT RIC is not operational",
684 "content": {"*/*": {"schema": {"type": "string"}}}
685 },
686 "404": {
687 "description": "Near-RT RIC or policy type is not found",
688 "content": {"*/*": {"schema": {"type": "string"}}}
689 }
690 },
691 "parameters": [
692 {
693 "schema": {
694 "default": "",
695 "type": "string"
696 },
697 "in": "query",
698 "name": "type",
699 "description": "The name of the policy type.",
700 "required": false
701 },
702 {
703 "schema": {"type": "string"},
704 "in": "query",
705 "name": "id",
706 "description": "The identity of the policy instance.",
707 "required": true
708 },
709 {
710 "schema": {"type": "string"},
711 "in": "query",
712 "name": "ric",
713 "description": "The name of the Near-RT RIC where the policy will be created.",
714 "required": true
715 },
716 {
717 "schema": {"type": "string"},
718 "in": "query",
719 "name": "service",
720 "description": "The name of the service creating the policy.",
721 "required": true
722 },
723 {
724 "schema": {
725 "default": false,
726 "type": "boolean"
727 },
728 "in": "query",
729 "name": "transient",
730 "description": "If the policy is transient or not (boolean defaulted to false). A policy is transient if it will be forgotten when the service needs to reconnect to the Near-RT RIC.",
731 "required": false
732 }
733 ],
734 "tags": ["A1 Policy Management V1.0"]
735 }
736 },
737 "/policies": {"get": {
738 "summary": "Query policies",
739 "operationId": "getPolicies",
740 "responses": {
741 "200": {
742 "description": "Policies",
743 "content": {"*/*": {"schema": {
744 "type": "array",
745 "items": {"$ref": "#/components/schemas/policy_info_v1"}
746 }}}
747 },
748 "404": {
749 "description": "Near-RT RIC or type not found",
750 "content": {"*/*": {"schema": {"type": "string"}}}
751 }
752 },
753 "parameters": [
754 {
755 "schema": {"type": "string"},
756 "in": "query",
757 "name": "type",
758 "description": "The name of the policy type to get policies for.",
759 "required": false
760 },
761 {
762 "schema": {"type": "string"},
763 "in": "query",
764 "name": "ric",
765 "description": "The name of the Near-RT RIC to get policies for.",
766 "required": false
767 },
768 {
769 "schema": {"type": "string"},
770 "in": "query",
771 "name": "service",
772 "description": "The name of the service to get policies for.",
773 "required": false
774 }
775 ],
776 "tags": ["A1 Policy Management V1.0"]
777 }},
778 "/a1-policy/v2/services/{service_id}/keepalive": {"put": {
779 "summary": "Heartbeat indicates that the service is running",
780 "description": "A registerred service must call this in regular intervals to indicate that it is in operation. Absence of this call will lead to that teh service will be deregisterred and all its policies are removed.",
781 "operationId": "keepAliveService_1",
782 "responses": {
783 "200": {
784 "description": "Service supervision timer refreshed, OK",
785 "content": {"*/*": {"schema": {"type": "object"}}}
786 },
787 "404": {
788 "description": "The service is not found, needs re-registration",
789 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
790 }
791 },
792 "parameters": [{
793 "schema": {"type": "string"},
794 "in": "path",
795 "name": "service_id",
796 "required": true
797 }],
798 "tags": ["Service Registry and Supervision"]
799 }},
800 "/rics": {"get": {
801 "summary": "Query Near-RT RIC information",
802 "operationId": "getRics",
803 "responses": {
804 "200": {
805 "description": "OK",
806 "content": {"*/*": {"schema": {
807 "type": "array",
808 "items": {"$ref": "#/components/schemas/ric_info_v1"}
809 }}}
810 },
811 "404": {
812 "description": "Policy type is not found",
813 "content": {"*/*": {"schema": {"type": "string"}}}
814 }
815 },
816 "parameters": [{
817 "schema": {"type": "string"},
818 "in": "query",
819 "name": "policyType",
820 "description": "The name of the policy type",
821 "required": false
822 }],
823 "tags": ["A1 Policy Management V1.0"]
824 }},
825 "/policy_schema": {"get": {
826 "summary": "Returns one policy type schema definition",
827 "operationId": "getPolicySchema",
828 "responses": {
829 "200": {
830 "description": "Policy schema",
831 "content": {"*/*": {"schema": {"type": "object"}}}
832 },
833 "404": {
834 "description": "The policy type is not found",
835 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
836 }
837 },
838 "parameters": [{
839 "schema": {"type": "string"},
840 "in": "query",
841 "name": "id",
842 "description": "The identity of the policy type to get the definition for.",
843 "required": true
844 }],
845 "tags": ["A1 Policy Management V1.0"]
846 }},
847 "/policy_status": {"get": {
848 "summary": "Returns a policy status",
849 "operationId": "getPolicyStatus",
850 "responses": {
851 "200": {
852 "description": "Policy status",
853 "content": {"*/*": {"schema": {"type": "object"}}}
854 },
855 "404": {
856 "description": "Policy is not found",
857 "content": {"*/*": {"schema": {"type": "string"}}}
858 }
859 },
860 "parameters": [{
861 "schema": {"type": "string"},
862 "in": "query",
863 "name": "id",
864 "description": "The identity of the policy.",
865 "required": true
866 }],
867 "tags": ["A1 Policy Management V1.0"]
868 }},
869 "/a1-policy/v2/rics": {"get": {
870 "summary": "Query Near-RT RIC information",
871 "description": "The call returns all Near-RT RICs that supports a given policy type identity",
872 "operationId": "getRics_1",
873 "responses": {
874 "200": {
875 "description": "OK",
876 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ric_info_list_v2"}}}
877 },
878 "404": {
879 "description": "Policy type is not found",
880 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
881 }
882 },
883 "parameters": [{
884 "schema": {"type": "string"},
885 "in": "query",
886 "name": "policytype_id",
887 "description": "The identity of a policy type. If given, all Near-RT RICs supporteing the policy type are returned",
888 "required": false
889 }],
890 "tags": ["NearRT-RIC Repository"]
891 }},
892 "/policy_schemas": {"get": {
893 "summary": "Returns policy type schema definitions",
894 "operationId": "getPolicySchemas",
895 "responses": {
896 "200": {
897 "description": "Policy schemas",
898 "content": {"*/*": {"schema": {
899 "type": "array",
900 "items": {"type": "object"}
901 }}}
902 },
903 "404": {
904 "description": "Near-RT RIC is not found",
905 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
906 }
907 },
908 "parameters": [{
909 "schema": {"type": "string"},
910 "in": "query",
911 "name": "ric",
912 "description": "The name of the Near-RT RIC to get the definitions for.",
913 "required": false
914 }],
915 "tags": ["A1 Policy Management V1.0"]
916 }},
917 "/policy_ids": {"get": {
918 "summary": "Query policies, only policy identities returned",
919 "operationId": "getPolicyIds",
920 "responses": {
921 "200": {
922 "description": "Policy identitiess",
923 "content": {"*/*": {"schema": {
924 "type": "array",
925 "items": {"type": "string"}
926 }}}
927 },
928 "404": {
929 "description": "Near-RT RIC or type not found",
930 "content": {"*/*": {"schema": {"type": "string"}}}
931 }
932 },
933 "parameters": [
934 {
935 "schema": {"type": "string"},
936 "in": "query",
937 "name": "type",
938 "description": "The name of the policy type to get policies for.",
939 "required": false
940 },
941 {
942 "schema": {"type": "string"},
943 "in": "query",
944 "name": "ric",
945 "description": "The name of the Near-RT RIC to get policies for.",
946 "required": false
947 },
948 {
949 "schema": {"type": "string"},
950 "in": "query",
951 "name": "service",
952 "description": "The name of the service to get policies for.",
953 "required": false
954 }
955 ],
956 "tags": ["A1 Policy Management V1.0"]
957 }},
958 "/a1-policy/v2/services": {
959 "get": {
960 "summary": "Returns service information",
961 "description": "Either information about a registered service with given identity or all registered services are returned.",
962 "operationId": "getServices_1",
963 "responses": {
964 "200": {
965 "description": "OK",
966 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/service_list_v2"}}}
967 },
968 "404": {
969 "description": "Service is not found",
970 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
971 }
972 },
973 "parameters": [{
974 "schema": {"type": "string"},
975 "in": "query",
976 "name": "service_id",
977 "description": "The identity of the service",
978 "required": false
979 }],
980 "tags": ["Service Registry and Supervision"]
981 },
982 "put": {
983 "summary": "Register a service",
984 "requestBody": {
985 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/service_registration_info_v2"}}},
986 "required": true
987 },
988 "description": "Registering a service is needed to:<ul><li>Get callbacks.<\/li><li>Activate supervision of the service. If a service is inactive, its policies will be deleted.<\/li><\/ul>",
989 "operationId": "putService_1",
990 "responses": {
991 "200": {
992 "description": "Service updated",
993 "content": {"*/*": {"schema": {"type": "object"}}}
994 },
995 "201": {
996 "description": "Service created",
997 "content": {"*/*": {"schema": {"type": "object"}}}
998 },
999 "400": {
1000 "description": "The ServiceRegistrationInfo is not accepted",
1001 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
1002 }
1003 },
1004 "tags": ["Service Registry and Supervision"]
1005 }
1006 },
1007 "/ric": {"get": {
1008 "summary": "Returns the name of a RIC managing one Mananged Element",
1009 "operationId": "getRic",
1010 "responses": {
1011 "200": {
1012 "description": "Near-RT RIC is found",
1013 "content": {"*/*": {"schema": {"type": "string"}}}
1014 },
1015 "404": {
1016 "description": "Near-RT RIC is not found",
1017 "content": {"*/*": {"schema": {"type": "string"}}}
1018 }
1019 },
1020 "parameters": [{
1021 "schema": {"type": "string"},
1022 "in": "query",
1023 "name": "managedElementId",
1024 "description": "The identity of the Managed Element",
1025 "required": true
1026 }],
1027 "tags": ["A1 Policy Management V1.0"]
1028 }},
1029 "/services/keepalive": {"put": {
1030 "summary": "Heartbeat from a service",
1031 "operationId": "keepAliveService",
1032 "responses": {
1033 "200": {
1034 "description": "Service supervision timer refreshed, OK",
1035 "content": {"*/*": {"schema": {"type": "string"}}}
1036 },
1037 "404": {
1038 "description": "The service is not found, needs re-registration",
1039 "content": {"*/*": {"schema": {"type": "string"}}}
1040 }
1041 },
1042 "parameters": [{
1043 "schema": {"type": "string"},
1044 "in": "query",
1045 "name": "name",
1046 "description": "The name of the service",
1047 "required": true
1048 }],
1049 "tags": ["A1 Policy Management V1.0"]
1050 }},
1051 "/status": {"get": {
1052 "summary": "Returns status and statistics of this service",
1053 "operationId": "getStatus",
1054 "responses": {"200": {
1055 "description": "Service is living",
1056 "content": {"*/*": {"schema": {"type": "string"}}}
1057 }},
1058 "tags": ["A1 Policy Management V1.0"]
1059 }},
1060 "/a1-policy/v2/policy-types/{policytype_id}": {"get": {
1061 "summary": "Returns a policy type definition",
1062 "operationId": "getPolicyType",
1063 "responses": {
1064 "200": {
1065 "description": "Policy type",
1066 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/policytype_v2"}}}
1067 },
1068 "404": {
1069 "description": "Policy type is not found",
1070 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
1071 }
1072 },
1073 "parameters": [{
1074 "schema": {"type": "string"},
1075 "in": "path",
1076 "name": "policytype_id",
1077 "required": true
1078 }],
1079 "tags": ["A1 Policy Management"]
1080 }},
1081 "/a1-policy/v2/policies": {
1082 "get": {
1083 "summary": "Query policy identities",
1084 "description": "Returns a list of A1 policies matching given search criteria. <br>If several query parameters are defined, the policies matching all conditions are returned.",
1085 "operationId": "getPolicyIds_1",
1086 "responses": {
1087 "200": {
1088 "description": "Policy identities",
1089 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/policy_id_list_v2"}}}
1090 },
1091 "404": {
1092 "description": "Near-RT RIC or type not found",
1093 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
1094 }
1095 },
1096 "parameters": [
1097 {
1098 "schema": {"type": "string"},
1099 "in": "query",
1100 "name": "policytype_id",
1101 "description": "The identity of the policy type to get policies for.",
1102 "required": false
1103 },
1104 {
1105 "schema": {"type": "string"},
1106 "in": "query",
1107 "name": "ric_id",
1108 "description": "The identity of the Near-RT RIC to get policies for.",
1109 "required": false
1110 },
1111 {
1112 "schema": {"type": "string"},
1113 "in": "query",
1114 "name": "service_id",
1115 "description": "The identity of the service to get policies for.",
1116 "required": false
1117 }
1118 ],
1119 "tags": ["A1 Policy Management"]
1120 },
1121 "put": {
1122 "summary": "Create or update a policy",
1123 "requestBody": {
1124 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/policy_info_v2"}}},
1125 "required": true
1126 },
1127 "operationId": "putPolicy_1",
1128 "responses": {
1129 "200": {
1130 "description": "Policy updated",
1131 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/void"}}}
1132 },
1133 "201": {
1134 "description": "Policy created",
1135 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/void"}}}
1136 },
1137 "423": {
1138 "description": "Near-RT RIC is not operational",
1139 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
1140 },
1141 "404": {
1142 "description": "Near-RT RIC or policy type is not found",
1143 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
1144 }
1145 },
1146 "tags": ["A1 Policy Management"]
1147 }
1148 },
1149 "/r-app/near-rt-ric-status": {"post": {
1150 "summary": "Callback for Near-RT RIC status",
1151 "requestBody": {
1152 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/service_callback_info_v2"}}},
1153 "required": true
1154 },
1155 "description": "The URL to this call is registerred at Service registration.",
1156 "operationId": "jobStatusCallback",
1157 "responses": {"200": {
1158 "description": "OK",
1159 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/void"}}}
1160 }},
1161 "tags": ["Callbacks"]
1162 }},
1163 "/service": {"put": {
1164 "summary": "Register a service",
1165 "requestBody": {
1166 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/service_registration_info_v1"}}},
1167 "required": true
1168 },
1169 "operationId": "putService",
1170 "responses": {
1171 "200": {
1172 "description": "Service updated",
1173 "content": {"*/*": {"schema": {"type": "string"}}}
1174 },
1175 "201": {
1176 "description": "Service created",
1177 "content": {"*/*": {"schema": {"type": "string"}}}
1178 },
1179 "400": {
1180 "description": "The ServiceRegistrationInfo is not accepted",
1181 "content": {"*/*": {"schema": {"type": "string"}}}
1182 }
1183 },
1184 "tags": ["A1 Policy Management V1.0"]
1185 }},
1186 "/a1-policy/v2/services/{service_id}": {"delete": {
1187 "summary": "Unregister a service",
1188 "operationId": "deleteService_1",
1189 "responses": {
1190 "200": {
1191 "description": "Not used",
1192 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/void"}}}
1193 },
1194 "204": {
1195 "description": "Service unregistered",
1196 "content": {"*/*": {"schema": {"type": "object"}}}
1197 },
1198 "404": {
1199 "description": "Service not found",
1200 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
1201 }
1202 },
1203 "parameters": [{
1204 "schema": {"type": "string"},
1205 "in": "path",
1206 "name": "service_id",
1207 "required": true
1208 }],
1209 "tags": ["Service Registry and Supervision"]
1210 }},
1211 "/a1-policy/v2/policies/{policy_id}/status": {"get": {
1212 "summary": "Returns a policy status",
1213 "operationId": "getPolicyStatus_1",
1214 "responses": {
1215 "200": {
1216 "description": "Policy status",
1217 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/policy_status_info_v2"}}}
1218 },
1219 "404": {
1220 "description": "Policy is not found",
1221 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
1222 }
1223 },
1224 "parameters": [{
1225 "schema": {"type": "string"},
1226 "in": "path",
1227 "name": "policy_id",
1228 "required": true
1229 }],
1230 "tags": ["A1 Policy Management"]
1231 }}
1232 },
1233 "info": {
1234 "license": {
1235 "name": "Copyright (C) 2020 Nordix Foundation. Licensed under the Apache License.",
1236 "url": "http://www.apache.org/licenses/LICENSE-2.0"
1237 },
1238 "description": "<h2>General<\/h2><p>The O-RAN Non-RT RIC Policy Management Service provides a REST API for management of A1 policices. <br/>The main tasks of the service are:<\/p><ul><li>A1 Policy creation, modification and deletion.<\/li><li>Monitoring and maintaining consistency of the SMO view of A1 policies and the Near-RT RICs<\/li><li>Maintaining a view of supported Near-RT RIC policy types<\/li><li>Supervision of using services (R-APPs). When a service is unavailble, its policies are removed.<\/li><\/ul><h2>APIs provided by the service<\/h2><h3>A1 Policy Management<\/h3><p>This is an API for management of A1 Policies.<\/p><ul><li>A1 Policy retrieval, creation, modification and deletion.<\/li><li>Retrieval of supported A1 Policy types for a Near-RT RIC<\/li><li>Retrieval of status for existing A1 policies<\/li><\/ul><h3>Management of configuration<\/h3><p>API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.<\/p><h3>Callbacks<\/h3><p>These are endpoints that are invoked by this service. The callbacks are registerred in this service at service registration.<\/p><h3>NearRT-RIC Repository<\/h3><p>This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted for one Near-RT RIC.<\/p><h3>Health Check<\/h3><p>API used for supervision of the PMS component.<\/p><h3>Service Registry and Supervision<\/h3><p>API used for registerring services that uses PMS. Each A1 policy is owned by a service. PMS can supervise each registerred service and will automatically remove policies for unavailable services.<\/p>",
PatrikBuhr1122b012021-01-20 12:21:52 +01001239 "title": "A1 Policy management service",
1240 "version": "1.1.0"
1241 },
1242 "tags": [
1243 {
PatrikBuhrfee99552021-02-02 14:06:44 +01001244 "name": "A1 Policy Management V1.0",
1245 "description": "(deprecated primitves)"
PatrikBuhr1122b012021-01-20 12:21:52 +01001246 },
PatrikBuhrfee99552021-02-02 14:06:44 +01001247 {"name": "Management of configuration"},
1248 {"name": "A1 Policy Management"},
1249 {"name": "NearRT-RIC Repository"},
1250 {"name": "Service Registry and Supervision"},
1251 {"name": "Health Check"},
1252 {"name": "Callbacks"}
PatrikBuhr1122b012021-01-20 12:21:52 +01001253 ]
1254}