1 # ============LICENSE_START=======================================================
2 # Copyright (C) 2020-2023 Nordix Foundation
3 # Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.
4 # Modifications Copyright (C) 2021 Pantheon.tech
5 # Modifications Copyright (C) 2021 Bell Canada
6 # ================================================================================
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
19 # SPDX-License-Identifier: Apache-2.0
20 # ============LICENSE_END=========================================================
24 description: "<h2>General</h2><p>The O-RAN Non-RT RIC Policy Management Service\
25 \ provides a REST API for management of A1 policies. <br/>The main tasks of the\
26 \ service are:</p><ul><li>A1 Policy creation, modification and deletion.</li><li>Monitoring\
27 \ and maintaining consistency of the SMO view of A1 policies and the Near-RT RICs</li><li>Maintaining\
28 \ a view of supported Near-RT RIC policy types</li><li>Supervision of using services\
29 \ (R-APPs). When a service is unavailable, its policies are removed.</li></ul><h2>APIs\
30 \ provided or defined by the service</h2><h3>A1 Policy Management</h3><p>This\
31 \ is an API for management of A1 Policies.</p><ul><li>A1 Policy retrieval, creation,\
32 \ modification and deletion.</li><li>Retrieval of supported A1 Policy types for\
33 \ a Near-RT RIC</li><li>Retrieval of status for existing A1 policies</li></ul><h3>Management\
34 \ of configuration</h3><p>API for updating and retrieval of the component configuration.\
35 \ Note that there other ways to maintain the configuration.</p><h3>Service callbacks</h3><p>These\
36 \ are endpoints that are invoked by this service. The callbacks are registered\
37 \ in this service at service registration.</p><h3>NearRT-RIC Repository</h3><p>This\
38 \ is an API that provides support for looking up a NearRT-RIC. Each A1 policy\
39 \ is targeted for one Near-RT RIC.</p><h3>Health Check</h3><p>API used for supervision\
40 \ of the PMS component.</p><h3>Service Registry and Supervision</h3><p>API used\
41 \ for registering services that uses PMS. Each A1 policy is optionally owned by\
42 \ a service. PMS can supervise each registered service by a heart-beat supervision\
43 \ and will automatically remove policies for unavailable services. Note that a\
44 \ service does not need to be registered in order to create A1 Policies. This\
45 \ is a feature that is optional to use.</p><h3>Authorization API</h3><p>API used\
46 \ for access control of A1 Policy access. If configured, an external authorization\
47 \ provider is requested to grant access to the A1 Policy type.</p><h3>Spring Boot\
48 \ Actuator</h3><p>Provides generic functions used to monitor and manage the Spring\
49 \ web application.</p>"
51 name: Copyright (C) 2020-2023 Nordix Foundation. Licensed under the Apache License, and
52 Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.
53 url: http://www.apache.org/licenses/LICENSE-2.0
54 title: A1 Policy Management Service
59 - description: "API used for authorization of information A1 policy access (this is
60 provided by an authorization producer such as OPA). <br> Note that this API is called
61 by PMS, it is not provided."
62 name: Authorization API
63 - description: Monitor and interact
65 description: Spring Boot Actuator Web API Documentation
66 url: https://docs.spring.io/spring-boot/docs/current/actuator-api/html/
69 /a1-policy/v2/policy-instances:
71 description: "Returns a list of A1 policies matching given search criteria.\
72 \ <br>If several query parameters are defined, the policies matching all conditions\
74 operationId: getPolicyInstances
76 - description: Select policies with a given type identity.
84 - description: Select policies for a given Near-RT RIC identity.
92 - description: Select policies owned by a given service.
100 - description: Select policies of a given type name (type identity has the format
115 $ref: '#/components/examples/policy_info_list'
117 $ref: '#/components/schemas/policy_info_list'
118 description: Policies
123 $ref: '#/components/schemas/error_information'
124 description: "Near-RT RIC, policy type or service not found"
125 summary: Query for A1 policy instances
127 - A1 Policy Management
128 /example-authz-check:
130 description: The authorization function decides if access is granted.
131 operationId: performAccessControl
136 $ref: '#/components/schemas/policy_authorization'
143 $ref: '#/components/schemas/authorization_result'
145 summary: Request for access authorization.
148 /actuator/threaddump:
150 operationId: threaddump
154 text/plain;charset=UTF-8:
157 application/vnd.spring-boot.actuator.v3+json:
163 application/vnd.spring-boot.actuator.v2+json:
167 summary: Actuator web endpoint 'threaddump'
170 /a1-policy/v2/status:
172 operationId: getStatus
178 $ref: '#/components/schemas/status_info'
181 $ref: '#/components/examples/status_info'
182 description: Service is living
183 summary: Returns status and statistics of this service
192 application/vnd.spring-boot.actuator.v3+json:
198 application/vnd.spring-boot.actuator.v2+json:
202 summary: Actuator web endpoint 'loggers'
207 operationId: health-path
211 application/vnd.spring-boot.actuator.v3+json:
217 application/vnd.spring-boot.actuator.v2+json:
221 summary: Actuator web endpoint 'health-path'
224 /a1-policy/v2/rics/ric:
226 description: Either a Near-RT RIC identity or a Managed Element identity can
227 be specified.<br>The intention with Managed Element identity is the ID used
228 in O1 for accessing the traffical element (such as the ID of CU).
231 - description: "The identity of a Managed Element. If given, the Near-RT RIC\
232 \ managing the ME is returned."
235 name: managed_element_id
240 - description: The identity of a Near-RT RIC to get information for.
253 $ref: '#/components/schemas/ric_info'
256 $ref: '#/components/examples/ric_info'
257 description: Near-RT RIC is found
262 $ref: '#/components/schemas/error_information'
263 description: Near-RT RIC is not found
264 summary: Returns info for one Near-RT RIC
266 - NearRT-RIC Repository
269 operationId: shutdown
273 application/vnd.spring-boot.actuator.v3+json:
279 application/vnd.spring-boot.actuator.v2+json:
283 summary: Actuator web endpoint 'shutdown'
286 /a1-policy/v2/policy-types:
288 operationId: getPolicyTypes
290 - description: Select types for the given Near-RT RIC identity.
298 - description: Select types with the given type name (type identity has the
299 format <typename_version>)
307 - description: Select types that are compatible with the given version. This
308 parameter is only applicable in conjunction with type_name. As an example
309 version 1.9.1 is compatible with 1.0.0 but not the other way around. Matching
310 types will be returned sorted in ascending order.
313 name: compatible_with_version
324 $ref: '#/components/examples/policy_type_id_list'
326 $ref: '#/components/schemas/policy_type_id_list'
327 description: Policy type IDs
332 $ref: '#/components/schemas/error_information'
333 description: Near-RT RIC is not found
334 summary: Query policy type identities
336 - A1 Policy Management
337 /a1-policy/v2/policies/{policy_id}:
339 operationId: deletePolicy
353 $ref: '#/components/schemas/void'
354 description: Not used
359 $ref: '#/components/schemas/error_information'
360 description: Near-RT RIC is not operational
365 $ref: '#/components/schemas/void'
366 description: Policy deleted
371 $ref: '#/components/schemas/error_information'
372 description: Policy is not found
373 summary: Delete a policy
375 - A1 Policy Management
377 operationId: getPolicy
391 $ref: '#/components/schemas/policy_info'
394 $ref: '#/components/examples/policy_info'
395 description: Policy found
400 $ref: '#/components/schemas/error_information'
401 description: Policy is not found
402 summary: Returns a policy
404 - A1 Policy Management
405 /actuator/metrics/{requiredMetricName}:
407 operationId: metrics-requiredMetricName
411 name: requiredMetricName
419 application/vnd.spring-boot.actuator.v3+json:
425 application/vnd.spring-boot.actuator.v2+json:
429 summary: Actuator web endpoint 'metrics-requiredMetricName'
432 /a1-policy/v2/configuration:
434 operationId: getConfiguration
441 description: Configuration
446 $ref: '#/components/schemas/error_information'
447 description: File is not found or readable
448 summary: Returns the contents of the application configuration file
452 operationId: putConfiguration
464 $ref: '#/components/schemas/void'
465 description: Configuration updated
470 $ref: '#/components/schemas/error_information'
471 description: Invalid configuration provided
476 $ref: '#/components/schemas/error_information'
477 description: Something went wrong when replacing the configuration. Try
479 summary: Replace the current configuration file with the given configuration
488 application/vnd.spring-boot.actuator.v3+json:
490 additionalProperties:
491 additionalProperties:
492 $ref: '#/components/schemas/Link'
497 additionalProperties:
498 additionalProperties:
499 $ref: '#/components/schemas/Link'
502 application/vnd.spring-boot.actuator.v2+json:
504 additionalProperties:
505 additionalProperties:
506 $ref: '#/components/schemas/Link'
510 summary: Actuator root web endpoint
513 /actuator/loggers/{name}:
515 operationId: loggers-name
527 application/vnd.spring-boot.actuator.v3+json:
533 application/vnd.spring-boot.actuator.v2+json:
537 summary: Actuator web endpoint 'loggers-name'
541 operationId: loggers-name_2
570 summary: Actuator web endpoint 'loggers-name'
573 /a1-policy/v2/services/{service_id}/keepalive:
575 description: A registered service should invoke this operation regularly to
576 indicate that it is still alive. If a registered service fails to invoke this
577 operation before the end of a timeout period the service will be deregistered
578 and all its A1 policies wil be removed. (This timeout can be set or disabled
579 when each service is initially registered)
580 operationId: keepAliveService
595 description: "Service supervision timer refreshed, OK"
600 $ref: '#/components/schemas/error_information'
601 description: "The service is not found, needs re-registration"
602 summary: Heartbeat indicates that the service is running
604 - Service Registry and Supervision
611 application/vnd.spring-boot.actuator.v3+json:
617 application/vnd.spring-boot.actuator.v2+json:
621 summary: Actuator web endpoint 'metrics'
626 description: The call returns all Near-RT RICs that supports a given policy
630 - description: "The identity of a policy type. If given, all Near-RT RICs supporting\
631 \ the policy type are returned"
644 $ref: '#/components/schemas/ric_info_list'
647 $ref: '#/components/examples/ric_info_list'
653 $ref: '#/components/schemas/error_information'
654 description: Policy type is not found
655 summary: Query Near-RT RIC information
657 - NearRT-RIC Repository
658 /a1-policy/v2/services:
660 description: Either information about a registered service with given identity
661 or all registered services are returned.
662 operationId: getServices
664 - description: The identity of the service
677 $ref: '#/components/schemas/service_status_list'
680 $ref: '#/components/examples/service_status_list'
686 $ref: '#/components/schemas/error_information'
687 description: Service is not found
688 summary: Returns service information
690 - Service Registry and Supervision
692 description: "Registering a service is needed to:<ul><li>Get callbacks about\
693 \ available NearRT RICs.</li><li>Activate supervision of the service. If a\
694 \ service is inactive, its policies will automatically be deleted.</li></ul>Policies\
695 \ can be created even if the service is not registerred. This is a feature\
696 \ which it is optional to use."
697 operationId: putService
702 $ref: '#/components/schemas/service_registration_info'
710 description: Service updated
716 description: Service created
721 $ref: '#/components/schemas/error_information'
722 description: The ServiceRegistrationInfo is not accepted
723 summary: Register a service
725 - Service Registry and Supervision
728 "{$request.body#/callback_url}":
730 description: The URL to this call is registered at Service registration.
731 operationId: serviceCallback
736 $ref: '#/components/schemas/service_callback_info_v2'
743 $ref: '#/components/schemas/void'
745 summary: Callback for Near-RT RIC status
754 application/vnd.spring-boot.actuator.v3+json:
760 application/vnd.spring-boot.actuator.v2+json:
764 summary: Actuator web endpoint 'info'
769 operationId: getStatusV1
776 description: Service is living
777 summary: Returns status and statistics of this service
780 /a1-policy/v2/policy-types/{policytype_id}:
782 operationId: getPolicyTypeDefinition
796 $ref: '#/components/schemas/policy_type_definition'
798 policy_type_definition:
799 $ref: '#/components/examples/policy_type_definition'
800 description: schema of the given policy type
805 $ref: '#/components/schemas/error_information'
806 description: Policy type is not found
807 summary: Returns a policy type definition
809 - A1 Policy Management
816 text/plain;charset=UTF-8:
820 summary: Actuator web endpoint 'logfile'
829 application/vnd.spring-boot.actuator.v3+json:
835 application/vnd.spring-boot.actuator.v2+json:
839 summary: Actuator web endpoint 'health'
842 /a1-policy/v2/policies:
844 description: "Returns a list of A1 policies matching given search criteria.\
845 \ <br>If several query parameters are defined, the policies matching all conditions\
847 operationId: getPolicyIds
849 - description: Select policies of a given policy type identity.
857 - description: Select policies of a given Near-RT RIC identity.
865 - description: Select policies owned by a given service.
873 - description: Select policies of types with the given type name (type identity
874 has the format <typename_version>)
888 $ref: '#/components/examples/policy_id_list'
890 $ref: '#/components/schemas/policy_id_list'
891 description: Policy identities
896 $ref: '#/components/schemas/error_information'
897 description: Near-RT RIC or type not found
898 summary: Query policy identities
900 - A1 Policy Management
902 operationId: putPolicy
907 $ref: '#/components/schemas/policy_info'
914 $ref: '#/components/schemas/void'
915 description: Policy updated
920 $ref: '#/components/schemas/void'
921 description: Policy created
926 $ref: '#/components/schemas/error_information'
927 description: Near-RT RIC is not operational
932 $ref: '#/components/schemas/error_information'
933 description: Near-RT RIC or policy type is not found
934 summary: Create or update a policy
936 - A1 Policy Management
937 /a1-policy/v2/services/{service_id}:
939 operationId: deleteService
953 $ref: '#/components/schemas/void'
954 description: Not used
960 description: Service unregistered
965 $ref: '#/components/schemas/error_information'
966 description: Service not found
967 summary: Unregister a service
969 - Service Registry and Supervision
972 operationId: heapdump
976 application/octet-stream:
980 summary: Actuator web endpoint 'heapdump'
983 /a1-policy/v2/policies/{policy_id}/status:
985 operationId: getPolicyStatus
1000 $ref: '#/components/examples/policy_status_info'
1002 $ref: '#/components/schemas/policy_status_info'
1003 description: Policy status
1008 $ref: '#/components/schemas/error_information'
1009 description: Policy is not found
1010 summary: Returns a policy status
1012 - A1 Policy Management
1016 description: List of service information
1018 callback_url: callback_url
1019 service_id: service_id
1020 keep_alive_interval_seconds: 0
1021 time_since_last_activity_seconds: 6
1022 service_status_list:
1023 description: List of service information
1026 - callback_url: callback_url
1027 service_id: service_id
1028 keep_alive_interval_seconds: 0
1029 time_since_last_activity_seconds: 6
1030 - callback_url: callback_url
1031 service_id: service_id
1032 keep_alive_interval_seconds: 0
1033 time_since_last_activity_seconds: 6
1034 policy_type_definition:
1035 description: Schema of the given Policy type
1038 policy_type_id_list:
1039 description: Array of policy type id's
1041 policy_type_id_list:
1045 description: Policy information of one A1-P policy
1048 policy_id: policy_id
1050 service_id: service_id
1052 status_notification_uri: status_notification_uri
1053 policytype_id: policytype_id
1055 description: List of policy information
1059 policy_id: policy_id
1061 service_id: service_id
1063 status_notification_uri: status_notification_uri
1064 policytype_id: policytype_id
1066 policy_id: policy_id
1068 service_id: service_id
1070 status_notification_uri: status_notification_uri
1071 policytype_id: policytype_id
1073 description: A list of policy identities
1079 description: Status for one A1-P Policy
1081 last_modified: last_modified
1089 managed_element_ids:
1090 - managed_element_ids
1091 - managed_element_ids
1100 managed_element_ids:
1101 - managed_element_ids
1102 - managed_element_ids
1108 managed_element_ids:
1109 - managed_element_ids
1110 - managed_element_ids
1116 policy_type_definition:
1117 description: Contains policy type schema definition
1121 description: Policy type json schema. The schema is a json object following
1122 http://json-schema.org/draft-07/schema
1125 description: Problem as defined in https://tools.ietf.org/html/rfc7807
1128 description: ' A human-readable explanation specific to this occurrence
1130 example: Policy type not found
1133 description: 'The HTTP status code generated by the origin server for this
1134 occurrence of the problem. '
1140 description: Void/empty
1145 description: status text
1148 authorization_result:
1149 description: Result of authorization
1154 description: "If true, the access is granted"
1160 description: Information for a Near-RT RIC
1163 description: identity of the Near-RT RIC
1165 managed_element_ids:
1166 description: O1 identities for managed entities
1168 description: O1 identities for managed entities
1172 description: Represents the states for a Near-RT RIC
1180 description: supported policy types
1182 description: supported policy types
1186 service_registration_info:
1187 description: Information for one service
1190 description: callback for notifying of Near-RT RIC state changes
1193 description: identity of the service
1195 keep_alive_interval_seconds:
1196 description: "keep alive interval for the service. This is used to enable\
1197 \ optional heartbeat supervision of the service. If set (> 0) the registered\
1198 \ service should regularly invoke a 'keepalive' REST call. When a service\
1199 \ fails to invoke this 'keepalive' call within the configured time, the\
1200 \ service is considered unavailable. An unavailable service will be automatically\
1201 \ deregistered and its policies will be deleted. Value 0 means timeout\
1202 \ supervision is disabled."
1209 description: List of policy information
1212 description: List of policy information
1214 $ref: '#/components/schemas/policy_info'
1218 description: Status for one A1-P Policy
1221 description: "timestamp, last modification time"
1224 description: the Policy status
1230 description: callback for notifying of RIC synchronization
1233 description: identity of the service
1235 keep_alive_interval_seconds:
1236 description: policy keep alive timeout
1239 time_since_last_activity_seconds:
1240 description: time since last invocation by the service
1245 description: List of Near-RT RIC information
1248 description: List of Near-RT RIC information
1250 $ref: '#/components/schemas/ric_info'
1257 description: Access type
1264 description: Authorization token
1267 description: Policy type identifier
1274 policy_authorization:
1275 description: Authorization request for A1 policy requests
1278 $ref: '#/components/schemas/input'
1282 policy_type_id_list:
1283 description: Information about policy types
1286 description: Policy type identities
1288 description: Policy type identities
1293 description: Information for one A1-P Policy
1296 description: identity of the target Near-RT RIC
1299 description: identity of the policy
1303 description: "if true, the policy is deleted at RIC restart. If false, its\
1304 \ value is maintained by this service until explicitly deleted. Default\
1310 description: the identity of the service owning the policy. This can be
1311 used to group the policies (it is possible to get all policies associated
1312 to a service). Note that the service does not need to be registered.
1315 description: the configuration of the policy
1317 status_notification_uri:
1318 description: Callback URI for policy status updates
1321 description: identity of the policy type
1331 description: A list of policy identities
1338 description: Policy identities
1340 description: Policy identities
1344 service_status_list:
1347 description: List of service information
1349 $ref: '#/components/schemas/service_status'
1352 service_callback_info_v2:
1353 description: Information transferred as in Service callbacks (callback_url)
1356 description: identity of a Near-RT RIC
1359 description: "values:\nAVAILABLE: the Near-RT RIC has become available\
1360 \ for A1 Policy management"