From: saul.gill Date: Thu, 6 Mar 2025 17:09:12 +0000 (+0000) Subject: Improve OpenAPI files and documentation X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=7c6ca5b446ade0690e2e759ec2ab557f3b1af180;p=ccsdk%2Foran.git Improve OpenAPI files and documentation Issue-ID: CCSDK-4034 Change-Id: Ia107df1414615550a85807a3b46bdb3db0267bf0 Signed-off-by: saul.gill Make OpenAPI files & config schema avaialble in RTD docs Change-Id: I0952c3b2b0060dac4a514276d22c068ec432591d Signed-off-by: JohnKeeney Issue-ID: CCSDK-4073 Signed-off-by: JohnKeeney Added JSON log streaming capability - Added improvements to Open API yaml - Uplifted ccsdk parent references to 3.1.0 Issue-ID: CCSDK-4104 Change-Id: I082959c67e25c3516c68321bfaaa80313f332277 Signed-off-by: saul.gill Fixed managedElement required issue Issue-ID: CCSDK-4107 Change-Id: I6a5c1fb5e7be673d13c622f0fcbbaa3e883f4dfe Signed-off-by: saul.gill Split out open api files for managability Split V2 api files Split V3 api files Configured maven to output merged api files Fixed bug in rtd file Issue-ID: CCSDK-4108 Change-Id: Ic1eae5e517856fe97f0e3fa4991d5fc4e1c16fe3 Signed-off-by: saul.gill Add ability to turn off SSL Issue-ID: CCSDK-4110 Change-Id: If5e962a426e55250da6daf48a06cd4b68b1d7891 Signed-off-by: saul.gill Uplift springboot parent version Issue-ID: CCSDK-4112 Change-Id: Idb9b9b4b800c13899fda1c207aa7d122e0c97ae0 Signed-off-by: saul.gill Remove requestBody from V3 keepalive Issue-ID: CCSDK-4111 Change-Id: I47a228a5ac3ea9bf2656dba2b91a796466ab7cce Signed-off-by: saul.gill --- diff --git a/.gitignore b/.gitignore index cf9dd09e..8a5ff8ea 100644 --- a/.gitignore +++ b/.gitignore @@ -43,6 +43,6 @@ out/ _build/ .swagger* docs/offeredapis/**/README.md -a1-policy-management/api/**/README.md +a1-policy-management/api/offeredapis/openapigentool/**/README.md a1-policy-management/api/**/.openapi-generator** a1-policy-management/custom/ diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 676a4115..6e13b7f7 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -1,6 +1,6 @@ # ============LICENSE_START=============================================== # Copyright (C) 2020-2023 Nordix Foundation. All rights reserved. -# Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved. +# Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved. # ======================================================================== # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/a1-policy-management/Dockerfile b/a1-policy-management/Dockerfile index 54676d39..57bb9c14 100644 --- a/a1-policy-management/Dockerfile +++ b/a1-policy-management/Dockerfile @@ -3,6 +3,7 @@ # ONAP : ccsdk oran # ================================================================================ # Copyright (C) 2019-2020 Nordix Foundation. All rights reserved. +# Modifications Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -19,14 +20,14 @@ # SPDX-License-Identifier: Apache-2.0 # ============LICENSE_END========================================================= # -FROM openjdk:17-jdk-slim +FROM amazoncorretto:17-alpine3.17-jdk #install vim editor -RUN apt-get update -RUN apt-get install -y vim +RUN apk update +RUN apk add vim #install curl -RUN apt-get install -y curl +RUN apk add curl EXPOSE 8081 8433 @@ -40,7 +41,7 @@ RUN chmod -R 777 /var/policy-management-service -RUN groupadd -r onap && useradd -ms /bin/bash a1pms -g onap +RUN addgroup -S onap && adduser --shell /bin/bash --gecos "" --ingroup onap --disabled-password a1pms RUN chown -R a1pms:onap /var/log/policy-agent ADD /config/application.yaml /opt/app/policy-agent/config/application.yaml diff --git a/a1-policy-management/api/offeredapis/application_configuration_schema.json b/a1-policy-management/api/offeredapis/application_configuration_schema.json new file mode 100644 index 00000000..3186dae6 --- /dev/null +++ b/a1-policy-management/api/offeredapis/application_configuration_schema.json @@ -0,0 +1,91 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "config": { + "type": "object", + "properties": { + "//description": { + "type": "string" + }, + "description": { + "type": "string" + }, + "controller": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "baseUrl": { + "type": "string" + }, + "userName": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "required": [ + "name", + "baseUrl", + "userName", + "password" + ], + "additionalProperties": false + } + ] + }, + "ric": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "baseUrl": { + "type": "string" + }, + "controller": { + "type": "string" + }, + "customAdapterClass": { + "type": "string" + }, + "managedElementIds": { + "type": "array", + "items": [ + { + "type": "string" + }, + { + "type": "string" + } + ] + } + }, + "required": [ + "name", + "baseUrl" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "ric" + ], + "additionalProperties": true + } + }, + "required": [ + "config" + ] +} diff --git a/a1-policy-management/api/offeredapis/openapitoolgen/offeredapis/pms-api/index.html b/a1-policy-management/api/offeredapis/openapitoolgen/offeredapis/pms-api/index.html index 38e9caed..697ddf6c 100644 --- a/a1-policy-management/api/offeredapis/openapitoolgen/offeredapis/pms-api/index.html +++ b/a1-policy-management/api/offeredapis/openapitoolgen/offeredapis/pms-api/index.html @@ -2,7 +2,7 @@ - ONAP CCSDK A1 Policy Management Service + ONAP CCSDK - Pre-Spec A1 Policy Management API @@ -864,7 +864,7 @@ ul.nav-tabs { "detail" : { "type" : "string", "description" : " A human-readable explanation specific to this occurrence of the problem.", - "example" : "Policy type not found" + "example" : "A1 Policy Type not found" }, "title" : { "type" : "string", @@ -895,7 +895,7 @@ ul.nav-tabs { }, "policy_type_id" : { "type" : "string", - "description" : "Policy type identifier" + "description" : "A1 Policy Type identifier" } }, "description" : "input" @@ -952,14 +952,14 @@ ul.nav-tabs { }, "transient" : { "type" : "boolean", - "description" : "if true, the policy is deleted at RIC restart. If false, its value is maintained by this service until explicitly deleted. Default false.", + "description" : "If true, the policy is automatically deleted if the targeted Near-RT RIC restarts or recovers. If false, the A1 Policy Instance remains, and is re-pushed to the targeted Near-RT RIC after a restart or recovery. If false, the A1 Policy Instance is maintained and must be deleted separately in the event of Near-RT RIC restart or recovery. Default is false.\n", "nullable" : false, "example" : false, "default" : false }, "service_id" : { "type" : "string", - "description" : "the identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated to a service). Note that the service does not need to be registered.", + "description" : "The identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated to a service). Note that the service does not need to be registered. If the service is registered, the A1 Policy Instance will be subject to the same supervision rules as the the service's other policies.\n", "default" : "" }, "policy_data" : { @@ -972,7 +972,7 @@ ul.nav-tabs { }, "policytype_id" : { "type" : "string", - "description" : "identity of the policy type" + "description" : "identity of the A1 Policy Type" } }, "description" : "Information for one A1-P Policy" @@ -1009,24 +1009,24 @@ ul.nav-tabs { "properties" : { "policy_schema" : { "type" : "object", - "description" : "Policy type json schema. The schema is a json object following http://json-schema.org/draft-07/schema" + "description" : "A1 Policy Type json schema. The schema is a json object following http://json-schema.org/draft-07/schema" } }, - "description" : "Contains policy type schema definition" + "description" : "Contains A1 Policy Type schema definition" }; defs["policy_type_id_list"] = { "type" : "object", "properties" : { "policytype_ids" : { "type" : "array", - "description" : "Policy type identities", + "description" : "A1 Policy Type identities", "items" : { "type" : "string", - "description" : "Policy type identities" + "description" : "A1 Policy Type identities" } } }, - "description" : "Information about policy types" + "description" : "Information about A1 Policy Types" }; defs["ric_info"] = { "type" : "object", @@ -1050,10 +1050,10 @@ ul.nav-tabs { }, "policytype_ids" : { "type" : "array", - "description" : "supported policy types", + "description" : "supported A1 Policy Types", "items" : { "type" : "string", - "description" : "supported policy types" + "description" : "supported A1 Policy Types" } } }, @@ -1082,11 +1082,11 @@ ul.nav-tabs { }, "event_type" : { "type" : "string", - "description" : "values:\nAVAILABLE: the Near-RT RIC has become available for A1 Policy management", + "description" : "values: \n AVAILABLE: the Near-RT RIC has become available for A1 Policy management\n", "enum" : [ "AVAILABLE" ] } }, - "description" : "Information transferred as in Service callbacks (callback_url)" + "description" : "Information transferred in Service callbacks, \nif a callback URL was provided for a registered service\n" }; defs["service_registration_info"] = { "required" : [ "service_id" ], @@ -1094,7 +1094,7 @@ ul.nav-tabs { "properties" : { "callback_url" : { "type" : "string", - "description" : "callback for notifying of Near-RT RIC state changes" + "description" : "Callback for notifying of Near-RT RIC state changes" }, "service_id" : { "type" : "string", @@ -1102,7 +1102,7 @@ ul.nav-tabs { }, "keep_alive_interval_seconds" : { "type" : "integer", - "description" : "keep alive interval for the service. This is used to enable optional heartbeat supervision of the service. If set (> 0) the registered service should regularly invoke a 'keepalive' REST call. When a service fails to invoke this 'keepalive' call within the configured time, the service is considered unavailable. An unavailable service will be automatically deregistered and its policies will be deleted. Value 0 means timeout supervision is disabled.", + "description" : "Keep alive interval for the service. This is used to enable optional heartbeat supervision of the service. If set (> 0) the registered service should regularly invoke a 'keepalive' REST call. When a service fails to invoke this 'keepalive' call within the configured time, the service is considered unavailable. An unavailable service will be automatically deregistered and its policies will be deleted. Value 0 means timeout supervision is disabled.\n", "format" : "int64" } }, @@ -1240,7 +1240,7 @@ ul.nav-tabs {
-

ONAP CCSDK A1 Policy Management Service

+

ONAP CCSDK - Pre-Spec A1 Policy Management API

@@ -1250,7 +1250,7 @@ ul.nav-tabs {
Version: 1.3.0

-

General

The ONAP CCSDK A1 Policy Management Service provides a REST API for managemecnt of A1 policies.
The main tasks of the service are:

  • A1 Policy creation, modification and deletion.
  • Monitoring and maintaining consistency of the SMO view of A1 policies and the Near-RT RICs
  • Maintaining a view of supported Near-RT RIC policy types
  • Supervision of using services (R-APPs). When a service is unavailable, its policies are removed.

APIs provided or defined by the service

A1 Policy Management

This is an API for management of A1 Policies.

  • A1 Policy retrieval, creation, modification and deletion.
  • Retrieval of supported A1 Policy types for a Near-RT RIC
  • Retrieval of status for existing A1 policies

Management of configuration

API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.

Service callbacks

These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.

NearRT-RIC Repository

This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted for one Near-RT RIC.

Health Check

API used for supervision of the PMS component.

Service Registry and Supervision

API used for registering services that uses PMS. Each A1 policy is optionally owned by a service. PMS can supervise each registered service by a heart-beat supervision and will automatically remove policies for unavailable services. Note that a service does not need to be registered in order to create A1 Policies. This is a feature that is optional to use.

Authorization API

API used for access control of A1 Policy access. If configured, an external authorization provider is requested to grant access to the A1 Policy type.

Spring Boot Actuator

Provides generic functions used to monitor and manage the Spring web application.

+

General

The ONAP CCSDK A1 Policy Management Service provides a REST API for managing A1 policies.
This document describes an older pre-spec API set to perform tasks for:

  • A1 Policy creation, modification and deletion.
  • Monitoring and maintaining consistency of the SMO view of A1 Policies and the Near-RT RICs
  • Maintaining a view of each Near-RT RIC's supported A1 Policy Types
  • Supervision of registered services (rApps). When a registered service is unavailable, its policies are removed.

APIs provided or defined by the service

A1 Policy Management (Older pre-spec version)

This is an older API for managing A1 Policies:

  • A1 Policy retrieval, creation, modification and deletion.
  • Retrieval of supported A1 Policy Types for a Near-RT RIC
  • Retrieval of status for existing A1 policies

Management of configuration

API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.

Service Callbacks

These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.

NearRT-RIC Repository (Older version)

This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted towards one Near-RT RIC.

Health Check

API used for supervision of the A1 Policy Management Service .

Service Registry and Supervision

API used for registering services/clients/rApps. Each A1 Policy can be tagged with an owner. If the owner service is registered, then the service can be monitored by a heart-beat supervision mechanism, and if the registered service becomes unavailable, then its A1 Policies are removed. Note that services do not need to be registered to create A1 Policies, but unregistered services are not supervised. This is a feature that is optional to use.

Authorization API

API used for access control of A1 Policy access. If configured, an external authorization provider is requested to grant access to the A1 Policy Type.

Spring Boot Actuator

Provides built-in functions used to monitor and configure the Spring web application hosting the service.

@@ -1262,12 +1262,12 @@ ul.nav-tabs {

deletePolicy

-

Delete a policy

+

Delete an A1 Policy instance (deletePolicy)

-

Deleting the policy using the Policy's Policy ID.

+

Delete an A1 Policy instance using its policy ID.


/a1-policy/v2/policies/{policy_id}
@@ -1371,7 +1371,7 @@ public class A1PolicyManagementApiExample { A1PolicyManagementApi *apiInstance = [[A1PolicyManagementApi alloc] init]; String *policyId = policyId_example; // (default to null) -// Delete a policy +// Delete an A1 Policy instance (deletePolicy) [apiInstance deletePolicyWith:policyId completionHandler: ^(Object output, NSError* error) { if (output) { @@ -1385,10 +1385,10 @@ String *policyId = policyId_example; // (default to null)
-
var OnapCcsdkA1PolicyManagementService = require('onap_ccsdk_a1_policy_management_service');
+                              
var OnapCcsdkPreSpecA1PolicyManagementApi = require('onap_ccsdk_pre_spec_a1_policy_management_api');
 
 // Create an instance of the API class
-var api = new OnapCcsdkA1PolicyManagementService.A1PolicyManagementApi()
+var api = new OnapCcsdkPreSpecA1PolicyManagementApi.A1PolicyManagementApi()
 var policyId = policyId_example; // {String} 
 
 var callback = function(error, data, response) {
@@ -1424,7 +1424,7 @@ namespace Example
             var policyId = policyId_example;  // String |  (default to null)
 
             try {
-                // Delete a policy
+                // Delete an A1 Policy instance (deletePolicy)
                 Object result = apiInstance.deletePolicy(policyId);
                 Debug.WriteLine(result);
             } catch (Exception e) {
@@ -1483,7 +1483,7 @@ api_instance = openapi_client.A1PolicyManagementApi()
 policyId = policyId_example # String |  (default to null)
 
 try:
-    # Delete a policy
+    # Delete an A1 Policy instance (deletePolicy)
     api_response = api_instance.delete_policy(policyId)
     pprint(api_response)
 except ApiException as e:
@@ -1709,12 +1709,12 @@ pub fn main() {
                       

getPolicy

-

+

Get an A1 Policy instance (getPolicy)

-

Returns a policy

+

Get an A1 Policy instance using its policy ID


/a1-policy/v2/policies/{policy_id}
@@ -1818,6 +1818,7 @@ public class A1PolicyManagementApiExample { A1PolicyManagementApi *apiInstance = [[A1PolicyManagementApi alloc] init]; String *policyId = policyId_example; // (default to null) +// Get an A1 Policy instance (getPolicy) [apiInstance getPolicyWith:policyId completionHandler: ^(policy_info output, NSError* error) { if (output) { @@ -1831,10 +1832,10 @@ String *policyId = policyId_example; // (default to null)
-
var OnapCcsdkA1PolicyManagementService = require('onap_ccsdk_a1_policy_management_service');
+                              
var OnapCcsdkPreSpecA1PolicyManagementApi = require('onap_ccsdk_pre_spec_a1_policy_management_api');
 
 // Create an instance of the API class
-var api = new OnapCcsdkA1PolicyManagementService.A1PolicyManagementApi()
+var api = new OnapCcsdkPreSpecA1PolicyManagementApi.A1PolicyManagementApi()
 var policyId = policyId_example; // {String} 
 
 var callback = function(error, data, response) {
@@ -1870,6 +1871,7 @@ namespace Example
             var policyId = policyId_example;  // String |  (default to null)
 
             try {
+                // Get an A1 Policy instance (getPolicy)
                 policy_info result = apiInstance.getPolicy(policyId);
                 Debug.WriteLine(result);
             } catch (Exception e) {
@@ -1928,6 +1930,7 @@ api_instance = openapi_client.A1PolicyManagementApi()
 policyId = policyId_example # String |  (default to null)
 
 try:
+    # Get an A1 Policy instance (getPolicy)
     api_response = api_instance.get_policy(policyId)
     pprint(api_response)
 except ApiException as e:
@@ -2146,12 +2149,13 @@ pub fn main() {
                       

getPolicyIds

-

Query policy identities

+

Query A1 Policy Instances (getPolicyIds)

-

Returns a list of A1 policies matching given search criteria. <br>If several query parameters are defined, the policies matching all conditions are returned.

+

Retrieve a list of A1 Policy Instance IDs for policies that match given search criteria. If multiple query parameters are given, the policies matching all conditions are returned. +


/a1-policy/v2/policies
@@ -2195,10 +2199,11 @@ public class A1PolicyManagementApiExample { // Create an instance of the API class A1PolicyManagementApi apiInstance = new A1PolicyManagementApi(); - String policytypeId = policytypeId_example; // String | Select policies of a given policy type identity. + String policytypeId = policytypeId_example; // String | Select policies of a given A1 Policy Type ID. String ricId = ricId_example; // String | Select policies of a given Near-RT RIC identity. - String serviceId = serviceId_example; // String | Select policies owned by a given service. - String typeName = typeName_example; // String | Select policies of types with the given type name (type identity has the format ) + String serviceId = serviceId_example; // String | Select policies owned by a given service. (Both registered and unregistered services) + String typeName = typeName_example; // String | Select policies of types with the given A1 Policy Type name (type names have the format 'typename_version') + try { policy_id_list result = apiInstance.getPolicyIds(policytypeId, ricId, serviceId, typeName); @@ -2217,10 +2222,11 @@ public class A1PolicyManagementApiExample { final api_instance = DefaultApi(); -final String policytypeId = new String(); // String | Select policies of a given policy type identity. +final String policytypeId = new String(); // String | Select policies of a given A1 Policy Type ID. final String ricId = new String(); // String | Select policies of a given Near-RT RIC identity. -final String serviceId = new String(); // String | Select policies owned by a given service. -final String typeName = new String(); // String | Select policies of types with the given type name (type identity has the format ) +final String serviceId = new String(); // String | Select policies owned by a given service. (Both registered and unregistered services) +final String typeName = new String(); // String | Select policies of types with the given A1 Policy Type name (type names have the format 'typename_version') + try { final result = await api_instance.getPolicyIds(policytypeId, ricId, serviceId, typeName); @@ -2238,10 +2244,11 @@ try { public class A1PolicyManagementApiExample { public static void main(String[] args) { A1PolicyManagementApi apiInstance = new A1PolicyManagementApi(); - String policytypeId = policytypeId_example; // String | Select policies of a given policy type identity. + String policytypeId = policytypeId_example; // String | Select policies of a given A1 Policy Type ID. String ricId = ricId_example; // String | Select policies of a given Near-RT RIC identity. - String serviceId = serviceId_example; // String | Select policies owned by a given service. - String typeName = typeName_example; // String | Select policies of types with the given type name (type identity has the format ) + String serviceId = serviceId_example; // String | Select policies owned by a given service. (Both registered and unregistered services) + String typeName = typeName_example; // String | Select policies of types with the given A1 Policy Type name (type names have the format 'typename_version') + try { policy_id_list result = apiInstance.getPolicyIds(policytypeId, ricId, serviceId, typeName); @@ -2262,12 +2269,13 @@ public class A1PolicyManagementApiExample { // Create an instance of the API class A1PolicyManagementApi *apiInstance = [[A1PolicyManagementApi alloc] init]; -String *policytypeId = policytypeId_example; // Select policies of a given policy type identity. (optional) (default to null) +String *policytypeId = policytypeId_example; // Select policies of a given A1 Policy Type ID. (optional) (default to null) String *ricId = ricId_example; // Select policies of a given Near-RT RIC identity. (optional) (default to null) -String *serviceId = serviceId_example; // Select policies owned by a given service. (optional) (default to null) -String *typeName = typeName_example; // Select policies of types with the given type name (type identity has the format ) (optional) (default to null) +String *serviceId = serviceId_example; // Select policies owned by a given service. (Both registered and unregistered services) (optional) (default to null) +String *typeName = typeName_example; // Select policies of types with the given A1 Policy Type name (type names have the format 'typename_version') + (optional) (default to null) -// Query policy identities +// Query A1 Policy Instances (getPolicyIds) [apiInstance getPolicyIdsWith:policytypeId ricId:ricId serviceId:serviceId @@ -2284,15 +2292,16 @@ String *typeName = typeName_example; // Select policies of types with the given
-
var OnapCcsdkA1PolicyManagementService = require('onap_ccsdk_a1_policy_management_service');
+                              
var OnapCcsdkPreSpecA1PolicyManagementApi = require('onap_ccsdk_pre_spec_a1_policy_management_api');
 
 // Create an instance of the API class
-var api = new OnapCcsdkA1PolicyManagementService.A1PolicyManagementApi()
+var api = new OnapCcsdkPreSpecA1PolicyManagementApi.A1PolicyManagementApi()
 var opts = {
-  'policytypeId': policytypeId_example, // {String} Select policies of a given policy type identity.
+  'policytypeId': policytypeId_example, // {String} Select policies of a given A1 Policy Type ID.
   'ricId': ricId_example, // {String} Select policies of a given Near-RT RIC identity.
-  'serviceId': serviceId_example, // {String} Select policies owned by a given service.
-  'typeName': typeName_example // {String} Select policies of types with the given type name (type identity has the format )
+  'serviceId': serviceId_example, // {String} Select policies owned by a given service. (Both registered and unregistered services)
+  'typeName': typeName_example // {String} Select policies of types with the given A1 Policy Type name  (type names have the format 'typename_version')
+
 };
 
 var callback = function(error, data, response) {
@@ -2325,13 +2334,14 @@ namespace Example
 
             // Create an instance of the API class
             var apiInstance = new A1PolicyManagementApi();
-            var policytypeId = policytypeId_example;  // String | Select policies of a given policy type identity. (optional)  (default to null)
+            var policytypeId = policytypeId_example;  // String | Select policies of a given A1 Policy Type ID. (optional)  (default to null)
             var ricId = ricId_example;  // String | Select policies of a given Near-RT RIC identity. (optional)  (default to null)
-            var serviceId = serviceId_example;  // String | Select policies owned by a given service. (optional)  (default to null)
-            var typeName = typeName_example;  // String | Select policies of types with the given type name (type identity has the format ) (optional)  (default to null)
+            var serviceId = serviceId_example;  // String | Select policies owned by a given service. (Both registered and unregistered services) (optional)  (default to null)
+            var typeName = typeName_example;  // String | Select policies of types with the given A1 Policy Type name  (type names have the format 'typename_version')
+ (optional)  (default to null)
 
             try {
-                // Query policy identities
+                // Query A1 Policy Instances (getPolicyIds)
                 policy_id_list result = apiInstance.getPolicyIds(policytypeId, ricId, serviceId, typeName);
                 Debug.WriteLine(result);
             } catch (Exception e) {
@@ -2349,10 +2359,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
 
 // Create an instance of the API class
 $api_instance = new OpenAPITools\Client\Api\A1PolicyManagementApi();
-$policytypeId = policytypeId_example; // String | Select policies of a given policy type identity.
+$policytypeId = policytypeId_example; // String | Select policies of a given A1 Policy Type ID.
 $ricId = ricId_example; // String | Select policies of a given Near-RT RIC identity.
-$serviceId = serviceId_example; // String | Select policies owned by a given service.
-$typeName = typeName_example; // String | Select policies of types with the given type name (type identity has the format )
+$serviceId = serviceId_example; // String | Select policies owned by a given service. (Both registered and unregistered services)
+$typeName = typeName_example; // String | Select policies of types with the given A1 Policy Type name  (type names have the format 'typename_version')
+
 
 try {
     $result = $api_instance->getPolicyIds($policytypeId, $ricId, $serviceId, $typeName);
@@ -2370,10 +2381,11 @@ use WWW::OPenAPIClient::A1PolicyManagementApi;
 
 # Create an instance of the API class
 my $api_instance = WWW::OPenAPIClient::A1PolicyManagementApi->new();
-my $policytypeId = policytypeId_example; # String | Select policies of a given policy type identity.
+my $policytypeId = policytypeId_example; # String | Select policies of a given A1 Policy Type ID.
 my $ricId = ricId_example; # String | Select policies of a given Near-RT RIC identity.
-my $serviceId = serviceId_example; # String | Select policies owned by a given service.
-my $typeName = typeName_example; # String | Select policies of types with the given type name (type identity has the format )
+my $serviceId = serviceId_example; # String | Select policies owned by a given service. (Both registered and unregistered services)
+my $typeName = typeName_example; # String | Select policies of types with the given A1 Policy Type name  (type names have the format 'typename_version')
+
 
 eval {
     my $result = $api_instance->getPolicyIds(policytypeId => $policytypeId, ricId => $ricId, serviceId => $serviceId, typeName => $typeName);
@@ -2393,13 +2405,14 @@ from pprint import pprint
 
 # Create an instance of the API class
 api_instance = openapi_client.A1PolicyManagementApi()
-policytypeId = policytypeId_example # String | Select policies of a given policy type identity. (optional) (default to null)
+policytypeId = policytypeId_example # String | Select policies of a given A1 Policy Type ID. (optional) (default to null)
 ricId = ricId_example # String | Select policies of a given Near-RT RIC identity. (optional) (default to null)
-serviceId = serviceId_example # String | Select policies owned by a given service. (optional) (default to null)
-typeName = typeName_example # String | Select policies of types with the given type name (type identity has the format ) (optional) (default to null)
+serviceId = serviceId_example # String | Select policies owned by a given service. (Both registered and unregistered services) (optional) (default to null)
+typeName = typeName_example # String | Select policies of types with the given A1 Policy Type name  (type names have the format 'typename_version')
+ (optional) (default to null)
 
 try:
-    # Query policy identities
+    # Query A1 Policy Instances (getPolicyIds)
     api_response = api_instance.get_policy_ids(policytypeId=policytypeId, ricId=ricId, serviceId=serviceId, typeName=typeName)
     pprint(api_response)
 except ApiException as e:
@@ -2453,7 +2466,7 @@ pub fn main() {
                 
 
                     
-Select policies of a given policy type identity. +Select policies of a given A1 Policy Type ID.
@@ -2493,7 +2506,7 @@ Select policies of a given Near-RT RIC identity.
-Select policies owned by a given service. +Select policies owned by a given service. (Both registered and unregistered services)
@@ -2513,7 +2526,8 @@ Select policies owned by a given service.
-Select policies of types with the given type name (type identity has the format <typename_version>) +Select policies of types with the given A1 Policy Type name (type names have the format 'typename_version') +
@@ -2681,12 +2695,13 @@ Select policies of types with the given type name (type identity has the format

getPolicyInstances

-

Query for A1 policy instances

+

Query for A1 Policy instances (getPolicyInstances)

-

Returns a list of A1 policies matching given search criteria. <br>If several query parameters are defined, the policies matching all conditions are returned.

+

Returns a collection of A1 Policy Instance information for policies that match given search criteria. If several query parameters are defined, the policies matching all conditions are returned. +


/a1-policy/v2/policy-instances
@@ -2730,10 +2745,10 @@ public class A1PolicyManagementApiExample { // Create an instance of the API class A1PolicyManagementApi apiInstance = new A1PolicyManagementApi(); - String policytypeId = policytypeId_example; // String | Select policies with a given type identity. + String policytypeId = policytypeId_example; // String | Select policies with a given A1 Policy Type ID. String ricId = ricId_example; // String | Select policies for a given Near-RT RIC identity. - String serviceId = serviceId_example; // String | Select policies owned by a given service. - String typeName = typeName_example; // String | Select policies of a given type name (type identity has the format ) + String serviceId = serviceId_example; // String | Select policies owned by a given service (registered or unregistered). + String typeName = typeName_example; // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). try { policy_info_list result = apiInstance.getPolicyInstances(policytypeId, ricId, serviceId, typeName); @@ -2752,10 +2767,10 @@ public class A1PolicyManagementApiExample { final api_instance = DefaultApi(); -final String policytypeId = new String(); // String | Select policies with a given type identity. +final String policytypeId = new String(); // String | Select policies with a given A1 Policy Type ID. final String ricId = new String(); // String | Select policies for a given Near-RT RIC identity. -final String serviceId = new String(); // String | Select policies owned by a given service. -final String typeName = new String(); // String | Select policies of a given type name (type identity has the format ) +final String serviceId = new String(); // String | Select policies owned by a given service (registered or unregistered). +final String typeName = new String(); // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). try { final result = await api_instance.getPolicyInstances(policytypeId, ricId, serviceId, typeName); @@ -2773,10 +2788,10 @@ try { public class A1PolicyManagementApiExample { public static void main(String[] args) { A1PolicyManagementApi apiInstance = new A1PolicyManagementApi(); - String policytypeId = policytypeId_example; // String | Select policies with a given type identity. + String policytypeId = policytypeId_example; // String | Select policies with a given A1 Policy Type ID. String ricId = ricId_example; // String | Select policies for a given Near-RT RIC identity. - String serviceId = serviceId_example; // String | Select policies owned by a given service. - String typeName = typeName_example; // String | Select policies of a given type name (type identity has the format ) + String serviceId = serviceId_example; // String | Select policies owned by a given service (registered or unregistered). + String typeName = typeName_example; // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). try { policy_info_list result = apiInstance.getPolicyInstances(policytypeId, ricId, serviceId, typeName); @@ -2797,12 +2812,12 @@ public class A1PolicyManagementApiExample { // Create an instance of the API class A1PolicyManagementApi *apiInstance = [[A1PolicyManagementApi alloc] init]; -String *policytypeId = policytypeId_example; // Select policies with a given type identity. (optional) (default to null) +String *policytypeId = policytypeId_example; // Select policies with a given A1 Policy Type ID. (optional) (default to null) String *ricId = ricId_example; // Select policies for a given Near-RT RIC identity. (optional) (default to null) -String *serviceId = serviceId_example; // Select policies owned by a given service. (optional) (default to null) -String *typeName = typeName_example; // Select policies of a given type name (type identity has the format ) (optional) (default to null) +String *serviceId = serviceId_example; // Select policies owned by a given service (registered or unregistered). (optional) (default to null) +String *typeName = typeName_example; // Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). (optional) (default to null) -// Query for A1 policy instances +// Query for A1 Policy instances (getPolicyInstances) [apiInstance getPolicyInstancesWith:policytypeId ricId:ricId serviceId:serviceId @@ -2819,15 +2834,15 @@ String *typeName = typeName_example; // Select policies of a given type name (ty
-
var OnapCcsdkA1PolicyManagementService = require('onap_ccsdk_a1_policy_management_service');
+                              
var OnapCcsdkPreSpecA1PolicyManagementApi = require('onap_ccsdk_pre_spec_a1_policy_management_api');
 
 // Create an instance of the API class
-var api = new OnapCcsdkA1PolicyManagementService.A1PolicyManagementApi()
+var api = new OnapCcsdkPreSpecA1PolicyManagementApi.A1PolicyManagementApi()
 var opts = {
-  'policytypeId': policytypeId_example, // {String} Select policies with a given type identity.
+  'policytypeId': policytypeId_example, // {String} Select policies with a given A1 Policy Type ID.
   'ricId': ricId_example, // {String} Select policies for a given Near-RT RIC identity.
-  'serviceId': serviceId_example, // {String} Select policies owned by a given service.
-  'typeName': typeName_example // {String} Select policies of a given type name (type identity has the format )
+  'serviceId': serviceId_example, // {String} Select policies owned by a given service (registered or unregistered).
+  'typeName': typeName_example // {String} Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
 };
 
 var callback = function(error, data, response) {
@@ -2860,13 +2875,13 @@ namespace Example
 
             // Create an instance of the API class
             var apiInstance = new A1PolicyManagementApi();
-            var policytypeId = policytypeId_example;  // String | Select policies with a given type identity. (optional)  (default to null)
+            var policytypeId = policytypeId_example;  // String | Select policies with a given A1 Policy Type ID. (optional)  (default to null)
             var ricId = ricId_example;  // String | Select policies for a given Near-RT RIC identity. (optional)  (default to null)
-            var serviceId = serviceId_example;  // String | Select policies owned by a given service. (optional)  (default to null)
-            var typeName = typeName_example;  // String | Select policies of a given type name (type identity has the format ) (optional)  (default to null)
+            var serviceId = serviceId_example;  // String | Select policies owned by a given service (registered or unregistered). (optional)  (default to null)
+            var typeName = typeName_example;  // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). (optional)  (default to null)
 
             try {
-                // Query for A1 policy instances
+                // Query for A1 Policy instances (getPolicyInstances)
                 policy_info_list result = apiInstance.getPolicyInstances(policytypeId, ricId, serviceId, typeName);
                 Debug.WriteLine(result);
             } catch (Exception e) {
@@ -2884,10 +2899,10 @@ require_once(__DIR__ . '/vendor/autoload.php');
 
 // Create an instance of the API class
 $api_instance = new OpenAPITools\Client\Api\A1PolicyManagementApi();
-$policytypeId = policytypeId_example; // String | Select policies with a given type identity.
+$policytypeId = policytypeId_example; // String | Select policies with a given A1 Policy Type ID.
 $ricId = ricId_example; // String | Select policies for a given Near-RT RIC identity.
-$serviceId = serviceId_example; // String | Select policies owned by a given service.
-$typeName = typeName_example; // String | Select policies of a given type name (type identity has the format )
+$serviceId = serviceId_example; // String | Select policies owned by a given service (registered or unregistered).
+$typeName = typeName_example; // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
 
 try {
     $result = $api_instance->getPolicyInstances($policytypeId, $ricId, $serviceId, $typeName);
@@ -2905,10 +2920,10 @@ use WWW::OPenAPIClient::A1PolicyManagementApi;
 
 # Create an instance of the API class
 my $api_instance = WWW::OPenAPIClient::A1PolicyManagementApi->new();
-my $policytypeId = policytypeId_example; # String | Select policies with a given type identity.
+my $policytypeId = policytypeId_example; # String | Select policies with a given A1 Policy Type ID.
 my $ricId = ricId_example; # String | Select policies for a given Near-RT RIC identity.
-my $serviceId = serviceId_example; # String | Select policies owned by a given service.
-my $typeName = typeName_example; # String | Select policies of a given type name (type identity has the format )
+my $serviceId = serviceId_example; # String | Select policies owned by a given service (registered or unregistered).
+my $typeName = typeName_example; # String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
 
 eval {
     my $result = $api_instance->getPolicyInstances(policytypeId => $policytypeId, ricId => $ricId, serviceId => $serviceId, typeName => $typeName);
@@ -2928,13 +2943,13 @@ from pprint import pprint
 
 # Create an instance of the API class
 api_instance = openapi_client.A1PolicyManagementApi()
-policytypeId = policytypeId_example # String | Select policies with a given type identity. (optional) (default to null)
+policytypeId = policytypeId_example # String | Select policies with a given A1 Policy Type ID. (optional) (default to null)
 ricId = ricId_example # String | Select policies for a given Near-RT RIC identity. (optional) (default to null)
-serviceId = serviceId_example # String | Select policies owned by a given service. (optional) (default to null)
-typeName = typeName_example # String | Select policies of a given type name (type identity has the format ) (optional) (default to null)
+serviceId = serviceId_example # String | Select policies owned by a given service (registered or unregistered). (optional) (default to null)
+typeName = typeName_example # String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). (optional) (default to null)
 
 try:
-    # Query for A1 policy instances
+    # Query for A1 Policy instances (getPolicyInstances)
     api_response = api_instance.get_policy_instances(policytypeId=policytypeId, ricId=ricId, serviceId=serviceId, typeName=typeName)
     pprint(api_response)
 except ApiException as e:
@@ -2988,7 +3003,7 @@ pub fn main() {
                 
 
                     
-Select policies with a given type identity. +Select policies with a given A1 Policy Type ID.
@@ -3028,7 +3043,7 @@ Select policies for a given Near-RT RIC identity.
-Select policies owned by a given service. +Select policies owned by a given service (registered or unregistered).
@@ -3048,7 +3063,7 @@ Select policies owned by a given service.
-Select policies of a given type name (type identity has the format <typename_version>) +Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
@@ -3062,7 +3077,7 @@ Select policies of a given type name (type identity has the format <typename_

-

-
-
+
+
-

getPolicy

-

Get an A1 Policy's policy data (getPolicy)

+

getPolicyIds

+

Query for A1 Policy instances (getPolicyIds)

-

Get an A1 Policy instance's policy data using its policy ID

+

Returns a collection of A1 Policy Instance IDs for policies that match given search criteria. If several query parameters are defined, the policies matching all conditions are returned. +


-
/policies/{policyId}
+
/policies

Usage and SDK Samples

-
+
curl -X GET \
  -H "Accept: application/json,application/problem+json" \
- "https://example.com/a1-policy-management/v1/policies/{policyId}"
+ "https://example.com/a1-policy-management/v1/policies?policyTypeId=policyTypeId_example&nearRtRicId=nearRtRicId_example&serviceId=serviceId_example&typeName=typeName_example"
 
-
+
import org.openapitools.client.*;
 import org.openapitools.client.auth.*;
 import org.openapitools.client.model.*;
@@ -5197,14 +5106,17 @@ public class A1PolicyManagementApiExample {
 
         // Create an instance of the API class
         A1PolicyManagementApi apiInstance = new A1PolicyManagementApi();
-        String policyId = policyId_example; // String | 
+        String policyTypeId = policyTypeId_example; // String | Select policies with a given A1 Policy Type ID.
+        String nearRtRicId = nearRtRicId_example; // String | Select policies for a given Near-RT RIC identity.
+        String serviceId = serviceId_example; // String | Select policies owned by a given service (registered or unregistered).
+        String typeName = typeName_example; // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
         String accept = application/json; // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
 
         try {
-            Object result = apiInstance.getPolicy(policyId, accept);
+            array[PolicyInformation] result = apiInstance.getPolicyIds(policyTypeId, nearRtRicId, serviceId, typeName, accept);
             System.out.println(result);
         } catch (ApiException e) {
-            System.err.println("Exception when calling A1PolicyManagementApi#getPolicy");
+            System.err.println("Exception when calling A1PolicyManagementApi#getPolicyIds");
             e.printStackTrace();
         }
     }
@@ -5212,59 +5124,71 @@ public class A1PolicyManagementApiExample {
 
-
+
import 'package:openapi/api.dart';
 
 final api_instance = DefaultApi();
 
-final String policyId = new String(); // String | 
+final String policyTypeId = new String(); // String | Select policies with a given A1 Policy Type ID.
+final String nearRtRicId = new String(); // String | Select policies for a given Near-RT RIC identity.
+final String serviceId = new String(); // String | Select policies owned by a given service (registered or unregistered).
+final String typeName = new String(); // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
 final String accept = new String(); // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
 
 try {
-    final result = await api_instance.getPolicy(policyId, accept);
+    final result = await api_instance.getPolicyIds(policyTypeId, nearRtRicId, serviceId, typeName, accept);
     print(result);
 } catch (e) {
-    print('Exception when calling DefaultApi->getPolicy: $e\n');
+    print('Exception when calling DefaultApi->getPolicyIds: $e\n');
 }
 
 
-
+
import org.openapitools.client.api.A1PolicyManagementApi;
 
 public class A1PolicyManagementApiExample {
     public static void main(String[] args) {
         A1PolicyManagementApi apiInstance = new A1PolicyManagementApi();
-        String policyId = policyId_example; // String | 
+        String policyTypeId = policyTypeId_example; // String | Select policies with a given A1 Policy Type ID.
+        String nearRtRicId = nearRtRicId_example; // String | Select policies for a given Near-RT RIC identity.
+        String serviceId = serviceId_example; // String | Select policies owned by a given service (registered or unregistered).
+        String typeName = typeName_example; // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
         String accept = application/json; // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
 
         try {
-            Object result = apiInstance.getPolicy(policyId, accept);
+            array[PolicyInformation] result = apiInstance.getPolicyIds(policyTypeId, nearRtRicId, serviceId, typeName, accept);
             System.out.println(result);
         } catch (ApiException e) {
-            System.err.println("Exception when calling A1PolicyManagementApi#getPolicy");
+            System.err.println("Exception when calling A1PolicyManagementApi#getPolicyIds");
             e.printStackTrace();
         }
     }
 }
-
+

 
 // Create an instance of the API class
 A1PolicyManagementApi *apiInstance = [[A1PolicyManagementApi alloc] init];
-String *policyId = policyId_example; //  (default to null)
+String *policyTypeId = policyTypeId_example; // Select policies with a given A1 Policy Type ID. (optional) (default to null)
+String *nearRtRicId = nearRtRicId_example; // Select policies for a given Near-RT RIC identity. (optional) (default to null)
+String *serviceId = serviceId_example; // Select policies owned by a given service (registered or unregistered). (optional) (default to null)
+String *typeName = typeName_example; // Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). (optional) (default to null)
 String *accept = application/json; // Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. (optional) (default to null)
 
-// Get an A1 Policy's policy data (getPolicy)
-[apiInstance getPolicyWith:policyId
+// Query for A1 Policy instances (getPolicyIds)
+[apiInstance getPolicyIdsWith:policyTypeId
+    nearRtRicId:nearRtRicId
+    serviceId:serviceId
+    typeName:typeName
     accept:accept
-              completionHandler: ^(Object output, NSError* error) {
+              completionHandler: ^(array[PolicyInformation] output, NSError* error) {
     if (output) {
         NSLog(@"%@", output);
     }
@@ -5275,13 +5199,16 @@ String *accept = application/json; // Specifies the content type that the client
 
-
+
var OnapCcsdkA1PolicyManagementApi = require('onap_ccsdk_a1_policy_management_api');
 
 // Create an instance of the API class
 var api = new OnapCcsdkA1PolicyManagementApi.A1PolicyManagementApi()
-var policyId = policyId_example; // {String} 
 var opts = {
+  'policyTypeId': policyTypeId_example, // {String} Select policies with a given A1 Policy Type ID.
+  'nearRtRicId': nearRtRicId_example, // {String} Select policies for a given Near-RT RIC identity.
+  'serviceId': serviceId_example, // {String} Select policies owned by a given service (registered or unregistered).
+  'typeName': typeName_example, // {String} Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
   'accept': application/json // {String} Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
 };
 
@@ -5292,14 +5219,14 @@ var callback = function(error, data, response) {
     console.log('API called successfully. Returned data: ' + data);
   }
 };
-api.getPolicy(policyId, opts, callback);
+api.getPolicyIds(opts, callback);
 
- -
+
using System;
 using System.Diagnostics;
 using Org.OpenAPITools.Api;
@@ -5308,22 +5235,25 @@ using Org.OpenAPITools.Model;
 
 namespace Example
 {
-    public class getPolicyExample
+    public class getPolicyIdsExample
     {
         public void main()
         {
 
             // Create an instance of the API class
             var apiInstance = new A1PolicyManagementApi();
-            var policyId = policyId_example;  // String |  (default to null)
+            var policyTypeId = policyTypeId_example;  // String | Select policies with a given A1 Policy Type ID. (optional)  (default to null)
+            var nearRtRicId = nearRtRicId_example;  // String | Select policies for a given Near-RT RIC identity. (optional)  (default to null)
+            var serviceId = serviceId_example;  // String | Select policies owned by a given service (registered or unregistered). (optional)  (default to null)
+            var typeName = typeName_example;  // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). (optional)  (default to null)
             var accept = application/json;  // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. (optional)  (default to null)
 
             try {
-                // Get an A1 Policy's policy data (getPolicy)
-                Object result = apiInstance.getPolicy(policyId, accept);
+                // Query for A1 Policy instances (getPolicyIds)
+                array[PolicyInformation] result = apiInstance.getPolicyIds(policyTypeId, nearRtRicId, serviceId, typeName, accept);
                 Debug.WriteLine(result);
             } catch (Exception e) {
-                Debug.Print("Exception when calling A1PolicyManagementApi.getPolicy: " + e.Message );
+                Debug.Print("Exception when calling A1PolicyManagementApi.getPolicyIds: " + e.Message );
             }
         }
     }
@@ -5331,44 +5261,50 @@ namespace Example
 
-
+
<?php
 require_once(__DIR__ . '/vendor/autoload.php');
 
 // Create an instance of the API class
 $api_instance = new OpenAPITools\Client\Api\A1PolicyManagementApi();
-$policyId = policyId_example; // String | 
+$policyTypeId = policyTypeId_example; // String | Select policies with a given A1 Policy Type ID.
+$nearRtRicId = nearRtRicId_example; // String | Select policies for a given Near-RT RIC identity.
+$serviceId = serviceId_example; // String | Select policies owned by a given service (registered or unregistered).
+$typeName = typeName_example; // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
 $accept = application/json; // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
 
 try {
-    $result = $api_instance->getPolicy($policyId, $accept);
+    $result = $api_instance->getPolicyIds($policyTypeId, $nearRtRicId, $serviceId, $typeName, $accept);
     print_r($result);
 } catch (Exception $e) {
-    echo 'Exception when calling A1PolicyManagementApi->getPolicy: ', $e->getMessage(), PHP_EOL;
+    echo 'Exception when calling A1PolicyManagementApi->getPolicyIds: ', $e->getMessage(), PHP_EOL;
 }
 ?>
-
+
use Data::Dumper;
 use WWW::OPenAPIClient::Configuration;
 use WWW::OPenAPIClient::A1PolicyManagementApi;
 
 # Create an instance of the API class
 my $api_instance = WWW::OPenAPIClient::A1PolicyManagementApi->new();
-my $policyId = policyId_example; # String | 
+my $policyTypeId = policyTypeId_example; # String | Select policies with a given A1 Policy Type ID.
+my $nearRtRicId = nearRtRicId_example; # String | Select policies for a given Near-RT RIC identity.
+my $serviceId = serviceId_example; # String | Select policies owned by a given service (registered or unregistered).
+my $typeName = typeName_example; # String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
 my $accept = application/json; # String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
 
 eval {
-    my $result = $api_instance->getPolicy(policyId => $policyId, accept => $accept);
+    my $result = $api_instance->getPolicyIds(policyTypeId => $policyTypeId, nearRtRicId => $nearRtRicId, serviceId => $serviceId, typeName => $typeName, accept => $accept);
     print Dumper($result);
 };
 if ($@) {
-    warn "Exception when calling A1PolicyManagementApi->getPolicy: $@\n";
+    warn "Exception when calling A1PolicyManagementApi->getPolicyIds: $@\n";
 }
-
+
from __future__ import print_statement
 import time
 import openapi_client
@@ -5377,26 +5313,32 @@ from pprint import pprint
 
 # Create an instance of the API class
 api_instance = openapi_client.A1PolicyManagementApi()
-policyId = policyId_example # String |  (default to null)
+policyTypeId = policyTypeId_example # String | Select policies with a given A1 Policy Type ID. (optional) (default to null)
+nearRtRicId = nearRtRicId_example # String | Select policies for a given Near-RT RIC identity. (optional) (default to null)
+serviceId = serviceId_example # String | Select policies owned by a given service (registered or unregistered). (optional) (default to null)
+typeName = typeName_example # String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). (optional) (default to null)
 accept = application/json # String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. (optional) (default to null)
 
 try:
-    # Get an A1 Policy's policy data (getPolicy)
-    api_response = api_instance.get_policy(policyId, accept=accept)
+    # Query for A1 Policy instances (getPolicyIds)
+    api_response = api_instance.get_policy_ids(policyTypeId=policyTypeId, nearRtRicId=nearRtRicId, serviceId=serviceId, typeName=typeName, accept=accept)
     pprint(api_response)
 except ApiException as e:
-    print("Exception when calling A1PolicyManagementApi->getPolicy: %s\n" % e)
+ print("Exception when calling A1PolicyManagementApi->getPolicyIds: %s\n" % e)
-
+
extern crate A1PolicyManagementApi;
 
 pub fn main() {
-    let policyId = policyId_example; // String
+    let policyTypeId = policyTypeId_example; // String
+    let nearRtRicId = nearRtRicId_example; // String
+    let serviceId = serviceId_example; // String
+    let typeName = typeName_example; // String
     let accept = application/json; // String
 
     let mut context = A1PolicyManagementApi::Context::default();
-    let result = client.getPolicy(policyId, accept, &context).wait();
+    let result = client.getPolicyIds(policyTypeId, nearRtRicId, serviceId, typeName, accept, &context).wait();
 
     println!("{:?}", result);
 }
@@ -5411,27 +5353,28 @@ pub fn main() {
 
                           

Parameters

-
Path parameters
+ +
Header parameters
- - - - - + + + + + @@ -5439,17 +5382,19 @@ pub fn main() {
NameDescription
policyId*
NameDescription
Accept -
+
String +
+Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. +
-
- Required -
-
Header parameters
+ + +
Query parameters
- + -
Name Description
Accept
policyTypeId -
+
@@ -5457,7 +5402,7 @@ pub fn main() {
-Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. +Select policies with a given A1 Policy Type ID.
@@ -5465,29 +5410,86 @@ Specifies the content type that the client expects to receive in response to the
+ nearRtRicId + + + +
+
+
+ + String + + +
+Select policies for a given Near-RT RIC identity. +
+
+
+
+ + + serviceId + +
+
+
+ + String + + +
+Select policies owned by a given service (registered or unregistered). +
+
+
+
+ + + + typeName + + + +
+
+
+ + String + + +
+Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). +
+
+
+
+ + + +

Responses

-

-

+

+

-
@@ -9594,11 +9594,11 @@ Select types that are compatible with the given version. This parameter is only

-
-
+
+
-

putPolicy

-

Update an A1 Policy's policy data (putPolicy)

+

updatePolicy

+

Update an A1 Policy's policy data (updatePolicy)

@@ -9611,23 +9611,23 @@ Select types that are compatible with the given version. This parameter is only

Usage and SDK Samples

-
+
curl -X PUT \
  -H "Accept: application/json,application/problem+json" \
  -H "Content-Type: application/json" \
@@ -9635,7 +9635,7 @@ Select types that are compatible with the given version. This parameter is only
  -d ''
 
-
+
import org.openapitools.client.*;
 import org.openapitools.client.auth.*;
 import org.openapitools.client.model.*;
@@ -9653,10 +9653,10 @@ public class A1PolicyManagementApiExample {
         Object body = Object; // Object | 
 
         try {
-            Object result = apiInstance.putPolicy(policyId, body);
+            Object result = apiInstance.updatePolicy(policyId, body);
             System.out.println(result);
         } catch (ApiException e) {
-            System.err.println("Exception when calling A1PolicyManagementApi#putPolicy");
+            System.err.println("Exception when calling A1PolicyManagementApi#updatePolicy");
             e.printStackTrace();
         }
     }
@@ -9664,7 +9664,7 @@ public class A1PolicyManagementApiExample {
 
-
+
import 'package:openapi/api.dart';
 
 final api_instance = DefaultApi();
@@ -9673,16 +9673,16 @@ final String policyId = new String(); // String |
 final Object body = new Object(); // Object | 
 
 try {
-    final result = await api_instance.putPolicy(policyId, body);
+    final result = await api_instance.updatePolicy(policyId, body);
     print(result);
 } catch (e) {
-    print('Exception when calling DefaultApi->putPolicy: $e\n');
+    print('Exception when calling DefaultApi->updatePolicy: $e\n');
 }
 
 
-
+
import org.openapitools.client.api.A1PolicyManagementApi;
 
 public class A1PolicyManagementApiExample {
@@ -9692,20 +9692,20 @@ public class A1PolicyManagementApiExample {
         Object body = Object; // Object | 
 
         try {
-            Object result = apiInstance.putPolicy(policyId, body);
+            Object result = apiInstance.updatePolicy(policyId, body);
             System.out.println(result);
         } catch (ApiException e) {
-            System.err.println("Exception when calling A1PolicyManagementApi#putPolicy");
+            System.err.println("Exception when calling A1PolicyManagementApi#updatePolicy");
             e.printStackTrace();
         }
     }
 }
-
+

 
 // Create an instance of the API class
@@ -9713,8 +9713,8 @@ A1PolicyManagementApi *apiInstance = [[A1PolicyManagementApi alloc] init];
 String *policyId = policyId_example; //  (default to null)
 Object *body = Object; // 
 
-// Update an A1 Policy's policy data (putPolicy)
-[apiInstance putPolicyWith:policyId
+// Update an A1 Policy's policy data (updatePolicy)
+[apiInstance updatePolicyWith:policyId
     body:body
               completionHandler: ^(Object output, NSError* error) {
     if (output) {
@@ -9727,7 +9727,7 @@ Object *body = Object; //
 
-
+
var OnapCcsdkA1PolicyManagementApi = require('onap_ccsdk_a1_policy_management_api');
 
 // Create an instance of the API class
@@ -9742,14 +9742,14 @@ var callback = function(error, data, response) {
     console.log('API called successfully. Returned data: ' + data);
   }
 };
-api.putPolicy(policyId, body, callback);
+api.updatePolicy(policyId, body, callback);
 
- -
+
using System;
 using System.Diagnostics;
 using Org.OpenAPITools.Api;
@@ -9758,7 +9758,7 @@ using Org.OpenAPITools.Model;
 
 namespace Example
 {
-    public class putPolicyExample
+    public class updatePolicyExample
     {
         public void main()
         {
@@ -9769,11 +9769,11 @@ namespace Example
             var body = Object;  // Object | 
 
             try {
-                // Update an A1 Policy's policy data (putPolicy)
-                Object result = apiInstance.putPolicy(policyId, body);
+                // Update an A1 Policy's policy data (updatePolicy)
+                Object result = apiInstance.updatePolicy(policyId, body);
                 Debug.WriteLine(result);
             } catch (Exception e) {
-                Debug.Print("Exception when calling A1PolicyManagementApi.putPolicy: " + e.Message );
+                Debug.Print("Exception when calling A1PolicyManagementApi.updatePolicy: " + e.Message );
             }
         }
     }
@@ -9781,7 +9781,7 @@ namespace Example
 
-
+
<?php
 require_once(__DIR__ . '/vendor/autoload.php');
 
@@ -9791,15 +9791,15 @@ $policyId = policyId_example; // String |
 $body = Object; // Object | 
 
 try {
-    $result = $api_instance->putPolicy($policyId, $body);
+    $result = $api_instance->updatePolicy($policyId, $body);
     print_r($result);
 } catch (Exception $e) {
-    echo 'Exception when calling A1PolicyManagementApi->putPolicy: ', $e->getMessage(), PHP_EOL;
+    echo 'Exception when calling A1PolicyManagementApi->updatePolicy: ', $e->getMessage(), PHP_EOL;
 }
 ?>
-
+
use Data::Dumper;
 use WWW::OPenAPIClient::Configuration;
 use WWW::OPenAPIClient::A1PolicyManagementApi;
@@ -9810,15 +9810,15 @@ my $policyId = policyId_example; # String |
 my $body = WWW::OPenAPIClient::Object::Object->new(); # Object | 
 
 eval {
-    my $result = $api_instance->putPolicy(policyId => $policyId, body => $body);
+    my $result = $api_instance->updatePolicy(policyId => $policyId, body => $body);
     print Dumper($result);
 };
 if ($@) {
-    warn "Exception when calling A1PolicyManagementApi->putPolicy: $@\n";
+    warn "Exception when calling A1PolicyManagementApi->updatePolicy: $@\n";
 }
-
+
from __future__ import print_statement
 import time
 import openapi_client
@@ -9831,14 +9831,14 @@ policyId = policyId_example # String |  (default to null)
 body = Object # Object | 
 
 try:
-    # Update an A1 Policy's policy data (putPolicy)
-    api_response = api_instance.put_policy(policyId, body)
+    # Update an A1 Policy's policy data (updatePolicy)
+    api_response = api_instance.update_policy(policyId, body)
     pprint(api_response)
 except ApiException as e:
-    print("Exception when calling A1PolicyManagementApi->putPolicy: %s\n" % e)
+ print("Exception when calling A1PolicyManagementApi->updatePolicy: %s\n" % e)
-
+
extern crate A1PolicyManagementApi;
 
 pub fn main() {
@@ -9846,7 +9846,7 @@ pub fn main() {
     let body = Object; // Object
 
     let mut context = A1PolicyManagementApi::Context::default();
-    let result = client.putPolicy(policyId, body, &context).wait();
+    let result = client.updatePolicy(policyId, body, &context).wait();
 
     println!("{:?}", result);
 }
@@ -9871,7 +9871,7 @@ pub fn main() {
 
 
 
-    
+
@@ -9933,12 +9933,12 @@ $(document).ready(function() { } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_putPolicy_body'); + var result = $('#d2e199_updatePolicy_body'); result.empty(); result.append(view.render()); }); -
+
@@ -9947,23 +9947,23 @@ $(document).ready(function() {

Responses

-

-

+

+

-
diff --git a/a1-policy-management/api/offeredapis/openapitoolgen/offeredapis/pms-api/v3/index.html b/a1-policy-management/api/offeredapis/openapitoolgen/offeredapis/pms-api/v3/index.html index 71e0c49f..69b5ce4f 100644 --- a/a1-policy-management/api/offeredapis/openapitoolgen/offeredapis/pms-api/v3/index.html +++ b/a1-policy-management/api/offeredapis/openapitoolgen/offeredapis/pms-api/v3/index.html @@ -1178,12 +1178,12 @@ ul.nav-tabs {
  • deletePolicy
  • -
  • - getAllPolicies -
  • getPolicy
  • +
  • + getPolicyIds +
  • getPolicyStatus
  • @@ -1193,8 +1193,8 @@ ul.nav-tabs {
  • getPolicyTypes
  • -
  • - putPolicy +
  • + updatePolicy
  • @@ -1243,7 +1243,7 @@ ul.nav-tabs {
    Version: 1.0.0

    -

    General

    The ONAP CCSDK A1 Policy Management Service provides a REST API for managing A1 policies.
    This document describes the latest API set to perform tasks for:

    • A1 Policy creation, modification and deletion.
    • Monitoring and maintaining consistency of the SMO view of A1 Policies and the Near-RT RICs
    • Maintaining a view of each Near-RT RIC's supported A1 Policy Types
    • Supervision of registered services (rApps). When a registered service is unavailable, its policies are removed.

    APIs provided or defined by the service

    Note: parts of this API are strongly based on extracts of the O-RAN Alliance R1 Interface specification for A1 Policy Management, and those parts should be considered '� O-RAN ALLIANCE - All rights reserved.'

    A1 Policy Management

    This is the latest API for managing A1 Policies. This API is partially compliant with O-RAN Alliance R1 Interface specifications for A1 Policy Management:

    • A1 Policy retrieval, creation, modification and deletion.
    • Retrieval of supported A1 Policy Types for a Near-RT RIC
    • Retrieval of status for existing A1 policies

    Management of configuration

    API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.

    Service Callbacks

    These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.

    NearRT-RIC Repository (Older version)

    This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted towards one Near-RT RIC.

    Health Check

    API used for supervision of the A1 Policy Management Service.

    Service Registry and Supervision

    API used for registering services/clients/rApps. Each A1 Policy can be tagged with an owner. If the owner service is registered, then the service can be optionally monitored by a heart-beat supervision mechanism, and if the registered service becomes unavailable, then it is removed and all its A1 Policies are deleted. Note that services do not need to be registered to create A1 Policies, but unregistered services are not supervised. This is a feature that is optional to use.

    +

    General

    The ONAP CCSDK A1 Policy Management Service provides a REST API for managing A1 policies.
    This document describes the latest API set to perform tasks for:

    • A1 Policy creation, modification and deletion.
    • Monitoring and maintaining consistency of the SMO view of A1 Policies and the Near-RT RICs
    • Maintaining a view of each Near-RT RIC's supported A1 Policy Types
    • Supervision of registered services (rApps). When a registered service is unavailable, its policies are removed.

    APIs provided or defined by the service

    Note: parts of this API are strongly based on extracts of the O-RAN Alliance R1 Interface specification for A1 Policy Management, and those parts should be considered '© O-RAN ALLIANCE - All rights reserved.'

    A1 Policy Management

    This is the latest API for managing A1 Policies. This API is partially compliant with O-RAN Alliance R1 Interface specifications for A1 Policy Management:

    • A1 Policy retrieval, creation, modification and deletion.
    • Retrieval of supported A1 Policy Types for a Near-RT RIC
    • Retrieval of status for existing A1 policies

    Management of configuration

    API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.

    Service Callbacks

    These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.

    NearRT-RIC Repository (Older version)

    This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted towards one Near-RT RIC.

    Health Check

    API used for supervision of the A1 Policy Management Service.

    Service Registry and Supervision

    API used for registering services/clients/rApps. Each A1 Policy can be tagged with an owner. If the owner service is registered, then the service can be optionally monitored by a heart-beat supervision mechanism, and if the registered service becomes unavailable, then it is removed and all its A1 Policies are deleted. Note that services do not need to be registered to create A1 Policies, but unregistered services are not supervised. This is a feature that is optional to use.

  • @@ -3988,47 +3988,46 @@ Specifies the content type that the client expects to receive in response to the

    -
    -
    +
    +
    -

    getAllPolicies

    -

    Query for A1 Policy instances (getAllPolicies)

    +

    getPolicy

    +

    Get an A1 Policy's policy data (getPolicy)

    -

    Returns a collection of A1 Policy Instance IDs for policies that match given search criteria. If several query parameters are defined, the policies matching all conditions are returned. -

    +

    Get an A1 Policy instance's policy data using its policy ID


    -
    /policies
    +
    /policies/{policyId}

    Usage and SDK Samples

    -
    +
    curl -X GET \
      -H "Accept: application/json,application/problem+json" \
    - "https://example.com/a1-policy-management/v1/policies?policyTypeId=policyTypeId_example&nearRtRicId=nearRtRicId_example&serviceId=serviceId_example&typeName=typeName_example"
    + "https://example.com/a1-policy-management/v1/policies/{policyId}"
     
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -4042,17 +4041,14 @@ public class A1PolicyManagementApiExample {
     
             // Create an instance of the API class
             A1PolicyManagementApi apiInstance = new A1PolicyManagementApi();
    -        String policyTypeId = policyTypeId_example; // String | Select policies with a given A1 Policy Type ID.
    -        String nearRtRicId = nearRtRicId_example; // String | Select policies for a given Near-RT RIC identity.
    -        String serviceId = serviceId_example; // String | Select policies owned by a given service (registered or unregistered).
    -        String typeName = typeName_example; // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
    +        String policyId = policyId_example; // String | 
             String accept = application/json; // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
     
             try {
    -            array[PolicyInformation] result = apiInstance.getAllPolicies(policyTypeId, nearRtRicId, serviceId, typeName, accept);
    +            Object result = apiInstance.getPolicy(policyId, accept);
                 System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling A1PolicyManagementApi#getAllPolicies");
    +            System.err.println("Exception when calling A1PolicyManagementApi#getPolicy");
                 e.printStackTrace();
             }
         }
    @@ -4060,71 +4056,59 @@ public class A1PolicyManagementApiExample {
     
    -
    +
    import 'package:openapi/api.dart';
     
     final api_instance = DefaultApi();
     
    -final String policyTypeId = new String(); // String | Select policies with a given A1 Policy Type ID.
    -final String nearRtRicId = new String(); // String | Select policies for a given Near-RT RIC identity.
    -final String serviceId = new String(); // String | Select policies owned by a given service (registered or unregistered).
    -final String typeName = new String(); // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
    +final String policyId = new String(); // String | 
     final String accept = new String(); // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
     
     try {
    -    final result = await api_instance.getAllPolicies(policyTypeId, nearRtRicId, serviceId, typeName, accept);
    +    final result = await api_instance.getPolicy(policyId, accept);
         print(result);
     } catch (e) {
    -    print('Exception when calling DefaultApi->getAllPolicies: $e\n');
    +    print('Exception when calling DefaultApi->getPolicy: $e\n');
     }
     
     
    -
    +
    import org.openapitools.client.api.A1PolicyManagementApi;
     
     public class A1PolicyManagementApiExample {
         public static void main(String[] args) {
             A1PolicyManagementApi apiInstance = new A1PolicyManagementApi();
    -        String policyTypeId = policyTypeId_example; // String | Select policies with a given A1 Policy Type ID.
    -        String nearRtRicId = nearRtRicId_example; // String | Select policies for a given Near-RT RIC identity.
    -        String serviceId = serviceId_example; // String | Select policies owned by a given service (registered or unregistered).
    -        String typeName = typeName_example; // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
    +        String policyId = policyId_example; // String | 
             String accept = application/json; // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
     
             try {
    -            array[PolicyInformation] result = apiInstance.getAllPolicies(policyTypeId, nearRtRicId, serviceId, typeName, accept);
    +            Object result = apiInstance.getPolicy(policyId, accept);
                 System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling A1PolicyManagementApi#getAllPolicies");
    +            System.err.println("Exception when calling A1PolicyManagementApi#getPolicy");
                 e.printStackTrace();
             }
         }
     }
    -
    +
    
     
     // Create an instance of the API class
     A1PolicyManagementApi *apiInstance = [[A1PolicyManagementApi alloc] init];
    -String *policyTypeId = policyTypeId_example; // Select policies with a given A1 Policy Type ID. (optional) (default to null)
    -String *nearRtRicId = nearRtRicId_example; // Select policies for a given Near-RT RIC identity. (optional) (default to null)
    -String *serviceId = serviceId_example; // Select policies owned by a given service (registered or unregistered). (optional) (default to null)
    -String *typeName = typeName_example; // Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). (optional) (default to null)
    +String *policyId = policyId_example; //  (default to null)
     String *accept = application/json; // Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. (optional) (default to null)
     
    -// Query for A1 Policy instances (getAllPolicies)
    -[apiInstance getAllPoliciesWith:policyTypeId
    -    nearRtRicId:nearRtRicId
    -    serviceId:serviceId
    -    typeName:typeName
    +// Get an A1 Policy's policy data (getPolicy)
    +[apiInstance getPolicyWith:policyId
         accept:accept
    -              completionHandler: ^(array[PolicyInformation] output, NSError* error) {
    +              completionHandler: ^(Object output, NSError* error) {
         if (output) {
             NSLog(@"%@", output);
         }
    @@ -4135,16 +4119,13 @@ String *accept = application/json; // Specifies the content type that the client
     
    -
    +
    var OnapCcsdkA1PolicyManagementApi = require('onap_ccsdk_a1_policy_management_api');
     
     // Create an instance of the API class
     var api = new OnapCcsdkA1PolicyManagementApi.A1PolicyManagementApi()
    +var policyId = policyId_example; // {String} 
     var opts = {
    -  'policyTypeId': policyTypeId_example, // {String} Select policies with a given A1 Policy Type ID.
    -  'nearRtRicId': nearRtRicId_example, // {String} Select policies for a given Near-RT RIC identity.
    -  'serviceId': serviceId_example, // {String} Select policies owned by a given service (registered or unregistered).
    -  'typeName': typeName_example, // {String} Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
       'accept': application/json // {String} Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
     };
     
    @@ -4155,14 +4136,14 @@ var callback = function(error, data, response) {
         console.log('API called successfully. Returned data: ' + data);
       }
     };
    -api.getAllPolicies(opts, callback);
    +api.getPolicy(policyId, opts, callback);
     
    - -
    +
    using System;
     using System.Diagnostics;
     using Org.OpenAPITools.Api;
    @@ -4171,25 +4152,22 @@ using Org.OpenAPITools.Model;
     
     namespace Example
     {
    -    public class getAllPoliciesExample
    +    public class getPolicyExample
         {
             public void main()
             {
     
                 // Create an instance of the API class
                 var apiInstance = new A1PolicyManagementApi();
    -            var policyTypeId = policyTypeId_example;  // String | Select policies with a given A1 Policy Type ID. (optional)  (default to null)
    -            var nearRtRicId = nearRtRicId_example;  // String | Select policies for a given Near-RT RIC identity. (optional)  (default to null)
    -            var serviceId = serviceId_example;  // String | Select policies owned by a given service (registered or unregistered). (optional)  (default to null)
    -            var typeName = typeName_example;  // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). (optional)  (default to null)
    +            var policyId = policyId_example;  // String |  (default to null)
                 var accept = application/json;  // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. (optional)  (default to null)
     
                 try {
    -                // Query for A1 Policy instances (getAllPolicies)
    -                array[PolicyInformation] result = apiInstance.getAllPolicies(policyTypeId, nearRtRicId, serviceId, typeName, accept);
    +                // Get an A1 Policy's policy data (getPolicy)
    +                Object result = apiInstance.getPolicy(policyId, accept);
                     Debug.WriteLine(result);
                 } catch (Exception e) {
    -                Debug.Print("Exception when calling A1PolicyManagementApi.getAllPolicies: " + e.Message );
    +                Debug.Print("Exception when calling A1PolicyManagementApi.getPolicy: " + e.Message );
                 }
             }
         }
    @@ -4197,50 +4175,44 @@ namespace Example
     
    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
     // Create an instance of the API class
     $api_instance = new OpenAPITools\Client\Api\A1PolicyManagementApi();
    -$policyTypeId = policyTypeId_example; // String | Select policies with a given A1 Policy Type ID.
    -$nearRtRicId = nearRtRicId_example; // String | Select policies for a given Near-RT RIC identity.
    -$serviceId = serviceId_example; // String | Select policies owned by a given service (registered or unregistered).
    -$typeName = typeName_example; // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
    +$policyId = policyId_example; // String | 
     $accept = application/json; // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
     
     try {
    -    $result = $api_instance->getAllPolicies($policyTypeId, $nearRtRicId, $serviceId, $typeName, $accept);
    +    $result = $api_instance->getPolicy($policyId, $accept);
         print_r($result);
     } catch (Exception $e) {
    -    echo 'Exception when calling A1PolicyManagementApi->getAllPolicies: ', $e->getMessage(), PHP_EOL;
    +    echo 'Exception when calling A1PolicyManagementApi->getPolicy: ', $e->getMessage(), PHP_EOL;
     }
     ?>
    -
    +
    use Data::Dumper;
     use WWW::OPenAPIClient::Configuration;
     use WWW::OPenAPIClient::A1PolicyManagementApi;
     
     # Create an instance of the API class
     my $api_instance = WWW::OPenAPIClient::A1PolicyManagementApi->new();
    -my $policyTypeId = policyTypeId_example; # String | Select policies with a given A1 Policy Type ID.
    -my $nearRtRicId = nearRtRicId_example; # String | Select policies for a given Near-RT RIC identity.
    -my $serviceId = serviceId_example; # String | Select policies owned by a given service (registered or unregistered).
    -my $typeName = typeName_example; # String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
    +my $policyId = policyId_example; # String | 
     my $accept = application/json; # String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
     
     eval {
    -    my $result = $api_instance->getAllPolicies(policyTypeId => $policyTypeId, nearRtRicId => $nearRtRicId, serviceId => $serviceId, typeName => $typeName, accept => $accept);
    +    my $result = $api_instance->getPolicy(policyId => $policyId, accept => $accept);
         print Dumper($result);
     };
     if ($@) {
    -    warn "Exception when calling A1PolicyManagementApi->getAllPolicies: $@\n";
    +    warn "Exception when calling A1PolicyManagementApi->getPolicy: $@\n";
     }
    -
    +
    from __future__ import print_statement
     import time
     import openapi_client
    @@ -4249,32 +4221,26 @@ from pprint import pprint
     
     # Create an instance of the API class
     api_instance = openapi_client.A1PolicyManagementApi()
    -policyTypeId = policyTypeId_example # String | Select policies with a given A1 Policy Type ID. (optional) (default to null)
    -nearRtRicId = nearRtRicId_example # String | Select policies for a given Near-RT RIC identity. (optional) (default to null)
    -serviceId = serviceId_example # String | Select policies owned by a given service (registered or unregistered). (optional) (default to null)
    -typeName = typeName_example # String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). (optional) (default to null)
    +policyId = policyId_example # String |  (default to null)
     accept = application/json # String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. (optional) (default to null)
     
     try:
    -    # Query for A1 Policy instances (getAllPolicies)
    -    api_response = api_instance.get_all_policies(policyTypeId=policyTypeId, nearRtRicId=nearRtRicId, serviceId=serviceId, typeName=typeName, accept=accept)
    +    # Get an A1 Policy's policy data (getPolicy)
    +    api_response = api_instance.get_policy(policyId, accept=accept)
         pprint(api_response)
     except ApiException as e:
    -    print("Exception when calling A1PolicyManagementApi->getAllPolicies: %s\n" % e)
    + print("Exception when calling A1PolicyManagementApi->getPolicy: %s\n" % e)
    -
    +
    extern crate A1PolicyManagementApi;
     
     pub fn main() {
    -    let policyTypeId = policyTypeId_example; // String
    -    let nearRtRicId = nearRtRicId_example; // String
    -    let serviceId = serviceId_example; // String
    -    let typeName = typeName_example; // String
    +    let policyId = policyId_example; // String
         let accept = application/json; // String
     
         let mut context = A1PolicyManagementApi::Context::default();
    -    let result = client.getAllPolicies(policyTypeId, nearRtRicId, serviceId, typeName, accept, &context).wait();
    +    let result = client.getPolicy(policyId, accept, &context).wait();
     
         println!("{:?}", result);
     }
    @@ -4289,28 +4255,27 @@ pub fn main() {
     
                               

    Parameters

    - -
    Header parameters
    +
    Path parameters
    - - - - - + + + + + @@ -4318,39 +4283,17 @@ Specifies the content type that the client expects to receive in response to the
    NameDescription
    Accept
    NameDescription
    policyId* -
    +
    String -
    -Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. -
    +
    + Required +
    - - -
    Query parameters
    +
    Header parameters
    - - - - - + - -
    Name Description
    policyTypeId - - -
    -
    -
    - - String - - -
    -Select policies with a given A1 Policy Type ID. -
    -
    -
    -
    -
    nearRtRicId
    Accept -
    +
    @@ -4358,7 +4301,7 @@ Select policies with a given A1 Policy Type ID.
    -Select policies for a given Near-RT RIC identity. +Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
    @@ -4366,66 +4309,29 @@ Select policies for a given Near-RT RIC identity.
    serviceId +
    -
    -
    -
    - - String - -
    -Select policies owned by a given service (registered or unregistered). -
    -
    -
    -
    - - - - typeName - - - -
    -
    -
    - - String - - -
    -Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). -
    -
    -
    -
    - - - -

    Responses

    -

    -

    +

    +

    -

    -
    -
    +
    +
    -

    getPolicy

    -

    Get an A1 Policy's policy data (getPolicy)

    +

    getPolicyIds

    +

    Query for A1 Policy instances (getPolicyIds)

    -

    Get an A1 Policy instance's policy data using its policy ID

    +

    Returns a collection of A1 Policy Instance IDs for policies that match given search criteria. If several query parameters are defined, the policies matching all conditions are returned. +


    -
    /policies/{policyId}
    +
    /policies

    Usage and SDK Samples

    -
    +
    curl -X GET \
      -H "Accept: application/json,application/problem+json" \
    - "https://example.com/a1-policy-management/v1/policies/{policyId}"
    + "https://example.com/a1-policy-management/v1/policies?policyTypeId=policyTypeId_example&nearRtRicId=nearRtRicId_example&serviceId=serviceId_example&typeName=typeName_example"
     
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -5228,14 +5137,17 @@ public class A1PolicyManagementApiExample {
     
             // Create an instance of the API class
             A1PolicyManagementApi apiInstance = new A1PolicyManagementApi();
    -        String policyId = policyId_example; // String | 
    +        String policyTypeId = policyTypeId_example; // String | Select policies with a given A1 Policy Type ID.
    +        String nearRtRicId = nearRtRicId_example; // String | Select policies for a given Near-RT RIC identity.
    +        String serviceId = serviceId_example; // String | Select policies owned by a given service (registered or unregistered).
    +        String typeName = typeName_example; // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
             String accept = application/json; // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
     
             try {
    -            Object result = apiInstance.getPolicy(policyId, accept);
    +            array[PolicyInformation] result = apiInstance.getPolicyIds(policyTypeId, nearRtRicId, serviceId, typeName, accept);
                 System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling A1PolicyManagementApi#getPolicy");
    +            System.err.println("Exception when calling A1PolicyManagementApi#getPolicyIds");
                 e.printStackTrace();
             }
         }
    @@ -5243,59 +5155,71 @@ public class A1PolicyManagementApiExample {
     
    -
    +
    import 'package:openapi/api.dart';
     
     final api_instance = DefaultApi();
     
    -final String policyId = new String(); // String | 
    +final String policyTypeId = new String(); // String | Select policies with a given A1 Policy Type ID.
    +final String nearRtRicId = new String(); // String | Select policies for a given Near-RT RIC identity.
    +final String serviceId = new String(); // String | Select policies owned by a given service (registered or unregistered).
    +final String typeName = new String(); // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
     final String accept = new String(); // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
     
     try {
    -    final result = await api_instance.getPolicy(policyId, accept);
    +    final result = await api_instance.getPolicyIds(policyTypeId, nearRtRicId, serviceId, typeName, accept);
         print(result);
     } catch (e) {
    -    print('Exception when calling DefaultApi->getPolicy: $e\n');
    +    print('Exception when calling DefaultApi->getPolicyIds: $e\n');
     }
     
     
    -
    +
    import org.openapitools.client.api.A1PolicyManagementApi;
     
     public class A1PolicyManagementApiExample {
         public static void main(String[] args) {
             A1PolicyManagementApi apiInstance = new A1PolicyManagementApi();
    -        String policyId = policyId_example; // String | 
    +        String policyTypeId = policyTypeId_example; // String | Select policies with a given A1 Policy Type ID.
    +        String nearRtRicId = nearRtRicId_example; // String | Select policies for a given Near-RT RIC identity.
    +        String serviceId = serviceId_example; // String | Select policies owned by a given service (registered or unregistered).
    +        String typeName = typeName_example; // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
             String accept = application/json; // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
     
             try {
    -            Object result = apiInstance.getPolicy(policyId, accept);
    +            array[PolicyInformation] result = apiInstance.getPolicyIds(policyTypeId, nearRtRicId, serviceId, typeName, accept);
                 System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling A1PolicyManagementApi#getPolicy");
    +            System.err.println("Exception when calling A1PolicyManagementApi#getPolicyIds");
                 e.printStackTrace();
             }
         }
     }
    -
    +
    
     
     // Create an instance of the API class
     A1PolicyManagementApi *apiInstance = [[A1PolicyManagementApi alloc] init];
    -String *policyId = policyId_example; //  (default to null)
    +String *policyTypeId = policyTypeId_example; // Select policies with a given A1 Policy Type ID. (optional) (default to null)
    +String *nearRtRicId = nearRtRicId_example; // Select policies for a given Near-RT RIC identity. (optional) (default to null)
    +String *serviceId = serviceId_example; // Select policies owned by a given service (registered or unregistered). (optional) (default to null)
    +String *typeName = typeName_example; // Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). (optional) (default to null)
     String *accept = application/json; // Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. (optional) (default to null)
     
    -// Get an A1 Policy's policy data (getPolicy)
    -[apiInstance getPolicyWith:policyId
    +// Query for A1 Policy instances (getPolicyIds)
    +[apiInstance getPolicyIdsWith:policyTypeId
    +    nearRtRicId:nearRtRicId
    +    serviceId:serviceId
    +    typeName:typeName
         accept:accept
    -              completionHandler: ^(Object output, NSError* error) {
    +              completionHandler: ^(array[PolicyInformation] output, NSError* error) {
         if (output) {
             NSLog(@"%@", output);
         }
    @@ -5306,13 +5230,16 @@ String *accept = application/json; // Specifies the content type that the client
     
    -
    +
    var OnapCcsdkA1PolicyManagementApi = require('onap_ccsdk_a1_policy_management_api');
     
     // Create an instance of the API class
     var api = new OnapCcsdkA1PolicyManagementApi.A1PolicyManagementApi()
    -var policyId = policyId_example; // {String} 
     var opts = {
    +  'policyTypeId': policyTypeId_example, // {String} Select policies with a given A1 Policy Type ID.
    +  'nearRtRicId': nearRtRicId_example, // {String} Select policies for a given Near-RT RIC identity.
    +  'serviceId': serviceId_example, // {String} Select policies owned by a given service (registered or unregistered).
    +  'typeName': typeName_example, // {String} Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
       'accept': application/json // {String} Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
     };
     
    @@ -5323,14 +5250,14 @@ var callback = function(error, data, response) {
         console.log('API called successfully. Returned data: ' + data);
       }
     };
    -api.getPolicy(policyId, opts, callback);
    +api.getPolicyIds(opts, callback);
     
    - -
    +
    using System;
     using System.Diagnostics;
     using Org.OpenAPITools.Api;
    @@ -5339,22 +5266,25 @@ using Org.OpenAPITools.Model;
     
     namespace Example
     {
    -    public class getPolicyExample
    +    public class getPolicyIdsExample
         {
             public void main()
             {
     
                 // Create an instance of the API class
                 var apiInstance = new A1PolicyManagementApi();
    -            var policyId = policyId_example;  // String |  (default to null)
    +            var policyTypeId = policyTypeId_example;  // String | Select policies with a given A1 Policy Type ID. (optional)  (default to null)
    +            var nearRtRicId = nearRtRicId_example;  // String | Select policies for a given Near-RT RIC identity. (optional)  (default to null)
    +            var serviceId = serviceId_example;  // String | Select policies owned by a given service (registered or unregistered). (optional)  (default to null)
    +            var typeName = typeName_example;  // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). (optional)  (default to null)
                 var accept = application/json;  // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. (optional)  (default to null)
     
                 try {
    -                // Get an A1 Policy's policy data (getPolicy)
    -                Object result = apiInstance.getPolicy(policyId, accept);
    +                // Query for A1 Policy instances (getPolicyIds)
    +                array[PolicyInformation] result = apiInstance.getPolicyIds(policyTypeId, nearRtRicId, serviceId, typeName, accept);
                     Debug.WriteLine(result);
                 } catch (Exception e) {
    -                Debug.Print("Exception when calling A1PolicyManagementApi.getPolicy: " + e.Message );
    +                Debug.Print("Exception when calling A1PolicyManagementApi.getPolicyIds: " + e.Message );
                 }
             }
         }
    @@ -5362,44 +5292,50 @@ namespace Example
     
    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
     // Create an instance of the API class
     $api_instance = new OpenAPITools\Client\Api\A1PolicyManagementApi();
    -$policyId = policyId_example; // String | 
    +$policyTypeId = policyTypeId_example; // String | Select policies with a given A1 Policy Type ID.
    +$nearRtRicId = nearRtRicId_example; // String | Select policies for a given Near-RT RIC identity.
    +$serviceId = serviceId_example; // String | Select policies owned by a given service (registered or unregistered).
    +$typeName = typeName_example; // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
     $accept = application/json; // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
     
     try {
    -    $result = $api_instance->getPolicy($policyId, $accept);
    +    $result = $api_instance->getPolicyIds($policyTypeId, $nearRtRicId, $serviceId, $typeName, $accept);
         print_r($result);
     } catch (Exception $e) {
    -    echo 'Exception when calling A1PolicyManagementApi->getPolicy: ', $e->getMessage(), PHP_EOL;
    +    echo 'Exception when calling A1PolicyManagementApi->getPolicyIds: ', $e->getMessage(), PHP_EOL;
     }
     ?>
    -
    +
    use Data::Dumper;
     use WWW::OPenAPIClient::Configuration;
     use WWW::OPenAPIClient::A1PolicyManagementApi;
     
     # Create an instance of the API class
     my $api_instance = WWW::OPenAPIClient::A1PolicyManagementApi->new();
    -my $policyId = policyId_example; # String | 
    +my $policyTypeId = policyTypeId_example; # String | Select policies with a given A1 Policy Type ID.
    +my $nearRtRicId = nearRtRicId_example; # String | Select policies for a given Near-RT RIC identity.
    +my $serviceId = serviceId_example; # String | Select policies owned by a given service (registered or unregistered).
    +my $typeName = typeName_example; # String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
     my $accept = application/json; # String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
     
     eval {
    -    my $result = $api_instance->getPolicy(policyId => $policyId, accept => $accept);
    +    my $result = $api_instance->getPolicyIds(policyTypeId => $policyTypeId, nearRtRicId => $nearRtRicId, serviceId => $serviceId, typeName => $typeName, accept => $accept);
         print Dumper($result);
     };
     if ($@) {
    -    warn "Exception when calling A1PolicyManagementApi->getPolicy: $@\n";
    +    warn "Exception when calling A1PolicyManagementApi->getPolicyIds: $@\n";
     }
    -
    +
    from __future__ import print_statement
     import time
     import openapi_client
    @@ -5408,26 +5344,32 @@ from pprint import pprint
     
     # Create an instance of the API class
     api_instance = openapi_client.A1PolicyManagementApi()
    -policyId = policyId_example # String |  (default to null)
    +policyTypeId = policyTypeId_example # String | Select policies with a given A1 Policy Type ID. (optional) (default to null)
    +nearRtRicId = nearRtRicId_example # String | Select policies for a given Near-RT RIC identity. (optional) (default to null)
    +serviceId = serviceId_example # String | Select policies owned by a given service (registered or unregistered). (optional) (default to null)
    +typeName = typeName_example # String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). (optional) (default to null)
     accept = application/json # String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. (optional) (default to null)
     
     try:
    -    # Get an A1 Policy's policy data (getPolicy)
    -    api_response = api_instance.get_policy(policyId, accept=accept)
    +    # Query for A1 Policy instances (getPolicyIds)
    +    api_response = api_instance.get_policy_ids(policyTypeId=policyTypeId, nearRtRicId=nearRtRicId, serviceId=serviceId, typeName=typeName, accept=accept)
         pprint(api_response)
     except ApiException as e:
    -    print("Exception when calling A1PolicyManagementApi->getPolicy: %s\n" % e)
    + print("Exception when calling A1PolicyManagementApi->getPolicyIds: %s\n" % e)
    -
    +
    extern crate A1PolicyManagementApi;
     
     pub fn main() {
    -    let policyId = policyId_example; // String
    +    let policyTypeId = policyTypeId_example; // String
    +    let nearRtRicId = nearRtRicId_example; // String
    +    let serviceId = serviceId_example; // String
    +    let typeName = typeName_example; // String
         let accept = application/json; // String
     
         let mut context = A1PolicyManagementApi::Context::default();
    -    let result = client.getPolicy(policyId, accept, &context).wait();
    +    let result = client.getPolicyIds(policyTypeId, nearRtRicId, serviceId, typeName, accept, &context).wait();
     
         println!("{:?}", result);
     }
    @@ -5435,52 +5377,95 @@ pub fn main() {
                                 
    -

    Scopes

    - - -
    +

    Scopes

    + + +
    + +

    Parameters

    + + +
    Header parameters
    + + + + + + + + + +
    NameDescription
    Accept + + +
    +
    +
    + + String + + +
    +Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. +
    +
    +
    +
    +
    + + + +
    Query parameters
    + + + + + + + + + +
    NameDescription
    policyTypeId + -

    Parameters

    +
    +
    +
    + + String + -
    Path parameters
    - - - - - - +
    +Select policies with a given A1 Policy Type ID. +
    + + + + + + + -
    NameDescription
    policyId*
    nearRtRicId -
    +
    String +
    +Select policies for a given Near-RT RIC identity. +
    -
    - Required -
    - -
    Header parameters
    - - - - - - + -
    NameDescription
    Accept
    serviceId -
    +
    @@ -5488,7 +5473,7 @@ pub fn main() {
    -Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. +Select policies owned by a given service (registered or unregistered).
    @@ -5496,29 +5481,46 @@ Specifies the content type that the client expects to receive in response to the
    +
    typeName + +
    +
    +
    + + String + +
    +Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). +
    +
    +
    +
    +

    Responses

    -

    -

    +

    +

    -
    @@ -9625,11 +9625,11 @@ Select types that are compatible with the given version. This parameter is only

    -
    -
    +
    +
    -

    putPolicy

    -

    Update an A1 Policy's policy data (putPolicy)

    +

    updatePolicy

    +

    Update an A1 Policy's policy data (updatePolicy)

    @@ -9642,23 +9642,23 @@ Select types that are compatible with the given version. This parameter is only

    Usage and SDK Samples

    -
    +
    curl -X PUT \
      -H "Accept: application/json,application/problem+json" \
      -H "Content-Type: application/json" \
    @@ -9666,7 +9666,7 @@ Select types that are compatible with the given version. This parameter is only
      -d ''
     
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -9684,10 +9684,10 @@ public class A1PolicyManagementApiExample {
             Object body = Object; // Object | 
     
             try {
    -            Object result = apiInstance.putPolicy(policyId, body);
    +            Object result = apiInstance.updatePolicy(policyId, body);
                 System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling A1PolicyManagementApi#putPolicy");
    +            System.err.println("Exception when calling A1PolicyManagementApi#updatePolicy");
                 e.printStackTrace();
             }
         }
    @@ -9695,7 +9695,7 @@ public class A1PolicyManagementApiExample {
     
    -
    +
    import 'package:openapi/api.dart';
     
     final api_instance = DefaultApi();
    @@ -9704,16 +9704,16 @@ final String policyId = new String(); // String |
     final Object body = new Object(); // Object | 
     
     try {
    -    final result = await api_instance.putPolicy(policyId, body);
    +    final result = await api_instance.updatePolicy(policyId, body);
         print(result);
     } catch (e) {
    -    print('Exception when calling DefaultApi->putPolicy: $e\n');
    +    print('Exception when calling DefaultApi->updatePolicy: $e\n');
     }
     
     
    -
    +
    import org.openapitools.client.api.A1PolicyManagementApi;
     
     public class A1PolicyManagementApiExample {
    @@ -9723,20 +9723,20 @@ public class A1PolicyManagementApiExample {
             Object body = Object; // Object | 
     
             try {
    -            Object result = apiInstance.putPolicy(policyId, body);
    +            Object result = apiInstance.updatePolicy(policyId, body);
                 System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling A1PolicyManagementApi#putPolicy");
    +            System.err.println("Exception when calling A1PolicyManagementApi#updatePolicy");
                 e.printStackTrace();
             }
         }
     }
    -
    +
    
     
     // Create an instance of the API class
    @@ -9744,8 +9744,8 @@ A1PolicyManagementApi *apiInstance = [[A1PolicyManagementApi alloc] init];
     String *policyId = policyId_example; //  (default to null)
     Object *body = Object; // 
     
    -// Update an A1 Policy's policy data (putPolicy)
    -[apiInstance putPolicyWith:policyId
    +// Update an A1 Policy's policy data (updatePolicy)
    +[apiInstance updatePolicyWith:policyId
         body:body
                   completionHandler: ^(Object output, NSError* error) {
         if (output) {
    @@ -9758,7 +9758,7 @@ Object *body = Object; //
     
    -
    +
    var OnapCcsdkA1PolicyManagementApi = require('onap_ccsdk_a1_policy_management_api');
     
     // Create an instance of the API class
    @@ -9773,14 +9773,14 @@ var callback = function(error, data, response) {
         console.log('API called successfully. Returned data: ' + data);
       }
     };
    -api.putPolicy(policyId, body, callback);
    +api.updatePolicy(policyId, body, callback);
     
    - -
    +
    using System;
     using System.Diagnostics;
     using Org.OpenAPITools.Api;
    @@ -9789,7 +9789,7 @@ using Org.OpenAPITools.Model;
     
     namespace Example
     {
    -    public class putPolicyExample
    +    public class updatePolicyExample
         {
             public void main()
             {
    @@ -9800,11 +9800,11 @@ namespace Example
                 var body = Object;  // Object | 
     
                 try {
    -                // Update an A1 Policy's policy data (putPolicy)
    -                Object result = apiInstance.putPolicy(policyId, body);
    +                // Update an A1 Policy's policy data (updatePolicy)
    +                Object result = apiInstance.updatePolicy(policyId, body);
                     Debug.WriteLine(result);
                 } catch (Exception e) {
    -                Debug.Print("Exception when calling A1PolicyManagementApi.putPolicy: " + e.Message );
    +                Debug.Print("Exception when calling A1PolicyManagementApi.updatePolicy: " + e.Message );
                 }
             }
         }
    @@ -9812,7 +9812,7 @@ namespace Example
     
    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -9822,15 +9822,15 @@ $policyId = policyId_example; // String |
     $body = Object; // Object | 
     
     try {
    -    $result = $api_instance->putPolicy($policyId, $body);
    +    $result = $api_instance->updatePolicy($policyId, $body);
         print_r($result);
     } catch (Exception $e) {
    -    echo 'Exception when calling A1PolicyManagementApi->putPolicy: ', $e->getMessage(), PHP_EOL;
    +    echo 'Exception when calling A1PolicyManagementApi->updatePolicy: ', $e->getMessage(), PHP_EOL;
     }
     ?>
    -
    +
    use Data::Dumper;
     use WWW::OPenAPIClient::Configuration;
     use WWW::OPenAPIClient::A1PolicyManagementApi;
    @@ -9841,15 +9841,15 @@ my $policyId = policyId_example; # String |
     my $body = WWW::OPenAPIClient::Object::Object->new(); # Object | 
     
     eval {
    -    my $result = $api_instance->putPolicy(policyId => $policyId, body => $body);
    +    my $result = $api_instance->updatePolicy(policyId => $policyId, body => $body);
         print Dumper($result);
     };
     if ($@) {
    -    warn "Exception when calling A1PolicyManagementApi->putPolicy: $@\n";
    +    warn "Exception when calling A1PolicyManagementApi->updatePolicy: $@\n";
     }
    -
    +
    from __future__ import print_statement
     import time
     import openapi_client
    @@ -9862,14 +9862,14 @@ policyId = policyId_example # String |  (default to null)
     body = Object # Object | 
     
     try:
    -    # Update an A1 Policy's policy data (putPolicy)
    -    api_response = api_instance.put_policy(policyId, body)
    +    # Update an A1 Policy's policy data (updatePolicy)
    +    api_response = api_instance.update_policy(policyId, body)
         pprint(api_response)
     except ApiException as e:
    -    print("Exception when calling A1PolicyManagementApi->putPolicy: %s\n" % e)
    + print("Exception when calling A1PolicyManagementApi->updatePolicy: %s\n" % e)
    -
    +
    extern crate A1PolicyManagementApi;
     
     pub fn main() {
    @@ -9877,7 +9877,7 @@ pub fn main() {
         let body = Object; // Object
     
         let mut context = A1PolicyManagementApi::Context::default();
    -    let result = client.putPolicy(policyId, body, &context).wait();
    +    let result = client.updatePolicy(policyId, body, &context).wait();
     
         println!("{:?}", result);
     }
    @@ -9902,7 +9902,7 @@ pub fn main() {
     
     
     
    -    
    +
    @@ -9964,12 +9964,12 @@ $(document).ready(function() { } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_putPolicy_body'); + var result = $('#d2e199_updatePolicy_body'); result.empty(); result.append(view.render()); }); -
    +
    @@ -9978,23 +9978,23 @@ $(document).ready(function() {

    Responses

    -

    -

    +

    +

    -
    @@ -11466,7 +11466,7 @@ pub fn main() {

    -

    Replace the current Application Configuration with a new configuration. The new configuration, if accepted, will take effect after a short delay. The new configuration must comply with the Application Configuration schema, which can be found from the the Application Documentation (Developer Guide) +

    Replace the current Application Configuration with a new configuration. The new configuration, if accepted, will take effect after a short delay. The new configuration must comply with the Application Configuration schema, which can be found from the the Application Documentation (Developer Guide)


    @@ -14335,9 +14335,7 @@ The identity of the registered service
    curl -X PUT \
      -H "Accept: application/json,application/problem+json" \
    - -H "Content-Type: application/json" \
    - "https://example.com/a1-policy-management/v1/services/{serviceId}/keepalive" \
    - -d ''
    + "https://example.com/a1-policy-management/v1/services/{serviceId}/keepalive"
     
    @@ -14356,10 +14354,9 @@ public class ServiceRegistryAndSupervisionApiExample { ServiceRegistryAndSupervisionApi apiInstance = new ServiceRegistryAndSupervisionApi(); String serviceId = serviceId_example; // String | String accept = application/json; // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. - String body = body_example; // String | try { - Object result = apiInstance.keepAliveService(serviceId, accept, body); + Object result = apiInstance.keepAliveService(serviceId, accept); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ServiceRegistryAndSupervisionApi#keepAliveService"); @@ -14377,10 +14374,9 @@ final api_instance = DefaultApi(); final String serviceId = new String(); // String | final String accept = new String(); // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. -final String body = new String(); // String | try { - final result = await api_instance.keepAliveService(serviceId, accept, body); + final result = await api_instance.keepAliveService(serviceId, accept); print(result); } catch (e) { print('Exception when calling DefaultApi->keepAliveService: $e\n'); @@ -14397,10 +14393,9 @@ public class ServiceRegistryAndSupervisionApiExample { ServiceRegistryAndSupervisionApi apiInstance = new ServiceRegistryAndSupervisionApi(); String serviceId = serviceId_example; // String | String accept = application/json; // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. - String body = body_example; // String | try { - Object result = apiInstance.keepAliveService(serviceId, accept, body); + Object result = apiInstance.keepAliveService(serviceId, accept); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ServiceRegistryAndSupervisionApi#keepAliveService"); @@ -14420,12 +14415,10 @@ public class ServiceRegistryAndSupervisionApiExample { ServiceRegistryAndSupervisionApi *apiInstance = [[ServiceRegistryAndSupervisionApi alloc] init]; String *serviceId = serviceId_example; // (default to null) String *accept = application/json; // Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. (optional) (default to null) -String *body = body_example; // (optional) // Heartbeat message from a service (keepAliveService) [apiInstance keepAliveServiceWith:serviceId accept:accept - body:body completionHandler: ^(Object output, NSError* error) { if (output) { NSLog(@"%@", output); @@ -14444,8 +14437,7 @@ String *body = body_example; // (optional) var api = new OnapCcsdkA1PolicyManagementApi.ServiceRegistryAndSupervisionApi() var serviceId = serviceId_example; // {String} var opts = { - 'accept': application/json, // {String} Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. - 'body': body_example // {String} + 'accept': application/json // {String} Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. }; var callback = function(error, data, response) { @@ -14480,11 +14472,10 @@ namespace Example var apiInstance = new ServiceRegistryAndSupervisionApi(); var serviceId = serviceId_example; // String | (default to null) var accept = application/json; // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. (optional) (default to null) - var body = body_example; // String | (optional) try { // Heartbeat message from a service (keepAliveService) - Object result = apiInstance.keepAliveService(serviceId, accept, body); + Object result = apiInstance.keepAliveService(serviceId, accept); Debug.WriteLine(result); } catch (Exception e) { Debug.Print("Exception when calling ServiceRegistryAndSupervisionApi.keepAliveService: " + e.Message ); @@ -14503,10 +14494,9 @@ require_once(__DIR__ . '/vendor/autoload.php'); $api_instance = new OpenAPITools\Client\Api\ServiceRegistryAndSupervisionApi(); $serviceId = serviceId_example; // String | $accept = application/json; // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. -$body = body_example; // String | try { - $result = $api_instance->keepAliveService($serviceId, $accept, $body); + $result = $api_instance->keepAliveService($serviceId, $accept); print_r($result); } catch (Exception $e) { echo 'Exception when calling ServiceRegistryAndSupervisionApi->keepAliveService: ', $e->getMessage(), PHP_EOL; @@ -14523,10 +14513,9 @@ use WWW::OPenAPIClient::ServiceRegistryAndSupervisionApi; my $api_instance = WWW::OPenAPIClient::ServiceRegistryAndSupervisionApi->new(); my $serviceId = serviceId_example; # String | my $accept = application/json; # String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. -my $body = WWW::OPenAPIClient::Object::String->new(); # String | eval { - my $result = $api_instance->keepAliveService(serviceId => $serviceId, accept => $accept, body => $body); + my $result = $api_instance->keepAliveService(serviceId => $serviceId, accept => $accept); print Dumper($result); }; if ($@) { @@ -14545,11 +14534,10 @@ from pprint import pprint api_instance = openapi_client.ServiceRegistryAndSupervisionApi() serviceId = serviceId_example # String | (default to null) accept = application/json # String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. (optional) (default to null) -body = body_example # String | (optional) try: # Heartbeat message from a service (keepAliveService) - api_response = api_instance.keep_alive_service(serviceId, accept=accept, body=body) + api_response = api_instance.keep_alive_service(serviceId, accept=accept) pprint(api_response) except ApiException as e: print("Exception when calling ServiceRegistryAndSupervisionApi->keepAliveService: %s\n" % e) @@ -14561,10 +14549,9 @@ except ApiException as e: pub fn main() { let serviceId = serviceId_example; // String let accept = application/json; // String - let body = body_example; // String let mut context = ServiceRegistryAndSupervisionApi::Context::default(); - let result = client.keepAliveService(serviceId, accept, body, &context).wait(); + let result = client.keepAliveService(serviceId, accept, &context).wait(); println!("{:?}", result); } @@ -14635,54 +14622,6 @@ Specifies the content type that the client expects to receive in response to the -
    Body parameters
    - - - - - - - - - -
    NameDescription
    body -

    - -
    -
    diff --git a/a1-policy-management/api/offeredapis/swagger/README.md b/a1-policy-management/api/offeredapis/swagger/README.md new file mode 100644 index 00000000..8bbce067 --- /dev/null +++ b/a1-policy-management/api/offeredapis/swagger/README.md @@ -0,0 +1,2 @@ +# OpenAPI JSON +This is a OpenAPI JSON built by the [openapi-generator](https://github.com/openapitools/openapi-generator) project. \ No newline at end of file diff --git a/a1-policy-management/api/offeredapis/swagger/custom/README.md b/a1-policy-management/api/offeredapis/swagger/custom/README.md new file mode 100644 index 00000000..8bbce067 --- /dev/null +++ b/a1-policy-management/api/offeredapis/swagger/custom/README.md @@ -0,0 +1,2 @@ +# OpenAPI JSON +This is a OpenAPI JSON built by the [openapi-generator](https://github.com/openapitools/openapi-generator) project. \ No newline at end of file diff --git a/a1-policy-management/api/offeredapis/swagger/custom/a1pms-api-custom-v3.json b/a1-policy-management/api/offeredapis/swagger/custom/a1pms-api-custom-v3.json index ec085700..9d378bd7 100644 --- a/a1-policy-management/api/offeredapis/swagger/custom/a1pms-api-custom-v3.json +++ b/a1-policy-management/api/offeredapis/swagger/custom/a1pms-api-custom-v3.json @@ -5,7 +5,7 @@ "email" : "discuss-list@onap.com", "url" : "https://www.onap.org/" }, - "description" : "

    General

    The ONAP CCSDK A1 Policy Management Service provides a REST API for managing A1 policies.
    This document describes the latest API set to perform tasks for:

    • A1 Policy creation, modification and deletion.
    • Monitoring and maintaining consistency of the SMO view of A1 Policies and the Near-RT RICs
    • Maintaining a view of each Near-RT RIC's supported A1 Policy Types
    • Supervision of registered services (rApps). When a registered service is unavailable, its policies are removed.

    APIs provided or defined by the service

    Note: parts of this API are strongly based on extracts of the O-RAN Alliance R1 Interface specification for A1 Policy Management, and those parts should be considered '� O-RAN ALLIANCE - All rights reserved.'

    A1 Policy Management

    This is the latest API for managing A1 Policies. This API is partially compliant with O-RAN Alliance R1 Interface specifications for A1 Policy Management:

    • A1 Policy retrieval, creation, modification and deletion.
    • Retrieval of supported A1 Policy Types for a Near-RT RIC
    • Retrieval of status for existing A1 policies

    Management of configuration

    API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.

    Service Callbacks

    These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.

    NearRT-RIC Repository (Older version)

    This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted towards one Near-RT RIC.

    Health Check

    API used for supervision of the A1 Policy Management Service.

    Service Registry and Supervision

    API used for registering services/clients/rApps. Each A1 Policy can be tagged with an owner. If the owner service is registered, then the service can be optionally monitored by a heart-beat supervision mechanism, and if the registered service becomes unavailable, then it is removed and all its A1 Policies are deleted. Note that services do not need to be registered to create A1 Policies, but unregistered services are not supervised. This is a feature that is optional to use.

    ", + "description" : "

    General

    The ONAP CCSDK A1 Policy Management Service provides a REST API for managing A1 policies.
    This document describes the latest API set to perform tasks for:

    • A1 Policy creation, modification and deletion.
    • Monitoring and maintaining consistency of the SMO view of A1 Policies and the Near-RT RICs
    • Maintaining a view of each Near-RT RIC's supported A1 Policy Types
    • Supervision of registered services (rApps). When a registered service is unavailable, its policies are removed.

    APIs provided or defined by the service

    Note: parts of this API are strongly based on extracts of the O-RAN Alliance R1 Interface specification for A1 Policy Management, and those parts should be considered '© O-RAN ALLIANCE - All rights reserved.'

    A1 Policy Management

    This is the latest API for managing A1 Policies. This API is partially compliant with O-RAN Alliance R1 Interface specifications for A1 Policy Management:

    • A1 Policy retrieval, creation, modification and deletion.
    • Retrieval of supported A1 Policy Types for a Near-RT RIC
    • Retrieval of status for existing A1 policies

    Management of configuration

    API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.

    Service Callbacks

    These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.

    NearRT-RIC Repository (Older version)

    This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted towards one Near-RT RIC.

    Health Check

    API used for supervision of the A1 Policy Management Service.

    Service Registry and Supervision

    API used for registering services/clients/rApps. Each A1 Policy can be tagged with an owner. If the owner service is registered, then the service can be optionally monitored by a heart-beat supervision mechanism, and if the registered service becomes unavailable, then it is removed and all its A1 Policies are deleted. Note that services do not need to be registered to create A1 Policies, but unregistered services are not supervised. This is a feature that is optional to use.

    ", "license" : { "name" : "Copyright (C) 2024 - 2025 OpenInfra Foundation Europe. Licensed under the Apache 2 License.", "url" : "http://www.apache.org/licenses/LICENSE-2.0" @@ -93,19 +93,15 @@ "schema" : { "nullable" : false, "type" : "string" - }, - "style" : "simple" + } }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -154,15 +150,12 @@ "style" : "form" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -231,15 +224,12 @@ "style" : "form" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -370,15 +360,12 @@ "style" : "simple" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -506,15 +493,12 @@ "style" : "simple" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "204" : { @@ -653,15 +637,12 @@ "style" : "simple" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -775,16 +756,14 @@ }, "put" : { "description" : "Update an existing A1 Policy instance's policy data using its policy ID.", - "operationId" : "putPolicy", + "operationId" : "updatePolicy", "parameters" : [ { - "explode" : false, "in" : "path", "name" : "policyId", "required" : true, "schema" : { "type" : "string" - }, - "style" : "simple" + } } ], "requestBody" : { "content" : { @@ -948,7 +927,7 @@ "description" : "Service Unavailable" } }, - "summary" : "Update an A1 Policy's policy data (putPolicy)", + "summary" : "Update an A1 Policy's policy data (updatePolicy)", "tags" : [ "A1 Policy Management" ] } }, @@ -967,15 +946,12 @@ "style" : "simple" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -1086,7 +1062,7 @@ "/policies" : { "get" : { "description" : "Returns a collection of A1 Policy Instance IDs for policies that match given search criteria. If several query parameters are defined, the policies matching all conditions are returned.\n", - "operationId" : "getAllPolicies", + "operationId" : "getPolicyIds", "parameters" : [ { "description" : "Select policies with a given A1 Policy Type ID.", "explode" : true, @@ -1129,15 +1105,12 @@ "style" : "form" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -1244,7 +1217,7 @@ "description" : "Service Unavailable" } }, - "summary" : "Query for A1 Policy instances (getAllPolicies)", + "summary" : "Query for A1 Policy instances (getPolicyIds)", "tags" : [ "A1 Policy Management" ] }, "post" : { @@ -1273,21 +1246,17 @@ "headers" : { "Location" : { "description" : "Contains the URI of the newly created A1 Policy Instances. This URI includes the A1 Policy Instance ID for the newly created policy instance.\n", - "explode" : false, "required" : true, "schema" : { "type" : "string" - }, - "style" : "simple" + } }, "Content-Type" : { "description" : "Media Type of the response", - "explode" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } } }, @@ -1471,7 +1440,7 @@ "tags" : [ "Configuration" ] }, "put" : { - "description" : "Replace the current Application Configuration with a new configuration. The new configuration, if accepted, will take effect after a short delay. The new configuration must comply with the Application Configuration schema, which can be found from the the Application Documentation (Developer Guide) \n", + "description" : "Replace the current Application Configuration with a new configuration. The new configuration, if accepted, will take effect after a short delay. The new configuration must comply with the Application Configuration schema, which can be found from the the Application Documentation (Developer Guide)\n", "operationId" : "putConfiguration", "requestBody" : { "content" : { @@ -1524,26 +1493,13 @@ "style" : "simple" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "string" - } - } - }, - "required" : false - }, "responses" : { "200" : { "content" : { @@ -1586,15 +1542,12 @@ "style" : "form" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -1734,15 +1687,12 @@ "style" : "simple" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "204" : { @@ -1773,22 +1723,6 @@ }, "components" : { "examples" : { - "ServiceStatusList" : { - "description" : "List of service information", - "value" : { - "serviceList" : [ { - "callbackUrl" : "http://callback.url", - "serviceId" : "serviceId1", - "keepAliveIntervalSeconds" : 0, - "timeSinceLastActivitySeconds" : 6 - }, { - "callbackUrl" : "http://callback.url", - "serviceId" : "serviceId2", - "keepAliveIntervalSeconds" : 500, - "timeSinceLastActivitySeconds" : 401 - } ] - } - }, "StatusInfo" : { "value" : { "status" : "success" @@ -1817,48 +1751,6 @@ } ] } }, - "PolicyObject" : { - "value" : { - "scope" : { - "ueId" : { - "guRanUeId" : { - "globalGnbId" : { - "plmnId" : { - "mcc" : "123", - "mnc" : "45" - }, - "gnbId" : { - "gnbIdLength" : 24, - "gnbIdValue" : 12345678 - } - }, - "RanUeId" : "a31c510b20e64a74" - } - }, - "groupId" : { - "spId" : 123 - }, - "qosId" : { - "5qI" : 1 - }, - "cellId" : { - "plmnId" : { - "mcc" : "123", - "mnc" : "45" - }, - "cId" : { - "ncI" : 123 - } - } - }, - "qosObjectives" : { - "gfbr" : 100, - "mfbr" : 200, - "priorityLevel" : 3, - "pdb" : 50 - } - } - }, "PolicyTypeInformation" : { "value" : [ { "policyTypeId" : "STD_QOS2_0.1.0", @@ -1908,9 +1800,77 @@ } } } + }, + "PolicyObject" : { + "value" : { + "scope" : { + "ueId" : { + "guRanUeId" : { + "globalGnbId" : { + "plmnId" : { + "mcc" : "123", + "mnc" : "45" + }, + "gnbId" : { + "gnbIdLength" : 24, + "gnbIdValue" : 12345678 + } + }, + "RanUeId" : "a31c510b20e64a74" + } + }, + "groupId" : { + "spId" : 123 + }, + "qosId" : { + "5qI" : 1 + }, + "cellId" : { + "plmnId" : { + "mcc" : "123", + "mnc" : "45" + }, + "cId" : { + "ncI" : 123 + } + } + }, + "qosObjectives" : { + "gfbr" : 100, + "mfbr" : 200, + "priorityLevel" : 3, + "pdb" : 50 + } + } + }, + "ServiceStatusList" : { + "description" : "List of service information", + "value" : { + "serviceList" : [ { + "callbackUrl" : "http://callback.url", + "serviceId" : "serviceId1", + "keepAliveIntervalSeconds" : 0, + "timeSinceLastActivitySeconds" : 6 + }, { + "callbackUrl" : "http://callback.url", + "serviceId" : "serviceId2", + "keepAliveIntervalSeconds" : 500, + "timeSinceLastActivitySeconds" : 401 + } ] + } } }, "responses" : { + "404" : { + "content" : { + "application/problem+json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemDetails" + } + } + }, + "description" : "Not Found" + }, "400" : { "content" : { "application/problem+json" : { @@ -1941,7 +1901,7 @@ }, "description" : "Forbidden" }, - "404" : { + "406" : { "content" : { "application/problem+json" : { "schema" : { @@ -1949,9 +1909,9 @@ } } }, - "description" : "Not Found" + "description" : "Not Acceptable" }, - "405" : { + "429" : { "content" : { "application/problem+json" : { "schema" : { @@ -1959,9 +1919,9 @@ } } }, - "description" : "Method Not Allowed" + "description" : "Too Many Requests" }, - "406" : { + "500" : { "content" : { "application/problem+json" : { "schema" : { @@ -1969,9 +1929,9 @@ } } }, - "description" : "Not Acceptable" + "description" : "Internal Server Error" }, - "409" : { + "502" : { "content" : { "application/problem+json" : { "schema" : { @@ -1979,9 +1939,9 @@ } } }, - "description" : "Conflict" + "description" : "Bad Gateway" }, - "411" : { + "503" : { "content" : { "application/problem+json" : { "schema" : { @@ -1989,9 +1949,9 @@ } } }, - "description" : "Length Required" + "description" : "Service Unavailable" }, - "413" : { + "411" : { "content" : { "application/problem+json" : { "schema" : { @@ -1999,9 +1959,9 @@ } } }, - "description" : "Payload Too Large" + "description" : "Length Required" }, - "415" : { + "413" : { "content" : { "application/problem+json" : { "schema" : { @@ -2009,9 +1969,9 @@ } } }, - "description" : "Unsupported Media Type" + "description" : "Payload Too Large" }, - "429" : { + "415" : { "content" : { "application/problem+json" : { "schema" : { @@ -2019,19 +1979,24 @@ } } }, - "description" : "Too Many Requests" + "description" : "Unsupported Media Type" }, - "500" : { + "Locked" : { "content" : { "application/problem+json" : { + "example" : { + "status" : 423, + "title" : "Locked", + "detail" : "State is Locked in the provided request." + }, "schema" : { - "$ref" : "#/components/schemas/ProblemDetails" + "$ref" : "#/components/schemas/ErrorInformation" } } }, - "description" : "Internal Server Error" + "description" : "Locked - HTTP Status code which can be used when the state is Locked" }, - "502" : { + "405" : { "content" : { "application/problem+json" : { "schema" : { @@ -2039,9 +2004,9 @@ } } }, - "description" : "Bad Gateway" + "description" : "Method Not Allowed" }, - "503" : { + "409" : { "content" : { "application/problem+json" : { "schema" : { @@ -2049,106 +2014,111 @@ } } }, - "description" : "Service Unavailable" - }, - "Locked" : { - "content" : { - "application/problem+json" : { - "example" : { - "status" : 423, - "title" : "Locked", - "detail" : "State is Locked in the provided request." - }, - "schema" : { - "$ref" : "#/components/schemas/ErrorInformation" - } - } - }, - "description" : "Locked - HTTP Status code which can be used when the state is Locked" + "description" : "Conflict" } }, "schemas" : { - "PolicyTypeInformation" : { - "description" : "A data tuple to indicate that an identified A1 Policy Type is supported at an identified Near-RT RIC.", - "example" : { - "policyTypeId" : "STD_QOS2_0.1.0", - "nearRtRicId" : "ric_g3_2" - }, + "StatusInfo" : { "properties" : { - "policyTypeId" : { - "description" : "A1 Policy Type identifier", + "status" : { + "description" : "Status text", "type" : "string" - }, - "nearRtRicId" : { - "$ref" : "#/components/schemas/NearRtRicId" } }, - "required" : [ "nearRtRicId", "policyTypeId" ], "type" : "object" }, - "PolicyObjectInformation" : { - "description" : "Information to create an A1 Policy Instance", + "ProblemDetails" : { + "description" : "Object to carry details about a problem in an HTTP response according to IETF RFC 7807", "properties" : { - "nearRtRicId" : { - "description" : "Identity of the target Near-RT RIC", - "example" : "Near-RT-Ric-ID1", + "type" : { + "description" : "URI reference according to IETF RFC 3986 that identifies the problem type", "type" : "string" }, - "transient" : { - "default" : false, - "description" : "If true, the policy is automatically deleted if the targeted Near-RT RIC restarts or recovers. If false, the A1 Policy Instance remains, and is re-pushed to the targeted Near-RT RIC after a restart or recovery. If false, the A1 Policy Instance is maintained and must be deleted separately in the event of Near-RT RIC restart or recovery. Default is false.\n", - "nullable" : false, - "type" : "boolean" - }, - "policyId" : { - "description" : "An optional identity to be used for the new A1 Policy Instance. If this value is present, it must be unique. If not present the new A1 Policy Instance will be assigned a newly generated unique ID, and the new ID can be extracted from the 'Location' header in the response.\n", - "example" : "POLICY-ID1", + "title" : { + "description" : "Human-readable summary of the problem type", "type" : "string" }, - "serviceId" : { - "default" : "", - "description" : "the identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated to a service). Note that the service does not need to be registered. If the service is registered, the newly created A1 Policy Instance will be subject to the same supervision rules as the the service's other policies.", - "example" : "rApp 1", - "type" : "string" + "status" : { + "description" : "HTTP status code", + "type" : "number" }, - "policyObject" : { - "$ref" : "#/components/schemas/PolicyObject" + "detail" : { + "description" : "Human-readable explanation", + "type" : "string" }, - "policyTypeId" : { - "description" : "A1 Policy Type identity", - "example" : "ORAN_QOS_1.0.0 '(typeName_SemVersion)'", + "instance" : { + "description" : "URI reference that identifies the specific occurrence of the problem", "type" : "string" } }, - "required" : [ "nearRtRicId", "policyObject", "policyTypeId" ], "type" : "object" }, - "ErrorInformation" : { - "description" : "Problem as defined in https://tools.ietf.org/html/rfc7807", + "RicInfo" : { + "description" : "Information for a Near-RT RIC", "properties" : { - "detail" : { - "description" : "A human-readable explanation specific to this occurrence of the problem.", - "example" : "Policy type not found", + "ricId" : { + "description" : "Identity of the Near-RT RIC", "type" : "string" }, - "title" : { - "description" : "A specific error name", - "example" : "Not Found", + "managedElementIds" : { + "description" : "Identities for managed entities", + "items" : { + "description" : "Identity for a managed entity", + "type" : "string" + }, + "type" : "array" + }, + "state" : { + "description" : "Represents the state of a Near-RT RIC", + "enum" : [ "UNAVAILABLE", "AVAILABLE", "SYNCHRONIZING", "CONSISTENCY_CHECK" ], "type" : "string" }, - "status" : { - "description" : "The HTTP status code generated by the origin server for this occurrence of the problem.\n", - "example" : 404, - "format" : "int32", - "type" : "integer" + "policyTypeIds" : { + "description" : "Supported A1 Policy Types", + "items" : { + "description" : "Supported A1 Policy Type ID", + "type" : "string" + }, + "type" : "array" } }, "type" : "object" }, - "PolicyObject" : { - "description" : "Policy Object is a JSON representation policy data for an A1 Policy Instance. The schema for this policy data is defined in the corresponding A1 Policy Type. \n", + "RicInfoList" : { + "description" : "Collection of Near-RT RIC information objects", + "properties" : { + "rics" : { + "description" : "List of Near-RT RIC information objects", + "items" : { + "$ref" : "#/components/schemas/RicInfo" + }, + "type" : "array" + } + }, "type" : "object" }, + "PolicyTypeInformation" : { + "description" : "A data tuple to indicate that an identified A1 Policy Type is supported at an identified Near-RT RIC.", + "example" : { + "policyTypeId" : "STD_QOS2_0.1.0", + "nearRtRicId" : "ric_g3_2" + }, + "properties" : { + "policyTypeId" : { + "description" : "A1 Policy Type identifier", + "type" : "string" + }, + "nearRtRicId" : { + "$ref" : "#/components/schemas/NearRtRicId" + } + }, + "required" : [ "nearRtRicId", "policyTypeId" ], + "type" : "object" + }, + "NearRtRicId" : { + "description" : "Identity of the Near-RT RIC", + "type" : "string" + }, "PolicyTypeObject" : { "description" : "An A1 Policy Type, as defined in O-RAN Alliance A1TD", "example" : { @@ -2219,72 +2189,101 @@ "description" : "A schema to define the contents of the status information for A1 Policy Instances. Status schemas are Policy Type specific. All status information for all A1 Policy Instances of an A1 Policy Type should comply with the type's status schema.\n", "type" : "object" }, - "PolicyStatusObject" : { - "description" : "A generic policy status object that can be used to transport any policy status. Additionally, a schema for policy status can be defined in the corresponding A1 Policy Type.\n", - "type" : "object" - }, - "void" : { - "description" : "Void/empty", + "PolicyObject" : { + "description" : "Policy Object is a JSON representation policy data for an A1 Policy Instance. The schema for this policy data is defined in the corresponding A1 Policy Type.\n", "type" : "object" }, - "StatusInfo" : { + "ErrorInformation" : { + "description" : "Problem as defined in https://tools.ietf.org/html/rfc7807", "properties" : { - "status" : { - "description" : "Status text", + "detail" : { + "description" : "A human-readable explanation specific to this occurrence of the problem.", + "example" : "Policy type not found", + "type" : "string" + }, + "title" : { + "description" : "A specific error name", + "example" : "Not Found", "type" : "string" + }, + "status" : { + "description" : "The HTTP status code generated by the origin server for this occurrence of the problem.\n", + "example" : 404, + "format" : "int32", + "type" : "integer" } }, "type" : "object" }, - "RicInfo" : { - "description" : "Information for a Near-RT RIC", + "PolicyStatusObject" : { + "description" : "A generic policy status object that can be used to transport any policy status. Additionally, a schema for policy status can be defined in the corresponding A1 Policy Type.\n", + "type" : "object" + }, + "PolicyInformation" : { + "description" : "Information tuple for a single A1 Policy Instance. Contains the A1 Policy Instance ID, and the ID of the Near-RT RIC where the policy is created.\n", "properties" : { - "ricId" : { - "description" : "Identity of the Near-RT RIC", - "type" : "string" - }, - "managedElementIds" : { - "description" : "Identities for managed entities", - "items" : { - "description" : "Identity for a managed entity", - "type" : "string" - }, - "type" : "array" - }, - "state" : { - "description" : "Represents the state of a Near-RT RIC", - "enum" : [ "UNAVAILABLE", "AVAILABLE", "SYNCHRONIZING", "CONSISTENCY_CHECK" ], + "policyId" : { + "description" : "Identity of the A1 Policy Instance", "type" : "string" }, - "policyTypeIds" : { - "description" : "Supported A1 Policy Types", - "items" : { - "description" : "Supported A1 Policy Type ID", - "type" : "string" - }, - "type" : "array" + "nearRtRicId" : { + "$ref" : "#/components/schemas/NearRtRicId" } }, + "required" : [ "nearRtRicId", "policyId" ], "type" : "object" }, - "ServiceRegistrationInfo" : { - "description" : "Information for a service to be registered", + "PolicyObjectInformation" : { + "description" : "Information to create an A1 Policy Instance", "properties" : { - "callbackUrl" : { - "description" : "Callback URL for notifying of Near-RT RIC state changes", + "nearRtRicId" : { + "description" : "Identity of the target Near-RT RIC", + "example" : "Near-RT-Ric-ID1", + "type" : "string" + }, + "transient" : { + "default" : false, + "description" : "If true, the policy is automatically deleted if the targeted Near-RT RIC restarts or recovers. If false, the A1 Policy Instance remains, and is re-pushed to the targeted Near-RT RIC after a restart or recovery. If false, the A1 Policy Instance is maintained and must be deleted separately in the event of Near-RT RIC restart or recovery. Default is false.\n", + "nullable" : false, + "type" : "boolean" + }, + "policyId" : { + "description" : "An optional identity to be used for the new A1 Policy Instance. If this value is present, it must be unique. If not present the new A1 Policy Instance will be assigned a newly generated unique ID, and the new ID can be extracted from the 'Location' header in the response.\n", + "example" : "POLICY-ID1", "type" : "string" }, "serviceId" : { - "description" : "Identity of the service", + "default" : "", + "description" : "the identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated to a service). Note that the service does not need to be registered. If the service is registered, the newly created A1 Policy Instance will be subject to the same supervision rules as the the service's other policies.", + "example" : "rApp 1", "type" : "string" }, - "keepAliveIntervalSeconds" : { - "description" : "Keep alive interval for the service. This is used to enable optional heartbeat supervision of the service. If set (> 0) the registered service should regularly invoke a 'keepalive' REST call. When a service fails to invoke this 'keepalive' call within the configured time, the service is considered unavailable. An unavailable service will be automatically deregistered and its policies will be deleted. Value 0 means timeout supervision is disabled.\n", - "format" : "int64", - "type" : "integer" + "policyObject" : { + "$ref" : "#/components/schemas/PolicyObject" + }, + "policyTypeId" : { + "description" : "A1 Policy Type identity", + "example" : "ORAN_QOS_1.0.0 '(typeName_SemVersion)'", + "type" : "string" + } + }, + "required" : [ "nearRtRicId", "policyObject", "policyTypeId" ], + "type" : "object" + }, + "void" : { + "description" : "Void/empty", + "type" : "object" + }, + "ServiceStatusList" : { + "properties" : { + "serviceList" : { + "description" : "List of Service Status objects, describing a collection of registered services.", + "items" : { + "$ref" : "#/components/schemas/ServiceStatus" + }, + "type" : "array" } }, - "required" : [ "serviceId" ], "type" : "object" }, "ServiceStatus" : { @@ -2311,47 +2310,24 @@ }, "type" : "object" }, - "RicInfoList" : { - "description" : "Collection of Near-RT RIC information objects", - "properties" : { - "rics" : { - "description" : "List of Near-RT RIC information objects", - "items" : { - "$ref" : "#/components/schemas/RicInfo" - }, - "type" : "array" - } - }, - "type" : "object" - }, - "NearRtRicId" : { - "description" : "Identity of the Near-RT RIC", - "type" : "string" - }, - "PolicyInformation" : { - "description" : "Information tuple for a single A1 Policy Instance. Contains the A1 Policy Instance ID, and the ID of the Near-RT RIC where the policy is created.\n", + "ServiceRegistrationInfo" : { + "description" : "Information for a service to be registered", "properties" : { - "policyId" : { - "description" : "Identity of the A1 Policy Instance", + "callbackUrl" : { + "description" : "Callback URL for notifying of Near-RT RIC state changes", "type" : "string" }, - "nearRtRicId" : { - "$ref" : "#/components/schemas/NearRtRicId" - } - }, - "required" : [ "nearRtRicId", "policyId" ], - "type" : "object" - }, - "ServiceStatusList" : { - "properties" : { - "serviceList" : { - "description" : "List of Service Status objects, describing a collection of registered services.", - "items" : { - "$ref" : "#/components/schemas/ServiceStatus" - }, - "type" : "array" + "serviceId" : { + "description" : "Identity of the service", + "type" : "string" + }, + "keepAliveIntervalSeconds" : { + "description" : "Keep alive interval for the service. This is used to enable optional heartbeat supervision of the service. If set (> 0) the registered service should regularly invoke a 'keepalive' REST call. When a service fails to invoke this 'keepalive' call within the configured time, the service is considered unavailable. An unavailable service will be automatically deregistered and its policies will be deleted. Value 0 means timeout supervision is disabled.\n", + "format" : "int64", + "type" : "integer" } }, + "required" : [ "serviceId" ], "type" : "object" }, "ServiceCallbackInfo" : { @@ -2369,32 +2345,6 @@ }, "required" : [ "eventType", "ricId" ], "type" : "object" - }, - "ProblemDetails" : { - "description" : "Object to carry details about a problem in an HTTP response according to IETF RFC 7807", - "properties" : { - "type" : { - "description" : "URI reference according to IETF RFC 3986 that identifies the problem type", - "type" : "string" - }, - "title" : { - "description" : "Human-readable summary of the problem type", - "type" : "string" - }, - "status" : { - "description" : "HTTP status code", - "type" : "number" - }, - "detail" : { - "description" : "Human-readable explanation", - "type" : "string" - }, - "instance" : { - "description" : "URI reference that identifies the specific occurrence of the problem", - "type" : "string" - } - }, - "type" : "object" } } } diff --git a/a1-policy-management/api/offeredapis/swagger/pms-api-v3.json b/a1-policy-management/api/offeredapis/swagger/pms-api-v3.json index ec085700..9d378bd7 100644 --- a/a1-policy-management/api/offeredapis/swagger/pms-api-v3.json +++ b/a1-policy-management/api/offeredapis/swagger/pms-api-v3.json @@ -5,7 +5,7 @@ "email" : "discuss-list@onap.com", "url" : "https://www.onap.org/" }, - "description" : "

    General

    The ONAP CCSDK A1 Policy Management Service provides a REST API for managing A1 policies.
    This document describes the latest API set to perform tasks for:

    • A1 Policy creation, modification and deletion.
    • Monitoring and maintaining consistency of the SMO view of A1 Policies and the Near-RT RICs
    • Maintaining a view of each Near-RT RIC's supported A1 Policy Types
    • Supervision of registered services (rApps). When a registered service is unavailable, its policies are removed.

    APIs provided or defined by the service

    Note: parts of this API are strongly based on extracts of the O-RAN Alliance R1 Interface specification for A1 Policy Management, and those parts should be considered '� O-RAN ALLIANCE - All rights reserved.'

    A1 Policy Management

    This is the latest API for managing A1 Policies. This API is partially compliant with O-RAN Alliance R1 Interface specifications for A1 Policy Management:

    • A1 Policy retrieval, creation, modification and deletion.
    • Retrieval of supported A1 Policy Types for a Near-RT RIC
    • Retrieval of status for existing A1 policies

    Management of configuration

    API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.

    Service Callbacks

    These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.

    NearRT-RIC Repository (Older version)

    This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted towards one Near-RT RIC.

    Health Check

    API used for supervision of the A1 Policy Management Service.

    Service Registry and Supervision

    API used for registering services/clients/rApps. Each A1 Policy can be tagged with an owner. If the owner service is registered, then the service can be optionally monitored by a heart-beat supervision mechanism, and if the registered service becomes unavailable, then it is removed and all its A1 Policies are deleted. Note that services do not need to be registered to create A1 Policies, but unregistered services are not supervised. This is a feature that is optional to use.

    ", + "description" : "

    General

    The ONAP CCSDK A1 Policy Management Service provides a REST API for managing A1 policies.
    This document describes the latest API set to perform tasks for:

    • A1 Policy creation, modification and deletion.
    • Monitoring and maintaining consistency of the SMO view of A1 Policies and the Near-RT RICs
    • Maintaining a view of each Near-RT RIC's supported A1 Policy Types
    • Supervision of registered services (rApps). When a registered service is unavailable, its policies are removed.

    APIs provided or defined by the service

    Note: parts of this API are strongly based on extracts of the O-RAN Alliance R1 Interface specification for A1 Policy Management, and those parts should be considered '© O-RAN ALLIANCE - All rights reserved.'

    A1 Policy Management

    This is the latest API for managing A1 Policies. This API is partially compliant with O-RAN Alliance R1 Interface specifications for A1 Policy Management:

    • A1 Policy retrieval, creation, modification and deletion.
    • Retrieval of supported A1 Policy Types for a Near-RT RIC
    • Retrieval of status for existing A1 policies

    Management of configuration

    API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.

    Service Callbacks

    These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.

    NearRT-RIC Repository (Older version)

    This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted towards one Near-RT RIC.

    Health Check

    API used for supervision of the A1 Policy Management Service.

    Service Registry and Supervision

    API used for registering services/clients/rApps. Each A1 Policy can be tagged with an owner. If the owner service is registered, then the service can be optionally monitored by a heart-beat supervision mechanism, and if the registered service becomes unavailable, then it is removed and all its A1 Policies are deleted. Note that services do not need to be registered to create A1 Policies, but unregistered services are not supervised. This is a feature that is optional to use.

    ", "license" : { "name" : "Copyright (C) 2024 - 2025 OpenInfra Foundation Europe. Licensed under the Apache 2 License.", "url" : "http://www.apache.org/licenses/LICENSE-2.0" @@ -93,19 +93,15 @@ "schema" : { "nullable" : false, "type" : "string" - }, - "style" : "simple" + } }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -154,15 +150,12 @@ "style" : "form" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -231,15 +224,12 @@ "style" : "form" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -370,15 +360,12 @@ "style" : "simple" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -506,15 +493,12 @@ "style" : "simple" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "204" : { @@ -653,15 +637,12 @@ "style" : "simple" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -775,16 +756,14 @@ }, "put" : { "description" : "Update an existing A1 Policy instance's policy data using its policy ID.", - "operationId" : "putPolicy", + "operationId" : "updatePolicy", "parameters" : [ { - "explode" : false, "in" : "path", "name" : "policyId", "required" : true, "schema" : { "type" : "string" - }, - "style" : "simple" + } } ], "requestBody" : { "content" : { @@ -948,7 +927,7 @@ "description" : "Service Unavailable" } }, - "summary" : "Update an A1 Policy's policy data (putPolicy)", + "summary" : "Update an A1 Policy's policy data (updatePolicy)", "tags" : [ "A1 Policy Management" ] } }, @@ -967,15 +946,12 @@ "style" : "simple" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -1086,7 +1062,7 @@ "/policies" : { "get" : { "description" : "Returns a collection of A1 Policy Instance IDs for policies that match given search criteria. If several query parameters are defined, the policies matching all conditions are returned.\n", - "operationId" : "getAllPolicies", + "operationId" : "getPolicyIds", "parameters" : [ { "description" : "Select policies with a given A1 Policy Type ID.", "explode" : true, @@ -1129,15 +1105,12 @@ "style" : "form" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -1244,7 +1217,7 @@ "description" : "Service Unavailable" } }, - "summary" : "Query for A1 Policy instances (getAllPolicies)", + "summary" : "Query for A1 Policy instances (getPolicyIds)", "tags" : [ "A1 Policy Management" ] }, "post" : { @@ -1273,21 +1246,17 @@ "headers" : { "Location" : { "description" : "Contains the URI of the newly created A1 Policy Instances. This URI includes the A1 Policy Instance ID for the newly created policy instance.\n", - "explode" : false, "required" : true, "schema" : { "type" : "string" - }, - "style" : "simple" + } }, "Content-Type" : { "description" : "Media Type of the response", - "explode" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } } }, @@ -1471,7 +1440,7 @@ "tags" : [ "Configuration" ] }, "put" : { - "description" : "Replace the current Application Configuration with a new configuration. The new configuration, if accepted, will take effect after a short delay. The new configuration must comply with the Application Configuration schema, which can be found from the the Application Documentation (Developer Guide) \n", + "description" : "Replace the current Application Configuration with a new configuration. The new configuration, if accepted, will take effect after a short delay. The new configuration must comply with the Application Configuration schema, which can be found from the the Application Documentation (Developer Guide)\n", "operationId" : "putConfiguration", "requestBody" : { "content" : { @@ -1524,26 +1493,13 @@ "style" : "simple" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "string" - } - } - }, - "required" : false - }, "responses" : { "200" : { "content" : { @@ -1586,15 +1542,12 @@ "style" : "form" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -1734,15 +1687,12 @@ "style" : "simple" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "204" : { @@ -1773,22 +1723,6 @@ }, "components" : { "examples" : { - "ServiceStatusList" : { - "description" : "List of service information", - "value" : { - "serviceList" : [ { - "callbackUrl" : "http://callback.url", - "serviceId" : "serviceId1", - "keepAliveIntervalSeconds" : 0, - "timeSinceLastActivitySeconds" : 6 - }, { - "callbackUrl" : "http://callback.url", - "serviceId" : "serviceId2", - "keepAliveIntervalSeconds" : 500, - "timeSinceLastActivitySeconds" : 401 - } ] - } - }, "StatusInfo" : { "value" : { "status" : "success" @@ -1817,48 +1751,6 @@ } ] } }, - "PolicyObject" : { - "value" : { - "scope" : { - "ueId" : { - "guRanUeId" : { - "globalGnbId" : { - "plmnId" : { - "mcc" : "123", - "mnc" : "45" - }, - "gnbId" : { - "gnbIdLength" : 24, - "gnbIdValue" : 12345678 - } - }, - "RanUeId" : "a31c510b20e64a74" - } - }, - "groupId" : { - "spId" : 123 - }, - "qosId" : { - "5qI" : 1 - }, - "cellId" : { - "plmnId" : { - "mcc" : "123", - "mnc" : "45" - }, - "cId" : { - "ncI" : 123 - } - } - }, - "qosObjectives" : { - "gfbr" : 100, - "mfbr" : 200, - "priorityLevel" : 3, - "pdb" : 50 - } - } - }, "PolicyTypeInformation" : { "value" : [ { "policyTypeId" : "STD_QOS2_0.1.0", @@ -1908,9 +1800,77 @@ } } } + }, + "PolicyObject" : { + "value" : { + "scope" : { + "ueId" : { + "guRanUeId" : { + "globalGnbId" : { + "plmnId" : { + "mcc" : "123", + "mnc" : "45" + }, + "gnbId" : { + "gnbIdLength" : 24, + "gnbIdValue" : 12345678 + } + }, + "RanUeId" : "a31c510b20e64a74" + } + }, + "groupId" : { + "spId" : 123 + }, + "qosId" : { + "5qI" : 1 + }, + "cellId" : { + "plmnId" : { + "mcc" : "123", + "mnc" : "45" + }, + "cId" : { + "ncI" : 123 + } + } + }, + "qosObjectives" : { + "gfbr" : 100, + "mfbr" : 200, + "priorityLevel" : 3, + "pdb" : 50 + } + } + }, + "ServiceStatusList" : { + "description" : "List of service information", + "value" : { + "serviceList" : [ { + "callbackUrl" : "http://callback.url", + "serviceId" : "serviceId1", + "keepAliveIntervalSeconds" : 0, + "timeSinceLastActivitySeconds" : 6 + }, { + "callbackUrl" : "http://callback.url", + "serviceId" : "serviceId2", + "keepAliveIntervalSeconds" : 500, + "timeSinceLastActivitySeconds" : 401 + } ] + } } }, "responses" : { + "404" : { + "content" : { + "application/problem+json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemDetails" + } + } + }, + "description" : "Not Found" + }, "400" : { "content" : { "application/problem+json" : { @@ -1941,7 +1901,7 @@ }, "description" : "Forbidden" }, - "404" : { + "406" : { "content" : { "application/problem+json" : { "schema" : { @@ -1949,9 +1909,9 @@ } } }, - "description" : "Not Found" + "description" : "Not Acceptable" }, - "405" : { + "429" : { "content" : { "application/problem+json" : { "schema" : { @@ -1959,9 +1919,9 @@ } } }, - "description" : "Method Not Allowed" + "description" : "Too Many Requests" }, - "406" : { + "500" : { "content" : { "application/problem+json" : { "schema" : { @@ -1969,9 +1929,9 @@ } } }, - "description" : "Not Acceptable" + "description" : "Internal Server Error" }, - "409" : { + "502" : { "content" : { "application/problem+json" : { "schema" : { @@ -1979,9 +1939,9 @@ } } }, - "description" : "Conflict" + "description" : "Bad Gateway" }, - "411" : { + "503" : { "content" : { "application/problem+json" : { "schema" : { @@ -1989,9 +1949,9 @@ } } }, - "description" : "Length Required" + "description" : "Service Unavailable" }, - "413" : { + "411" : { "content" : { "application/problem+json" : { "schema" : { @@ -1999,9 +1959,9 @@ } } }, - "description" : "Payload Too Large" + "description" : "Length Required" }, - "415" : { + "413" : { "content" : { "application/problem+json" : { "schema" : { @@ -2009,9 +1969,9 @@ } } }, - "description" : "Unsupported Media Type" + "description" : "Payload Too Large" }, - "429" : { + "415" : { "content" : { "application/problem+json" : { "schema" : { @@ -2019,19 +1979,24 @@ } } }, - "description" : "Too Many Requests" + "description" : "Unsupported Media Type" }, - "500" : { + "Locked" : { "content" : { "application/problem+json" : { + "example" : { + "status" : 423, + "title" : "Locked", + "detail" : "State is Locked in the provided request." + }, "schema" : { - "$ref" : "#/components/schemas/ProblemDetails" + "$ref" : "#/components/schemas/ErrorInformation" } } }, - "description" : "Internal Server Error" + "description" : "Locked - HTTP Status code which can be used when the state is Locked" }, - "502" : { + "405" : { "content" : { "application/problem+json" : { "schema" : { @@ -2039,9 +2004,9 @@ } } }, - "description" : "Bad Gateway" + "description" : "Method Not Allowed" }, - "503" : { + "409" : { "content" : { "application/problem+json" : { "schema" : { @@ -2049,106 +2014,111 @@ } } }, - "description" : "Service Unavailable" - }, - "Locked" : { - "content" : { - "application/problem+json" : { - "example" : { - "status" : 423, - "title" : "Locked", - "detail" : "State is Locked in the provided request." - }, - "schema" : { - "$ref" : "#/components/schemas/ErrorInformation" - } - } - }, - "description" : "Locked - HTTP Status code which can be used when the state is Locked" + "description" : "Conflict" } }, "schemas" : { - "PolicyTypeInformation" : { - "description" : "A data tuple to indicate that an identified A1 Policy Type is supported at an identified Near-RT RIC.", - "example" : { - "policyTypeId" : "STD_QOS2_0.1.0", - "nearRtRicId" : "ric_g3_2" - }, + "StatusInfo" : { "properties" : { - "policyTypeId" : { - "description" : "A1 Policy Type identifier", + "status" : { + "description" : "Status text", "type" : "string" - }, - "nearRtRicId" : { - "$ref" : "#/components/schemas/NearRtRicId" } }, - "required" : [ "nearRtRicId", "policyTypeId" ], "type" : "object" }, - "PolicyObjectInformation" : { - "description" : "Information to create an A1 Policy Instance", + "ProblemDetails" : { + "description" : "Object to carry details about a problem in an HTTP response according to IETF RFC 7807", "properties" : { - "nearRtRicId" : { - "description" : "Identity of the target Near-RT RIC", - "example" : "Near-RT-Ric-ID1", + "type" : { + "description" : "URI reference according to IETF RFC 3986 that identifies the problem type", "type" : "string" }, - "transient" : { - "default" : false, - "description" : "If true, the policy is automatically deleted if the targeted Near-RT RIC restarts or recovers. If false, the A1 Policy Instance remains, and is re-pushed to the targeted Near-RT RIC after a restart or recovery. If false, the A1 Policy Instance is maintained and must be deleted separately in the event of Near-RT RIC restart or recovery. Default is false.\n", - "nullable" : false, - "type" : "boolean" - }, - "policyId" : { - "description" : "An optional identity to be used for the new A1 Policy Instance. If this value is present, it must be unique. If not present the new A1 Policy Instance will be assigned a newly generated unique ID, and the new ID can be extracted from the 'Location' header in the response.\n", - "example" : "POLICY-ID1", + "title" : { + "description" : "Human-readable summary of the problem type", "type" : "string" }, - "serviceId" : { - "default" : "", - "description" : "the identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated to a service). Note that the service does not need to be registered. If the service is registered, the newly created A1 Policy Instance will be subject to the same supervision rules as the the service's other policies.", - "example" : "rApp 1", - "type" : "string" + "status" : { + "description" : "HTTP status code", + "type" : "number" }, - "policyObject" : { - "$ref" : "#/components/schemas/PolicyObject" + "detail" : { + "description" : "Human-readable explanation", + "type" : "string" }, - "policyTypeId" : { - "description" : "A1 Policy Type identity", - "example" : "ORAN_QOS_1.0.0 '(typeName_SemVersion)'", + "instance" : { + "description" : "URI reference that identifies the specific occurrence of the problem", "type" : "string" } }, - "required" : [ "nearRtRicId", "policyObject", "policyTypeId" ], "type" : "object" }, - "ErrorInformation" : { - "description" : "Problem as defined in https://tools.ietf.org/html/rfc7807", + "RicInfo" : { + "description" : "Information for a Near-RT RIC", "properties" : { - "detail" : { - "description" : "A human-readable explanation specific to this occurrence of the problem.", - "example" : "Policy type not found", + "ricId" : { + "description" : "Identity of the Near-RT RIC", "type" : "string" }, - "title" : { - "description" : "A specific error name", - "example" : "Not Found", + "managedElementIds" : { + "description" : "Identities for managed entities", + "items" : { + "description" : "Identity for a managed entity", + "type" : "string" + }, + "type" : "array" + }, + "state" : { + "description" : "Represents the state of a Near-RT RIC", + "enum" : [ "UNAVAILABLE", "AVAILABLE", "SYNCHRONIZING", "CONSISTENCY_CHECK" ], "type" : "string" }, - "status" : { - "description" : "The HTTP status code generated by the origin server for this occurrence of the problem.\n", - "example" : 404, - "format" : "int32", - "type" : "integer" + "policyTypeIds" : { + "description" : "Supported A1 Policy Types", + "items" : { + "description" : "Supported A1 Policy Type ID", + "type" : "string" + }, + "type" : "array" } }, "type" : "object" }, - "PolicyObject" : { - "description" : "Policy Object is a JSON representation policy data for an A1 Policy Instance. The schema for this policy data is defined in the corresponding A1 Policy Type. \n", + "RicInfoList" : { + "description" : "Collection of Near-RT RIC information objects", + "properties" : { + "rics" : { + "description" : "List of Near-RT RIC information objects", + "items" : { + "$ref" : "#/components/schemas/RicInfo" + }, + "type" : "array" + } + }, "type" : "object" }, + "PolicyTypeInformation" : { + "description" : "A data tuple to indicate that an identified A1 Policy Type is supported at an identified Near-RT RIC.", + "example" : { + "policyTypeId" : "STD_QOS2_0.1.0", + "nearRtRicId" : "ric_g3_2" + }, + "properties" : { + "policyTypeId" : { + "description" : "A1 Policy Type identifier", + "type" : "string" + }, + "nearRtRicId" : { + "$ref" : "#/components/schemas/NearRtRicId" + } + }, + "required" : [ "nearRtRicId", "policyTypeId" ], + "type" : "object" + }, + "NearRtRicId" : { + "description" : "Identity of the Near-RT RIC", + "type" : "string" + }, "PolicyTypeObject" : { "description" : "An A1 Policy Type, as defined in O-RAN Alliance A1TD", "example" : { @@ -2219,72 +2189,101 @@ "description" : "A schema to define the contents of the status information for A1 Policy Instances. Status schemas are Policy Type specific. All status information for all A1 Policy Instances of an A1 Policy Type should comply with the type's status schema.\n", "type" : "object" }, - "PolicyStatusObject" : { - "description" : "A generic policy status object that can be used to transport any policy status. Additionally, a schema for policy status can be defined in the corresponding A1 Policy Type.\n", - "type" : "object" - }, - "void" : { - "description" : "Void/empty", + "PolicyObject" : { + "description" : "Policy Object is a JSON representation policy data for an A1 Policy Instance. The schema for this policy data is defined in the corresponding A1 Policy Type.\n", "type" : "object" }, - "StatusInfo" : { + "ErrorInformation" : { + "description" : "Problem as defined in https://tools.ietf.org/html/rfc7807", "properties" : { - "status" : { - "description" : "Status text", + "detail" : { + "description" : "A human-readable explanation specific to this occurrence of the problem.", + "example" : "Policy type not found", + "type" : "string" + }, + "title" : { + "description" : "A specific error name", + "example" : "Not Found", "type" : "string" + }, + "status" : { + "description" : "The HTTP status code generated by the origin server for this occurrence of the problem.\n", + "example" : 404, + "format" : "int32", + "type" : "integer" } }, "type" : "object" }, - "RicInfo" : { - "description" : "Information for a Near-RT RIC", + "PolicyStatusObject" : { + "description" : "A generic policy status object that can be used to transport any policy status. Additionally, a schema for policy status can be defined in the corresponding A1 Policy Type.\n", + "type" : "object" + }, + "PolicyInformation" : { + "description" : "Information tuple for a single A1 Policy Instance. Contains the A1 Policy Instance ID, and the ID of the Near-RT RIC where the policy is created.\n", "properties" : { - "ricId" : { - "description" : "Identity of the Near-RT RIC", - "type" : "string" - }, - "managedElementIds" : { - "description" : "Identities for managed entities", - "items" : { - "description" : "Identity for a managed entity", - "type" : "string" - }, - "type" : "array" - }, - "state" : { - "description" : "Represents the state of a Near-RT RIC", - "enum" : [ "UNAVAILABLE", "AVAILABLE", "SYNCHRONIZING", "CONSISTENCY_CHECK" ], + "policyId" : { + "description" : "Identity of the A1 Policy Instance", "type" : "string" }, - "policyTypeIds" : { - "description" : "Supported A1 Policy Types", - "items" : { - "description" : "Supported A1 Policy Type ID", - "type" : "string" - }, - "type" : "array" + "nearRtRicId" : { + "$ref" : "#/components/schemas/NearRtRicId" } }, + "required" : [ "nearRtRicId", "policyId" ], "type" : "object" }, - "ServiceRegistrationInfo" : { - "description" : "Information for a service to be registered", + "PolicyObjectInformation" : { + "description" : "Information to create an A1 Policy Instance", "properties" : { - "callbackUrl" : { - "description" : "Callback URL for notifying of Near-RT RIC state changes", + "nearRtRicId" : { + "description" : "Identity of the target Near-RT RIC", + "example" : "Near-RT-Ric-ID1", + "type" : "string" + }, + "transient" : { + "default" : false, + "description" : "If true, the policy is automatically deleted if the targeted Near-RT RIC restarts or recovers. If false, the A1 Policy Instance remains, and is re-pushed to the targeted Near-RT RIC after a restart or recovery. If false, the A1 Policy Instance is maintained and must be deleted separately in the event of Near-RT RIC restart or recovery. Default is false.\n", + "nullable" : false, + "type" : "boolean" + }, + "policyId" : { + "description" : "An optional identity to be used for the new A1 Policy Instance. If this value is present, it must be unique. If not present the new A1 Policy Instance will be assigned a newly generated unique ID, and the new ID can be extracted from the 'Location' header in the response.\n", + "example" : "POLICY-ID1", "type" : "string" }, "serviceId" : { - "description" : "Identity of the service", + "default" : "", + "description" : "the identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated to a service). Note that the service does not need to be registered. If the service is registered, the newly created A1 Policy Instance will be subject to the same supervision rules as the the service's other policies.", + "example" : "rApp 1", "type" : "string" }, - "keepAliveIntervalSeconds" : { - "description" : "Keep alive interval for the service. This is used to enable optional heartbeat supervision of the service. If set (> 0) the registered service should regularly invoke a 'keepalive' REST call. When a service fails to invoke this 'keepalive' call within the configured time, the service is considered unavailable. An unavailable service will be automatically deregistered and its policies will be deleted. Value 0 means timeout supervision is disabled.\n", - "format" : "int64", - "type" : "integer" + "policyObject" : { + "$ref" : "#/components/schemas/PolicyObject" + }, + "policyTypeId" : { + "description" : "A1 Policy Type identity", + "example" : "ORAN_QOS_1.0.0 '(typeName_SemVersion)'", + "type" : "string" + } + }, + "required" : [ "nearRtRicId", "policyObject", "policyTypeId" ], + "type" : "object" + }, + "void" : { + "description" : "Void/empty", + "type" : "object" + }, + "ServiceStatusList" : { + "properties" : { + "serviceList" : { + "description" : "List of Service Status objects, describing a collection of registered services.", + "items" : { + "$ref" : "#/components/schemas/ServiceStatus" + }, + "type" : "array" } }, - "required" : [ "serviceId" ], "type" : "object" }, "ServiceStatus" : { @@ -2311,47 +2310,24 @@ }, "type" : "object" }, - "RicInfoList" : { - "description" : "Collection of Near-RT RIC information objects", - "properties" : { - "rics" : { - "description" : "List of Near-RT RIC information objects", - "items" : { - "$ref" : "#/components/schemas/RicInfo" - }, - "type" : "array" - } - }, - "type" : "object" - }, - "NearRtRicId" : { - "description" : "Identity of the Near-RT RIC", - "type" : "string" - }, - "PolicyInformation" : { - "description" : "Information tuple for a single A1 Policy Instance. Contains the A1 Policy Instance ID, and the ID of the Near-RT RIC where the policy is created.\n", + "ServiceRegistrationInfo" : { + "description" : "Information for a service to be registered", "properties" : { - "policyId" : { - "description" : "Identity of the A1 Policy Instance", + "callbackUrl" : { + "description" : "Callback URL for notifying of Near-RT RIC state changes", "type" : "string" }, - "nearRtRicId" : { - "$ref" : "#/components/schemas/NearRtRicId" - } - }, - "required" : [ "nearRtRicId", "policyId" ], - "type" : "object" - }, - "ServiceStatusList" : { - "properties" : { - "serviceList" : { - "description" : "List of Service Status objects, describing a collection of registered services.", - "items" : { - "$ref" : "#/components/schemas/ServiceStatus" - }, - "type" : "array" + "serviceId" : { + "description" : "Identity of the service", + "type" : "string" + }, + "keepAliveIntervalSeconds" : { + "description" : "Keep alive interval for the service. This is used to enable optional heartbeat supervision of the service. If set (> 0) the registered service should regularly invoke a 'keepalive' REST call. When a service fails to invoke this 'keepalive' call within the configured time, the service is considered unavailable. An unavailable service will be automatically deregistered and its policies will be deleted. Value 0 means timeout supervision is disabled.\n", + "format" : "int64", + "type" : "integer" } }, + "required" : [ "serviceId" ], "type" : "object" }, "ServiceCallbackInfo" : { @@ -2369,32 +2345,6 @@ }, "required" : [ "eventType", "ricId" ], "type" : "object" - }, - "ProblemDetails" : { - "description" : "Object to carry details about a problem in an HTTP response according to IETF RFC 7807", - "properties" : { - "type" : { - "description" : "URI reference according to IETF RFC 3986 that identifies the problem type", - "type" : "string" - }, - "title" : { - "description" : "Human-readable summary of the problem type", - "type" : "string" - }, - "status" : { - "description" : "HTTP status code", - "type" : "number" - }, - "detail" : { - "description" : "Human-readable explanation", - "type" : "string" - }, - "instance" : { - "description" : "URI reference that identifies the specific occurrence of the problem", - "type" : "string" - } - }, - "type" : "object" } } } diff --git a/a1-policy-management/api/offeredapis/swagger/pms-api-v3.yaml b/a1-policy-management/api/offeredapis/swagger/pms-api-v3.yaml index e08bea1a..482fe319 100644 --- a/a1-policy-management/api/offeredapis/swagger/pms-api-v3.yaml +++ b/a1-policy-management/api/offeredapis/swagger/pms-api-v3.yaml @@ -19,625 +19,982 @@ openapi: 3.0.3 info: - title: ONAP CCSDK - A1 Policy Management API - version: 1.0.0 - x-api-id: e9776a07-0813-4fca-9801-6f892f0a7c13 - x-audience: external-public - description: "

    General

    The ONAP CCSDK A1 Policy Management Service\ - \ provides a REST API for managing A1 policies.
    This document describes the latest API set - \ to perform tasks for:

    • A1 Policy creation, modification and deletion.
    • Monitoring\ - \ and maintaining consistency of the SMO view of A1 Policies and the Near-RT RICs
    • Maintaining\ - \ a view of each Near-RT RIC's supported A1 Policy Types
    • Supervision of registered services\ - \ (rApps). When a registered service is unavailable, its policies are removed.

    APIs\ - \ provided or defined by the service

    \ - \

    Note: parts of this API are strongly based on extracts of the O-RAN Alliance R1 Interface specification\ - \ for A1 Policy Management, and those parts should be considered '© O-RAN ALLIANCE - All rights reserved.'

    \ - \

    A1 Policy Management

    \ - \

    This is the latest API for managing A1 Policies. This API is partially compliant with O-RAN\ - \ Alliance R1 Interface specifications for A1 Policy Management:

    • A1 Policy retrieval, creation,\ + contact: + email: discuss-list@onap.com + url: https://www.onap.org/ + description: "

      General

      The ONAP CCSDK A1 Policy Management Service provides\ + \ a REST API for managing A1 policies.
      This document describes the latest\ + \ API set to perform tasks for:

      • A1 Policy creation, modification\ + \ and deletion.
      • Monitoring and maintaining consistency of the SMO view\ + \ of A1 Policies and the Near-RT RICs
      • Maintaining a view of each Near-RT\ + \ RIC's supported A1 Policy Types
      • Supervision of registered services (rApps).\ + \ When a registered service is unavailable, its policies are removed.

      APIs\ + \ provided or defined by the service

      Note: parts of this API are strongly\ + \ based on extracts of the O-RAN Alliance R1 Interface specification for A1 Policy\ + \ Management, and those parts should be considered '© O-RAN ALLIANCE - All rights\ + \ reserved.'

      A1 Policy Management

      This is the latest API for managing\ + \ A1 Policies. This API is partially compliant with O-RAN Alliance R1 Interface\ + \ specifications for A1 Policy Management:

      • A1 Policy retrieval, creation,\ \ modification and deletion.
      • Retrieval of supported A1 Policy Types for\ \ a Near-RT RIC
      • Retrieval of status for existing A1 policies

      Management\ \ of configuration

      API for updating and retrieval of the component configuration.\ \ Note that there other ways to maintain the configuration.

      Service Callbacks

      These\ \ are endpoints that are invoked by this service. The callbacks are registered\ - \ in this service at service registration.

      NearRT-RIC Repository (Older version)

      \ - \

      This is an API that provides support for looking up a NearRT-RIC. Each A1 policy\ - \ is targeted towards one Near-RT RIC.

      Health Check

      API used for supervision\ - \ of the A1 Policy Management Service.

      Service Registry and Supervision

      \ - \

      API used for registering services/clients/rApps. Each A1 Policy can be tagged with an owner.\ - \ If the owner service is registered, then the service can be optionally monitored by a heart-beat supervision\ - \ mechanism, and if the registered service becomes unavailable, then it is removed and all its A1 Policies are \ - \ deleted. Note that services do not need to be registered to create A1 Policies, but unregistered \ - \ services are not supervised. This is a feature that is optional to use.

      " + \ in this service at service registration.

      NearRT-RIC Repository (Older\ + \ version)

      This is an API that provides support for looking up a NearRT-RIC.\ + \ Each A1 policy is targeted towards one Near-RT RIC.

      Health Check

      API\ + \ used for supervision of the A1 Policy Management Service.

      Service Registry\ + \ and Supervision

      API used for registering services/clients/rApps. Each\ + \ A1 Policy can be tagged with an owner. If the owner service is registered, then\ + \ the service can be optionally monitored by a heart-beat supervision mechanism,\ + \ and if the registered service becomes unavailable, then it is removed and all\ + \ its A1 Policies are deleted. Note that services do not need to be registered\ + \ to create A1 Policies, but unregistered services are not supervised. This\ + \ is a feature that is optional to use.

      " license: - name: Copyright (C) 2024 - 2025 OpenInfra Foundation Europe. Licensed under the Apache 2 License. + name: Copyright (C) 2024 - 2025 OpenInfra Foundation Europe. Licensed under the + Apache 2 License. url: http://www.apache.org/licenses/LICENSE-2.0 - contact: - url: https://www.onap.org/ - email: discuss-list@onap.com + title: ONAP CCSDK - A1 Policy Management API + version: 1.0.0 + x-api-id: e9776a07-0813-4fca-9801-6f892f0a7c13 + x-audience: external-public externalDocs: - description: 'Based on parts of O-RAN ALLIANCE specification: O-RAN.WG2.R1AP-v07.00' - url: 'https://www.o-ran.org/specifications' + description: "Based on parts of O-RAN ALLIANCE specification: O-RAN.WG2.R1AP-v07.00" + url: https://www.o-ran.org/specifications servers: - - url: '{apiRoot}/a1-policy-management/v1' - variables: - apiRoot: - default: 'https://example.com' - description: 'This is the Host:Port or Address where the A1-Policy Management Service can be accessed. - Note: This URL path format aligns with the O-RAN Alliance R1-AP specifications for A1 Policy Management' +- url: "{apiRoot}/a1-policy-management/v1" + variables: + apiRoot: + default: https://example.com + description: "This is the Host:Port or Address where the A1-Policy Management\ + \ Service can be accessed. Note: This URL path format aligns with the O-RAN\ + \ Alliance R1-AP specifications for A1 Policy Management" tags: - - name: A1 Policy Management - description: > - API used to get, create, update and delete A1 Policy Instances. Also used to query A1 Policy Types. - - name: NearRT-RIC Repository - description: > - API used to get information about registered Near-RT RICs. - - name: Service Registry and Supervision - description: > - API used to manage registered services, and control their keep-alive status via heart-beat messages. - - name: Health Check - description: > - API used to get the health status and statistics of this service. - - name: Configuration - description: > - API used to create or fetch the application configuration. +- description: | + API used to get, create, update and delete A1 Policy Instances. Also used to query A1 Policy Types. + name: A1 Policy Management +- description: | + API used to get information about registered Near-RT RICs. + name: NearRT-RIC Repository +- description: | + API used to manage registered services, and control their keep-alive status via heart-beat messages. + name: Service Registry and Supervision +- description: | + API used to get the health status and statistics of this service. + name: Health Check +- description: | + API used to create or fetch the application configuration. + name: Configuration paths: /status: get: - operationId: getStatus description: Returns status and statistics of this service - summary: Get Status (getStatus) - tags: - - Health Check + operationId: getStatus responses: "200": content: application/json: - schema: - $ref: '#/components/schemas/StatusInfo' examples: status_info: $ref: '#/components/examples/StatusInfo' + schema: + $ref: '#/components/schemas/StatusInfo' description: OK- Service is living Ok "404": - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + summary: Get Status (getStatus) + tags: + - Health Check /rics/{ricId}: get: - operationId: getRic description: Get information about a Near-RT RIC - summary: Get a Near-RT RIC (getRic) - tags: - - NearRT-RIC Repository + operationId: getRic parameters: - - description: The identity of a Near-RT RIC to get information for. - explode: true - in: path - name: ricId - required: true - schema: - type: string - nullable: false - - description: Specifies the content type that the client expects to receive in response to the request. - Only application/json is allowed. - in: header - name: Accept - schema: - type: string - example: application/json + - description: The identity of a Near-RT RIC to get information for. + explode: true + in: path + name: ricId + required: true + schema: + nullable: false + type: string + - description: Specifies the content type that the client expects to receive + in response to the request. Only application/json is allowed. + in: header + name: Accept + schema: + example: application/json + type: string responses: "200": content: application/json: - schema: - $ref: '#/components/schemas/RicInfo' examples: ric_info: $ref: '#/components/examples/RicInfo' + schema: + $ref: '#/components/schemas/RicInfo' description: OK - Near-RT RIC is found OK "404": - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + summary: Get a Near-RT RIC (getRic) + tags: + - NearRT-RIC Repository /rics: get: - operationId: getRics description: Get all Near-RT RICs that supports a given A1 Policy Type ID - summary: Get Near-RT RICs for A1 Policy Type (getRics) - tags: - - NearRT-RIC Repository + operationId: getRics parameters: - - description: > - The identity of an A1 Policy Type. If given, all Near-RT RICs supporting - the A1 Policy Type are returned. - explode: true - in: query - name: policyTypeId - required: false - schema: - type: string - style: form - - description: Specifies the content type that the client expects to receive in response to the request. - Only application/json is allowed. - in: header - name: Accept - schema: - type: string - example: application/json + - description: | + The identity of an A1 Policy Type. If given, all Near-RT RICs supporting the A1 Policy Type are returned. + explode: true + in: query + name: policyTypeId + required: false + schema: + type: string + style: form + - description: Specifies the content type that the client expects to receive + in response to the request. Only application/json is allowed. + in: header + name: Accept + schema: + example: application/json + type: string responses: "200": content: application/json: - schema: - $ref: '#/components/schemas/RicInfoList' examples: ric_info_list: $ref: '#/components/examples/RicInfoList' + schema: + $ref: '#/components/schemas/RicInfoList' description: OK "404": - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + summary: Get Near-RT RICs for A1 Policy Type (getRics) + tags: + - NearRT-RIC Repository /policy-types: get: description: Query A1 Policy Type identities using query parameters operationId: getPolicyTypes - summary: Get A1 Policy Types (getPolicyTypes) - tags: - - A1 Policy Management parameters: - - description: Select types for the given Near-RT RIC identity. - explode: true - in: query - name: nearRtRicId - required: false - schema: - type: string - style: form - - description: Select types compatible with the given type name (type identity has the format 'typename_version') - explode: true - in: query - name: typeName - required: false - schema: - type: string - style: form - - description: > - Select types that are compatible with the given version. This - parameter is only applicable in conjunction with typeName. As an example - version 1.9.1 is compatible with 1.0.0 but not the other way around. Matching - types will be returned sorted in ascending order. - explode: true - in: query - name: compatibleWithVersion - required: false - schema: - type: string - style: form - - description: Specifies the content type that the client expects to receive in response to the request. - Only application/json is allowed. - in: header - name: Accept - schema: - type: string - example: application/json + - description: Select types for the given Near-RT RIC identity. + explode: true + in: query + name: nearRtRicId + required: false + schema: + type: string + style: form + - description: Select types compatible with the given type name (type identity + has the format 'typename_version') + explode: true + in: query + name: typeName + required: false + schema: + type: string + style: form + - description: | + Select types that are compatible with the given version. This parameter is only applicable in conjunction with typeName. As an example version 1.9.1 is compatible with 1.0.0 but not the other way around. Matching types will be returned sorted in ascending order. + explode: true + in: query + name: compatibleWithVersion + required: false + schema: + type: string + style: form + - description: Specifies the content type that the client expects to receive + in response to the request. Only application/json is allowed. + in: header + name: Accept + schema: + example: application/json + type: string responses: - '200': + "200": content: application/json: + examples: + PolicyTypeInformation: + $ref: '#/components/examples/PolicyTypeInformation' schema: items: $ref: '#/components/schemas/PolicyTypeInformation' type: array - examples: - PolicyTypeInformation: - $ref: '#/components/examples/PolicyTypeInformation' description: OK - Policy Type IDs found Ok - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '429': - $ref: '#/components/responses/429' - '500': - $ref: '#/components/responses/500' - '502': - $ref: '#/components/responses/502' - '503': - $ref: '#/components/responses/503' + "400": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Request + "401": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized + "403": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Forbidden + "404": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + "406": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Acceptable + "429": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Too Many Requests + "500": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error + "502": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Gateway + "503": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable + summary: Get A1 Policy Types (getPolicyTypes) + tags: + - A1 Policy Management /policy-types/{policyTypeId}: get: - operationId: getPolicyTypeDefinition description: Get an A1 Policy Type definition using its policy type ID - summary: Get an A1 Policy Type definition (getPolicyTypeDefinition) - tags: - - A1 Policy Management + operationId: getPolicyTypeDefinition parameters: - - explode: false - in: path - name: policyTypeId - required: true - schema: - type: string - style: simple - - description: Specifies the content type that the client expects to receive in response to the request. - Only application/json is allowed. - in: header - name: Accept - schema: - type: string - example: application/json + - explode: false + in: path + name: policyTypeId + required: true + schema: + type: string + style: simple + - description: Specifies the content type that the client expects to receive + in response to the request. Only application/json is allowed. + in: header + name: Accept + schema: + example: application/json + type: string responses: - '200': + "200": content: application/json: - schema: - $ref: '#/components/schemas/PolicyTypeObject' examples: PolicyTypeObject: $ref: '#/components/examples/PolicyTypeObject' + schema: + $ref: '#/components/schemas/PolicyTypeObject' description: OK - details and schema of the requested A1 Policy Type - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '429': - $ref: '#/components/responses/429' - '500': - $ref: '#/components/responses/500' - '502': - $ref: '#/components/responses/502' - '503': - $ref: '#/components/responses/503' - /policies/{policyId}: - put: - operationId: putPolicy - description: Update an existing A1 Policy instance's policy data using its policy ID. - summary: Update an A1 Policy's policy data (putPolicy) + "400": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Request + "401": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized + "403": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Forbidden + "404": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + "406": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Acceptable + "429": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Too Many Requests + "500": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error + "502": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Gateway + "503": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable + summary: Get an A1 Policy Type definition (getPolicyTypeDefinition) tags: - - A1 Policy Management + - A1 Policy Management + /policies/{policyId}: + delete: + description: Delete an existing A1 Policy instance using its policy ID. + operationId: deletePolicy parameters: - - name: policyId - in: path - required: true - schema: - type: string - requestBody: + - explode: false + in: path + name: policyId required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyObject' - examples: - policyObject: - $ref: '#/components/examples/PolicyObject' + schema: + type: string + style: simple + - description: Specifies the content type that the client expects to receive + in response to the request. Only application/json is allowed. + in: header + name: Accept + schema: + example: application/json + type: string responses: - '200': + "204": + description: No Content + "400": content: - application/json: + application/problem+json: schema: - $ref: '#/components/schemas/PolicyObject' - description: OK - Policy updated - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '411': - $ref: '#/components/responses/411' - '413': - $ref: '#/components/responses/413' - '415': - $ref: '#/components/responses/415' - '423': - $ref: '#/components/responses/Locked' - '429': - $ref: '#/components/responses/429' - '500': - $ref: '#/components/responses/500' - '502': - $ref: '#/components/responses/502' - '503': - $ref: '#/components/responses/503' - delete: - operationId: deletePolicy - description: Delete an existing A1 Policy instance using its policy ID. + $ref: '#/components/schemas/ProblemDetails' + description: Bad Request + "401": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized + "403": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Forbidden + "404": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + "405": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Method Not Allowed + "406": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Acceptable + "423": + content: + application/problem+json: + example: + status: 423 + title: Locked + detail: State is Locked in the provided request. + schema: + $ref: '#/components/schemas/ErrorInformation' + description: Locked - HTTP Status code which can be used when the state + is Locked + "429": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Too Many Requests + "500": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error + "502": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Gateway + "503": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable summary: Delete an A1 Policy instance (deletePolicy) tags: - - A1 Policy Management - parameters: - - explode: false - in: path - name: policyId - required: true - schema: - type: string - style: simple - - description: Specifies the content type that the client expects to receive in response to the request. - Only application/json is allowed. - in: header - name: Accept - schema: - type: string - example: application/json - responses: - '204': - description: 'No Content' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '405': - $ref: '#/components/responses/405' - '406': - $ref: '#/components/responses/406' - '423': - $ref: '#/components/responses/Locked' - '429': - $ref: '#/components/responses/429' - '500': - $ref: '#/components/responses/500' - '502': - $ref: '#/components/responses/502' - '503': - $ref: '#/components/responses/503' + - A1 Policy Management get: - operationId: getPolicy description: Get an A1 Policy instance's policy data using its policy ID - summary: Get an A1 Policy's policy data (getPolicy) - tags: - - A1 Policy Management + operationId: getPolicy parameters: - - explode: false - in: path - name: policyId - required: true - schema: - type: string - style: simple - - description: Specifies the content type that the client expects to receive in response to the request. - Only application/json is allowed. - in: header - name: Accept - schema: - type: string - example: application/json + - explode: false + in: path + name: policyId + required: true + schema: + type: string + style: simple + - description: Specifies the content type that the client expects to receive + in response to the request. Only application/json is allowed. + in: header + name: Accept + schema: + example: application/json + type: string responses: - '200': + "200": content: application/json: - schema: - $ref: '#/components/schemas/PolicyObject' examples: policyObject: $ref: '#/components/examples/PolicyObject' + schema: + $ref: '#/components/schemas/PolicyObject' description: OK - Policy found - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '429': - $ref: '#/components/responses/429' - '500': - $ref: '#/components/responses/500' - '502': - $ref: '#/components/responses/502' - '503': - $ref: '#/components/responses/503' - /policies/{policyId}/status: - get: - operationId: getPolicyStatus - description: Retrieve the status information for an A1 Policy Instance using its policy ID. - summary: Get an A1 Policy Instance's status (getPolicyStatus) - tags: - - A1 Policy Management - parameters: - - explode: false - in: path - name: policyId - required: true - schema: - type: string - style: simple - - description: Specifies the content type that the client expects to receive in response to the request. - Only application/json is allowed. - in: header - name: Accept - schema: - type: string - example: application/json - responses: - '200': + "400": content: - application/json: + application/problem+json: schema: - $ref: '#/components/schemas/PolicyStatusObject' - description: OK - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '429': - $ref: '#/components/responses/429' - '500': - $ref: '#/components/responses/500' - '502': - $ref: '#/components/responses/502' - '503': - $ref: '#/components/responses/503' - /policies: - get: - operationId: getAllPolicies - description: > - Returns a collection of A1 Policy Instance IDs for policies that match given search criteria. - If several query parameters are defined, the policies matching all conditions are returned. - summary: Query for A1 Policy instances (getAllPolicies) - tags: - - A1 Policy Management - parameters: - - description: Select policies with a given A1 Policy Type ID. - explode: true - in: query - name: policyTypeId - required: false - schema: - type: string - style: form - - description: Select policies for a given Near-RT RIC identity. - explode: true - in: query - name: nearRtRicId - required: false - schema: - type: string - style: form - - description: Select policies owned by a given service (registered or unregistered). - explode: true - in: query - name: serviceId - required: false - schema: - type: string - style: form - - description: Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). - explode: true - in: query - name: typeName - required: false - schema: - type: string - style: form - - description: Specifies the content type that the client expects to receive in response to the request. - Only application/json is allowed. - in: header - name: Accept - schema: - type: string - example: application/json - responses: - '200': + $ref: '#/components/schemas/ProblemDetails' + description: Bad Request + "401": content: - application/json: + application/problem+json: schema: - items: - $ref: '#/components/schemas/PolicyInformation' - type: array - description: OK - Policy identities - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '429': - $ref: '#/components/responses/429' - '500': - $ref: '#/components/responses/500' - '502': - $ref: '#/components/responses/502' - '503': - $ref: '#/components/responses/503' - post: - operationId: createPolicy - description: Create an A1 Policy Instance - summary: Create an A1 Policy Instance (createPolicy) + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized + "403": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Forbidden + "404": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + "406": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Acceptable + "429": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Too Many Requests + "500": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error + "502": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Gateway + "503": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable + summary: Get an A1 Policy's policy data (getPolicy) tags: - - A1 Policy Management + - A1 Policy Management + put: + description: Update an existing A1 Policy instance's policy data using its policy + ID. + operationId: updatePolicy + parameters: + - in: path + name: policyId + required: true + schema: + type: string requestBody: + content: + application/json: + examples: + policyObject: + $ref: '#/components/examples/PolicyObject' + schema: + $ref: '#/components/schemas/PolicyObject' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyObject' + description: OK - Policy updated + "400": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Request + "401": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized + "403": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Forbidden + "404": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + "406": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Acceptable + "411": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Length Required + "413": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Payload Too Large + "415": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unsupported Media Type + "423": + content: + application/problem+json: + example: + status: 423 + title: Locked + detail: State is Locked in the provided request. + schema: + $ref: '#/components/schemas/ErrorInformation' + description: Locked - HTTP Status code which can be used when the state + is Locked + "429": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Too Many Requests + "500": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error + "502": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Gateway + "503": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable + summary: Update an A1 Policy's policy data (updatePolicy) + tags: + - A1 Policy Management + /policies/{policyId}/status: + get: + description: Retrieve the status information for an A1 Policy Instance using + its policy ID. + operationId: getPolicyStatus + parameters: + - explode: false + in: path + name: policyId required: true + schema: + type: string + style: simple + - description: Specifies the content type that the client expects to receive + in response to the request. Only application/json is allowed. + in: header + name: Accept + schema: + example: application/json + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyStatusObject' + description: OK + "400": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Request + "401": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized + "403": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Forbidden + "404": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + "406": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Acceptable + "429": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Too Many Requests + "500": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error + "502": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Gateway + "503": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable + summary: Get an A1 Policy Instance's status (getPolicyStatus) + tags: + - A1 Policy Management + /policies: + get: + description: | + Returns a collection of A1 Policy Instance IDs for policies that match given search criteria. If several query parameters are defined, the policies matching all conditions are returned. + operationId: getPolicyIds + parameters: + - description: Select policies with a given A1 Policy Type ID. + explode: true + in: query + name: policyTypeId + required: false + schema: + type: string + style: form + - description: Select policies for a given Near-RT RIC identity. + explode: true + in: query + name: nearRtRicId + required: false + schema: + type: string + style: form + - description: Select policies owned by a given service (registered or unregistered). + explode: true + in: query + name: serviceId + required: false + schema: + type: string + style: form + - description: Select policies of a given A1 Policy Type name (type identity + has the format 'typename_version'). + explode: true + in: query + name: typeName + required: false + schema: + type: string + style: form + - description: Specifies the content type that the client expects to receive + in response to the request. Only application/json is allowed. + in: header + name: Accept + schema: + example: application/json + type: string + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/PolicyInformation' + type: array + description: OK - Policy identities + "400": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Request + "401": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized + "403": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Forbidden + "404": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + "406": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Acceptable + "429": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Too Many Requests + "500": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error + "502": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Gateway + "503": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable + summary: Query for A1 Policy instances (getPolicyIds) + tags: + - A1 Policy Management + post: + description: Create an A1 Policy Instance + operationId: createPolicy + requestBody: content: application/json: schema: $ref: '#/components/schemas/PolicyObjectInformation' + required: true responses: - '201': - description: 'Created' + "201": content: application/json: schema: $ref: '#/components/schemas/PolicyObjectInformation' + description: Created headers: Location: - description: > - Contains the URI of the newly created A1 Policy Instances. - This URI includes the A1 Policy Instance ID for the newly - created policy instance. + description: | + Contains the URI of the newly created A1 Policy Instances. This URI includes the A1 Policy Instance ID for the newly created policy instance. required: true schema: type: string Content-Type: - description: 'Media Type of the response' + description: Media Type of the response schema: - type: string example: application/json - - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '405': - $ref: '#/components/responses/405' - '406': - $ref: '#/components/responses/406' - '409': - $ref: '#/components/responses/409' - '413': - $ref: '#/components/responses/413' - '415': - $ref: '#/components/responses/415' - '423': - $ref: '#/components/responses/Locked' - '429': - $ref: '#/components/responses/429' - '500': - $ref: '#/components/responses/500' - '502': - $ref: '#/components/responses/502' - '503': - $ref: '#/components/responses/503' + type: string + "400": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Request + "401": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized + "403": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Forbidden + "404": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + "405": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Method Not Allowed + "406": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Acceptable + "409": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Conflict + "413": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Payload Too Large + "415": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unsupported Media Type + "423": + content: + application/problem+json: + example: + status: 423 + title: Locked + detail: State is Locked in the provided request. + schema: + $ref: '#/components/schemas/ErrorInformation' + description: Locked - HTTP Status code which can be used when the state + is Locked + "429": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Too Many Requests + "500": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error + "502": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Gateway + "503": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable + summary: Create an A1 Policy Instance (createPolicy) + tags: + - A1 Policy Management /configuration: get: - operationId: getConfiguration description: Returns the entire contents of the Application Configuration. - tags: - - Configuration - summary: Get the Application Configuration (getConfiguration) + operationId: getConfiguration responses: "200": content: @@ -646,17 +1003,18 @@ paths: type: string description: OK - Application configuration received "404": - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + summary: Get the Application Configuration (getConfiguration) + tags: + - Configuration put: + description: | + Replace the current Application Configuration with a new configuration. The new configuration, if accepted, will take effect after a short delay. The new configuration must comply with the Application Configuration schema, which can be found from the the Application Documentation (Developer Guide) operationId: putConfiguration - description: > - Replace the current Application Configuration with a new configuration. - The new configuration, if accepted, will take effect after a short delay. - The new configuration must comply with the Application Configuration schema, - which can be found from the the Application Documentation (Developer Guide) - tags: - - Configuration - summary: Set/Replace the Application Configuration (putConfiguration) requestBody: content: application/json: @@ -666,139 +1024,110 @@ paths: responses: "200": content: - 'application/json': + application/json: schema: $ref: '#/components/schemas/void' description: OK - Configuration updated "400": - $ref: '#/components/responses/400' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Request + summary: Set/Replace the Application Configuration (putConfiguration) + tags: + - Configuration /services/{serviceId}/keepalive: put: + description: "A registered service should invoke this operation regularly to\ + \ indicate that it is still alive. If a registered service fails to invoke\ + \ some operation, or this operation, before the end of a timeout period the\ + \ service will be deregistered and all its A1 policies wil be removed and\ + \ the service is deleted. This operation is only intended for registered services.\ + \ (This timeout can be set or disabled when each service is initially registered).\ + \ Unregistered services do not need to invoke this operation, since the optional\ + \ keep-alive monitoring feature can only be enabled for registered services." operationId: keepAliveService - description: A registered service should invoke this operation regularly to - indicate that it is still alive. If a registered service fails to invoke some operation, - or this operation, before the end of a timeout period the service will be deregistered - and all its A1 policies wil be removed and the service is deleted. - This operation is only intended for registered services. (This timeout can be set or disabled when - each service is initially registered). Unregistered services do not need to invoke this operation, - since the optional keep-alive monitoring feature can only be enabled for registered services. - summary: Heartbeat message from a service (keepAliveService) - tags: - - Service Registry and Supervision parameters: - - explode: false - in: path - name: serviceId - required: true - schema: - type: string - style: simple - - description: Specifies the content type that the client expects to receive in response to the request. - Only application/json is allowed. - in: header - name: Accept - schema: - type: string - example: application/json - requestBody: - required: false - content: - application/json: - schema: - type: string + - explode: false + in: path + name: serviceId + required: true + schema: + type: string + style: simple + - description: Specifies the content type that the client expects to receive + in response to the request. Only application/json is allowed. + in: header + name: Accept + schema: + example: application/json + type: string responses: "200": content: - 'application/json': + application/json: schema: type: object - description: OK - Service supervision timer refreshed, OK + description: "OK - Service supervision timer refreshed, OK" "404": - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + summary: Heartbeat message from a service (keepAliveService) + tags: + - Service Registry and Supervision /services: get: + description: | + Get information about all registered services, or a single registered service. If the service ID of a registered service is included in the query, information about that service is returned. Otherwise Information about all registered is returned. This operation does not retrieve information about unregistered services. operationId: getServices - description: > - Get information about all registered services, or a single registered service. - If the service ID of a registered service is included in the query, information about that - service is returned. Otherwise Information about all registered is returned. - This operation does not retrieve information about unregistered services. - summary: Get Services (getServices) - tags: - - Service Registry and Supervision parameters: - - description: The identity of the registered service - explode: true - in: query - name: serviceId - required: false - schema: - type: string - style: form - - description: Specifies the content type that the client expects to receive in response to the request. - Only application/json is allowed. - in: header - name: Accept - schema: - type: string - example: application/json + - description: The identity of the registered service + explode: true + in: query + name: serviceId + required: false + schema: + type: string + style: form + - description: Specifies the content type that the client expects to receive + in response to the request. Only application/json is allowed. + in: header + name: Accept + schema: + example: application/json + type: string responses: "200": content: application/json: - schema: - $ref: '#/components/schemas/ServiceStatusList' examples: service_status_list: $ref: '#/components/examples/ServiceStatusList' + schema: + $ref: '#/components/schemas/ServiceStatusList' description: OK "404": - $ref: '#/components/responses/404' - put: - operationId: putService - description: > - Register a single service, or update a previous registration. - Service registration is required to get callbacks about available NearRT RICs - and to enable supervision of the service's active status. If a registered - service becomes inactive, its policies can be automatically deleted. - A1 Policy instances can also be created for unregistered services. - If an unregistered service is later registered, the service's policies are - retained when the service becomes registered. This feature is optional to use. - summary: Register or update a Service (putService) - tags: - - Service Registry and Supervision - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ServiceRegistrationInfo' - required: true - responses: - "200": - content: - 'application/json': - schema: - type: object - description: OK - Service updated - "201": content: - 'application/json': + application/problem+json: schema: - type: object - description: Created - Service created - "400": - $ref: '#/components/responses/400' + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + summary: Get Services (getServices) + tags: + - Service Registry and Supervision + put: callbacks: RICStatus: - "{$request.body#/callback_url}": + '{$request.body#/callback_url}': post: + description: "Callouts to indicate Near-RT RIC status changes relevant\ + \ for Services. \nThe URL invoked by this callback is provided at\ + \ Service registration.\n" operationId: serviceCallback - description: | - Callouts to indicate Near-RT RIC status changes relevant for Services. - The URL invoked by this callback is provided at Service registration. - summary: Callback for Near-RT RIC status (serviceCallback) - tags: - - Service Registry and Supervision requestBody: content: application/json: @@ -813,57 +1142,84 @@ paths: $ref: '#/components/schemas/void' description: OK "404": - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + summary: Callback for Near-RT RIC status (serviceCallback) + tags: + - Service Registry and Supervision + x-callback-request: true + description: | + Register a single service, or update a previous registration. Service registration is required to get callbacks about available NearRT RICs and to enable supervision of the service's active status. If a registered service becomes inactive, its policies can be automatically deleted. A1 Policy instances can also be created for unregistered services. If an unregistered service is later registered, the service's policies are retained when the service becomes registered. This feature is optional to use. + operationId: putService + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceRegistrationInfo' + required: true + responses: + "200": + content: + application/json: + schema: + type: object + description: OK - Service updated + "201": + content: + application/json: + schema: + type: object + description: Created - Service created + "400": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Request + summary: Register or update a Service (putService) + tags: + - Service Registry and Supervision /services/{serviceId}: delete: + description: | + Unregister a registered Service using its service ID. Only registered services can be unregistered. All A1 Policy Instances for the previously registered service will be removed. operationId: deleteService - description: > - Unregister a registered Service using its service ID. - Only registered services can be unregistered. All A1 Policy Instances - for the previously registered service will be removed. - tags: - - Service Registry and Supervision - summary: Unregister a Service (deleteService) parameters: - - explode: false - in: path - name: serviceId - required: true - schema: - type: string - style: simple - - description: Specifies the content type that the client expects to receive in response to the request. - Only application/json is allowed. - in: header - name: Accept - schema: - type: string - example: application/json + - explode: false + in: path + name: serviceId + required: true + schema: + type: string + style: simple + - description: Specifies the content type that the client expects to receive + in response to the request. Only application/json is allowed. + in: header + name: Accept + schema: + example: application/json + type: string responses: "204": content: - 'application/json': + application/json: schema: type: object description: No Content - Service unregistered "404": - $ref: '#/components/responses/404' - + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + summary: Unregister a Service (deleteService) + tags: + - Service Registry and Supervision components: - examples: - ServiceStatusList: - description: List of service information - value: - serviceList: - - callbackUrl: http://callback.url - serviceId: serviceId1 - keepAliveIntervalSeconds: 0 - timeSinceLastActivitySeconds: 6 - - callbackUrl: http://callback.url - serviceId: serviceId2 - keepAliveIntervalSeconds: 500 - timeSinceLastActivitySeconds: 401 StatusInfo: value: status: success @@ -871,61 +1227,33 @@ components: value: ricId: ricId1 managedElementIds: - - "Note #1" - - "Athlone small cells" - - "Some optional string" + - "Note #1" + - Athlone small cells + - Some optional string state: UNAVAILABLE policyTypeIds: - - policyTypeId1 - - policyTypeId2 + - policyTypeId1 + - policyTypeId2 RicInfoList: value: rics: - - ricId: ricId1 - managedElementIds: - - "Note #1" - - "Athlone small cells" - - "Fake Cells" - state: UNAVAILABLE - policyTypeIds: - - policyTypeId1 - - policyTypeId2 - - ricId: ricId2 - managedElementIds: - - "My test element" - - "Another test element" - state: UNAVAILABLE - policyTypeIds: - - policyTypeId3 - - policyTypeId4 - PolicyObject: - value: - scope: - ueId: - guRanUeId: - globalGnbId: - plmnId: - mcc: "123" - mnc: "45" - gnbId: - gnbIdLength: 24 - gnbIdValue: 12345678 - RanUeId: 'a31c510b20e64a74' - groupId: - spId: 123 - qosId: - 5qI: 1 - cellId: - plmnId: - mcc: "123" - mnc: "45" - cId: - ncI: 123 - qosObjectives: - gfbr: 100 - mfbr: 200 - priorityLevel: 3 - pdb: 50 + - ricId: ricId1 + managedElementIds: + - "Note #1" + - Athlone small cells + - Fake Cells + state: UNAVAILABLE + policyTypeIds: + - policyTypeId1 + - policyTypeId2 + - ricId: ricId2 + managedElementIds: + - My test element + - Another test element + state: UNAVAILABLE + policyTypeIds: + - policyTypeId3 + - policyTypeId4 PolicyTypeInformation: value: - policyTypeId: STD_QOS2_0.1.0 @@ -939,7 +1267,7 @@ components: PolicyTypeObject: value: policySchema: - "$schema": http://json-schema.org/draft-07/schema# + $schema: http://json-schema.org/draft-07/schema# title: STD_QOS_0_2_0 description: STD QOS2 policy type type: object @@ -953,8 +1281,8 @@ components: type: string additionalProperties: false required: - - ueId - - qosId + - ueId + - qosId qosObjectives: type: object properties: @@ -962,173 +1290,184 @@ components: type: number additionalProperties: false required: - - priorityLevel - + - priorityLevel + PolicyObject: + value: + scope: + ueId: + guRanUeId: + globalGnbId: + plmnId: + mcc: "123" + mnc: "45" + gnbId: + gnbIdLength: 24 + gnbIdValue: 12345678 + RanUeId: a31c510b20e64a74 + groupId: + spId: 123 + qosId: + "5qI": 1 + cellId: + plmnId: + mcc: "123" + mnc: "45" + cId: + ncI: 123 + qosObjectives: + gfbr: 100 + mfbr: 200 + priorityLevel: 3 + pdb: 50 + ServiceStatusList: + description: List of service information + value: + serviceList: + - callbackUrl: http://callback.url + serviceId: serviceId1 + keepAliveIntervalSeconds: 0 + timeSinceLastActivitySeconds: 6 + - callbackUrl: http://callback.url + serviceId: serviceId2 + keepAliveIntervalSeconds: 500 + timeSinceLastActivitySeconds: 401 + responses: + "404": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + "400": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Request + "401": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized + "403": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Forbidden + "406": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Acceptable + "429": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Too Many Requests + "500": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error + "502": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Gateway + "503": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable + "411": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Length Required + "413": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Payload Too Large + "415": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unsupported Media Type + Locked: + content: + application/problem+json: + example: + status: 423 + title: Locked + detail: State is Locked in the provided request. + schema: + $ref: '#/components/schemas/ErrorInformation' + description: Locked - HTTP Status code which can be used when the state is Locked + "405": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Method Not Allowed + "409": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Conflict schemas: - PolicyTypeInformation: - description: >- - A data tuple to indicate that an identified A1 Policy Type is supported at an identified Near-RT RIC. - type: object + StatusInfo: + example: + status: status properties: - policyTypeId: - description: A1 Policy Type identifier + status: + description: Status text type: string - nearRtRicId: - $ref: '#/components/schemas/NearRtRicId' - required: - - policyTypeId - - nearRtRicId - example: - policyTypeId: STD_QOS2_0.1.0 - nearRtRicId: ric_g3_2 - PolicyObjectInformation: - description: Information to create an A1 Policy Instance type: object + ProblemDetails: + description: Object to carry details about a problem in an HTTP response according + to IETF RFC 7807 properties: - nearRtRicId: - description: Identity of the target Near-RT RIC - type: string - example: - 'Near-RT-Ric-ID1' - transient: - default: false - description: > - If true, the policy is automatically deleted if the targeted Near-RT RIC restarts - or recovers. If false, the A1 Policy Instance remains, and is re-pushed to the targeted - Near-RT RIC after a restart or recovery. If false, the A1 Policy Instance is maintained and - must be deleted separately in the event of Near-RT RIC restart or recovery. Default is false. - nullable: false - type: boolean - policyId: - description: > - An optional identity to be used for the new A1 Policy Instance. - If this value is present, it must be unique. If not present the new A1 - Policy Instance will be assigned a newly generated unique ID, and the - new ID can be extracted from the 'Location' header in the response. - type: string - example: - 'POLICY-ID1' - serviceId: - description: the identity of the service owning the policy. This can be - used to group the policies (it is possible to get all policies associated - to a service). Note that the service does not need to be registered. - If the service is registered, the newly created A1 Policy Instance will be - subject to the same supervision rules as the the service's other policies. + type: + description: URI reference according to IETF RFC 3986 that identifies the + problem type type: string - example: - 'rApp 1' - default: "" - policyObject: - $ref: '#/components/schemas/PolicyObject' - policyTypeId: - description: A1 Policy Type identity + title: + description: Human-readable summary of the problem type type: string - example: ORAN_QOS_1.0.0 '(typeName_SemVersion)' - required: - - nearRtRicId - - policyObject - - policyTypeId - ErrorInformation: - description: Problem as defined in https://tools.ietf.org/html/rfc7807 - properties: + status: + description: HTTP status code + type: number detail: - description: A human-readable explanation specific to this occurrence of the problem. - example: Policy type not found + description: Human-readable explanation type: string - title: - description: A specific error name - type: string - example: Not Found - status: - description: | - The HTTP status code generated by the origin server for this occurrence of the problem. - example: 404 - format: int32 - type: integer - type: object - PolicyObject: - description: > - Policy Object is a JSON representation policy data for an A1 Policy Instance. - The schema for this policy data is defined in the corresponding A1 Policy Type. - type: object - PolicyTypeObject: - description: An A1 Policy Type, as defined in O-RAN Alliance A1TD - type: object - properties: - policySchema: - $ref: '#/components/schemas/PolicySchema' - statusSchema: - $ref: '#/components/schemas/StatusSchema' - required: - - policySchema - example: - policySchema: - "$schema": http://json-schema.org/draft-07/schema# - title: STD_QOS_0_2_0 - description: Policy data schema for STD_QOS_0.2.0 A1 Policy Instances. - type: object - properties: - scope: - type: object - properties: - ueId: - type: string - qosId: - type: string - additionalProperties: false - required: - - ueId - - qosId - qosObjectives: - type: object - properties: - priorityLevel: - type: number - additionalProperties: false - required: - - priorityLevel - statusSchema: - "$schema": http://json-schema.org/draft-07/schema# - title: STD_QOS_0.2.0 - description: Status schema for STD_QOS_0.2.0 A1 Policy Instances. - type: object - properties: - enforceStatus: - type: string - enforceReason: - type: string - additionalProperties: false - required: - - enforceStatus - PolicySchema: - description: > - A schema to define the policy data contents of A1 Policy Instances. - Policy data schemas are Policy Type specific. - All A1 Policy Instances of an A1 Policy Type should comply with the type's policy data schema. - type: object - StatusSchema: - description: > - A schema to define the contents of the status information for A1 Policy Instances. - Status schemas are Policy Type specific. - All status information for all A1 Policy Instances of an A1 Policy Type should comply - with the type's status schema. - type: object - PolicyStatusObject: - description: > - A generic policy status object that can be used to transport any policy status. - Additionally, a schema for policy status can be defined in the corresponding A1 Policy Type. - type: object - void: - description: Void/empty - type: object - StatusInfo: - properties: - status: - description: Status text + instance: + description: URI reference that identifies the specific occurrence of the + problem type: string type: object RicInfo: description: Information for a Near-RT RIC + example: + ricId: ricId + policyTypeIds: + - policyTypeIds + - policyTypeIds + managedElementIds: + - managedElementIds + - managedElementIds + state: UNAVAILABLE properties: ricId: description: Identity of the Near-RT RIC @@ -1142,10 +1481,10 @@ components: state: description: Represents the state of a Near-RT RIC enum: - - UNAVAILABLE - - AVAILABLE - - SYNCHRONIZING - - CONSISTENCY_CHECK + - UNAVAILABLE + - AVAILABLE + - SYNCHRONIZING + - CONSISTENCY_CHECK type: string policyTypeIds: description: Supported A1 Policy Types @@ -1154,31 +1493,235 @@ components: type: string type: array type: object - ServiceRegistrationInfo: - description: Information for a service to be registered + RicInfoList: + description: Collection of Near-RT RIC information objects + example: + rics: + - ricId: ricId + policyTypeIds: + - policyTypeIds + - policyTypeIds + managedElementIds: + - managedElementIds + - managedElementIds + state: UNAVAILABLE + - ricId: ricId + policyTypeIds: + - policyTypeIds + - policyTypeIds + managedElementIds: + - managedElementIds + - managedElementIds + state: UNAVAILABLE properties: - callbackUrl: - description: Callback URL for notifying of Near-RT RIC state changes + rics: + description: List of Near-RT RIC information objects + items: + $ref: '#/components/schemas/RicInfo' + type: array + type: object + PolicyTypeInformation: + description: A data tuple to indicate that an identified A1 Policy Type is supported + at an identified Near-RT RIC. + example: + policyTypeId: STD_QOS2_0.1.0 + nearRtRicId: ric_g3_2 + properties: + policyTypeId: + description: A1 Policy Type identifier type: string - serviceId: - description: Identity of the service + nearRtRicId: + description: Identity of the Near-RT RIC type: string - keepAliveIntervalSeconds: - description: > - Keep alive interval for the service. This is used to enable - optional heartbeat supervision of the service. If set (> 0) the registered - service should regularly invoke a 'keepalive' REST call. When a service - fails to invoke this 'keepalive' call within the configured time, the - service is considered unavailable. An unavailable service will be automatically - deregistered and its policies will be deleted. Value 0 means timeout - supervision is disabled. - format: int64 + required: + - nearRtRicId + - policyTypeId + type: object + NearRtRicId: + description: Identity of the Near-RT RIC + type: string + PolicyTypeObject: + description: "An A1 Policy Type, as defined in O-RAN Alliance A1TD" + example: + policySchema: + $schema: http://json-schema.org/draft-07/schema# + title: STD_QOS_0_2_0 + description: Policy data schema for STD_QOS_0.2.0 A1 Policy Instances. + type: object + properties: + scope: + type: object + properties: + ueId: + type: string + qosId: + type: string + additionalProperties: false + required: + - ueId + - qosId + qosObjectives: + type: object + properties: + priorityLevel: + type: number + additionalProperties: false + required: + - priorityLevel + statusSchema: + $schema: http://json-schema.org/draft-07/schema# + title: STD_QOS_0.2.0 + description: Status schema for STD_QOS_0.2.0 A1 Policy Instances. + type: object + properties: + enforceStatus: + type: string + enforceReason: + type: string + additionalProperties: false + required: + - enforceStatus + properties: + policySchema: + description: | + A schema to define the policy data contents of A1 Policy Instances. Policy data schemas are Policy Type specific. All A1 Policy Instances of an A1 Policy Type should comply with the type's policy data schema. + type: object + statusSchema: + description: | + A schema to define the contents of the status information for A1 Policy Instances. Status schemas are Policy Type specific. All status information for all A1 Policy Instances of an A1 Policy Type should comply with the type's status schema. + type: object + required: + - policySchema + type: object + PolicySchema: + description: | + A schema to define the policy data contents of A1 Policy Instances. Policy data schemas are Policy Type specific. All A1 Policy Instances of an A1 Policy Type should comply with the type's policy data schema. + type: object + StatusSchema: + description: | + A schema to define the contents of the status information for A1 Policy Instances. Status schemas are Policy Type specific. All status information for all A1 Policy Instances of an A1 Policy Type should comply with the type's status schema. + type: object + PolicyObject: + description: | + Policy Object is a JSON representation policy data for an A1 Policy Instance. The schema for this policy data is defined in the corresponding A1 Policy Type. + type: object + ErrorInformation: + description: Problem as defined in https://tools.ietf.org/html/rfc7807 + properties: + detail: + description: A human-readable explanation specific to this occurrence of + the problem. + example: Policy type not found + type: string + title: + description: A specific error name + example: Not Found + type: string + status: + description: | + The HTTP status code generated by the origin server for this occurrence of the problem. + example: 404 + format: int32 type: integer + type: object + PolicyStatusObject: + description: | + A generic policy status object that can be used to transport any policy status. Additionally, a schema for policy status can be defined in the corresponding A1 Policy Type. + type: object + PolicyInformation: + description: | + Information tuple for a single A1 Policy Instance. Contains the A1 Policy Instance ID, and the ID of the Near-RT RIC where the policy is created. + example: + policyId: policyId + nearRtRicId: nearRtRicId + properties: + policyId: + description: Identity of the A1 Policy Instance + type: string + nearRtRicId: + description: Identity of the Near-RT RIC + type: string + required: + - nearRtRicId + - policyId + type: object + PolicyObjectInformation: + description: Information to create an A1 Policy Instance + example: + policyId: POLICY-ID1 + nearRtRicId: Near-RT-Ric-ID1 + transient: false + policyObject: "{}" + serviceId: rApp 1 + policyTypeId: ORAN_QOS_1.0.0 '(typeName_SemVersion)' + properties: + nearRtRicId: + description: Identity of the target Near-RT RIC + example: Near-RT-Ric-ID1 + type: string + transient: + default: false + description: | + If true, the policy is automatically deleted if the targeted Near-RT RIC restarts or recovers. If false, the A1 Policy Instance remains, and is re-pushed to the targeted Near-RT RIC after a restart or recovery. If false, the A1 Policy Instance is maintained and must be deleted separately in the event of Near-RT RIC restart or recovery. Default is false. + nullable: false + type: boolean + policyId: + description: | + An optional identity to be used for the new A1 Policy Instance. If this value is present, it must be unique. If not present the new A1 Policy Instance will be assigned a newly generated unique ID, and the new ID can be extracted from the 'Location' header in the response. + example: POLICY-ID1 + type: string + serviceId: + default: "" + description: "the identity of the service owning the policy. This can be\ + \ used to group the policies (it is possible to get all policies associated\ + \ to a service). Note that the service does not need to be registered.\ + \ If the service is registered, the newly created A1 Policy Instance will\ + \ be subject to the same supervision rules as the the service's other\ + \ policies." + example: rApp 1 + type: string + policyObject: + description: | + Policy Object is a JSON representation policy data for an A1 Policy Instance. The schema for this policy data is defined in the corresponding A1 Policy Type. + type: object + policyTypeId: + description: A1 Policy Type identity + example: ORAN_QOS_1.0.0 '(typeName_SemVersion)' + type: string required: - - serviceId + - nearRtRicId + - policyObject + - policyTypeId + type: object + void: + description: Void/empty + type: object + ServiceStatusList: + example: + serviceList: + - keepAliveIntervalSeconds: 0 + callbackUrl: callbackUrl + timeSinceLastActivitySeconds: 6 + serviceId: serviceId + - keepAliveIntervalSeconds: 0 + callbackUrl: callbackUrl + timeSinceLastActivitySeconds: 6 + serviceId: serviceId + properties: + serviceList: + description: "List of Service Status objects, describing a collection of\ + \ registered services." + items: + $ref: '#/components/schemas/ServiceStatus' + type: array type: object ServiceStatus: description: Information about a previously registered service + example: + keepAliveIntervalSeconds: 0 + callbackUrl: callbackUrl + timeSinceLastActivitySeconds: 6 + serviceId: serviceId properties: callbackUrl: description: Callback URL for notifying of Near-RT RIC state changes @@ -1187,14 +1730,8 @@ components: description: Identity of the service type: string keepAliveIntervalSeconds: - description: > - Keep alive interval (seconds) for the service. This is used to enable - optional heartbeat supervision of the service. If set (> 0) the registered - service should regularly invoke a 'keepalive' REST call. When a service - fails to invoke this 'keepalive' call within the configured time, the - service is considered unavailable. An unavailable service will be automatically - deregistered and its policies will be deleted. Value 0 means timeout - supervision is disabled. + description: | + Keep alive interval (seconds) for the service. This is used to enable optional heartbeat supervision of the service. If set (> 0) the registered service should regularly invoke a 'keepalive' REST call. When a service fails to invoke this 'keepalive' call within the configured time, the service is considered unavailable. An unavailable service will be automatically deregistered and its policies will be deleted. Value 0 means timeout supervision is disabled. format: int64 type: integer timeSinceLastActivitySeconds: @@ -1202,171 +1739,44 @@ components: format: int64 type: integer type: object - RicInfoList: - description: Collection of Near-RT RIC information objects - properties: - rics: - description: List of Near-RT RIC information objects - items: - $ref: '#/components/schemas/RicInfo' - type: array - type: object - NearRtRicId: - description: Identity of the Near-RT RIC - type: string - PolicyInformation: - description: > - Information tuple for a single A1 Policy Instance. - Contains the A1 Policy Instance ID, and the ID of the Near-RT RIC where the policy is created. - type: object + ServiceRegistrationInfo: + description: Information for a service to be registered + example: + keepAliveIntervalSeconds: 0 + callbackUrl: callbackUrl + serviceId: serviceId properties: - policyId: - description: Identity of the A1 Policy Instance + callbackUrl: + description: Callback URL for notifying of Near-RT RIC state changes type: string - nearRtRicId: - $ref: '#/components/schemas/NearRtRicId' + serviceId: + description: Identity of the service + type: string + keepAliveIntervalSeconds: + description: | + Keep alive interval for the service. This is used to enable optional heartbeat supervision of the service. If set (> 0) the registered service should regularly invoke a 'keepalive' REST call. When a service fails to invoke this 'keepalive' call within the configured time, the service is considered unavailable. An unavailable service will be automatically deregistered and its policies will be deleted. Value 0 means timeout supervision is disabled. + format: int64 + type: integer required: - - policyId - - nearRtRicId - ServiceStatusList: - properties: - serviceList: - description: List of Service Status objects, describing a collection of registered services. - items: - $ref: '#/components/schemas/ServiceStatus' - type: array + - serviceId type: object ServiceCallbackInfo: - description: | - Information transferred in Service callbacks, - if a callback URL was provided for a registered service + description: "Information transferred in Service callbacks, \nif a callback\ + \ URL was provided for a registered service\n" + example: + ricId: ricId + eventType: AVAILABLE properties: ricId: description: Identity of a Near-RT RIC type: string eventType: - description: > - values: - AVAILABLE: the Near-RT RIC has become available for A1 Policy management + description: "values: \n AVAILABLE: the Near-RT RIC has become available\ + \ for A1 Policy management\n" enum: - - AVAILABLE + - AVAILABLE type: string required: - - eventType - - ricId - type: object - ProblemDetails: - description: Object to carry details about a problem in an HTTP response according to IETF RFC 7807 + - eventType + - ricId type: object - properties: - type: - description: URI reference according to IETF RFC 3986 that identifies the problem type - type: string - title: - description: Human-readable summary of the problem type - type: string - status: - description: HTTP status code - type: number - detail: - description: Human-readable explanation - type: string - instance: - description: URI reference that identifies the specific occurrence of the problem - type: string - - responses: - '400': - description: Bad Request - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - '401': - description: Unauthorized - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - '403': - description: Forbidden - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - '404': - description: Not Found - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - '405': - description: Method Not Allowed - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - '406': - description: Not Acceptable - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - '409': - description: Conflict - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - '411': - description: Length Required - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - '413': - description: Payload Too Large - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - '415': - description: Unsupported Media Type - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - '429': - description: Too Many Requests - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - '500': - description: Internal Server Error - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - '502': - description: Bad Gateway - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - '503': - description: Service Unavailable - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - Locked: - description: Locked - HTTP Status code which can be used when the state is Locked - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorInformation' - example: - status: 423 - title: Locked - detail: State is Locked in the provided request. diff --git a/a1-policy-management/api/offeredapis/swagger/pms-api.json b/a1-policy-management/api/offeredapis/swagger/pms-api.json index 036e7fea..c35456a6 100644 --- a/a1-policy-management/api/offeredapis/swagger/pms-api.json +++ b/a1-policy-management/api/offeredapis/swagger/pms-api.json @@ -3,14 +3,15 @@ "info" : { "contact" : { "email" : "discuss-list@onap.com", + "name" : "ONAP CCSDK Project", "url" : "https://www.onap.org/" }, - "description" : "

      General

      The ONAP CCSDK A1 Policy Management Service provides a REST API for managemecnt of A1 policies.
      The main tasks of the service are:

      • A1 Policy creation, modification and deletion.
      • Monitoring and maintaining consistency of the SMO view of A1 policies and the Near-RT RICs
      • Maintaining a view of supported Near-RT RIC policy types
      • Supervision of using services (R-APPs). When a service is unavailable, its policies are removed.

      APIs provided or defined by the service

      A1 Policy Management

      This is an API for management of A1 Policies.

      • A1 Policy retrieval, creation, modification and deletion.
      • Retrieval of supported A1 Policy types for a Near-RT RIC
      • Retrieval of status for existing A1 policies

      Management of configuration

      API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.

      Service callbacks

      These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.

      NearRT-RIC Repository

      This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted for one Near-RT RIC.

      Health Check

      API used for supervision of the PMS component.

      Service Registry and Supervision

      API used for registering services that uses PMS. Each A1 policy is optionally owned by a service. PMS can supervise each registered service by a heart-beat supervision and will automatically remove policies for unavailable services. Note that a service does not need to be registered in order to create A1 Policies. This is a feature that is optional to use.

      Authorization API

      API used for access control of A1 Policy access. If configured, an external authorization provider is requested to grant access to the A1 Policy type.

      Spring Boot Actuator

      Provides generic functions used to monitor and manage the Spring web application.

      ", + "description" : "

      General

      The ONAP CCSDK A1 Policy Management Service provides a REST API for managing A1 policies.
      This document describes an older pre-spec API set to perform tasks for:

      • A1 Policy creation, modification and deletion.
      • Monitoring and maintaining consistency of the SMO view of A1 Policies and the Near-RT RICs
      • Maintaining a view of each Near-RT RIC's supported A1 Policy Types
      • Supervision of registered services (rApps). When a registered service is unavailable, its policies are removed.

      APIs provided or defined by the service

      A1 Policy Management (Older pre-spec version)

      This is an older API for managing A1 Policies:

      • A1 Policy retrieval, creation, modification and deletion.
      • Retrieval of supported A1 Policy Types for a Near-RT RIC
      • Retrieval of status for existing A1 policies

      Management of configuration

      API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.

      Service Callbacks

      These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.

      NearRT-RIC Repository (Older version)

      This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted towards one Near-RT RIC.

      Health Check

      API used for supervision of the A1 Policy Management Service .

      Service Registry and Supervision

      API used for registering services/clients/rApps. Each A1 Policy can be tagged with an owner. If the owner service is registered, then the service can be monitored by a heart-beat supervision mechanism, and if the registered service becomes unavailable, then its A1 Policies are removed. Note that services do not need to be registered to create A1 Policies, but unregistered services are not supervised. This is a feature that is optional to use.

      Authorization API

      API used for access control of A1 Policy access. If configured, an external authorization provider is requested to grant access to the A1 Policy Type.

      Spring Boot Actuator

      Provides built-in functions used to monitor and configure the Spring web application hosting the service.

      ", "license" : { - "name" : "Copyright (C) 2020-2023 Nordix Foundation, and Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved. Licensed under the Apache 2 License.", + "name" : "Copyright (C) 2020-2023 Nordix Foundation, and Copyright (C) 2024-2025 OpenInfra Foundation Europe. \nAll rights reserved. Licensed under the Apache 2 License.\n", "url" : "http://www.apache.org/licenses/LICENSE-2.0" }, - "title" : "ONAP CCSDK A1 Policy Management Service", + "title" : "ONAP CCSDK - Pre-Spec A1 Policy Management API", "version" : "1.3.0", "x-api-id" : "a31c510b-20e6-4a08-af16-368c44d7fba8", "x-audience" : "external-public" @@ -19,189 +20,53 @@ "url" : "/" } ], "tags" : [ { - "description" : "Older API used to create polices, Policy Instances and get them as individual using an ID or get all policies/Instances.", - "name" : "A1 Policy Management (Older version)" + "description" : "Older pre-spec API used to get, create, update and delete A1 Policy Instances. Also used to query A1 Policy Types.\n", + "name" : "A1 Policy Management" }, { - "description" : "API used to get the NearRT-RIC for the managed element.", + "description" : "Older API used to get information about registered Near-RT RICs.\n", "name" : "NearRT-RIC Repository" }, { - "description" : "API used to keep the service Alive with in the timeout period", + "description" : "Older API used to manage registered services, and control their keep-alive status via heart-beat messages.\n", "name" : "Service Registry and Supervision" }, { - "description" : "API used to get the health status and statistics of this service", + "description" : "API used to get the health status and statistics of this service\n", "name" : "Health Check" }, { - "description" : "Callouts to indicate status schanges relevant for Services.
      Note that these calls are called by A1-PMS, not provided.", - "name" : "Service callbacks" + "description" : "Callout to registered services to indicate a status changes for a Near-RT RIC. Note that these operations are called by the A1 Policy Management Service, not provided.\n", + "name" : "Service Callbacks" }, { - "description" : "API used for authorization of information A1 policy access (this is provided by an authorization producer such as OPA).
      Note that this API is called by A1-PMS, it is not provided.", + "description" : "API used for authorization of information A1 policy access (this is provided by an authorization producer such as OPA). Note that these operations are called by the A1 Policy Management Service, not provided.\n", "name" : "Authorization API" }, { - "description" : "API used to create or fetch the application configuration.", + "description" : "API used to create or fetch the application configuration.\n", "name" : "Configuration" }, { - "description" : "Monitor and interact", + "description" : "API used to monitor and configure the A1-PMS Springboot Service.\n", "externalDocs" : { "description" : "Spring Boot Actuator Web API Documentation", - "url" : "https://docs.spring.io/spring-boot/docs/current/actuator-api/html/" + "url" : "https://docs.spring.io/spring-boot/reference/actuator/endpoints.html" }, - "name" : "Actuator" + "name" : "Actuator API" } ], "paths" : { - "/a1-policy/v2/policy-instances" : { - "get" : { - "description" : "Returns a list of A1 policies matching given search criteria.
      If several query parameters are defined, the policies matching all conditions are returned.", - "operationId" : "getPolicyInstances", - "parameters" : [ { - "description" : "Select policies with a given type identity.", - "explode" : true, - "in" : "query", - "name" : "policytype_id", - "required" : false, - "schema" : { - "type" : "string" - }, - "style" : "form" - }, { - "description" : "Select policies for a given Near-RT RIC identity.", - "explode" : true, - "in" : "query", - "name" : "ric_id", - "required" : false, - "schema" : { - "type" : "string" - }, - "style" : "form" - }, { - "description" : "Select policies owned by a given service.", - "explode" : true, - "in" : "query", - "name" : "service_id", - "required" : false, - "schema" : { - "type" : "string" - }, - "style" : "form" - }, { - "description" : "Select policies of a given type name (type identity has the format )", - "explode" : true, - "in" : "query", - "name" : "type_name", - "required" : false, - "schema" : { - "type" : "string" - }, - "style" : "form" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "examples" : { - "policy_info_list" : { - "$ref" : "#/components/examples/policy_info_list" - } - }, - "schema" : { - "$ref" : "#/components/schemas/policy_info_list" - } - } - }, - "description" : "OK - Returns A1 Policies which matches the criteria" - }, - "404" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/error_information" - } - } - }, - "description" : "Not Found - Near-RT RIC, policy type or service not found" - } - }, - "summary" : "Query for A1 policy instances", - "tags" : [ "A1 Policy Management" ] - } - }, - "/example-authz-check" : { - "post" : { - "description" : "The authorization function decides if access is granted.", - "operationId" : "performAccessControl", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/policy_authorization" - } - } - }, - "required" : true - }, - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/authorization_result" - } - } - }, - "description" : "OK" - }, - "403" : { - "content" : { - "application/problem+json" : { - "example" : { - "status" : 403, - "title" : "Forbidden", - "detail" : "Your role does not allow to perform this action. Contact System Administrator to change your access rights." - }, - "schema" : { - "$ref" : "#/components/schemas/error_information" - } - } - }, - "description" : "Forbidden" - } - }, - "summary" : "Request for access authorization.", - "tags" : [ "Authorization API" ] - } - }, - "/actuator/threaddump" : { + "/status" : { "get" : { - "operationId" : "threaddump", + "description" : "Returns status and statistics of this service", + "operationId" : "getStatusV1", "responses" : { "200" : { "content" : { - "text/plain;charset=UTF-8" : { - "schema" : { - "type" : "object" - } - }, - "application/vnd.spring-boot.actuator.v3+json" : { - "schema" : { - "type" : "object" - } - }, - "application/json" : { - "schema" : { - "type" : "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json" : { + "*/*" : { "schema" : { - "type" : "object" + "type" : "string" } } }, - "description" : "OK" + "description" : "OK - Service is living" } }, - "summary" : "Actuator web endpoint 'threaddump'", - "tags" : [ "Actuator" ], - "x-internal" : true + "summary" : "Get Status (getStatusV1)", + "tags" : [ "Health Check" ] } }, "/a1-policy/v2/status" : { @@ -225,75 +90,16 @@ "description" : "OK- Service is living Ok" } }, + "summary" : "Get Status (getStatus)", "tags" : [ "Health Check" ] } }, - "/actuator/loggers" : { - "get" : { - "operationId" : "loggers", - "responses" : { - "200" : { - "content" : { - "application/vnd.spring-boot.actuator.v3+json" : { - "schema" : { - "type" : "object" - } - }, - "application/json" : { - "schema" : { - "type" : "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json" : { - "schema" : { - "type" : "object" - } - } - }, - "description" : "OK" - } - }, - "summary" : "Actuator web endpoint 'loggers'", - "tags" : [ "Actuator" ], - "x-internal" : true - } - }, - "/actuator/health/**" : { - "get" : { - "operationId" : "health-path", - "responses" : { - "200" : { - "content" : { - "application/vnd.spring-boot.actuator.v3+json" : { - "schema" : { - "type" : "object" - } - }, - "application/json" : { - "schema" : { - "type" : "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json" : { - "schema" : { - "type" : "object" - } - } - }, - "description" : "OK" - } - }, - "summary" : "Actuator web endpoint 'health-path'", - "tags" : [ "Actuator" ], - "x-internal" : true - } - }, "/a1-policy/v2/rics/ric" : { "get" : { - "description" : "Either a Near-RT RIC identity or a Managed Element identity can be specified.
      The intention with Managed Element identity is the ID used in O1 for accessing the traffical element (such as the ID of CU).", + "description" : "Query information about a Near-RT RIC. Either a Near-RT RIC identity or a Managed Element identity can be specified. The intention with Managed Element identity is the ID used in O1 for accessing the traffical element (such as the ID of CU).\n", "operationId" : "getRic", "parameters" : [ { - "description" : "The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned.", + "description" : "The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned.\n", "explode" : true, "in" : "query", "name" : "managed_element_id", @@ -338,43 +144,13 @@ "description" : "Not Found" } }, - "summary" : "Returns info of Near-RT RIC queried by the ric-id and managed-element-id", + "summary" : "Get a Near-RT RIC (getRic)", "tags" : [ "NearRT-RIC Repository" ] } }, - "/actuator/shutdown" : { - "post" : { - "operationId" : "shutdown", - "responses" : { - "200" : { - "content" : { - "application/vnd.spring-boot.actuator.v3+json" : { - "schema" : { - "type" : "object" - } - }, - "application/json" : { - "schema" : { - "type" : "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json" : { - "schema" : { - "type" : "object" - } - } - }, - "description" : "OK" - } - }, - "summary" : "Actuator web endpoint 'shutdown'", - "tags" : [ "Actuator" ], - "x-internal" : true - } - }, "/a1-policy/v2/policy-types" : { "get" : { - "description" : "Query policy type identities", + "description" : "Query A1 Policy Type identities using query parameters", "operationId" : "getPolicyTypes", "parameters" : [ { "description" : "Select types for the given Near-RT RIC identity.", @@ -387,7 +163,7 @@ }, "style" : "form" }, { - "description" : "Select types with the given type name (type identity has the format )", + "description" : "Select types compatible with the given type name (type identity has the format 'typename_version')", "explode" : true, "in" : "query", "name" : "type_name", @@ -432,12 +208,13 @@ "description" : "Not Found" } }, + "summary" : "Get A1 Policy Types (getPolicyTypes)", "tags" : [ "A1 Policy Management" ] } }, "/a1-policy/v2/policies/{policy_id}" : { "delete" : { - "description" : "Deleting the policy using the Policy's Policy ID.", + "description" : "Delete an A1 Policy instance using its policy ID.", "operationId" : "deletePolicy", "parameters" : [ { "explode" : false, @@ -476,11 +253,11 @@ "description" : "Locked - HTTP Status code which can be used when the state is Locked" } }, - "summary" : "Delete a policy", + "summary" : "Delete an A1 Policy instance (deletePolicy)", "tags" : [ "A1 Policy Management" ] }, "get" : { - "description" : "Returns a policy", + "description" : "Get an A1 Policy instance using its policy ID", "operationId" : "getPolicy", "parameters" : [ { "explode" : false, @@ -517,16 +294,18 @@ "description" : "Not Found" } }, + "summary" : "Get an A1 Policy instance (getPolicy)", "tags" : [ "A1 Policy Management" ] } }, - "/actuator/metrics/{requiredMetricName}" : { - "get" : { - "operationId" : "metrics-requiredMetricName", + "/a1-policy/v2/services/{service_id}/keepalive" : { + "put" : { + "description" : "A registered service should invoke this operation regularly to indicate that it is still alive. If a registered service fails to invoke some operation, or this operation, before the end of a timeout period the service will be deregistered and all its A1 policies wil be removed. This operation is only intended for registered services. (This timeout can be set or disabled when each service is initially registered)", + "operationId" : "keepAliveService", "parameters" : [ { "explode" : false, "in" : "path", - "name" : "requiredMetricName", + "name" : "service_id", "required" : true, "schema" : { "type" : "string" @@ -536,299 +315,33 @@ "responses" : { "200" : { "content" : { - "application/vnd.spring-boot.actuator.v3+json" : { - "schema" : { - "type" : "object" - } - }, - "application/json" : { - "schema" : { - "type" : "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json" : { + "*/*" : { "schema" : { "type" : "object" } } }, - "description" : "OK" + "description" : "OK - Service supervision timer refreshed, OK" + }, + "404" : { + "content" : { + "application/problem+json" : { + "example" : [ ] + } + }, + "description" : "Not Found" } }, - "summary" : "Actuator web endpoint 'metrics-requiredMetricName'", - "tags" : [ "Actuator" ], - "x-internal" : true + "summary" : "Heartbeat message from a service (keepAliveService)", + "tags" : [ "Service Registry and Supervision" ] } }, - "/a1-policy/v2/configuration" : { + "/a1-policy/v2/rics" : { "get" : { - "description" : "Returns the contents of the application configuration file", - "operationId" : "getConfiguration", - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "string" - } - } - }, - "description" : "OK - Configuration" - }, - "404" : { - "content" : { - "application/problem+json" : { - "example" : [ ] - } - }, - "description" : "Not Found" - } - }, - "tags" : [ "Configuration" ] - }, - "put" : { - "description" : "Replace the current configuration with the given configuration", - "operationId" : "putConfiguration", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object" - } - } - }, - "required" : true - }, - "responses" : { - "200" : { - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/void" - } - } - }, - "description" : "OK - Configuration updated" - }, - "400" : { - "content" : { - "application/problem+json" : { - "example" : { - "status" : 400, - "title" : "Bad Request", - "detail" : "The provided request is not valid." - }, - "schema" : { - "$ref" : "#/components/schemas/error_information" - } - } - }, - "description" : "Bad Request" - } - }, - "tags" : [ "Configuration" ] - } - }, - "/actuator" : { - "get" : { - "operationId" : "links", - "responses" : { - "200" : { - "content" : { - "application/vnd.spring-boot.actuator.v3+json" : { - "schema" : { - "additionalProperties" : { - "additionalProperties" : { - "$ref" : "#/components/schemas/Link" - }, - "type" : "object" - }, - "type" : "object" - } - }, - "application/json" : { - "schema" : { - "additionalProperties" : { - "additionalProperties" : { - "$ref" : "#/components/schemas/Link" - }, - "type" : "object" - }, - "type" : "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json" : { - "schema" : { - "additionalProperties" : { - "additionalProperties" : { - "$ref" : "#/components/schemas/Link" - }, - "type" : "object" - }, - "type" : "object" - } - } - }, - "description" : "OK" - } - }, - "summary" : "Actuator root web endpoint", - "tags" : [ "Actuator" ], - "x-internal" : true - } - }, - "/actuator/loggers/{name}" : { - "get" : { - "operationId" : "loggers-name", - "parameters" : [ { - "explode" : false, - "in" : "path", - "name" : "name", - "required" : true, - "schema" : { - "type" : "string" - }, - "style" : "simple" - } ], - "responses" : { - "200" : { - "content" : { - "application/vnd.spring-boot.actuator.v3+json" : { - "schema" : { - "type" : "object" - } - }, - "application/json" : { - "schema" : { - "type" : "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json" : { - "schema" : { - "type" : "object" - } - } - }, - "description" : "OK" - } - }, - "summary" : "Actuator web endpoint 'loggers-name'", - "tags" : [ "Actuator" ], - "x-internal" : true - }, - "post" : { - "operationId" : "loggers-name_2", - "parameters" : [ { - "explode" : false, - "in" : "path", - "name" : "name", - "required" : true, - "schema" : { - "type" : "string" - }, - "style" : "simple" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "enum" : [ "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "FATAL", "OFF" ], - "type" : "string" - } - } - } - }, - "responses" : { - "200" : { - "content" : { - "*/*" : { - "schema" : { - "type" : "object" - } - } - }, - "description" : "OK" - } - }, - "summary" : "Actuator web endpoint 'loggers-name'", - "tags" : [ "Actuator" ], - "x-internal" : true - } - }, - "/a1-policy/v2/services/{service_id}/keepalive" : { - "put" : { - "description" : "A registered service should invoke this operation regularly to indicate that it is still alive. If a registered service fails to invoke this operation before the end of a timeout period the service will be deregistered and all its A1 policies wil be removed. (This timeout can be set or disabled when each service is initially registered)", - "operationId" : "keepAliveService", - "parameters" : [ { - "explode" : false, - "in" : "path", - "name" : "service_id", - "required" : true, - "schema" : { - "type" : "string" - }, - "style" : "simple" - } ], - "responses" : { - "200" : { - "content" : { - "*/*" : { - "schema" : { - "type" : "object" - } - } - }, - "description" : "OK - Service supervision timer refreshed, OK" - }, - "404" : { - "content" : { - "application/problem+json" : { - "example" : [ ] - } - }, - "description" : "Not Found" - } - }, - "summary" : "Heartbeat indicates that the service is running", - "tags" : [ "Service Registry and Supervision" ] - } - }, - "/actuator/metrics" : { - "get" : { - "operationId" : "metrics", - "responses" : { - "200" : { - "content" : { - "application/vnd.spring-boot.actuator.v3+json" : { - "schema" : { - "type" : "object" - } - }, - "application/json" : { - "schema" : { - "type" : "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json" : { - "schema" : { - "type" : "object" - } - } - }, - "description" : "OK" - } - }, - "summary" : "Actuator web endpoint 'metrics'", - "tags" : [ "Actuator" ], - "x-internal" : true - } - }, - "/a1-policy/v2/rics" : { - "get" : { - "description" : "The call returns all Near-RT RICs that supports a given policy type identity", + "description" : "Get all Near-RT RICs that supports a given A1 Policy Type ID", "operationId" : "getRics", "parameters" : [ { - "description" : "The identity of a policy type. If given, all Near-RT RICs supporting the policy type are returned", + "description" : "The identity of an A1 Policy Type. If given, all Near-RT RICs supporting the A1 Policy Type are returned.\n", "explode" : true, "in" : "query", "name" : "policytype_id", @@ -863,16 +376,16 @@ "description" : "Not Found" } }, - "summary" : "Query Near-RT RIC information", + "summary" : "Get Near-RT RICs for A1 Policy Type (getRics)", "tags" : [ "NearRT-RIC Repository" ] } }, "/a1-policy/v2/services" : { "get" : { - "description" : "Either information about a registered service with given identity or all registered services are returned.", + "description" : "Get information about all registered services, or a single registered service. If the service ID of a registered service is included in the query, information about that service is returned. Otherwise Information about all registered is returned. This operation does not retrieve information about unregistered services.\n", "operationId" : "getServices", "parameters" : [ { - "description" : "The identity of the service", + "description" : "The identity of the registered service", "explode" : true, "in" : "query", "name" : "service_id", @@ -907,7 +420,7 @@ "description" : "Not Found" } }, - "summary" : "Returns service information", + "summary" : "Get Services (getServices)", "tags" : [ "Service Registry and Supervision" ] }, "put" : { @@ -915,7 +428,7 @@ "RICStatus" : { "{$request.body#/callback_url}" : { "post" : { - "description" : "The URL to this call is registered at Service registration.", + "description" : "Callouts to indicate Near-RT RIC status changes relevant for Services. \nThe URL invoked by this callback is provided at Service registration.\n", "operationId" : "serviceCallback", "requestBody" : { "content" : { @@ -947,13 +460,13 @@ "description" : "Not Found" } }, - "summary" : "Callback for Near-RT RIC status", - "tags" : [ "Service callbacks" ] + "summary" : "Callback for Near-RT RIC status (serviceCallback)", + "tags" : [ "Service Registry and Supervision", "Service Callbacks" ] } } } }, - "description" : "Registering a service is needed to:
      • Get callbacks about available NearRT RICs.
      • Activate supervision of the service. If a service is inactive, its policies will automatically be deleted.
      Policies can be created even if the service is not registerred. This is a feature which it is optional to use.", + "description" : "Register a single service, or update a previous registtration. Service registration is required to get callbacks about available NearRT RICs and to enable supervision of the service's active status. If a registered service becomes inactive, its policies can be automatically deleted. A1 Policy instances can also be created for unregistered services. If an unregistered service is later registered, the service's policies are retained when the service becomes registered. This feature is optional to use.\n", "operationId" : "putService", "requestBody" : { "content" : { @@ -1002,62 +515,13 @@ "description" : "Bad Request" } }, - "summary" : "Register a service", + "summary" : "Register or update a Service (putService)", "tags" : [ "Service Registry and Supervision" ] } }, - "/actuator/info" : { + "/a1-policy/v2/policy-types/{policytype_id}" : { "get" : { - "operationId" : "info", - "responses" : { - "200" : { - "content" : { - "application/vnd.spring-boot.actuator.v3+json" : { - "schema" : { - "type" : "object" - } - }, - "application/json" : { - "schema" : { - "type" : "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json" : { - "schema" : { - "type" : "object" - } - } - }, - "description" : "OK" - } - }, - "summary" : "Actuator web endpoint 'info'", - "tags" : [ "Actuator" ], - "x-internal" : true - } - }, - "/status" : { - "get" : { - "description" : "Returns status and statistics of this service", - "operationId" : "getStatusV1", - "responses" : { - "200" : { - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - }, - "description" : "OK - Service is living" - } - }, - "tags" : [ "Health Check" ] - } - }, - "/a1-policy/v2/policy-types/{policytype_id}" : { - "get" : { - "description" : "Returns a policy type definition", + "description" : "Get an A1 Policy Type definition using its policy type ID", "operationId" : "getPolicyTypeDefinition", "parameters" : [ { "explode" : false, @@ -1083,7 +547,7 @@ } } }, - "description" : "OK - schema of the given policy type" + "description" : "OK - schema of the requested A1 Policy Type" }, "404" : { "content" : { @@ -1094,65 +558,16 @@ "description" : "Not Found" } }, + "summary" : "Get an A1 Policy Type definition (getPolicyTypeDefinition)", "tags" : [ "A1 Policy Management" ] } }, - "/actuator/logfile" : { - "get" : { - "operationId" : "logfile", - "responses" : { - "200" : { - "content" : { - "text/plain;charset=UTF-8" : { - "schema" : { - "type" : "object" - } - } - }, - "description" : "OK" - } - }, - "summary" : "Actuator web endpoint 'logfile'", - "tags" : [ "Actuator" ], - "x-internal" : true - } - }, - "/actuator/health" : { - "get" : { - "operationId" : "health", - "responses" : { - "200" : { - "content" : { - "application/vnd.spring-boot.actuator.v3+json" : { - "schema" : { - "type" : "object" - } - }, - "application/json" : { - "schema" : { - "type" : "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json" : { - "schema" : { - "type" : "object" - } - } - }, - "description" : "OK" - } - }, - "summary" : "Actuator web endpoint 'health'", - "tags" : [ "Actuator" ], - "x-internal" : true - } - }, "/a1-policy/v2/policies" : { "get" : { - "description" : "Returns a list of A1 policies matching given search criteria.
      If several query parameters are defined, the policies matching all conditions are returned.", + "description" : "Retrieve a list of A1 Policy Instance IDs for policies that match given search criteria. If multiple query parameters are given, the policies matching all conditions are returned.\n", "operationId" : "getPolicyIds", "parameters" : [ { - "description" : "Select policies of a given policy type identity.", + "description" : "Select policies of a given A1 Policy Type ID.", "explode" : true, "in" : "query", "name" : "policytype_id", @@ -1172,7 +587,7 @@ }, "style" : "form" }, { - "description" : "Select policies owned by a given service.", + "description" : "Select policies owned by a given service. (Both registered and unregistered services)", "explode" : true, "in" : "query", "name" : "service_id", @@ -1182,7 +597,7 @@ }, "style" : "form" }, { - "description" : "Select policies of types with the given type name (type identity has the format )", + "description" : "Select policies of types with the given A1 Policy Type name (type names have the format 'typename_version')\n", "explode" : true, "in" : "query", "name" : "type_name", @@ -1217,11 +632,11 @@ "description" : "Not Found" } }, - "summary" : "Query policy identities", + "summary" : "Query A1 Policy Instances (getPolicyIds)", "tags" : [ "A1 Policy Management" ] }, "put" : { - "description" : "Create or update a policy", + "description" : "Create or Update an A1 Policy Instance", "operationId" : "putPolicy", "requestBody" : { "content" : { @@ -1270,12 +685,89 @@ "description" : "Locked - HTTP Status code which can be used when the state is Locked" } }, + "summary" : "Create or Update an A1 Policy Instance (putPolicy)", + "tags" : [ "A1 Policy Management" ] + } + }, + "/a1-policy/v2/policy-instances" : { + "get" : { + "description" : "Returns a collection of A1 Policy Instance information for policies that match given search criteria. If several query parameters are defined, the policies matching all conditions are returned.\n", + "operationId" : "getPolicyInstances", + "parameters" : [ { + "description" : "Select policies with a given A1 Policy Type ID.", + "explode" : true, + "in" : "query", + "name" : "policytype_id", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "form" + }, { + "description" : "Select policies for a given Near-RT RIC identity.", + "explode" : true, + "in" : "query", + "name" : "ric_id", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "form" + }, { + "description" : "Select policies owned by a given service (registered or unregistered).", + "explode" : true, + "in" : "query", + "name" : "service_id", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "form" + }, { + "description" : "Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').", + "explode" : true, + "in" : "query", + "name" : "type_name", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "form" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "examples" : { + "policy_info_list" : { + "$ref" : "#/components/examples/policy_info_list" + } + }, + "schema" : { + "$ref" : "#/components/schemas/policy_info_list" + } + } + }, + "description" : "OK - Returns A1 Policy Instances which match the criteria" + }, + "404" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/error_information" + } + } + }, + "description" : "Not Found - Near-RT RIC, A1 Policy Type or service was not found" + } + }, + "summary" : "Query for A1 Policy instances (getPolicyInstances)", "tags" : [ "A1 Policy Management" ] } }, "/a1-policy/v2/services/{service_id}" : { "delete" : { - "description" : "Unregister a service", + "description" : "Unregister a registered Service using its service ID. Only registered services can be unregistered. All A1 Policy Instances for the previously registered service will be removed.\n", "operationId" : "deleteService", "parameters" : [ { "explode" : false, @@ -1307,32 +799,13 @@ "description" : "Not Found" } }, + "summary" : "Unregister a Service (deleteService)", "tags" : [ "Service Registry and Supervision" ] } }, - "/actuator/heapdump" : { - "get" : { - "operationId" : "heapdump", - "responses" : { - "200" : { - "content" : { - "application/octet-stream" : { - "schema" : { - "type" : "object" - } - } - }, - "description" : "OK" - } - }, - "summary" : "Actuator web endpoint 'heapdump'", - "tags" : [ "Actuator" ], - "x-internal" : true - } - }, "/a1-policy/v2/policies/{policy_id}/status" : { "get" : { - "description" : "Returns a policy status", + "description" : "Retrieve the status information for an A1 Policy Instance.", "operationId" : "getPolicyStatus", "parameters" : [ { "explode" : false, @@ -1369,100 +842,614 @@ "description" : "Not Found" } }, + "summary" : "Get an A1 Policy Instance's status (getPolicyStatus)", "tags" : [ "A1 Policy Management" ] } - } - }, - "components" : { - "examples" : { - "service_status" : { - "description" : "List of service information", - "value" : { - "callback_url" : "callback_url", - "service_id" : "service_id", - "keep_alive_interval_seconds" : 0, - "time_since_last_activity_seconds" : 6 - } - }, - "service_status_list" : { - "description" : "List of service information", - "value" : { - "service_list" : [ { - "callback_url" : "callback_url", - "service_id" : "service_id", - "keep_alive_interval_seconds" : 0, - "time_since_last_activity_seconds" : 6 - }, { - "callback_url" : "callback_url", - "service_id" : "service_id", - "keep_alive_interval_seconds" : 0, - "time_since_last_activity_seconds" : 6 - } ] - } - }, - "policy_type_definition" : { - "description" : "Schema of the given Policy type", - "value" : { - "policy_schema" : "{}" - } - }, - "policy_type_id_list" : { - "description" : "Array of policy type id's", - "value" : { - "policy_type_id_list" : [ "policytype_id", "policytype_id" ] - } - }, - "policy_info" : { - "description" : "Policy information of one A1-P policy", - "value" : { - "ric_id" : "ric_id", - "policy_id" : "policy_id", - "transient" : false, - "service_id" : "service_id", - "policy_data" : "{}", - "status_notification_uri" : "status_notification_uri", - "policytype_id" : "policytype_id" - } - }, - "policy_info_list" : { - "description" : "List of policy information", - "value" : { - "policies" : [ { - "ric_id" : "ric_id", - "policy_id" : "policy_id", - "transient" : false, - "service_id" : "service_id", - "policy_data" : "{}", - "status_notification_uri" : "status_notification_uri", - "policytype_id" : "policytype_id" - }, { - "ric_id" : "ric_id", - "policy_id" : "policy_id", - "transient" : false, - "service_id" : "service_id", - "policy_data" : "{}", - "status_notification_uri" : "status_notification_uri", - "policytype_id" : "policytype_id" - } ] - } + }, + "/a1-policy/v2/configuration" : { + "get" : { + "description" : "Returns the entire contents of the Application Configuration.", + "operationId" : "getConfiguration", + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "string" + } + } + }, + "description" : "OK - Configuration" + }, + "404" : { + "content" : { + "application/problem+json" : { + "example" : [ ] + } + }, + "description" : "Not Found" + } + }, + "summary" : "Get the Application Configuration (getConfiguration)", + "tags" : [ "Configuration" ] }, - "policy_id_list" : { - "description" : "A list of policy identities", - "value" : { - "policy_ids" : [ "some_policy_id", "some_policy_id" ] - } + "put" : { + "description" : "Replace the current Application Configuration with a new configuration. The new configuration, if accepted, will take effect after a short delay. The new configuration must comply with the Application Configuration schema, which can be found from the the Application Documentation (Developer Guide)\n", + "operationId" : "putConfiguration", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object" + } + } + }, + "required" : true + }, + "responses" : { + "200" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/void" + } + } + }, + "description" : "OK - Configuration updated" + }, + "400" : { + "content" : { + "application/problem+json" : { + "example" : { + "status" : 400, + "title" : "Bad Request", + "detail" : "The provided request is not valid." + }, + "schema" : { + "$ref" : "#/components/schemas/error_information" + } + } + }, + "description" : "Bad Request" + } + }, + "summary" : "Set/Replace the Application Configuration (putConfiguration)", + "tags" : [ "Configuration" ] + } + }, + "/example-authz-check" : { + "post" : { + "description" : "A template endpoint for callout requests to an external authorization function. The authorization function, if enabled, decides if individual operations are permitted.\n", + "operationId" : "performAccessControl", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/policy_authorization" + } + } + }, + "required" : true + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/authorization_result" + } + } + }, + "description" : "OK" + }, + "403" : { + "content" : { + "application/problem+json" : { + "example" : { + "status" : 403, + "title" : "Forbidden", + "detail" : "Your role does not allow to perform this action. Contact System Administrator to change your access rights." + }, + "schema" : { + "$ref" : "#/components/schemas/error_information" + } + } + }, + "description" : "Forbidden" + } + }, + "summary" : "Callout request for access authorization (performAccessControl)", + "tags" : [ "Authorization API" ] + } + }, + "/actuator" : { + "get" : { + "description" : "A1-PMS Springboot Service Actuator web endpoint. Returns a set of links to available/enabled actuator endpoints.\n", + "externalDocs" : { + "description" : "Spring Boot Actuator Web API Documentation", + "url" : "https://docs.spring.io/spring-boot/reference/actuator/endpoints.html" + }, + "operationId" : "actuatorLinks", + "responses" : { + "200" : { + "content" : { + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "additionalProperties" : { + "additionalProperties" : { + "$ref" : "#/components/schemas/Link" + }, + "type" : "object" + }, + "type" : "object" + } + }, + "application/json" : { + "schema" : { + "additionalProperties" : { + "additionalProperties" : { + "$ref" : "#/components/schemas/Link" + }, + "type" : "object" + }, + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "additionalProperties" : { + "additionalProperties" : { + "$ref" : "#/components/schemas/Link" + }, + "type" : "object" + }, + "type" : "object" + } + } + }, + "description" : "OK" + } + }, + "summary" : "Actuator endpoint - Root (actuatorLinks)", + "tags" : [ "Actuator API" ], + "x-internal" : true + } + }, + "/actuator/heapdump" : { + "get" : { + "description" : "A1-PMS Springboot Service Actuator web endpoint - HeapDump.\n", + "externalDocs" : { + "description" : "Spring Boot Actuator Web API Documentation", + "url" : "https://docs.spring.io/spring-boot/reference/actuator/endpoints.html" + }, + "operationId" : "actuatorHeapdump", + "responses" : { + "200" : { + "content" : { + "application/octet-stream" : { + "schema" : { + "type" : "object" + } + } + }, + "description" : "OK" + } + }, + "summary" : "Actuator endpoint - Heapdump (actuatorHeapdump)", + "tags" : [ "Actuator API" ], + "x-internal" : true + } + }, + "/actuator/info" : { + "get" : { + "description" : "A1-PMS Springboot Service Actuator web endpoint - Info.\n", + "externalDocs" : { + "description" : "Spring Boot Actuator Web API Documentation", + "url" : "https://docs.spring.io/spring-boot/reference/actuator/endpoints.html" + }, + "operationId" : "actuatorInfo", + "responses" : { + "200" : { + "content" : { + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" + } + }, + "application/json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" + } + } + }, + "description" : "OK" + } + }, + "summary" : "Actuator endpoint - Info (actuatorInfo)", + "tags" : [ "Actuator API" ], + "x-internal" : true + } + }, + "/actuator/threaddump" : { + "get" : { + "description" : "A1-PMS Springboot Service Actuator web endpoint - ThreadDump.\n", + "externalDocs" : { + "description" : "Spring Boot Actuator Web API Documentation", + "url" : "https://docs.spring.io/spring-boot/reference/actuator/endpoints.html" + }, + "operationId" : "actuatorThreaddump", + "responses" : { + "200" : { + "content" : { + "text/plain;charset=UTF-8" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" + } + }, + "application/json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" + } + } + }, + "description" : "OK" + } + }, + "summary" : "Actuator endpoint - Threaddump (actuatorThreaddump)", + "tags" : [ "Actuator API" ], + "x-internal" : true + } + }, + "/actuator/loggers" : { + "get" : { + "description" : "A1-PMS Springboot Service Actuator web endpoint - Get a list of Loggers.\n", + "externalDocs" : { + "description" : "Spring Boot Actuator Web API Documentation", + "url" : "https://docs.spring.io/spring-boot/reference/actuator/endpoints.html" + }, + "operationId" : "actuatorLoggers", + "responses" : { + "200" : { + "content" : { + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" + } + }, + "application/json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" + } + } + }, + "description" : "OK" + } + }, + "summary" : "Actuator endpoint - Get Loggers (actuatorLoggers)", + "tags" : [ "Actuator API" ], + "x-internal" : true + } + }, + "/actuator/loggers/{name}" : { + "get" : { + "description" : "A1-PMS Springboot Service Actuator web endpoint - Get a single named Logger.\n", + "externalDocs" : { + "description" : "Spring Boot Actuator Web API Documentation", + "url" : "https://docs.spring.io/spring-boot/reference/actuator/endpoints.html" + }, + "operationId" : "actuatorGetLogger", + "parameters" : [ { + "explode" : false, + "in" : "path", + "name" : "name", + "required" : true, + "schema" : { + "type" : "string" + }, + "style" : "simple" + } ], + "responses" : { + "200" : { + "content" : { + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" + } + }, + "application/json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" + } + } + }, + "description" : "OK" + } + }, + "summary" : "Actuator endpoint - Get Logger (actuatorGetLogger)", + "tags" : [ "Actuator API" ], + "x-internal" : true }, - "policy_status_info" : { - "description" : "Status for one A1-P Policy", - "value" : { - "last_modified" : "last_modified", - "status" : { - "value" : { - "status" : "status" + "post" : { + "description" : "A1-PMS Springboot Service Actuator web endpoint - Create or Update single named Logger.\n", + "externalDocs" : { + "description" : "Spring Boot Actuator Web API Documentation", + "url" : "https://docs.spring.io/spring-boot/reference/actuator/endpoints.html" + }, + "operationId" : "actuatorSetlogger", + "parameters" : [ { + "explode" : false, + "in" : "path", + "name" : "name", + "required" : true, + "schema" : { + "type" : "string" + }, + "style" : "simple" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "enum" : [ "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "FATAL", "OFF" ], + "type" : "string" + } } } - } - }, + }, + "responses" : { + "200" : { + "content" : { + "*/*" : { + "schema" : { + "type" : "object" + } + } + }, + "description" : "OK" + } + }, + "summary" : "Actuator endpoint - Set Logger (actuatorSetlogger)", + "tags" : [ "Actuator API" ], + "x-internal" : true + } + }, + "/actuator/logfile" : { + "get" : { + "description" : "A1-PMS Springboot Service Actuator web endpoint - Get the Log file.\n", + "externalDocs" : { + "description" : "Spring Boot Actuator Web API Documentation", + "url" : "https://docs.spring.io/spring-boot/reference/actuator/endpoints.html" + }, + "operationId" : "actuatorGetLogFile", + "responses" : { + "200" : { + "content" : { + "text/plain;charset=UTF-8" : { + "schema" : { + "type" : "object" + } + } + }, + "description" : "OK" + } + }, + "summary" : "Actuator endpoint - Log File (actuatorGetLogFile)", + "tags" : [ "Actuator API" ], + "x-internal" : true + } + }, + "/actuator/health" : { + "get" : { + "description" : "A1-PMS Springboot Service Actuator web endpoint - Health Check.\n", + "externalDocs" : { + "description" : "Spring Boot Actuator Web API Documentation", + "url" : "https://docs.spring.io/spring-boot/reference/actuator/endpoints.html" + }, + "operationId" : "actuatorHealth", + "responses" : { + "200" : { + "content" : { + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" + } + }, + "application/json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" + } + } + }, + "description" : "OK" + } + }, + "summary" : "Actuator endpoint - Health (actuatorHealth)", + "tags" : [ "Actuator API" ], + "x-internal" : true + } + }, + "/actuator/health/**" : { + "get" : { + "description" : "A1-PMS Springboot Service Actuator web endpoint - Health Status for an Application Component.\n", + "externalDocs" : { + "description" : "Spring Boot Actuator Web API Documentation", + "url" : "https://docs.spring.io/spring-boot/reference/actuator/endpoints.html" + }, + "operationId" : "actuatorHealthComponent", + "responses" : { + "200" : { + "content" : { + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" + } + }, + "application/json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" + } + } + }, + "description" : "OK" + } + }, + "summary" : "Actuator endpoint - Component Health (actuatorHealthComponent)", + "tags" : [ "Actuator API" ], + "x-internal" : true + } + }, + "/actuator/shutdown" : { + "post" : { + "description" : "A1-PMS Springboot Service Actuator web endpoint - Shutdown the Application.\n", + "externalDocs" : { + "description" : "Spring Boot Actuator Web API Documentation", + "url" : "https://docs.spring.io/spring-boot/reference/actuator/endpoints.html" + }, + "operationId" : "actuatorShutdown", + "responses" : { + "200" : { + "content" : { + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" + } + }, + "application/json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" + } + } + }, + "description" : "OK" + } + }, + "summary" : "Actuator endpoint - Shutdown (actuatorShutdown)", + "tags" : [ "Actuator API" ], + "x-internal" : true + } + }, + "/actuator/metrics" : { + "get" : { + "description" : "A1-PMS Springboot Service Actuator web endpoint - Get a list of Application metrics names.\n", + "externalDocs" : { + "description" : "Spring Boot Actuator Web API Documentation", + "url" : "https://docs.spring.io/spring-boot/reference/actuator/endpoints.html" + }, + "operationId" : "actuatorMetrics", + "responses" : { + "200" : { + "content" : { + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" + } + }, + "application/json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" + } + } + }, + "description" : "OK" + } + }, + "summary" : "Actuator endpoint - Metrics (actuatorMetrics)", + "tags" : [ "Actuator API" ], + "x-internal" : true + } + }, + "/actuator/metrics/{requiredMetricName}" : { + "get" : { + "description" : "A1-PMS Springboot Service Actuator web endpoint - Get the value for a named Application metric.\n", + "externalDocs" : { + "description" : "Spring Boot Actuator Web API Documentation", + "url" : "https://docs.spring.io/spring-boot/reference/actuator/endpoints.html" + }, + "operationId" : "actuatorGetMetric", + "parameters" : [ { + "explode" : false, + "in" : "path", + "name" : "requiredMetricName", + "required" : true, + "schema" : { + "type" : "string" + }, + "style" : "simple" + } ], + "responses" : { + "200" : { + "content" : { + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" + } + }, + "application/json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" + } + } + }, + "description" : "OK" + } + }, + "summary" : "Actuator endpoint - Get Metric (actuatorGetMetric)", + "x-internal" : true + } + } + }, + "components" : { + "examples" : { "status_info" : { "value" : { "status" : "status" @@ -1476,6 +1463,24 @@ "policytype_ids" : [ "some_policytype_id", "some_policytype_id" ] } }, + "policy_type_id_list" : { + "description" : "Array of A1 Policy Type id's", + "value" : { + "policy_type_id_list" : [ "policytype_id", "policytype_id" ] + } + }, + "policy_info" : { + "description" : "Information for an A1 Policy Instance", + "value" : { + "ric_id" : "ric_id1", + "policy_id" : "policy_id1", + "transient" : false, + "service_id" : "service_id1", + "policy_data" : "{}", + "status_notification_uri" : "status_notification_uri", + "policytype_id" : "policytype_id1" + } + }, "ric_info_list" : { "value" : { "rics" : [ { @@ -1490,9 +1495,78 @@ "policytype_ids" : [ "policytype_ids", "policytype_ids" ] } ] } + }, + "service_status_list" : { + "description" : "List of service information", + "value" : { + "service_list" : [ { + "callback_url" : "callback_url", + "service_id" : "service_id", + "keep_alive_interval_seconds" : 0, + "time_since_last_activity_seconds" : 6 + }, { + "callback_url" : "callback_url", + "service_id" : "service_id", + "keep_alive_interval_seconds" : 0, + "time_since_last_activity_seconds" : 6 + } ] + } + }, + "policy_type_definition" : { + "description" : "Schema of the given A1 Policy Type", + "value" : { + "policy_schema" : "{}" + } + }, + "policy_id_list" : { + "description" : "A list of policy identities", + "value" : { + "policy_ids" : [ "some_policy_id", "some_policy_id" ] + } + }, + "policy_info_list" : { + "description" : "List of policy information", + "value" : { + "policies" : [ { + "ric_id" : "ric_id1", + "policy_id" : "policy_id1", + "transient" : false, + "service_id" : "service_id1", + "policy_data" : "{}", + "status_notification_uri" : "status_notification_uri", + "policytype_id" : "policytype_id1" + }, { + "ric_id" : "ric_id2", + "policy_id" : "policy_id2", + "transient" : true, + "service_id" : "service_id2", + "policy_data" : "{}", + "status_notification_uri" : "status_notification_uri", + "policytype_id" : "policytype_id2" + } ] + } + }, + "policy_status_info" : { + "description" : "Status for one A1-P Policy", + "value" : { + "last_modified" : "last_modified", + "status" : { + "value" : { + "status" : "status" + } + } + } } }, "responses" : { + "NotFound" : { + "content" : { + "application/problem+json" : { + "example" : [ ] + } + }, + "description" : "Not Found" + }, "Locked" : { "content" : { "application/problem+json" : { @@ -1537,74 +1611,16 @@ } }, "description" : "Forbidden" - }, - "NotFound" : { - "content" : { - "application/problem+json" : { - "example" : [ ] - } - }, - "description" : "Not Found" } }, - "schemas" : { - "policy_type_definition" : { - "description" : "Contains policy type schema definition", - "properties" : { - "policy_schema" : { - "description" : "Policy type json schema. The schema is a json object following http://json-schema.org/draft-07/schema", - "type" : "object" - } - }, - "type" : "object" - }, - "error_information" : { - "description" : "Problem as defined in https://tools.ietf.org/html/rfc7807", - "properties" : { - "detail" : { - "description" : " A human-readable explanation specific to this occurrence of the problem.", - "example" : "Policy type not found", - "type" : "string" - }, - "title" : { - "description" : "A specific error name", - "example" : "Not Found", - "type" : "string" - }, - "status" : { - "description" : "The HTTP status code generated by the origin server for this occurrence of the problem. ", - "example" : 404, - "format" : "int32", - "type" : "integer" - } - }, - "type" : "object" - }, - "void" : { - "description" : "Void/empty", - "type" : "object" - }, - "status_info" : { - "properties" : { - "status" : { - "description" : "status text", - "type" : "string" - } - }, - "type" : "object" - }, - "authorization_result" : { - "description" : "Result of authorization", - "example" : { - "result" : true - }, + "schemas" : { + "status_info" : { "properties" : { - "result" : { - "description" : "If true, the access is granted", - "type" : "boolean" + "status" : { + "description" : "status text", + "type" : "string" } }, - "required" : [ "result" ], "type" : "object" }, "ric_info" : { @@ -1628,9 +1644,9 @@ "type" : "string" }, "policytype_ids" : { - "description" : "supported policy types", + "description" : "supported A1 Policy Types", "items" : { - "description" : "supported policy types", + "description" : "supported A1 Policy Types", "type" : "string" }, "type" : "array" @@ -1638,49 +1654,106 @@ }, "type" : "object" }, - "service_registration_info" : { - "description" : "Information for one service", + "policy_type_id_list" : { + "description" : "Information about A1 Policy Types", "properties" : { - "callback_url" : { - "description" : "callback for notifying of Near-RT RIC state changes", + "policytype_ids" : { + "description" : "A1 Policy Type identities", + "items" : { + "description" : "A1 Policy Type identities", + "type" : "string" + }, + "type" : "array" + } + }, + "type" : "object" + }, + "policy_info" : { + "description" : "Information for one A1-P Policy", + "properties" : { + "ric_id" : { + "description" : "identity of the target Near-RT RIC", + "type" : "string" + }, + "policy_id" : { + "description" : "identity of the policy", "type" : "string" }, + "transient" : { + "default" : false, + "description" : "If true, the policy is automatically deleted if the targeted Near-RT RIC restarts or recovers. If false, the A1 Policy Instance remains, and is re-pushed to the targeted Near-RT RIC after a restart or recovery. If false, the A1 Policy Instance is maintained and must be deleted separately in the event of Near-RT RIC restart or recovery. Default is false.\n", + "example" : false, + "nullable" : false, + "type" : "boolean" + }, "service_id" : { - "description" : "identity of the service", + "default" : "", + "description" : "The identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated to a service). Note that the service does not need to be registered. If the service is registered, the A1 Policy Instance will be subject to the same supervision rules as the the service's other policies.\n", "type" : "string" }, - "keep_alive_interval_seconds" : { - "description" : "keep alive interval for the service. This is used to enable optional heartbeat supervision of the service. If set (> 0) the registered service should regularly invoke a 'keepalive' REST call. When a service fails to invoke this 'keepalive' call within the configured time, the service is considered unavailable. An unavailable service will be automatically deregistered and its policies will be deleted. Value 0 means timeout supervision is disabled.", - "format" : "int64", + "policy_data" : { + "description" : "the configuration of the policy", + "type" : "object" + }, + "status_notification_uri" : { + "description" : "Callback URI for policy status updates", + "type" : "string" + }, + "policytype_id" : { + "description" : "identity of the A1 Policy Type", + "type" : "string" + } + }, + "required" : [ "policy_data", "policy_id", "policytype_id", "ric_id" ], + "type" : "object" + }, + "void" : { + "description" : "Void/empty", + "type" : "object" + }, + "error_information" : { + "description" : "Problem as defined in https://tools.ietf.org/html/rfc7807", + "properties" : { + "detail" : { + "description" : " A human-readable explanation specific to this occurrence of the problem.", + "example" : "A1 Policy Type not found", + "type" : "string" + }, + "title" : { + "description" : "A specific error name", + "example" : "Not Found", + "type" : "string" + }, + "status" : { + "description" : "The HTTP status code generated by the origin server for this occurrence of the problem. ", + "example" : 404, + "format" : "int32", "type" : "integer" } }, - "required" : [ "service_id" ], "type" : "object" }, - "policy_info_list" : { - "description" : "List of policy information", + "ric_info_list" : { + "description" : "List of Near-RT RIC information", "properties" : { - "policies" : { - "description" : "List of policy information", + "rics" : { + "description" : "List of Near-RT RIC information", "items" : { - "$ref" : "#/components/schemas/policy_info" + "$ref" : "#/components/schemas/ric_info" }, "type" : "array" } }, "type" : "object" }, - "policy_status_info" : { - "description" : "Status for one A1-P Policy", + "service_status_list" : { "properties" : { - "last_modified" : { - "description" : "timestamp, last modification time", - "type" : "string" - }, - "status" : { - "description" : "the Policy status", - "type" : "object" + "service_list" : { + "description" : "List of service information", + "items" : { + "$ref" : "#/components/schemas/service_status" + }, + "type" : "array" } }, "type" : "object" @@ -1708,100 +1781,50 @@ }, "type" : "object" }, - "ric_info_list" : { - "description" : "List of Near-RT RIC information", - "properties" : { - "rics" : { - "description" : "List of Near-RT RIC information", - "items" : { - "$ref" : "#/components/schemas/ric_info" - }, - "type" : "array" - } - }, - "type" : "object" - }, - "input" : { - "description" : "input", + "service_registration_info" : { + "description" : "Information for one service", "properties" : { - "access_type" : { - "description" : "Access type", - "enum" : [ "READ", "WRITE", "DELETE" ], + "callback_url" : { + "description" : "Callback for notifying of Near-RT RIC state changes", "type" : "string" }, - "auth_token" : { - "description" : "Authorization token", + "service_id" : { + "description" : "identity of the service", "type" : "string" }, - "policy_type_id" : { - "description" : "Policy type identifier", - "type" : "string" - } - }, - "required" : [ "access_type", "auth_token", "policy_type_id" ], - "type" : "object" - }, - "policy_authorization" : { - "description" : "Authorization request for A1 policy requests", - "properties" : { - "input" : { - "$ref" : "#/components/schemas/input" + "keep_alive_interval_seconds" : { + "description" : "Keep alive interval for the service. This is used to enable optional heartbeat supervision of the service. If set (> 0) the registered service should regularly invoke a 'keepalive' REST call. When a service fails to invoke this 'keepalive' call within the configured time, the service is considered unavailable. An unavailable service will be automatically deregistered and its policies will be deleted. Value 0 means timeout supervision is disabled.\n", + "format" : "int64", + "type" : "integer" } }, - "required" : [ "input" ], + "required" : [ "service_id" ], "type" : "object" }, - "policy_type_id_list" : { - "description" : "Information about policy types", + "service_callback_info_v2" : { + "description" : "Information transferred in Service callbacks, \nif a callback URL was provided for a registered service\n", "properties" : { - "policytype_ids" : { - "description" : "Policy type identities", - "items" : { - "description" : "Policy type identities", - "type" : "string" - }, - "type" : "array" + "ric_id" : { + "description" : "identity of a Near-RT RIC", + "type" : "string" + }, + "event_type" : { + "description" : "values: \n AVAILABLE: the Near-RT RIC has become available for A1 Policy management\n", + "enum" : [ "AVAILABLE" ], + "type" : "string" } }, + "required" : [ "event_type", "ric_id" ], "type" : "object" }, - "policy_info" : { - "description" : "Information for one A1-P Policy", + "policy_type_definition" : { + "description" : "Contains A1 Policy Type schema definition", "properties" : { - "ric_id" : { - "description" : "identity of the target Near-RT RIC", - "type" : "string" - }, - "policy_id" : { - "description" : "identity of the policy", - "type" : "string" - }, - "transient" : { - "default" : false, - "description" : "if true, the policy is deleted at RIC restart. If false, its value is maintained by this service until explicitly deleted. Default false.", - "example" : false, - "nullable" : false, - "type" : "boolean" - }, - "service_id" : { - "default" : "", - "description" : "the identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated to a service). Note that the service does not need to be registered.", - "type" : "string" - }, - "policy_data" : { - "description" : "the configuration of the policy", + "policy_schema" : { + "description" : "A1 Policy Type json schema. The schema is a json object following http://json-schema.org/draft-07/schema", "type" : "object" - }, - "status_notification_uri" : { - "description" : "Callback URI for policy status updates", - "type" : "string" - }, - "policytype_id" : { - "description" : "identity of the policy type", - "type" : "string" } }, - "required" : [ "policy_data", "policy_id", "policytype_id", "ric_id" ], "type" : "object" }, "policy_id_list" : { @@ -1821,32 +1844,75 @@ }, "type" : "object" }, - "service_status_list" : { + "policy_info_list" : { + "description" : "List of policy information", "properties" : { - "service_list" : { - "description" : "List of service information", + "policies" : { + "description" : "List of policy information", "items" : { - "$ref" : "#/components/schemas/service_status" + "$ref" : "#/components/schemas/policy_info" }, "type" : "array" } }, "type" : "object" }, - "service_callback_info_v2" : { - "description" : "Information transferred as in Service callbacks (callback_url)", + "policy_status_info" : { + "description" : "Status for one A1-P Policy", "properties" : { - "ric_id" : { - "description" : "identity of a Near-RT RIC", + "last_modified" : { + "description" : "timestamp, last modification time", "type" : "string" }, - "event_type" : { - "description" : "values:\nAVAILABLE: the Near-RT RIC has become available for A1 Policy management", - "enum" : [ "AVAILABLE" ], + "status" : { + "description" : "the Policy status", + "type" : "object" + } + }, + "type" : "object" + }, + "policy_authorization" : { + "description" : "Authorization request for A1 policy requests", + "properties" : { + "input" : { + "$ref" : "#/components/schemas/input" + } + }, + "required" : [ "input" ], + "type" : "object" + }, + "input" : { + "description" : "input", + "properties" : { + "access_type" : { + "description" : "Access type", + "enum" : [ "READ", "WRITE", "DELETE" ], + "type" : "string" + }, + "auth_token" : { + "description" : "Authorization token", + "type" : "string" + }, + "policy_type_id" : { + "description" : "A1 Policy Type identifier", "type" : "string" } }, - "required" : [ "event_type", "ric_id" ], + "required" : [ "access_type", "auth_token", "policy_type_id" ], + "type" : "object" + }, + "authorization_result" : { + "description" : "Result of authorization", + "example" : { + "result" : true + }, + "properties" : { + "result" : { + "description" : "If true, the access is granted", + "type" : "boolean" + } + }, + "required" : [ "result" ], "type" : "object" }, "Link" : { diff --git a/a1-policy-management/api/offeredapis/swagger/pms-api.yaml b/a1-policy-management/api/offeredapis/swagger/pms-api.yaml index 421201e9..5f54504f 100644 --- a/a1-policy-management/api/offeredapis/swagger/pms-api.yaml +++ b/a1-policy-management/api/offeredapis/swagger/pms-api.yaml @@ -1,6 +1,6 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2020-2023 Nordix Foundation. All rights reserved. # Copyright (C) 2023-2025 OpenInfra Foundation Europe. All rights reserved. -# Modifications Copyright (C) 2021 Pantheon.tech -# Modifications Copyright (C) 2021 Bell Canada # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -19,322 +19,184 @@ openapi: 3.0.3 info: - x-api-id: a31c510b-20e6-4a08-af16-368c44d7fba8 - x-audience: external-public - description: "

      General

      The ONAP CCSDK A1 Policy Management Service\ - \ provides a REST API for managemecnt of A1 policies.
      The main tasks of the\ - \ service are:

      • A1 Policy creation, modification and deletion.
      • Monitoring\ - \ and maintaining consistency of the SMO view of A1 policies and the Near-RT RICs
      • Maintaining\ - \ a view of supported Near-RT RIC policy types
      • Supervision of using services\ - \ (R-APPs). When a service is unavailable, its policies are removed.

      APIs\ - \ provided or defined by the service

      A1 Policy Management

      This\ - \ is an API for management of A1 Policies.

      • A1 Policy retrieval, creation,\ - \ modification and deletion.
      • Retrieval of supported A1 Policy types for\ - \ a Near-RT RIC
      • Retrieval of status for existing A1 policies

      Management\ - \ of configuration

      API for updating and retrieval of the component configuration.\ - \ Note that there other ways to maintain the configuration.

      Service callbacks

      These\ - \ are endpoints that are invoked by this service. The callbacks are registered\ - \ in this service at service registration.

      NearRT-RIC Repository

      This\ - \ is an API that provides support for looking up a NearRT-RIC. Each A1 policy\ - \ is targeted for one Near-RT RIC.

      Health Check

      API used for supervision\ - \ of the PMS component.

      Service Registry and Supervision

      API used\ - \ for registering services that uses PMS. Each A1 policy is optionally owned by\ - \ a service. PMS can supervise each registered service by a heart-beat supervision\ - \ and will automatically remove policies for unavailable services. Note that a\ - \ service does not need to be registered in order to create A1 Policies. This\ - \ is a feature that is optional to use.

      Authorization API

      API used\ - \ for access control of A1 Policy access. If configured, an external authorization\ - \ provider is requested to grant access to the A1 Policy type.

      Spring Boot\ - \ Actuator

      Provides generic functions used to monitor and manage the Spring\ - \ web application.

      " + contact: + email: discuss-list@onap.com + name: ONAP CCSDK Project + url: https://www.onap.org/ + description: "

      General

      The ONAP CCSDK A1 Policy Management Service provides\ + \ a REST API for managing A1 policies.
      This document describes an older pre-spec\ + \ API set to perform tasks for:

      • A1 Policy creation, modification\ + \ and deletion.
      • Monitoring and maintaining consistency of the SMO view\ + \ of A1 Policies and the Near-RT RICs
      • Maintaining a view of each Near-RT\ + \ RIC's supported A1 Policy Types
      • Supervision of registered services (rApps).\ + \ When a registered service is unavailable, its policies are removed.

      APIs\ + \ provided or defined by the service

      A1 Policy Management (Older pre-spec\ + \ version)

      This is an older API for managing A1 Policies:

      • A1\ + \ Policy retrieval, creation, modification and deletion.
      • Retrieval of\ + \ supported A1 Policy Types for a Near-RT RIC
      • Retrieval of status for\ + \ existing A1 policies

      Management of configuration

      API for\ + \ updating and retrieval of the component configuration. Note that there other\ + \ ways to maintain the configuration.

      Service Callbacks

      These are\ + \ endpoints that are invoked by this service. The callbacks are registered in\ + \ this service at service registration.

      NearRT-RIC Repository (Older version)

      \ + \

      This is an API that provides support for looking up a NearRT-RIC. Each A1\ + \ policy is targeted towards one Near-RT RIC.

      Health Check

      API used\ + \ for supervision of the A1 Policy Management Service .

      Service Registry\ + \ and Supervision

      API used for registering services/clients/rApps. Each\ + \ A1 Policy can be tagged with an owner. If the owner service is registered, then\ + \ the service can be monitored by a heart-beat supervision mechanism, and if the\ + \ registered service becomes unavailable, then its A1 Policies are removed. Note\ + \ that services do not need to be registered to create A1 Policies, but unregistered\ + \ services are not supervised. This is a feature that is optional to use.

      Authorization\ + \ API

      API used for access control of A1 Policy access. If configured, an\ + \ external authorization provider is requested to grant access to the A1 Policy\ + \ Type.

      Spring Boot Actuator

      Provides built-in functions used to\ + \ monitor and configure the Spring web application hosting the service.

      " license: - name: Copyright (C) 2020-2023 Nordix Foundation, and Copyright (C) 2024-2025 OpenInfra Foundation Europe. - All rights reserved. Licensed under the Apache 2 License. + name: "Copyright (C) 2020-2023 Nordix Foundation, and Copyright (C) 2024-2025\ + \ OpenInfra Foundation Europe. \nAll rights reserved. Licensed under the Apache\ + \ 2 License.\n" url: http://www.apache.org/licenses/LICENSE-2.0 - title: ONAP CCSDK A1 Policy Management Service + title: ONAP CCSDK - Pre-Spec A1 Policy Management API version: 1.3.0 - contact: - url: https://www.onap.org/ - email: discuss-list@onap.com + x-api-id: a31c510b-20e6-4a08-af16-368c44d7fba8 + x-audience: external-public servers: - - url: / +- url: / tags: - - name: A1 Policy Management (Older version) - description: "Older API used to create polices, Policy Instances and get them as individual - using an ID or get all policies/Instances." - - name: NearRT-RIC Repository - description: "API used to get the NearRT-RIC for the managed element." - - name: Service Registry and Supervision - description: "API used to keep the service Alive with in the timeout period" - - name: Health Check - description: "API used to get the health status and statistics of this service" - - name: Service callbacks - description: "Callouts to indicate status schanges relevant for Services. -
      Note that these calls are called by A1-PMS, not provided." - - name: Authorization API - description: "API used for authorization of information A1 policy access (this is - provided by an authorization producer such as OPA).
      Note that this API is called - by A1-PMS, it is not provided." - - name: Configuration - description: "API used to create or fetch the application configuration." - - name: Actuator - description: Monitor and interact - externalDocs: - description: Spring Boot Actuator Web API Documentation - url: https://docs.spring.io/spring-boot/docs/current/actuator-api/html/ +- description: | + Older pre-spec API used to get, create, update and delete A1 Policy Instances. Also used to query A1 Policy Types. + name: A1 Policy Management +- description: | + Older API used to get information about registered Near-RT RICs. + name: NearRT-RIC Repository +- description: | + Older API used to manage registered services, and control their keep-alive status via heart-beat messages. + name: Service Registry and Supervision +- description: | + API used to get the health status and statistics of this service + name: Health Check +- description: | + Callout to registered services to indicate a status changes for a Near-RT RIC. Note that these operations are called by the A1 Policy Management Service, not provided. + name: Service Callbacks +- description: | + API used for authorization of information A1 policy access (this is provided by an authorization producer such as OPA). Note that these operations are called by the A1 Policy Management Service, not provided. + name: Authorization API +- description: | + API used to create or fetch the application configuration. + name: Configuration +- description: | + API used to monitor and configure the A1-PMS Springboot Service. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + name: Actuator API paths: - /a1-policy/v2/policy-instances: - get: - description: "Returns a list of A1 policies matching given search criteria.\ - \
      If several query parameters are defined, the policies matching all conditions\ - \ are returned." - operationId: getPolicyInstances - parameters: - - description: Select policies with a given type identity. - explode: true - in: query - name: policytype_id - required: false - schema: - type: string - style: form - - description: Select policies for a given Near-RT RIC identity. - explode: true - in: query - name: ric_id - required: false - schema: - type: string - style: form - - description: Select policies owned by a given service. - explode: true - in: query - name: service_id - required: false - schema: - type: string - style: form - - description: Select policies of a given type name (type identity has the format - ) - explode: true - in: query - name: type_name - required: false - schema: - type: string - style: form - responses: - "200": - content: - application/json: - examples: - policy_info_list: - $ref: '#/components/examples/policy_info_list' - schema: - $ref: '#/components/schemas/policy_info_list' - description: OK - Returns A1 Policies which matches the criteria - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/error_information' - description: "Not Found - Near-RT RIC, policy type or service not found" - summary: Query for A1 policy instances - tags: - - A1 Policy Management - /example-authz-check: - post: - description: The authorization function decides if access is granted. - operationId: performAccessControl - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/policy_authorization' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/authorization_result' - description: OK - "403": - $ref: '#/components/responses/Forbidden' - summary: Request for access authorization. - tags: - - Authorization API - /actuator/threaddump: + /status: get: - x-internal: true - operationId: threaddump + description: Returns status and statistics of this service + operationId: getStatusV1 responses: "200": content: - text/plain;charset=UTF-8: - schema: - type: object - application/vnd.spring-boot.actuator.v3+json: - schema: - type: object - application/json: - schema: - type: object - application/vnd.spring-boot.actuator.v2+json: + '*/*': schema: - type: object - description: OK - summary: Actuator web endpoint 'threaddump' + type: string + description: OK - Service is living + summary: Get Status (getStatusV1) tags: - - Actuator + - Health Check /a1-policy/v2/status: get: + description: Returns status and statistics of this service operationId: getStatus responses: "200": content: application/json: - schema: - $ref: '#/components/schemas/status_info' examples: status_info: $ref: '#/components/examples/status_info' - description: OK- Service is living Ok - description: Returns status and statistics of this service - tags: - - Health Check - /actuator/loggers: - get: - x-internal: true - operationId: loggers - responses: - "200": - content: - application/vnd.spring-boot.actuator.v3+json: - schema: - type: object - application/json: - schema: - type: object - application/vnd.spring-boot.actuator.v2+json: - schema: - type: object - description: OK - summary: Actuator web endpoint 'loggers' - tags: - - Actuator - /actuator/health/**: - get: - x-internal: true - operationId: health-path - responses: - "200": - content: - application/vnd.spring-boot.actuator.v3+json: - schema: - type: object - application/json: schema: - type: object - application/vnd.spring-boot.actuator.v2+json: - schema: - type: object - description: OK - summary: Actuator web endpoint 'health-path' + $ref: '#/components/schemas/status_info' + description: OK- Service is living Ok + summary: Get Status (getStatus) tags: - - Actuator + - Health Check /a1-policy/v2/rics/ric: get: - description: Either a Near-RT RIC identity or a Managed Element identity can - be specified.
      The intention with Managed Element identity is the ID used - in O1 for accessing the traffical element (such as the ID of CU). + description: | + Query information about a Near-RT RIC. Either a Near-RT RIC identity or a Managed Element identity can be specified. The intention with Managed Element identity is the ID used in O1 for accessing the traffical element (such as the ID of CU). operationId: getRic parameters: - - description: "The identity of a Managed Element. If given, the Near-RT RIC\ - \ managing the ME is returned." - explode: true - in: query - name: managed_element_id - required: false - schema: - type: string - style: form - - description: The identity of a Near-RT RIC to get information for. - explode: true - in: query - name: ric_id - required: false - schema: - type: string - style: form + - description: | + The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned. + explode: true + in: query + name: managed_element_id + required: false + schema: + type: string + style: form + - description: The identity of a Near-RT RIC to get information for. + explode: true + in: query + name: ric_id + required: false + schema: + type: string + style: form responses: "200": content: application/json: - schema: - $ref: '#/components/schemas/ric_info' examples: ric_info: $ref: '#/components/examples/ric_info' + schema: + $ref: '#/components/schemas/ric_info' description: OK - Near-RT RIC is found "404": - $ref: '#/components/responses/NotFound' - description: NotFound - Requested NearRT-RIC Not Found - summary: Returns info of Near-RT RIC queried by the ric-id and managed-element-id - tags: - - NearRT-RIC Repository - /actuator/shutdown: - post: - x-internal: true - operationId: shutdown - responses: - "200": content: - application/vnd.spring-boot.actuator.v3+json: - schema: - type: object - application/json: - schema: - type: object - application/vnd.spring-boot.actuator.v2+json: - schema: - type: object - description: OK - summary: Actuator web endpoint 'shutdown' + application/problem+json: + example: [] + description: Not Found + summary: Get a Near-RT RIC (getRic) tags: - - Actuator + - NearRT-RIC Repository /a1-policy/v2/policy-types: get: + description: Query A1 Policy Type identities using query parameters operationId: getPolicyTypes parameters: - - description: Select types for the given Near-RT RIC identity. - explode: true - in: query - name: ric_id - required: false - schema: - type: string - style: form - - description: Select types with the given type name (type identity has the - format ) - explode: true - in: query - name: type_name - required: false - schema: - type: string - style: form - - description: Select types that are compatible with the given version. This - parameter is only applicable in conjunction with type_name. As an example - version 1.9.1 is compatible with 1.0.0 but not the other way around. Matching - types will be returned sorted in ascending order. - explode: true - in: query - name: compatible_with_version - required: false - schema: - type: string - style: form + - description: Select types for the given Near-RT RIC identity. + explode: true + in: query + name: ric_id + required: false + schema: + type: string + style: form + - description: Select types compatible with the given type name (type identity + has the format 'typename_version') + explode: true + in: query + name: type_name + required: false + schema: + type: string + style: form + - description: Select types that are compatible with the given version. This + parameter is only applicable in conjunction with type_name. As an example + version 1.9.1 is compatible with 1.0.0 but not the other way around. Matching + types will be returned sorted in ascending order. + explode: true + in: query + name: compatible_with_version + required: false + schema: + type: string + style: form responses: "200": content: @@ -346,23 +208,25 @@ paths: $ref: '#/components/schemas/policy_type_id_list' description: OK - Policy Type IDs Found "404": - $ref: '#/components/responses/NotFound' - description: 'Not Found - Requested Policy Type IDs Not Found' - description: Query policy type identities + content: + application/problem+json: + example: [] + description: Not Found + summary: Get A1 Policy Types (getPolicyTypes) tags: - - A1 Policy Management + - A1 Policy Management /a1-policy/v2/policies/{policy_id}: delete: - description: Deleting the policy using the Policy's Policy ID. + description: Delete an A1 Policy instance using its policy ID. operationId: deletePolicy parameters: - - explode: false - in: path - name: policy_id - required: true - schema: - type: string - style: simple + - explode: false + in: path + name: policy_id + required: true + schema: + type: string + style: simple responses: "200": content: @@ -371,434 +235,650 @@ paths: $ref: '#/components/schemas/void' description: OK - Policy deleted "423": - $ref: '#/components/responses/Locked' - description: 'The requested policy using policy_id is Locked' - summary: Delete a policy + content: + application/problem+json: + example: + status: 423 + title: Locked + detail: Requested resource is in a locked state. + schema: + $ref: '#/components/schemas/error_information' + description: Locked - HTTP Status code which can be used when the state + is Locked + summary: Delete an A1 Policy instance (deletePolicy) tags: - - A1 Policy Management + - A1 Policy Management get: + description: Get an A1 Policy instance using its policy ID operationId: getPolicy parameters: - - explode: false - in: path - name: policy_id - required: true - schema: - type: string - style: simple + - explode: false + in: path + name: policy_id + required: true + schema: + type: string + style: simple responses: "200": content: application/json: - schema: - $ref: '#/components/schemas/policy_info' examples: policy_info: $ref: '#/components/examples/policy_info' + schema: + $ref: '#/components/schemas/policy_info' description: OK - Policy found "404": - $ref: '#/components/responses/NotFound' - description: 'Not Found - Requested Policy using policy_id is not found' - description: Returns a policy + content: + application/problem+json: + example: [] + description: Not Found + summary: Get an A1 Policy instance (getPolicy) tags: - - A1 Policy Management - /actuator/metrics/{requiredMetricName}: - get: - x-internal: true - operationId: metrics-requiredMetricName + - A1 Policy Management + /a1-policy/v2/services/{service_id}/keepalive: + put: + description: "A registered service should invoke this operation regularly to\ + \ indicate that it is still alive. If a registered service fails to invoke\ + \ some operation, or this operation, before the end of a timeout period the\ + \ service will be deregistered and all its A1 policies wil be removed. This\ + \ operation is only intended for registered services. (This timeout can be\ + \ set or disabled when each service is initially registered)" + operationId: keepAliveService parameters: - - explode: false - in: path - name: requiredMetricName - required: true - schema: - type: string - style: simple + - explode: false + in: path + name: service_id + required: true + schema: + type: string + style: simple responses: "200": content: - application/vnd.spring-boot.actuator.v3+json: + '*/*': schema: type: object + description: "OK - Service supervision timer refreshed, OK" + "404": + content: + application/problem+json: + example: [] + description: Not Found + summary: Heartbeat message from a service (keepAliveService) + tags: + - Service Registry and Supervision + /a1-policy/v2/rics: + get: + description: Get all Near-RT RICs that supports a given A1 Policy Type ID + operationId: getRics + parameters: + - description: | + The identity of an A1 Policy Type. If given, all Near-RT RICs supporting the A1 Policy Type are returned. + explode: true + in: query + name: policytype_id + required: false + schema: + type: string + style: form + responses: + "200": + content: application/json: + examples: + ric_info_list: + $ref: '#/components/examples/ric_info_list' schema: - type: object - application/vnd.spring-boot.actuator.v2+json: - schema: - type: object + $ref: '#/components/schemas/ric_info_list' description: OK - summary: Actuator web endpoint 'metrics-requiredMetricName' + "404": + content: + application/problem+json: + example: [] + description: Not Found + summary: Get Near-RT RICs for A1 Policy Type (getRics) tags: - - Actuator - /a1-policy/v2/configuration: + - NearRT-RIC Repository + /a1-policy/v2/services: get: - operationId: getConfiguration + description: | + Get information about all registered services, or a single registered service. If the service ID of a registered service is included in the query, information about that service is returned. Otherwise Information about all registered is returned. This operation does not retrieve information about unregistered services. + operationId: getServices + parameters: + - description: The identity of the registered service + explode: true + in: query + name: service_id + required: false + schema: + type: string + style: form responses: "200": content: application/json: + examples: + service_status_list: + $ref: '#/components/examples/service_status_list' schema: - type: string - description: OK - Configuration + $ref: '#/components/schemas/service_status_list' + description: OK "404": - $ref: '#/components/responses/NotFound' - description: Not Found - Configuration is not found or readable - description: Returns the contents of the application configuration file + content: + application/problem+json: + example: [] + description: Not Found + summary: Get Services (getServices) tags: - - Configuration + - Service Registry and Supervision put: - operationId: putConfiguration + callbacks: + RICStatus: + '{$request.body#/callback_url}': + post: + description: "Callouts to indicate Near-RT RIC status changes relevant\ + \ for Services. \nThe URL invoked by this callback is provided at\ + \ Service registration.\n" + operationId: serviceCallback + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/service_callback_info_v2' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/void' + description: OK + "404": + content: + application/problem+json: + example: [] + description: Not Found + summary: Callback for Near-RT RIC status (serviceCallback) + tags: + - Service Registry and Supervision + - Service Callbacks + x-callback-request: true + description: | + Register a single service, or update a previous registtration. Service registration is required to get callbacks about available NearRT RICs and to enable supervision of the service's active status. If a registered service becomes inactive, its policies can be automatically deleted. A1 Policy instances can also be created for unregistered services. If an unregistered service is later registered, the service's policies are retained when the service becomes registered. This feature is optional to use. + operationId: putService requestBody: content: application/json: schema: - type: object + $ref: '#/components/schemas/service_registration_info' required: true responses: "200": content: '*/*': schema: - $ref: '#/components/schemas/void' - description: OK - Configuration updated + type: object + description: OK - Service updated + "201": + content: + '*/*': + schema: + type: object + description: Created - Service created "400": - $ref: '#/components/responses/BadRequest' - description: Replace the current configuration with the given configuration - tags: - - Configuration - /actuator: - get: - x-internal: true - operationId: links - responses: - "200": content: - application/vnd.spring-boot.actuator.v3+json: + application/problem+json: + example: + status: 400 + title: Bad Request + detail: The provided request is not valid. schema: - additionalProperties: - additionalProperties: - $ref: '#/components/schemas/Link' - type: object - type: object + $ref: '#/components/schemas/error_information' + description: Bad Request + summary: Register or update a Service (putService) + tags: + - Service Registry and Supervision + /a1-policy/v2/policy-types/{policytype_id}: + get: + description: Get an A1 Policy Type definition using its policy type ID + operationId: getPolicyTypeDefinition + parameters: + - explode: false + in: path + name: policytype_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: application/json: + examples: + policy_type_definition: + $ref: '#/components/examples/policy_type_definition' schema: - additionalProperties: - additionalProperties: - $ref: '#/components/schemas/Link' - type: object - type: object - application/vnd.spring-boot.actuator.v2+json: - schema: - additionalProperties: - additionalProperties: - $ref: '#/components/schemas/Link' - type: object - type: object - description: OK - summary: Actuator root web endpoint + $ref: '#/components/schemas/policy_type_definition' + description: OK - schema of the requested A1 Policy Type + "404": + content: + application/problem+json: + example: [] + description: Not Found + summary: Get an A1 Policy Type definition (getPolicyTypeDefinition) tags: - - Actuator - /actuator/loggers/{name}: + - A1 Policy Management + /a1-policy/v2/policies: get: - x-internal: true - operationId: loggers-name + description: | + Retrieve a list of A1 Policy Instance IDs for policies that match given search criteria. If multiple query parameters are given, the policies matching all conditions are returned. + operationId: getPolicyIds parameters: - - explode: false - in: path - name: name - required: true - schema: - type: string - style: simple + - description: Select policies of a given A1 Policy Type ID. + explode: true + in: query + name: policytype_id + required: false + schema: + type: string + style: form + - description: Select policies of a given Near-RT RIC identity. + explode: true + in: query + name: ric_id + required: false + schema: + type: string + style: form + - description: Select policies owned by a given service. (Both registered and + unregistered services) + explode: true + in: query + name: service_id + required: false + schema: + type: string + style: form + - description: | + Select policies of types with the given A1 Policy Type name (type names have the format 'typename_version') + explode: true + in: query + name: type_name + required: false + schema: + type: string + style: form responses: "200": content: - application/vnd.spring-boot.actuator.v3+json: - schema: - type: object application/json: + examples: + policy_id_list: + $ref: '#/components/examples/policy_id_list' schema: - type: object - application/vnd.spring-boot.actuator.v2+json: - schema: - type: object - description: OK - summary: Actuator web endpoint 'loggers-name' + $ref: '#/components/schemas/policy_id_list' + description: OK - Policy identities + "404": + content: + application/problem+json: + example: [] + description: Not Found + summary: Query A1 Policy Instances (getPolicyIds) tags: - - Actuator - post: - x-internal: true - operationId: loggers-name_2 - parameters: - - explode: false - in: path - name: name - required: true - schema: - type: string - style: simple + - A1 Policy Management + put: + description: Create or Update an A1 Policy Instance + operationId: putPolicy requestBody: content: application/json: schema: - enum: - - TRACE - - DEBUG - - INFO - - WARN - - ERROR - - FATAL - - "OFF" - type: string + $ref: '#/components/schemas/policy_info' + required: true responses: "200": content: - '*/*': + application/json: schema: - type: object - description: OK - summary: Actuator web endpoint 'loggers-name' - tags: - - Actuator - /a1-policy/v2/services/{service_id}/keepalive: - put: - description: A registered service should invoke this operation regularly to - indicate that it is still alive. If a registered service fails to invoke this - operation before the end of a timeout period the service will be deregistered - and all its A1 policies wil be removed. (This timeout can be set or disabled - when each service is initially registered) - operationId: keepAliveService - parameters: - - explode: false - in: path - name: service_id - required: true - schema: - type: string - style: simple - responses: - "200": + $ref: '#/components/schemas/void' + description: OK - Policy updated + "201": content: - '*/*': + application/json: schema: - type: object - description: "OK - Service supervision timer refreshed, OK" - "404": - $ref: '#/components/responses/NotFound' - summary: Heartbeat indicates that the service is running + $ref: '#/components/schemas/void' + description: Created - Policy created + "423": + content: + application/problem+json: + example: + status: 423 + title: Locked + detail: Requested resource is in a locked state. + schema: + $ref: '#/components/schemas/error_information' + description: Locked - HTTP Status code which can be used when the state + is Locked + summary: Create or Update an A1 Policy Instance (putPolicy) tags: - - Service Registry and Supervision - /actuator/metrics: + - A1 Policy Management + /a1-policy/v2/policy-instances: get: - x-internal: true - operationId: metrics + description: | + Returns a collection of A1 Policy Instance information for policies that match given search criteria. If several query parameters are defined, the policies matching all conditions are returned. + operationId: getPolicyInstances + parameters: + - description: Select policies with a given A1 Policy Type ID. + explode: true + in: query + name: policytype_id + required: false + schema: + type: string + style: form + - description: Select policies for a given Near-RT RIC identity. + explode: true + in: query + name: ric_id + required: false + schema: + type: string + style: form + - description: Select policies owned by a given service (registered or unregistered). + explode: true + in: query + name: service_id + required: false + schema: + type: string + style: form + - description: Select policies of a given A1 Policy Type name (type identity + has the format 'typename_version'). + explode: true + in: query + name: type_name + required: false + schema: + type: string + style: form responses: "200": content: - application/vnd.spring-boot.actuator.v3+json: + application/json: + examples: + policy_info_list: + $ref: '#/components/examples/policy_info_list' schema: - type: object + $ref: '#/components/schemas/policy_info_list' + description: OK - Returns A1 Policy Instances which match the criteria + "404": + content: application/json: schema: - type: object - application/vnd.spring-boot.actuator.v2+json: + $ref: '#/components/schemas/error_information' + description: "Not Found - Near-RT RIC, A1 Policy Type or service was not\ + \ found" + summary: Query for A1 Policy instances (getPolicyInstances) + tags: + - A1 Policy Management + /a1-policy/v2/services/{service_id}: + delete: + description: | + Unregister a registered Service using its service ID. Only registered services can be unregistered. All A1 Policy Instances for the previously registered service will be removed. + operationId: deleteService + parameters: + - explode: false + in: path + name: service_id + required: true + schema: + type: string + style: simple + responses: + "204": + content: + '*/*': schema: type: object - description: OK - summary: Actuator web endpoint 'metrics' + description: No Content - Service unregistered + "404": + content: + application/problem+json: + example: [] + description: Not Found + summary: Unregister a Service (deleteService) tags: - - Actuator - /a1-policy/v2/rics: + - Service Registry and Supervision + /a1-policy/v2/policies/{policy_id}/status: get: - description: The call returns all Near-RT RICs that supports a given policy - type identity - operationId: getRics + description: Retrieve the status information for an A1 Policy Instance. + operationId: getPolicyStatus parameters: - - description: "The identity of a policy type. If given, all Near-RT RICs supporting\ - \ the policy type are returned" - explode: true - in: query - name: policytype_id - required: false - schema: - type: string - style: form + - explode: false + in: path + name: policy_id + required: true + schema: + type: string + style: simple responses: "200": content: application/json: - schema: - $ref: '#/components/schemas/ric_info_list' examples: - ric_info_list: - $ref: '#/components/examples/ric_info_list' - description: OK + policy_status_info: + $ref: '#/components/examples/policy_status_info' + schema: + $ref: '#/components/schemas/policy_status_info' + description: OK - Policy status "404": - $ref: '#/components/responses/NotFound' - summary: Query Near-RT RIC information + content: + application/problem+json: + example: [] + description: Not Found + summary: Get an A1 Policy Instance's status (getPolicyStatus) tags: - - NearRT-RIC Repository - /a1-policy/v2/services: + - A1 Policy Management + /a1-policy/v2/configuration: get: - description: Either information about a registered service with given identity - or all registered services are returned. - operationId: getServices - parameters: - - description: The identity of the service - explode: true - in: query - name: service_id - required: false - schema: - type: string - style: form + description: Returns the entire contents of the Application Configuration. + operationId: getConfiguration responses: "200": content: application/json: schema: - $ref: '#/components/schemas/service_status_list' - examples: - service_status_list: - $ref: '#/components/examples/service_status_list' - description: OK + type: string + description: OK - Configuration "404": - $ref: '#/components/responses/NotFound' - summary: Returns service information + content: + application/problem+json: + example: [] + description: Not Found + summary: Get the Application Configuration (getConfiguration) tags: - - Service Registry and Supervision + - Configuration put: - description: "Registering a service is needed to:
      • Get callbacks about\ - \ available NearRT RICs.
      • Activate supervision of the service. If a\ - \ service is inactive, its policies will automatically be deleted.
      Policies\ - \ can be created even if the service is not registerred. This is a feature\ - \ which it is optional to use." - operationId: putService + description: | + Replace the current Application Configuration with a new configuration. The new configuration, if accepted, will take effect after a short delay. The new configuration must comply with the Application Configuration schema, which can be found from the the Application Documentation (Developer Guide) + operationId: putConfiguration requestBody: content: application/json: schema: - $ref: '#/components/schemas/service_registration_info' + type: object required: true responses: "200": content: '*/*': schema: - type: object - description: OK - Service updated - "201": + $ref: '#/components/schemas/void' + description: OK - Configuration updated + "400": content: - '*/*': + application/problem+json: + example: + status: 400 + title: Bad Request + detail: The provided request is not valid. schema: - type: object - description: Created - Service created - "400": - $ref: '#/components/responses/BadRequest' - summary: Register a service + $ref: '#/components/schemas/error_information' + description: Bad Request + summary: Set/Replace the Application Configuration (putConfiguration) tags: - - Service Registry and Supervision - callbacks: - RICStatus: - "{$request.body#/callback_url}": - post: - description: The URL to this call is registered at Service registration. - operationId: serviceCallback - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/service_callback_info_v2' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/void' - description: OK - "404": - $ref: '#/components/responses/NotFound' - summary: Callback for Near-RT RIC status - tags: - - Service callbacks - /actuator/info: + - Configuration + /example-authz-check: + post: + description: | + A template endpoint for callout requests to an external authorization function. The authorization function, if enabled, decides if individual operations are permitted. + operationId: performAccessControl + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/policy_authorization' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/authorization_result' + description: OK + "403": + content: + application/problem+json: + example: + status: 403 + title: Forbidden + detail: Your role does not allow to perform this action. Contact System + Administrator to change your access rights. + schema: + $ref: '#/components/schemas/error_information' + description: Forbidden + summary: Callout request for access authorization (performAccessControl) + tags: + - Authorization API + /actuator: get: - x-internal: true - operationId: info + description: | + A1-PMS Springboot Service Actuator web endpoint. Returns a set of links to available/enabled actuator endpoints. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + operationId: actuatorLinks responses: "200": content: application/vnd.spring-boot.actuator.v3+json: schema: + additionalProperties: + additionalProperties: + $ref: '#/components/schemas/Link' + type: object type: object application/json: schema: + additionalProperties: + additionalProperties: + $ref: '#/components/schemas/Link' + type: object type: object application/vnd.spring-boot.actuator.v2+json: schema: + additionalProperties: + additionalProperties: + $ref: '#/components/schemas/Link' + type: object type: object description: OK - summary: Actuator web endpoint 'info' + summary: Actuator endpoint - Root (actuatorLinks) tags: - - Actuator - /status: + - Actuator API + x-internal: true + /actuator/heapdump: get: - operationId: getStatusV1 + description: | + A1-PMS Springboot Service Actuator web endpoint - HeapDump. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + operationId: actuatorHeapdump responses: "200": content: - '*/*': + application/octet-stream: schema: - type: string - description: OK - Service is living - description: Returns status and statistics of this service + type: object + description: OK + summary: Actuator endpoint - Heapdump (actuatorHeapdump) tags: - - Health Check - /a1-policy/v2/policy-types/{policytype_id}: + - Actuator API + x-internal: true + /actuator/info: get: - operationId: getPolicyTypeDefinition - parameters: - - explode: false - in: path - name: policytype_id - required: true - schema: - type: string - style: simple + description: | + A1-PMS Springboot Service Actuator web endpoint - Info. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + operationId: actuatorInfo responses: "200": content: + application/vnd.spring-boot.actuator.v3+json: + schema: + type: object application/json: schema: - $ref: '#/components/schemas/policy_type_definition' - examples: - policy_type_definition: - $ref: '#/components/examples/policy_type_definition' - description: OK - schema of the given policy type - "404": - $ref: '#/components/responses/NotFound' - description: Returns a policy type definition + type: object + application/vnd.spring-boot.actuator.v2+json: + schema: + type: object + description: OK + summary: Actuator endpoint - Info (actuatorInfo) tags: - - A1 Policy Management - /actuator/logfile: - get: + - Actuator API x-internal: true - operationId: logfile + /actuator/threaddump: + get: + description: | + A1-PMS Springboot Service Actuator web endpoint - ThreadDump. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + operationId: actuatorThreaddump responses: "200": content: text/plain;charset=UTF-8: schema: type: object + application/vnd.spring-boot.actuator.v3+json: + schema: + type: object + application/json: + schema: + type: object + application/vnd.spring-boot.actuator.v2+json: + schema: + type: object description: OK - summary: Actuator web endpoint 'logfile' + summary: Actuator endpoint - Threaddump (actuatorThreaddump) tags: - - Actuator - /actuator/health: - get: + - Actuator API x-internal: true - operationId: health + /actuator/loggers: + get: + description: | + A1-PMS Springboot Service Actuator web endpoint - Get a list of Loggers. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + operationId: actuatorLoggers responses: "200": content: @@ -812,257 +892,322 @@ paths: schema: type: object description: OK - summary: Actuator web endpoint 'health' + summary: Actuator endpoint - Get Loggers (actuatorLoggers) tags: - - Actuator - /a1-policy/v2/policies: + - Actuator API + x-internal: true + /actuator/loggers/{name}: get: - description: "Returns a list of A1 policies matching given search criteria.\ - \
      If several query parameters are defined, the policies matching all conditions\ - \ are returned." - operationId: getPolicyIds + description: | + A1-PMS Springboot Service Actuator web endpoint - Get a single named Logger. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + operationId: actuatorGetLogger parameters: - - description: Select policies of a given policy type identity. - explode: true - in: query - name: policytype_id - required: false - schema: - type: string - style: form - - description: Select policies of a given Near-RT RIC identity. - explode: true - in: query - name: ric_id - required: false - schema: - type: string - style: form - - description: Select policies owned by a given service. - explode: true - in: query - name: service_id - required: false - schema: - type: string - style: form - - description: Select policies of types with the given type name (type identity - has the format ) - explode: true - in: query - name: type_name - required: false - schema: - type: string - style: form + - explode: false + in: path + name: name + required: true + schema: + type: string + style: simple responses: "200": content: + application/vnd.spring-boot.actuator.v3+json: + schema: + type: object application/json: - examples: - policy_id_list: - $ref: '#/components/examples/policy_id_list' schema: - $ref: '#/components/schemas/policy_id_list' - description: OK - Policy identities - "404": - $ref: '#/components/responses/NotFound' - summary: Query policy identities + type: object + application/vnd.spring-boot.actuator.v2+json: + schema: + type: object + description: OK + summary: Actuator endpoint - Get Logger (actuatorGetLogger) tags: - - A1 Policy Management - put: - operationId: putPolicy + - Actuator API + x-internal: true + post: + description: | + A1-PMS Springboot Service Actuator web endpoint - Create or Update single named Logger. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + operationId: actuatorSetlogger + parameters: + - explode: false + in: path + name: name + required: true + schema: + type: string + style: simple requestBody: content: application/json: schema: - $ref: '#/components/schemas/policy_info' - required: true + enum: + - TRACE + - DEBUG + - INFO + - WARN + - ERROR + - FATAL + - "OFF" + type: string + responses: + "200": + content: + '*/*': + schema: + type: object + description: OK + summary: Actuator endpoint - Set Logger (actuatorSetlogger) + tags: + - Actuator API + x-internal: true + /actuator/logfile: + get: + description: | + A1-PMS Springboot Service Actuator web endpoint - Get the Log file. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + operationId: actuatorGetLogFile responses: "200": content: + text/plain;charset=UTF-8: + schema: + type: object + description: OK + summary: Actuator endpoint - Log File (actuatorGetLogFile) + tags: + - Actuator API + x-internal: true + /actuator/health: + get: + description: | + A1-PMS Springboot Service Actuator web endpoint - Health Check. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + operationId: actuatorHealth + responses: + "200": + content: + application/vnd.spring-boot.actuator.v3+json: + schema: + type: object application/json: schema: - $ref: '#/components/schemas/void' - description: OK - Policy updated - "201": + type: object + application/vnd.spring-boot.actuator.v2+json: + schema: + type: object + description: OK + summary: Actuator endpoint - Health (actuatorHealth) + tags: + - Actuator API + x-internal: true + /actuator/health/**: + get: + description: | + A1-PMS Springboot Service Actuator web endpoint - Health Status for an Application Component. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + operationId: actuatorHealthComponent + responses: + "200": content: + application/vnd.spring-boot.actuator.v3+json: + schema: + type: object application/json: schema: - $ref: '#/components/schemas/void' - description: Created - Policy created - "423": - $ref: '#/components/responses/Locked' - description: Create or update a policy + type: object + application/vnd.spring-boot.actuator.v2+json: + schema: + type: object + description: OK + summary: Actuator endpoint - Component Health (actuatorHealthComponent) tags: - - A1 Policy Management - /a1-policy/v2/services/{service_id}: - delete: - operationId: deleteService - parameters: - - explode: false - in: path - name: service_id - required: true - schema: - type: string - style: simple + - Actuator API + x-internal: true + /actuator/shutdown: + post: + description: | + A1-PMS Springboot Service Actuator web endpoint - Shutdown the Application. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + operationId: actuatorShutdown responses: - "204": + "200": content: - '*/*': + application/vnd.spring-boot.actuator.v3+json: schema: type: object - description: No Content - Service unregistered - "404": - $ref: '#/components/responses/NotFound' - description: Unregister a service + application/json: + schema: + type: object + application/vnd.spring-boot.actuator.v2+json: + schema: + type: object + description: OK + summary: Actuator endpoint - Shutdown (actuatorShutdown) tags: - - Service Registry and Supervision - /actuator/heapdump: - get: + - Actuator API x-internal: true - operationId: heapdump + /actuator/metrics: + get: + description: | + A1-PMS Springboot Service Actuator web endpoint - Get a list of Application metrics names. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + operationId: actuatorMetrics responses: "200": content: - application/octet-stream: + application/vnd.spring-boot.actuator.v3+json: + schema: + type: object + application/json: + schema: + type: object + application/vnd.spring-boot.actuator.v2+json: schema: type: object description: OK - summary: Actuator web endpoint 'heapdump' + summary: Actuator endpoint - Metrics (actuatorMetrics) tags: - - Actuator - /a1-policy/v2/policies/{policy_id}/status: + - Actuator API + x-internal: true + /actuator/metrics/{requiredMetricName}: get: - operationId: getPolicyStatus + description: | + A1-PMS Springboot Service Actuator web endpoint - Get the value for a named Application metric. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + operationId: actuatorGetMetric parameters: - - explode: false - in: path - name: policy_id - required: true - schema: - type: string - style: simple + - explode: false + in: path + name: requiredMetricName + required: true + schema: + type: string + style: simple responses: "200": content: + application/vnd.spring-boot.actuator.v3+json: + schema: + type: object application/json: schema: - $ref: '#/components/schemas/policy_status_info' - examples: - policy_status_info: - $ref: '#/components/examples/policy_status_info' - description: OK - Policy status - "404": - $ref: '#/components/responses/NotFound' - description: Returns a policy status - tags: - - A1 Policy Management + type: object + application/vnd.spring-boot.actuator.v2+json: + schema: + type: object + description: OK + summary: Actuator endpoint - Get Metric (actuatorGetMetric) + x-internal: true components: - responses: - Locked: - description: "Locked - HTTP Status code which can be used when the state is Locked" - content: - application/problem+json: - schema: - $ref: '#/components/schemas/error_information' - example: - status: 423 - title: Locked - detail: Requested resource is in a locked state. - BadRequest: - description: Bad Request - content: - application/problem+json: - schema: - $ref: '#/components/schemas/error_information' - example: - status: 400 - title: Bad Request - detail: The provided request is not valid. - Forbidden: - description: Forbidden - content: - application/problem+json: - schema: - $ref: '#/components/schemas/error_information' - example: - status: 403 - title: Forbidden - detail: Your role does not allow to perform this action. Contact System Administrator to change your access rights. - NotFound: - description: Not Found - content: - application/problem+json: - example: - [ ] - examples: - service_status: - description: List of service information - value: - callback_url: callback_url - service_id: service_id - keep_alive_interval_seconds: 0 - time_since_last_activity_seconds: 6 - - service_status_list: - description: List of service information + status_info: value: - service_list: - - callback_url: callback_url - service_id: service_id - keep_alive_interval_seconds: 0 - time_since_last_activity_seconds: 6 - - callback_url: callback_url - service_id: service_id - keep_alive_interval_seconds: 0 - time_since_last_activity_seconds: 6 - policy_type_definition: - description: Schema of the given Policy type + status: status + ric_info: value: - policy_schema: "{}" + ric_id: ric_id + managed_element_ids: + - some_managed_element_id + - some_managed_element_id + state: UNAVAILABLE + policytype_ids: + - some_policytype_id + - some_policytype_id policy_type_id_list: - description: Array of policy type id's + description: Array of A1 Policy Type id's value: policy_type_id_list: - - policytype_id - - policytype_id + - policytype_id + - policytype_id policy_info: - description: Policy information of one A1-P policy + description: Information for an A1 Policy Instance value: - ric_id: ric_id - policy_id: policy_id + ric_id: ric_id1 + policy_id: policy_id1 transient: false - service_id: service_id + service_id: service_id1 policy_data: "{}" status_notification_uri: status_notification_uri - policytype_id: policytype_id - policy_info_list: - description: List of policy information + policytype_id: policytype_id1 + ric_info_list: value: - policies: - - ric_id: ric_id - policy_id: policy_id - transient: false - service_id: service_id - policy_data: "{}" - status_notification_uri: status_notification_uri - policytype_id: policytype_id - - ric_id: ric_id - policy_id: policy_id - transient: false - service_id: service_id - policy_data: "{}" - status_notification_uri: status_notification_uri - policytype_id: policytype_id + rics: + - ric_id: ric_id + managed_element_ids: + - some_managed_element_id + - some_managed_element_id + state: UNAVAILABLE + policytype_ids: + - policytype_id + - policytype_id + - ric_id: ric_id + managed_element_ids: + - managed_element_ids + - managed_element_ids + state: UNAVAILABLE + policytype_ids: + - policytype_ids + - policytype_ids + service_status_list: + description: List of service information + value: + service_list: + - callback_url: callback_url + service_id: service_id + keep_alive_interval_seconds: 0 + time_since_last_activity_seconds: 6 + - callback_url: callback_url + service_id: service_id + keep_alive_interval_seconds: 0 + time_since_last_activity_seconds: 6 + policy_type_definition: + description: Schema of the given A1 Policy Type + value: + policy_schema: "{}" policy_id_list: description: A list of policy identities value: policy_ids: - - some_policy_id - - some_policy_id + - some_policy_id + - some_policy_id + policy_info_list: + description: List of policy information + value: + policies: + - ric_id: ric_id1 + policy_id: policy_id1 + transient: false + service_id: service_id1 + policy_data: "{}" + status_notification_uri: status_notification_uri + policytype_id: policytype_id1 + - ric_id: ric_id2 + policy_id: policy_id2 + transient: true + service_id: service_id2 + policy_data: "{}" + status_notification_uri: status_notification_uri + policytype_id: policytype_id2 policy_status_info: description: Status for one A1-P Policy value: @@ -1070,89 +1215,63 @@ components: status: value: status: status + responses: + NotFound: + content: + application/problem+json: + example: [] + description: Not Found + Locked: + content: + application/problem+json: + example: + status: 423 + title: Locked + detail: Requested resource is in a locked state. + schema: + $ref: '#/components/schemas/error_information' + description: Locked - HTTP Status code which can be used when the state is Locked + BadRequest: + content: + application/problem+json: + example: + status: 400 + title: Bad Request + detail: The provided request is not valid. + schema: + $ref: '#/components/schemas/error_information' + description: Bad Request + Forbidden: + content: + application/problem+json: + example: + status: 403 + title: Forbidden + detail: Your role does not allow to perform this action. Contact System + Administrator to change your access rights. + schema: + $ref: '#/components/schemas/error_information' + description: Forbidden + schemas: status_info: - value: - status: status - ric_info: - value: - ric_id: ric_id - managed_element_ids: - - some_managed_element_id - - some_managed_element_id - state: UNAVAILABLE - policytype_ids: - - some_policytype_id - - some_policytype_id - ric_info_list: - value: - rics: - - ric_id: ric_id - managed_element_ids: - - some_managed_element_id - - some_managed_element_id - state: UNAVAILABLE - policytype_ids: - - policytype_id - - policytype_id - - ric_id: ric_id - managed_element_ids: - - managed_element_ids - - managed_element_ids - state: UNAVAILABLE - policytype_ids: - - policytype_ids - - policytype_ids - - schemas: - policy_type_definition: - description: Contains policy type schema definition - type: object - properties: - policy_schema: - description: Policy type json schema. The schema is a json object following - http://json-schema.org/draft-07/schema - type: object - error_information: - description: Problem as defined in https://tools.ietf.org/html/rfc7807 - properties: - detail: - description: ' A human-readable explanation specific to this occurrence - of the problem.' - example: Policy type not found - type: string - title: - description: 'A specific error name' - type: string - example: Not Found - status: - description: 'The HTTP status code generated by the origin server for this - occurrence of the problem. ' - example: 404 - format: int32 - type: integer - type: object - void: - description: Void/empty - type: object - status_info: + example: + status: status properties: status: description: status text type: string type: object - authorization_result: - description: Result of authorization - example: - result: true - properties: - result: - description: "If true, the access is granted" - type: boolean - required: - - result - type: object ric_info: description: Information for a Near-RT RIC + example: + ric_id: ric_id + managed_element_ids: + - managed_element_ids + - managed_element_ids + state: UNAVAILABLE + policytype_ids: + - policytype_ids + - policytype_ids properties: ric_id: description: identity of the Near-RT RIC @@ -1166,60 +1285,153 @@ components: state: description: Represents the states for a Near-RT RIC enum: - - UNAVAILABLE - - AVAILABLE - - SYNCHRONIZING - - CONSISTENCY_CHECK + - UNAVAILABLE + - AVAILABLE + - SYNCHRONIZING + - CONSISTENCY_CHECK type: string policytype_ids: - description: supported policy types + description: supported A1 Policy Types items: - description: supported policy types + description: supported A1 Policy Types type: string type: array type: object - service_registration_info: - description: Information for one service + policy_type_id_list: + description: Information about A1 Policy Types + example: + policytype_ids: + - policytype_ids + - policytype_ids properties: - callback_url: - description: callback for notifying of Near-RT RIC state changes + policytype_ids: + description: A1 Policy Type identities + items: + description: A1 Policy Type identities + type: string + type: array + type: object + policy_info: + description: Information for one A1-P Policy + example: + ric_id: ric_id + policy_id: policy_id + transient: false + service_id: "" + policy_data: "{}" + status_notification_uri: status_notification_uri + policytype_id: policytype_id + properties: + ric_id: + description: identity of the target Near-RT RIC + type: string + policy_id: + description: identity of the policy type: string + transient: + default: false + description: | + If true, the policy is automatically deleted if the targeted Near-RT RIC restarts or recovers. If false, the A1 Policy Instance remains, and is re-pushed to the targeted Near-RT RIC after a restart or recovery. If false, the A1 Policy Instance is maintained and must be deleted separately in the event of Near-RT RIC restart or recovery. Default is false. + example: false + nullable: false + type: boolean service_id: - description: identity of the service + default: "" + description: | + The identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated to a service). Note that the service does not need to be registered. If the service is registered, the A1 Policy Instance will be subject to the same supervision rules as the the service's other policies. + type: string + policy_data: + description: the configuration of the policy + type: object + status_notification_uri: + description: Callback URI for policy status updates + type: string + policytype_id: + description: identity of the A1 Policy Type type: string - keep_alive_interval_seconds: - description: "keep alive interval for the service. This is used to enable\ - \ optional heartbeat supervision of the service. If set (> 0) the registered\ - \ service should regularly invoke a 'keepalive' REST call. When a service\ - \ fails to invoke this 'keepalive' call within the configured time, the\ - \ service is considered unavailable. An unavailable service will be automatically\ - \ deregistered and its policies will be deleted. Value 0 means timeout\ - \ supervision is disabled." - format: int64 - type: integer required: - - service_id + - policy_data + - policy_id + - policytype_id + - ric_id type: object - policy_info_list: - description: List of policy information + void: + description: Void/empty + type: object + error_information: + description: Problem as defined in https://tools.ietf.org/html/rfc7807 + example: + detail: A1 Policy Type not found + title: Not Found + status: 404 properties: - policies: - description: List of policy information + detail: + description: ' A human-readable explanation specific to this occurrence + of the problem.' + example: A1 Policy Type not found + type: string + title: + description: A specific error name + example: Not Found + type: string + status: + description: 'The HTTP status code generated by the origin server for this + occurrence of the problem. ' + example: 404 + format: int32 + type: integer + type: object + ric_info_list: + description: List of Near-RT RIC information + example: + rics: + - ric_id: ric_id + managed_element_ids: + - managed_element_ids + - managed_element_ids + state: UNAVAILABLE + policytype_ids: + - policytype_ids + - policytype_ids + - ric_id: ric_id + managed_element_ids: + - managed_element_ids + - managed_element_ids + state: UNAVAILABLE + policytype_ids: + - policytype_ids + - policytype_ids + properties: + rics: + description: List of Near-RT RIC information items: - $ref: '#/components/schemas/policy_info' + $ref: '#/components/schemas/ric_info' type: array type: object - policy_status_info: - description: Status for one A1-P Policy + service_status_list: + example: + service_list: + - callback_url: callback_url + service_id: service_id + keep_alive_interval_seconds: 0 + time_since_last_activity_seconds: 6 + - callback_url: callback_url + service_id: service_id + keep_alive_interval_seconds: 0 + time_since_last_activity_seconds: 6 properties: - last_modified: - description: "timestamp, last modification time" - type: string - status: - description: the Policy status - type: object + service_list: + description: List of service information + items: + $ref: '#/components/schemas/service_status' + type: array type: object service_status: + example: + callback_url: callback_url + service_id: service_id + keep_alive_interval_seconds: 0 + time_since_last_activity_seconds: 6 properties: callback_url: description: callback for notifying of RIC synchronization @@ -1236,98 +1448,56 @@ components: format: int64 type: integer type: object - ric_info_list: - description: List of Near-RT RIC information - properties: - rics: - description: List of Near-RT RIC information - items: - $ref: '#/components/schemas/ric_info' - type: array - type: object - input: - description: input + service_registration_info: + description: Information for one service properties: - access_type: - description: Access type - enum: - - READ - - WRITE - - DELETE - type: string - auth_token: - description: Authorization token + callback_url: + description: Callback for notifying of Near-RT RIC state changes type: string - policy_type_id: - description: Policy type identifier + service_id: + description: identity of the service type: string + keep_alive_interval_seconds: + description: | + Keep alive interval for the service. This is used to enable optional heartbeat supervision of the service. If set (> 0) the registered service should regularly invoke a 'keepalive' REST call. When a service fails to invoke this 'keepalive' call within the configured time, the service is considered unavailable. An unavailable service will be automatically deregistered and its policies will be deleted. Value 0 means timeout supervision is disabled. + format: int64 + type: integer required: - - access_type - - auth_token - - policy_type_id - type: object - policy_authorization: - description: Authorization request for A1 policy requests - properties: - input: - $ref: '#/components/schemas/input' - required: - - input - type: object - policy_type_id_list: - description: Information about policy types - properties: - policytype_ids: - description: Policy type identities - items: - description: Policy type identities - type: string - type: array + - service_id type: object - policy_info: - description: Information for one A1-P Policy + service_callback_info_v2: + description: "Information transferred in Service callbacks, \nif a callback\ + \ URL was provided for a registered service\n" properties: ric_id: - description: identity of the target Near-RT RIC - type: string - policy_id: - description: identity of the policy - type: string - transient: - default: false - description: "if true, the policy is deleted at RIC restart. If false, its\ - \ value is maintained by this service until explicitly deleted. Default\ - \ false." - example: false - nullable: false - type: boolean - service_id: - description: the identity of the service owning the policy. This can be - used to group the policies (it is possible to get all policies associated - to a service). Note that the service does not need to be registered. - type: string - default: "" - policy_data: - description: the configuration of the policy - type: object - status_notification_uri: - description: Callback URI for policy status updates + description: identity of a Near-RT RIC type: string - policytype_id: - description: identity of the policy type + event_type: + description: "values: \n AVAILABLE: the Near-RT RIC has become available\ + \ for A1 Policy management\n" + enum: + - AVAILABLE type: string required: - - ric_id - - policy_id - - policy_data - - policytype_id + - event_type + - ric_id + type: object + policy_type_definition: + description: Contains A1 Policy Type schema definition + example: + policy_schema: "{}" + properties: + policy_schema: + description: A1 Policy Type json schema. The schema is a json object following + http://json-schema.org/draft-07/schema + type: object type: object policy_id_list: description: A list of policy identities example: policy_ids: - - policy_ids - - policy_ids + - policy_ids + - policy_ids properties: policy_ids: description: Policy identities @@ -1336,29 +1506,83 @@ components: type: string type: array type: object - service_status_list: + policy_info_list: + description: List of policy information + example: + policies: + - ric_id: ric_id + policy_id: policy_id + transient: false + service_id: "" + policy_data: "{}" + status_notification_uri: status_notification_uri + policytype_id: policytype_id + - ric_id: ric_id + policy_id: policy_id + transient: false + service_id: "" + policy_data: "{}" + status_notification_uri: status_notification_uri + policytype_id: policytype_id properties: - service_list: - description: List of service information + policies: + description: List of policy information items: - $ref: '#/components/schemas/service_status' + $ref: '#/components/schemas/policy_info' type: array type: object - service_callback_info_v2: - description: Information transferred as in Service callbacks (callback_url) + policy_status_info: + description: Status for one A1-P Policy + example: + last_modified: last_modified + status: "{}" properties: - ric_id: - description: identity of a Near-RT RIC + last_modified: + description: "timestamp, last modification time" type: string - event_type: - description: "values:\nAVAILABLE: the Near-RT RIC has become available\ - \ for A1 Policy management" + status: + description: the Policy status + type: object + type: object + policy_authorization: + description: Authorization request for A1 policy requests + properties: + input: + $ref: '#/components/schemas/input' + required: + - input + type: object + input: + description: input + properties: + access_type: + description: Access type enum: - - AVAILABLE + - READ + - WRITE + - DELETE type: string + auth_token: + description: Authorization token + type: string + policy_type_id: + description: A1 Policy Type identifier + type: string + required: + - access_type + - auth_token + - policy_type_id + type: object + authorization_result: + description: Result of authorization + example: + result: true + properties: + result: + description: "If true, the access is granted" + type: boolean required: - - event_type - - ric_id + - result type: object Link: properties: @@ -1366,4 +1590,4 @@ components: type: boolean href: type: string - type: object \ No newline at end of file + type: object diff --git a/a1-policy-management/config/application.yaml b/a1-policy-management/config/application.yaml index e1f3b5c9..4b1dbcef 100644 --- a/a1-policy-management/config/application.yaml +++ b/a1-policy-management/config/application.yaml @@ -3,7 +3,7 @@ # ONAP : ccsdk oran # ================================================================================ # Copyright (C) 2020-2023 Nordix Foundation. All rights reserved. -# Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved. +# Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ app: # A URL to authorization provider such as OPA. Each time an A1 Policy is accessed, a call to this # authorization provider is done for access control. If this is empty, no fine grained access control is done. authorization-provider: - # the config-file-schema-path referres to a location in the jar file. If this property is empty or missing, + # the config-file-schema-path refers to a location in the jar file. If this property is empty or missing, # no schema validation will be executed. config-file-schema-path: /application_configuration_schema.json # Postgres database usage is enabled using the below parameter. @@ -58,9 +58,13 @@ app: trust-store: /opt/app/policy-agent/etc/cert/truststore.jks # path where the service can store data. This parameter is not relevant if S3 Object store is configured. vardata-directory: /var/policy-management-service + # Options for schema validation of the policy and policy status. Options: NONE, INFO, WARN, FAIL + validate-policy-instance-schema: NONE lifecycle: timeout-per-shutdown-phase: "20s" + logging: + config: ${LOGBACK_CONFIG_FILE:classpath:logback-plain.xml} # Reactive logging filter reactive-entry-exit-filter-enabled: true # Configuration of logging @@ -103,6 +107,9 @@ otel: sdk: disabled: ${ONAP_SDK_DISABLED:true} south: ${ONAP_TRACING_SOUTHBOUND:true} + instrumentation: + spring-webflux: + enabled: ${ONAP_TRACING_NORTHBOUND:true} tracing: sampler: jaeger_remote: @@ -114,6 +121,7 @@ server: http-port: 8081 shutdown: "graceful" ssl: + enabled: true key-store-type: JKS key-store-password: policy_agent key-store: /opt/app/policy-agent/etc/cert/keystore.jks @@ -147,4 +155,4 @@ spring: username: a1pms password: mypwd springdoc: - show-actuator: true \ No newline at end of file + show-actuator: true diff --git a/a1-policy-management/open-api-fragments/custom-openapi-license-template/license-header.mustache b/a1-policy-management/open-api-fragments/custom-openapi-license-template/license-header.mustache new file mode 100644 index 00000000..1d9be65a --- /dev/null +++ b/a1-policy-management/open-api-fragments/custom-openapi-license-template/license-header.mustache @@ -0,0 +1,18 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2020-2023 Nordix Foundation. All rights reserved. +# Copyright (C) 2023-2025 OpenInfra Foundation Europe. All rights reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= \ No newline at end of file diff --git a/a1-policy-management/open-api-fragments/custom-openapi-license-template/openapi.mustache b/a1-policy-management/open-api-fragments/custom-openapi-license-template/openapi.mustache new file mode 100644 index 00000000..b95f5e6c --- /dev/null +++ b/a1-policy-management/open-api-fragments/custom-openapi-license-template/openapi.mustache @@ -0,0 +1,3 @@ +{{> license-header}} + +{{{openapi-yaml}}} \ No newline at end of file diff --git a/a1-policy-management/open-api-fragments/v2-fragments/actuator-api.yaml b/a1-policy-management/open-api-fragments/v2-fragments/actuator-api.yaml new file mode 100644 index 00000000..ab0a6f4c --- /dev/null +++ b/a1-policy-management/open-api-fragments/v2-fragments/actuator-api.yaml @@ -0,0 +1,368 @@ +actuator: + get: + x-internal: true + operationId: actuatorLinks + description: > + A1-PMS Springboot Service Actuator web endpoint. + Returns a set of links to available/enabled actuator endpoints. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + summary: Actuator endpoint - Root (actuatorLinks) + tags: + - Actuator API + responses: + "200": + content: + application/vnd.spring-boot.actuator.v3+json: + schema: + additionalProperties: + additionalProperties: + $ref: 'schemas.yaml#/schemas/Link' + type: object + type: object + application/json: + schema: + additionalProperties: + additionalProperties: + $ref: 'schemas.yaml#/schemas/Link' + type: object + type: object + application/vnd.spring-boot.actuator.v2+json: + schema: + additionalProperties: + additionalProperties: + $ref: 'schemas.yaml#/schemas/Link' + type: object + type: object + description: OK + +heapdump: + get: + x-internal: true + operationId: actuatorHeapdump + description: > + A1-PMS Springboot Service Actuator web endpoint - HeapDump. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + summary: Actuator endpoint - Heapdump (actuatorHeapdump) + tags: + - Actuator API + responses: + "200": + content: + application/octet-stream: + schema: + type: object + description: OK + +actuator-info: + get: + x-internal: true + operationId: actuatorInfo + description: > + A1-PMS Springboot Service Actuator web endpoint - Info. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + summary: Actuator endpoint - Info (actuatorInfo) + tags: + - Actuator API + responses: + "200": + content: + application/vnd.spring-boot.actuator.v3+json: + schema: + type: object + application/json: + schema: + type: object + application/vnd.spring-boot.actuator.v2+json: + schema: + type: object + description: OK + +threaddump: + get: + x-internal: true + operationId: actuatorThreaddump + description: > + A1-PMS Springboot Service Actuator web endpoint - ThreadDump. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + summary: Actuator endpoint - Threaddump (actuatorThreaddump) + tags: + - Actuator API + responses: + "200": + content: + text/plain;charset=UTF-8: + schema: + type: object + application/vnd.spring-boot.actuator.v3+json: + schema: + type: object + application/json: + schema: + type: object + application/vnd.spring-boot.actuator.v2+json: + schema: + type: object + description: OK + +loggers: + get: + x-internal: true + operationId: actuatorLoggers + description: > + A1-PMS Springboot Service Actuator web endpoint - Get a list of Loggers. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + summary: Actuator endpoint - Get Loggers (actuatorLoggers) + tags: + - Actuator API + responses: + "200": + content: + application/vnd.spring-boot.actuator.v3+json: + schema: + type: object + application/json: + schema: + type: object + application/vnd.spring-boot.actuator.v2+json: + schema: + type: object + description: OK + +logger: + get: + x-internal: true + operationId: actuatorGetLogger + description: > + A1-PMS Springboot Service Actuator web endpoint - Get a single named Logger. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + summary: Actuator endpoint - Get Logger (actuatorGetLogger) + tags: + - Actuator API + parameters: + - explode: false + in: path + name: name + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/vnd.spring-boot.actuator.v3+json: + schema: + type: object + application/json: + schema: + type: object + application/vnd.spring-boot.actuator.v2+json: + schema: + type: object + description: OK + post: + x-internal: true + operationId: actuatorSetlogger + description: > + A1-PMS Springboot Service Actuator web endpoint - Create or Update single named Logger. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + summary: Actuator endpoint - Set Logger (actuatorSetlogger) + tags: + - Actuator API + parameters: + - explode: false + in: path + name: name + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + enum: + - TRACE + - DEBUG + - INFO + - WARN + - ERROR + - FATAL + - "OFF" + type: string + responses: + "200": + content: + '*/*': + schema: + type: object + description: OK + +logfile: + get: + x-internal: true + operationId: actuatorGetLogFile + description: > + A1-PMS Springboot Service Actuator web endpoint - Get the Log file. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + summary: Actuator endpoint - Log File (actuatorGetLogFile) + tags: + - Actuator API + responses: + "200": + content: + text/plain;charset=UTF-8: + schema: + type: object + description: OK + +health: + get: + x-internal: true + operationId: actuatorHealth + description: > + A1-PMS Springboot Service Actuator web endpoint - Health Check. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + summary: Actuator endpoint - Health (actuatorHealth) + tags: + - Actuator API + responses: + "200": + content: + application/vnd.spring-boot.actuator.v3+json: + schema: + type: object + application/json: + schema: + type: object + application/vnd.spring-boot.actuator.v2+json: + schema: + type: object + description: OK + +health-all: + get: + x-internal: true + operationId: actuatorHealthComponent + description: > + A1-PMS Springboot Service Actuator web endpoint - Health Status for an Application Component. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + summary: Actuator endpoint - Component Health (actuatorHealthComponent) + tags: + - Actuator API + responses: + "200": + content: + application/vnd.spring-boot.actuator.v3+json: + schema: + type: object + application/json: + schema: + type: object + application/vnd.spring-boot.actuator.v2+json: + schema: + type: object + description: OK + +shutdown: + post: + x-internal: true + operationId: actuatorShutdown + description: > + A1-PMS Springboot Service Actuator web endpoint - Shutdown the Application. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + summary: Actuator endpoint - Shutdown (actuatorShutdown) + tags: + - Actuator API + responses: + "200": + content: + application/vnd.spring-boot.actuator.v3+json: + schema: + type: object + application/json: + schema: + type: object + application/vnd.spring-boot.actuator.v2+json: + schema: + type: object + description: OK + +metrics: + get: + x-internal: true + operationId: actuatorMetrics + description: > + A1-PMS Springboot Service Actuator web endpoint - Get a list of Application metrics names. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + summary: Actuator endpoint - Metrics (actuatorMetrics) + tags: + - Actuator API + responses: + "200": + content: + application/vnd.spring-boot.actuator.v3+json: + schema: + type: object + application/json: + schema: + type: object + application/vnd.spring-boot.actuator.v2+json: + schema: + type: object + description: OK + +metric: + get: + x-internal: true + operationId: actuatorGetMetric + description: > + A1-PMS Springboot Service Actuator web endpoint - Get the value for a named Application metric. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + summary: Actuator endpoint - Get Metric (actuatorGetMetric) + parameters: + - explode: false + in: path + name: requiredMetricName + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/vnd.spring-boot.actuator.v3+json: + schema: + type: object + application/json: + schema: + type: object + application/vnd.spring-boot.actuator.v2+json: + schema: + type: object + description: OK \ No newline at end of file diff --git a/a1-policy-management/open-api-fragments/v2-fragments/authz-api.yaml b/a1-policy-management/open-api-fragments/v2-fragments/authz-api.yaml new file mode 100644 index 00000000..ca8752cd --- /dev/null +++ b/a1-policy-management/open-api-fragments/v2-fragments/authz-api.yaml @@ -0,0 +1,24 @@ +authz: + post: + description: > + A template endpoint for callout requests to an external authorization function. + The authorization function, if enabled, decides if individual operations are permitted. + operationId: performAccessControl + summary: Callout request for access authorization (performAccessControl) + tags: + - Authorization API + requestBody: + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/policy_authorization' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/authorization_result' + description: OK + "403": + $ref: 'responses.yaml#/responses/Forbidden' \ No newline at end of file diff --git a/a1-policy-management/open-api-fragments/v2-fragments/configuration-api.yaml b/a1-policy-management/open-api-fragments/v2-fragments/configuration-api.yaml new file mode 100644 index 00000000..6ac239fe --- /dev/null +++ b/a1-policy-management/open-api-fragments/v2-fragments/configuration-api.yaml @@ -0,0 +1,42 @@ +configuration: + get: + description: Returns the entire contents of the Application Configuration. + tags: + - Configuration + operationId: getConfiguration + summary: Get the Application Configuration (getConfiguration) + responses: + "200": + content: + application/json: + schema: + type: string + description: OK - Configuration + "404": + $ref: 'responses.yaml#/responses/NotFound' + description: Not Found - Configuration is not found or is not readable + put: + description: > + Replace the current Application Configuration with a new configuration. + The new configuration, if accepted, will take effect after a short delay. + The new configuration must comply with the Application Configuration schema, + which can be found from the the Application Documentation (Developer Guide) + tags: + - Configuration + operationId: putConfiguration + summary: Set/Replace the Application Configuration (putConfiguration) + requestBody: + content: + application/json: + schema: + type: object + required: true + responses: + "200": + content: + '*/*': + schema: + $ref: 'schemas.yaml#/schemas/void' + description: OK - Configuration updated + "400": + $ref: 'responses.yaml#/responses/BadRequest' \ No newline at end of file diff --git a/a1-policy-management/open-api-fragments/v2-fragments/examples.yaml b/a1-policy-management/open-api-fragments/v2-fragments/examples.yaml new file mode 100644 index 00000000..2ea2d19f --- /dev/null +++ b/a1-policy-management/open-api-fragments/v2-fragments/examples.yaml @@ -0,0 +1,104 @@ +examples: + service_status: + description: List of service information + value: + callback_url: callback_url + service_id: service_id + keep_alive_interval_seconds: 0 + time_since_last_activity_seconds: 6 + + service_status_list: + description: List of service information + value: + service_list: + - callback_url: callback_url + service_id: service_id + keep_alive_interval_seconds: 0 + time_since_last_activity_seconds: 6 + - callback_url: callback_url + service_id: service_id + keep_alive_interval_seconds: 0 + time_since_last_activity_seconds: 6 + policy_type_definition: + description: Schema of the given A1 Policy Type + value: + policy_schema: "{}" + policy_type_id_list: + description: Array of A1 Policy Type id's + value: + policy_type_id_list: + - policytype_id + - policytype_id + policy_info: + description: Information for an A1 Policy Instance + value: + ric_id: ric_id1 + policy_id: policy_id1 + transient: false + service_id: service_id1 + policy_data: "{}" + status_notification_uri: status_notification_uri + policytype_id: policytype_id1 + policy_info_list: + description: List of policy information + value: + policies: + - ric_id: ric_id1 + policy_id: policy_id1 + transient: false + service_id: service_id1 + policy_data: "{}" + status_notification_uri: status_notification_uri + policytype_id: policytype_id1 + - ric_id: ric_id2 + policy_id: policy_id2 + transient: true + service_id: service_id2 + policy_data: "{}" + status_notification_uri: status_notification_uri + policytype_id: policytype_id2 + policy_id_list: + description: A list of policy identities + value: + policy_ids: + - some_policy_id + - some_policy_id + policy_status_info: + description: Status for one A1-P Policy + value: + last_modified: last_modified + status: + value: + status: status + status_info: + value: + status: status + ric_info: + value: + ric_id: ric_id + managed_element_ids: + - some_managed_element_id + - some_managed_element_id + state: UNAVAILABLE + policytype_ids: + - some_policytype_id + - some_policytype_id + ric_info_list: + value: + rics: + - ric_id: ric_id + managed_element_ids: + - some_managed_element_id + - some_managed_element_id + state: UNAVAILABLE + policytype_ids: + - policytype_id + - policytype_id + - ric_id: ric_id + managed_element_ids: + - managed_element_ids + - managed_element_ids + state: UNAVAILABLE + policytype_ids: + - policytype_ids + - policytype_ids \ No newline at end of file diff --git a/a1-policy-management/open-api-fragments/v2-fragments/healthcheck-api.yaml b/a1-policy-management/open-api-fragments/v2-fragments/healthcheck-api.yaml new file mode 100644 index 00000000..f8d75612 --- /dev/null +++ b/a1-policy-management/open-api-fragments/v2-fragments/healthcheck-api.yaml @@ -0,0 +1,31 @@ +status: + get: + operationId: getStatusV1 + description: Returns status and statistics of this service + summary: Get Status (getStatusV1) + tags: + - Health Check + responses: + "200": + content: + '*/*': + schema: + type: string + description: OK - Service is living +status-v2: + get: + operationId: getStatus + description: Returns status and statistics of this service + summary: Get Status (getStatus) + tags: + - Health Check + responses: + "200": + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/status_info' + examples: + status_info: + $ref: 'examples.yaml#/examples/status_info' + description: OK- Service is living Ok \ No newline at end of file diff --git a/a1-policy-management/open-api-fragments/v2-fragments/pms-api.yaml b/a1-policy-management/open-api-fragments/v2-fragments/pms-api.yaml new file mode 100644 index 00000000..57fe3a4e --- /dev/null +++ b/a1-policy-management/open-api-fragments/v2-fragments/pms-api.yaml @@ -0,0 +1,149 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2020-2023 Nordix Foundation. All rights reserved. +# Copyright (C) 2023-2025 OpenInfra Foundation Europe. All rights reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +openapi: 3.0.3 +info: + x-api-id: a31c510b-20e6-4a08-af16-368c44d7fba8 + x-audience: external-public + description: "

      General

      The ONAP CCSDK A1 Policy Management Service\ + \ provides a REST API for managing A1 policies.
      This document describes an older pre-spec API set + \ to perform tasks for:

      • A1 Policy creation, modification and deletion.
      • Monitoring\ + \ and maintaining consistency of the SMO view of A1 Policies and the Near-RT RICs
      • Maintaining\ + \ a view of each Near-RT RIC's supported A1 Policy Types
      • Supervision of registered services\ + \ (rApps). When a registered service is unavailable, its policies are removed.

      APIs\ + \ provided or defined by the service

      A1 Policy Management (Older pre-spec version)

      \ + \

      This is an older API for managing A1 Policies:

      • A1 Policy retrieval, creation,\ + \ modification and deletion.
      • Retrieval of supported A1 Policy Types for\ + \ a Near-RT RIC
      • Retrieval of status for existing A1 policies

      Management\ + \ of configuration

      API for updating and retrieval of the component configuration.\ + \ Note that there other ways to maintain the configuration.

      Service Callbacks

      These\ + \ are endpoints that are invoked by this service. The callbacks are registered\ + \ in this service at service registration.

      NearRT-RIC Repository (Older version)

      \ + \

      This is an API that provides support for looking up a NearRT-RIC. Each A1 policy\ + \ is targeted towards one Near-RT RIC.

      Health Check

      API used for supervision\ + \ of the A1 Policy Management Service .

      Service Registry and Supervision

      \ + \

      API used for registering services/clients/rApps. Each A1 Policy can be tagged with an owner.\ + \ If the owner service is registered, then the service can be monitored by a heart-beat supervision\ + \ mechanism, and if the registered service becomes unavailable, then its A1 Policies are removed. Note \ + \ that services do not need to be registered to create A1 Policies, but unregistered services are not \ + \ supervised. This is a feature that is optional to use.

      Authorization API

      API used\ + \ for access control of A1 Policy access. If configured, an external authorization\ + \ provider is requested to grant access to the A1 Policy Type.

      Spring Boot\ + \ Actuator

      Provides built-in functions used to monitor and configure the Spring\ + \ web application hosting the service.

      " + license: + name: | + Copyright (C) 2020-2023 Nordix Foundation, and Copyright (C) 2024-2025 OpenInfra Foundation Europe. + All rights reserved. Licensed under the Apache 2 License. + url: http://www.apache.org/licenses/LICENSE-2.0 + title: ONAP CCSDK - Pre-Spec A1 Policy Management API + version: 1.3.0 + contact: + name: ONAP CCSDK Project + url: https://www.onap.org/ + email: discuss-list@onap.com +servers: + - url: / +tags: + - name: A1 Policy Management + description: > + Older pre-spec API used to get, create, update and delete A1 Policy Instances. Also used to query A1 Policy Types. + - name: NearRT-RIC Repository + description: > + Older API used to get information about registered Near-RT RICs. + - name: Service Registry and Supervision + description: > + Older API used to manage registered services, and control their keep-alive status via heart-beat messages. + - name: Health Check + description: > + API used to get the health status and statistics of this service + - name: Service Callbacks + description: > + Callout to registered services to indicate a status changes for a Near-RT RIC. + Note that these operations are called by the A1 Policy Management Service, not provided. + - name: Authorization API + description: > + API used for authorization of information A1 policy access (this is + provided by an authorization producer such as OPA). + Note that these operations are called by the A1 Policy Management Service, not provided. + - name: Configuration + description: > + API used to create or fetch the application configuration. + - name: Actuator API + description: > + API used to monitor and configure the A1-PMS Springboot Service. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + +paths: + /status: + $ref: 'healthcheck-api.yaml#/status' + /a1-policy/v2/status: + $ref: 'healthcheck-api.yaml#/status-v2' + /a1-policy/v2/rics/ric: + $ref: 'ric-api.yaml#/ric' + /a1-policy/v2/policy-types: + $ref: 'pms-lcm-api.yaml#/policy-types' + /a1-policy/v2/policies/{policy_id}: + $ref: 'pms-lcm-api.yaml#/policy' + /a1-policy/v2/services/{service_id}/keepalive: + $ref: 'service-api.yaml#/keep-alive' + /a1-policy/v2/rics: + $ref: 'ric-api.yaml#/rics' + /a1-policy/v2/services: + $ref: 'service-api.yaml#/services' + /a1-policy/v2/policy-types/{policytype_id}: + $ref: 'pms-lcm-api.yaml#/policy-type' + /a1-policy/v2/policies: + $ref: 'pms-lcm-api.yaml#/policies' + /a1-policy/v2/policy-instances: + $ref: 'pms-lcm-api.yaml#/policy-instances' + /a1-policy/v2/services/{service_id}: + $ref: 'service-api.yaml#/service' + /a1-policy/v2/policies/{policy_id}/status: + $ref: 'pms-lcm-api.yaml#/policy-status' + /a1-policy/v2/configuration: + $ref: 'configuration-api.yaml#/configuration' + /example-authz-check: + $ref: 'authz-api.yaml#/authz' + /actuator: + $ref: 'actuator-api.yaml#/actuator' + /actuator/heapdump: + $ref: 'actuator-api.yaml#/heapdump' + /actuator/info: + $ref: 'actuator-api.yaml#/actuator-info' + /actuator/threaddump: + $ref: 'actuator-api.yaml#/threaddump' + /actuator/loggers: + $ref: 'actuator-api.yaml#/loggers' + /actuator/loggers/{name}: + $ref: 'actuator-api.yaml#/logger' + /actuator/logfile: + $ref: 'actuator-api.yaml#/logfile' + /actuator/health: + $ref: 'actuator-api.yaml#/health' + /actuator/health/**: + $ref: 'actuator-api.yaml#/health-all' + /actuator/shutdown: + $ref: 'actuator-api.yaml#/shutdown' + /actuator/metrics: + $ref: 'actuator-api.yaml#/metrics' + /actuator/metrics/{requiredMetricName}: + $ref: 'actuator-api.yaml#/metric' diff --git a/a1-policy-management/open-api-fragments/v2-fragments/pms-lcm-api.yaml b/a1-policy-management/open-api-fragments/v2-fragments/pms-lcm-api.yaml new file mode 100644 index 00000000..7eeffc4c --- /dev/null +++ b/a1-policy-management/open-api-fragments/v2-fragments/pms-lcm-api.yaml @@ -0,0 +1,301 @@ +policy-types: + get: + operationId: getPolicyTypes + description: Query A1 Policy Type identities using query parameters + summary: Get A1 Policy Types (getPolicyTypes) + tags: + - A1 Policy Management + parameters: + - description: Select types for the given Near-RT RIC identity. + explode: true + in: query + name: ric_id + required: false + schema: + type: string + style: form + - description: Select types compatible with the given type name (type identity has the + format 'typename_version') + explode: true + in: query + name: type_name + required: false + schema: + type: string + style: form + - description: Select types that are compatible with the given version. This + parameter is only applicable in conjunction with type_name. As an example + version 1.9.1 is compatible with 1.0.0 but not the other way around. Matching + types will be returned sorted in ascending order. + explode: true + in: query + name: compatible_with_version + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + examples: + policy_type_id_list: + $ref: 'examples.yaml#/examples/policy_type_id_list' + schema: + $ref: 'schemas.yaml#/schemas/policy_type_id_list' + description: OK - Policy Type IDs Found + "404": + $ref: 'responses.yaml#/responses/NotFound' + description: 'Not Found - Requested Policy Type IDs Not Found' + +policy-type: + get: + description: Get an A1 Policy Type definition using its policy type ID + operationId: getPolicyTypeDefinition + summary: Get an A1 Policy Type definition (getPolicyTypeDefinition) + tags: + - A1 Policy Management + parameters: + - explode: false + in: path + name: policytype_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/policy_type_definition' + examples: + policy_type_definition: + $ref: 'examples.yaml#/examples/policy_type_definition' + description: OK - schema of the requested A1 Policy Type + "404": + $ref: 'responses.yaml#/responses/NotFound' + +policy-instances: + get: + description: > + Returns a collection of A1 Policy Instance information for policies that match given search criteria. + If several query parameters are defined, the policies matching all conditions are returned. + operationId: getPolicyInstances + summary: Query for A1 Policy instances (getPolicyInstances) + tags: + - A1 Policy Management + parameters: + - description: Select policies with a given A1 Policy Type ID. + explode: true + in: query + name: policytype_id + required: false + schema: + type: string + style: form + - description: Select policies for a given Near-RT RIC identity. + explode: true + in: query + name: ric_id + required: false + schema: + type: string + style: form + - description: Select policies owned by a given service (registered or unregistered). + explode: true + in: query + name: service_id + required: false + schema: + type: string + style: form + - description: Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). + explode: true + in: query + name: type_name + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + examples: + policy_info_list: + $ref: 'examples.yaml#/examples/policy_info_list' + schema: + $ref: 'schemas.yaml#/schemas/policy_info_list' + description: OK - Returns A1 Policy Instances which match the criteria + "404": + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/error_information' + description: Not Found - Near-RT RIC, A1 Policy Type or service was not found + +policy-status: + get: + description: Retrieve the status information for an A1 Policy Instance. + tags: + - A1 Policy Management + operationId: getPolicyStatus + summary: Get an A1 Policy Instance's status (getPolicyStatus) + parameters: + - explode: false + in: path + name: policy_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/policy_status_info' + examples: + policy_status_info: + $ref: 'examples.yaml#/examples/policy_status_info' + description: OK - Policy status + "404": + $ref: 'responses.yaml#/responses/NotFound' + +policies: + get: + description: > + Retrieve a list of A1 Policy Instance IDs for policies that match given search criteria. + If multiple query parameters are given, the policies matching all conditions are returned. + operationId: getPolicyIds + summary: Query A1 Policy Instances (getPolicyIds) + tags: + - A1 Policy Management + parameters: + - description: Select policies of a given A1 Policy Type ID. + explode: true + in: query + name: policytype_id + required: false + schema: + type: string + style: form + - description: Select policies of a given Near-RT RIC identity. + explode: true + in: query + name: ric_id + required: false + schema: + type: string + style: form + - description: Select policies owned by a given service. (Both registered and unregistered services) + explode: true + in: query + name: service_id + required: false + schema: + type: string + style: form + - description: > + Select policies of types with the given A1 Policy Type name + (type names have the format 'typename_version') + explode: true + in: query + name: type_name + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + examples: + policy_id_list: + $ref: 'examples.yaml#/examples/policy_id_list' + schema: + $ref: 'schemas.yaml#/schemas/policy_id_list' + description: OK - Policy identities + "404": + $ref: 'responses.yaml#/responses/NotFound' + put: + description: Create or Update an A1 Policy Instance + tags: + - A1 Policy Management + operationId: putPolicy + summary: Create or Update an A1 Policy Instance (putPolicy) + requestBody: + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/policy_info' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/void' + description: OK - Policy updated + "201": + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/void' + description: Created - Policy created + "423": + $ref: 'responses.yaml#/responses/Locked' + +policy: + delete: + description: Delete an A1 Policy instance using its policy ID. + operationId: deletePolicy + summary: Delete an A1 Policy instance (deletePolicy) + tags: + - A1 Policy Management + parameters: + - explode: false + in: path + name: policy_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + '*/*': + schema: + $ref: 'schemas.yaml#/schemas/void' + description: OK - Policy deleted + "423": + $ref: 'responses.yaml#/responses/Locked' + description: 'The requested policy using policy_id is Locked' + get: + description: Get an A1 Policy instance using its policy ID + operationId: getPolicy + summary: Get an A1 Policy instance (getPolicy) + tags: + - A1 Policy Management + parameters: + - explode: false + in: path + name: policy_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/policy_info' + examples: + policy_info: + $ref: 'examples.yaml#/examples/policy_info' + description: OK - Policy found + "404": + $ref: 'responses.yaml#/responses/NotFound' + description: 'Not Found - Requested Policy using policy_id is not found' \ No newline at end of file diff --git a/a1-policy-management/open-api-fragments/v2-fragments/responses.yaml b/a1-policy-management/open-api-fragments/v2-fragments/responses.yaml new file mode 100644 index 00000000..32dfb3e9 --- /dev/null +++ b/a1-policy-management/open-api-fragments/v2-fragments/responses.yaml @@ -0,0 +1,37 @@ +responses: + Locked: + description: Locked - HTTP Status code which can be used when the state is Locked + content: + application/problem+json: + schema: + $ref: 'schemas.yaml#/schemas/error_information' + example: + status: 423 + title: Locked + detail: Requested resource is in a locked state. + BadRequest: + description: Bad Request + content: + application/problem+json: + schema: + $ref: 'schemas.yaml#/schemas/error_information' + example: + status: 400 + title: Bad Request + detail: The provided request is not valid. + Forbidden: + description: Forbidden + content: + application/problem+json: + schema: + $ref: 'schemas.yaml#/schemas/error_information' + example: + status: 403 + title: Forbidden + detail: Your role does not allow to perform this action. Contact System Administrator to change your access rights. + NotFound: + description: Not Found + content: + application/problem+json: + example: + [ ] \ No newline at end of file diff --git a/a1-policy-management/open-api-fragments/v2-fragments/ric-api.yaml b/a1-policy-management/open-api-fragments/v2-fragments/ric-api.yaml new file mode 100644 index 00000000..ae79956e --- /dev/null +++ b/a1-policy-management/open-api-fragments/v2-fragments/ric-api.yaml @@ -0,0 +1,71 @@ +ric: + get: + description: > + Query information about a Near-RT RIC. Either a Near-RT RIC identity or a Managed Element + identity can be specified. The intention with Managed Element identity is the ID used + in O1 for accessing the traffical element (such as the ID of CU). + operationId: getRic + summary: Get a Near-RT RIC (getRic) + tags: + - NearRT-RIC Repository + parameters: + - description: > + The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned. + explode: true + in: query + name: managed_element_id + required: false + schema: + type: string + style: form + - description: The identity of a Near-RT RIC to get information for. + explode: true + in: query + name: ric_id + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/ric_info' + examples: + ric_info: + $ref: 'examples.yaml#/examples/ric_info' + description: OK - Near-RT RIC is found + "404": + $ref: 'responses.yaml#/responses/NotFound' + description: NotFound - Requested NearRT-RIC Not Found +rics: + get: + description: Get all Near-RT RICs that supports a given A1 Policy Type ID + operationId: getRics + summary: Get Near-RT RICs for A1 Policy Type (getRics) + tags: + - NearRT-RIC Repository + parameters: + - description: > + The identity of an A1 Policy Type. If given, all Near-RT RICs supporting + the A1 Policy Type are returned. + explode: true + in: query + name: policytype_id + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/ric_info_list' + examples: + ric_info_list: + $ref: 'examples.yaml#/examples/ric_info_list' + description: OK + "404": + $ref: 'responses.yaml#/responses/NotFound' \ No newline at end of file diff --git a/a1-policy-management/open-api-fragments/v2-fragments/schemas.yaml b/a1-policy-management/open-api-fragments/v2-fragments/schemas.yaml new file mode 100644 index 00000000..fcb2761a --- /dev/null +++ b/a1-policy-management/open-api-fragments/v2-fragments/schemas.yaml @@ -0,0 +1,273 @@ +schemas: + policy_type_definition: + description: Contains A1 Policy Type schema definition + type: object + properties: + policy_schema: + description: A1 Policy Type json schema. The schema is a json object following + http://json-schema.org/draft-07/schema + type: object + error_information: + description: Problem as defined in https://tools.ietf.org/html/rfc7807 + properties: + detail: + description: ' A human-readable explanation specific to this occurrence + of the problem.' + example: A1 Policy Type not found + type: string + title: + description: 'A specific error name' + type: string + example: Not Found + status: + description: 'The HTTP status code generated by the origin server for this + occurrence of the problem. ' + example: 404 + format: int32 + type: integer + type: object + void: + description: Void/empty + type: object + status_info: + properties: + status: + description: status text + type: string + type: object + authorization_result: + description: Result of authorization + example: + result: true + properties: + result: + description: If true, the access is granted + type: boolean + required: + - result + type: object + ric_info: + description: Information for a Near-RT RIC + properties: + ric_id: + description: identity of the Near-RT RIC + type: string + managed_element_ids: + description: O1 identities for managed entities + items: + description: O1 identities for managed entities + type: string + type: array + state: + description: Represents the states for a Near-RT RIC + enum: + - UNAVAILABLE + - AVAILABLE + - SYNCHRONIZING + - CONSISTENCY_CHECK + type: string + policytype_ids: + description: supported A1 Policy Types + items: + description: supported A1 Policy Types + type: string + type: array + type: object + service_registration_info: + description: Information for one service + properties: + callback_url: + description: Callback for notifying of Near-RT RIC state changes + type: string + service_id: + description: identity of the service + type: string + keep_alive_interval_seconds: + description: > + Keep alive interval for the service. This is used to enable + optional heartbeat supervision of the service. If set (> 0) the registered + service should regularly invoke a 'keepalive' REST call. When a service + fails to invoke this 'keepalive' call within the configured time, the + service is considered unavailable. An unavailable service will be automatically + deregistered and its policies will be deleted. Value 0 means timeout + supervision is disabled. + format: int64 + type: integer + required: + - service_id + type: object + policy_info_list: + description: List of policy information + properties: + policies: + description: List of policy information + items: + $ref: '#/schemas/policy_info' + type: array + type: object + policy_status_info: + description: Status for one A1-P Policy + properties: + last_modified: + description: timestamp, last modification time + type: string + status: + description: the Policy status + type: object + type: object + service_status: + properties: + callback_url: + description: callback for notifying of RIC synchronization + type: string + service_id: + description: identity of the service + type: string + keep_alive_interval_seconds: + description: policy keep alive timeout + format: int64 + type: integer + time_since_last_activity_seconds: + description: time since last invocation by the service + format: int64 + type: integer + type: object + ric_info_list: + description: List of Near-RT RIC information + properties: + rics: + description: List of Near-RT RIC information + items: + $ref: '#/schemas/ric_info' + type: array + type: object + input: + description: input + properties: + access_type: + description: Access type + enum: + - READ + - WRITE + - DELETE + type: string + auth_token: + description: Authorization token + type: string + policy_type_id: + description: A1 Policy Type identifier + type: string + required: + - access_type + - auth_token + - policy_type_id + type: object + policy_authorization: + description: Authorization request for A1 policy requests + properties: + input: + $ref: '#/schemas/input' + required: + - input + type: object + policy_type_id_list: + description: Information about A1 Policy Types + properties: + policytype_ids: + description: A1 Policy Type identities + items: + description: A1 Policy Type identities + type: string + type: array + type: object + policy_info: + description: Information for one A1-P Policy + properties: + ric_id: + description: identity of the target Near-RT RIC + type: string + policy_id: + description: identity of the policy + type: string + transient: + default: false + description: > + If true, the policy is automatically deleted if the targeted Near-RT RIC restarts + or recovers. If false, the A1 Policy Instance remains, and is re-pushed to the targeted + Near-RT RIC after a restart or recovery. If false, the A1 Policy Instance is maintained and + must be deleted separately in the event of Near-RT RIC restart or recovery. Default is false. + example: false + nullable: false + type: boolean + service_id: + description: > + The identity of the service owning the policy. This can be + used to group the policies (it is possible to get all policies associated + to a service). Note that the service does not need to be registered. + If the service is registered, the A1 Policy Instance will be + subject to the same supervision rules as the the service's other policies. + type: string + default: "" + policy_data: + description: the configuration of the policy + type: object + status_notification_uri: + description: Callback URI for policy status updates + type: string + policytype_id: + description: identity of the A1 Policy Type + type: string + required: + - ric_id + - policy_id + - policy_data + - policytype_id + type: object + policy_id_list: + description: A list of policy identities + example: + policy_ids: + - policy_ids + - policy_ids + properties: + policy_ids: + description: Policy identities + items: + description: Policy identities + type: string + type: array + type: object + service_status_list: + properties: + service_list: + description: List of service information + items: + $ref: '#/schemas/service_status' + type: array + type: object + service_callback_info_v2: + description: | + Information transferred in Service callbacks, + if a callback URL was provided for a registered service + properties: + ric_id: + description: identity of a Near-RT RIC + type: string + event_type: + description: > + values: + AVAILABLE: the Near-RT RIC has become available for A1 Policy management + enum: + - AVAILABLE + type: string + required: + - event_type + - ric_id + type: object + Link: + properties: + templated: + type: boolean + href: + type: string + type: object \ No newline at end of file diff --git a/a1-policy-management/open-api-fragments/v2-fragments/service-api.yaml b/a1-policy-management/open-api-fragments/v2-fragments/service-api.yaml new file mode 100644 index 00000000..d8bb484a --- /dev/null +++ b/a1-policy-management/open-api-fragments/v2-fragments/service-api.yaml @@ -0,0 +1,150 @@ +keep-alive: + put: + description: A registered service should invoke this operation regularly to + indicate that it is still alive. If a registered service fails to invoke some operation, + or this operation, before the end of a timeout period the service will be deregistered + and all its A1 policies wil be removed. This operation is only intended for registered + services. (This timeout can be set or disabled when each service is initially registered) + operationId: keepAliveService + summary: Heartbeat message from a service (keepAliveService) + tags: + - Service Registry and Supervision + parameters: + - explode: false + in: path + name: service_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + '*/*': + schema: + type: object + description: OK - Service supervision timer refreshed, OK + "404": + $ref: 'responses.yaml#/responses/NotFound' + +services: + get: + description: > + Get information about all registered services, or a single registered service. + If the service ID of a registered service is included in the query, information about that + service is returned. Otherwise Information about all registered is returned. + This operation does not retrieve information about unregistered services. + operationId: getServices + summary: Get Services (getServices) + tags: + - Service Registry and Supervision + parameters: + - description: The identity of the registered service + explode: true + in: query + name: service_id + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/service_status_list' + examples: + service_status_list: + $ref: 'examples.yaml#/examples/service_status_list' + description: OK + "404": + $ref: 'responses.yaml#/responses/NotFound' + put: + description: > + Register a single service, or update a previous registtration. + Service registration is required to get callbacks about available NearRT RICs + and to enable supervision of the service's active status. If a registered + service becomes inactive, its policies can be automatically deleted. + A1 Policy instances can also be created for unregistered services. + If an unregistered service is later registered, the service's policies are + retained when the service becomes registered. This feature is optional to use. + operationId: putService + summary: Register or update a Service (putService) + tags: + - Service Registry and Supervision + requestBody: + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/service_registration_info' + required: true + responses: + "200": + content: + '*/*': + schema: + type: object + description: OK - Service updated + "201": + content: + '*/*': + schema: + type: object + description: Created - Service created + "400": + $ref: 'responses.yaml#/responses/BadRequest' + callbacks: + RICStatus: + "{$request.body#/callback_url}": + post: + description: | + Callouts to indicate Near-RT RIC status changes relevant for Services. + The URL invoked by this callback is provided at Service registration. + operationId: serviceCallback + summary: Callback for Near-RT RIC status (serviceCallback) + tags: + - Service Registry and Supervision + - Service Callbacks + requestBody: + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/service_callback_info_v2' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/void' + description: OK + "404": + $ref: 'responses.yaml#/responses/NotFound' + +service: + delete: + description: > + Unregister a registered Service using its service ID. + Only registered services can be unregistered. All A1 Policy Instances + for the previously registered service will be removed. + tags: + - Service Registry and Supervision + operationId: deleteService + summary: Unregister a Service (deleteService) + parameters: + - explode: false + in: path + name: service_id + required: true + schema: + type: string + style: simple + responses: + "204": + content: + '*/*': + schema: + type: object + description: No Content - Service unregistered + "404": + $ref: 'responses.yaml#/responses/NotFound' \ No newline at end of file diff --git a/a1-policy-management/open-api-fragments/v3-fragments/configuration-api.yaml b/a1-policy-management/open-api-fragments/v3-fragments/configuration-api.yaml new file mode 100644 index 00000000..2a7ef5bf --- /dev/null +++ b/a1-policy-management/open-api-fragments/v3-fragments/configuration-api.yaml @@ -0,0 +1,41 @@ +configuration: + get: + operationId: getConfiguration + description: Returns the entire contents of the Application Configuration. + tags: + - Configuration + summary: Get the Application Configuration (getConfiguration) + responses: + "200": + content: + application/json: + schema: + type: string + description: OK - Application configuration received + "404": + $ref: 'responses.yaml#/responses/404' + put: + operationId: putConfiguration + description: > + Replace the current Application Configuration with a new configuration. + The new configuration, if accepted, will take effect after a short delay. + The new configuration must comply with the Application Configuration schema, + which can be found from the the Application Documentation (Developer Guide) + tags: + - Configuration + summary: Set/Replace the Application Configuration (putConfiguration) + requestBody: + content: + application/json: + schema: + type: object + required: true + responses: + "200": + content: + 'application/json': + schema: + $ref: 'schemas.yaml#/schemas/void' + description: OK - Configuration updated + "400": + $ref: 'responses.yaml#/responses/400' \ No newline at end of file diff --git a/a1-policy-management/open-api-fragments/v3-fragments/examples.yaml b/a1-policy-management/open-api-fragments/v3-fragments/examples.yaml new file mode 100644 index 00000000..415d3b0f --- /dev/null +++ b/a1-policy-management/open-api-fragments/v3-fragments/examples.yaml @@ -0,0 +1,112 @@ +examples: + ServiceStatusList: + description: List of service information + value: + serviceList: + - callbackUrl: http://callback.url + serviceId: serviceId1 + keepAliveIntervalSeconds: 0 + timeSinceLastActivitySeconds: 6 + - callbackUrl: http://callback.url + serviceId: serviceId2 + keepAliveIntervalSeconds: 500 + timeSinceLastActivitySeconds: 401 + StatusInfo: + value: + status: success + RicInfo: + value: + ricId: ricId1 + managedElementIds: + - "Note #1" + - "Athlone small cells" + - "Some optional string" + state: UNAVAILABLE + policyTypeIds: + - policyTypeId1 + - policyTypeId2 + RicInfoList: + value: + rics: + - ricId: ricId1 + managedElementIds: + - "Note #1" + - "Athlone small cells" + - "Fake Cells" + state: UNAVAILABLE + policyTypeIds: + - policyTypeId1 + - policyTypeId2 + - ricId: ricId2 + managedElementIds: + - "My test element" + - "Another test element" + state: UNAVAILABLE + policyTypeIds: + - policyTypeId3 + - policyTypeId4 + PolicyObject: + value: + scope: + ueId: + guRanUeId: + globalGnbId: + plmnId: + mcc: "123" + mnc: "45" + gnbId: + gnbIdLength: 24 + gnbIdValue: 12345678 + RanUeId: 'a31c510b20e64a74' + groupId: + spId: 123 + qosId: + 5qI: 1 + cellId: + plmnId: + mcc: "123" + mnc: "45" + cId: + ncI: 123 + qosObjectives: + gfbr: 100 + mfbr: 200 + priorityLevel: 3 + pdb: 50 + PolicyTypeInformation: + value: + - policyTypeId: STD_QOS2_0.1.0 + nearRtRicId: ric_g3_2 + - policyTypeId: STD_QOS_0_2_0 + nearRtRicId: ric_g3_2 + - policyTypeId: STD_QOS2_0.1.0 + nearRtRicId: ric_g3_1 + - policyTypeId: STD_QOS_0_2_0 + nearRtRicId: ric_g3_1 + PolicyTypeObject: + value: + policySchema: + "$schema": http://json-schema.org/draft-07/schema# + title: STD_QOS_0_2_0 + description: STD QOS2 policy type + type: object + properties: + scope: + type: object + properties: + ueId: + type: string + qosId: + type: string + additionalProperties: false + required: + - ueId + - qosId + qosObjectives: + type: object + properties: + priorityLevel: + type: number + additionalProperties: false + required: + - priorityLevel \ No newline at end of file diff --git a/a1-policy-management/open-api-fragments/v3-fragments/healthcheck-api.yaml b/a1-policy-management/open-api-fragments/v3-fragments/healthcheck-api.yaml new file mode 100644 index 00000000..a1703016 --- /dev/null +++ b/a1-policy-management/open-api-fragments/v3-fragments/healthcheck-api.yaml @@ -0,0 +1,19 @@ +status: + get: + operationId: getStatus + description: Returns status and statistics of this service + summary: Get Status (getStatus) + tags: + - Health Check + responses: + "200": + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/StatusInfo' + examples: + status_info: + $ref: 'examples.yaml#/examples/StatusInfo' + description: OK- Service is living Ok + "404": + $ref: 'responses.yaml#/responses/404' \ No newline at end of file diff --git a/a1-policy-management/open-api-fragments/v3-fragments/pms-api-v3.yaml b/a1-policy-management/open-api-fragments/v3-fragments/pms-api-v3.yaml new file mode 100644 index 00000000..a9abd726 --- /dev/null +++ b/a1-policy-management/open-api-fragments/v3-fragments/pms-api-v3.yaml @@ -0,0 +1,108 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2020-2023 Nordix Foundation. All rights reserved. +# Copyright (C) 2023-2025 OpenInfra Foundation Europe. All rights reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +openapi: 3.0.3 +info: + title: ONAP CCSDK - A1 Policy Management API + version: 1.0.0 + x-api-id: e9776a07-0813-4fca-9801-6f892f0a7c13 + x-audience: external-public + description: "

      General

      The ONAP CCSDK A1 Policy Management Service\ + \ provides a REST API for managing A1 policies.
      This document describes the latest API set + \ to perform tasks for:

      • A1 Policy creation, modification and deletion.
      • Monitoring\ + \ and maintaining consistency of the SMO view of A1 Policies and the Near-RT RICs
      • Maintaining\ + \ a view of each Near-RT RIC's supported A1 Policy Types
      • Supervision of registered services\ + \ (rApps). When a registered service is unavailable, its policies are removed.

      APIs\ + \ provided or defined by the service

      \ + \

      Note: parts of this API are strongly based on extracts of the O-RAN Alliance R1 Interface specification\ + \ for A1 Policy Management, and those parts should be considered '© O-RAN ALLIANCE - All rights reserved.'

      \ + \

      A1 Policy Management

      \ + \

      This is the latest API for managing A1 Policies. This API is partially compliant with O-RAN\ + \ Alliance R1 Interface specifications for A1 Policy Management:

      • A1 Policy retrieval, creation,\ + \ modification and deletion.
      • Retrieval of supported A1 Policy Types for\ + \ a Near-RT RIC
      • Retrieval of status for existing A1 policies

      Management\ + \ of configuration

      API for updating and retrieval of the component configuration.\ + \ Note that there other ways to maintain the configuration.

      Service Callbacks

      These\ + \ are endpoints that are invoked by this service. The callbacks are registered\ + \ in this service at service registration.

      NearRT-RIC Repository (Older version)

      \ + \

      This is an API that provides support for looking up a NearRT-RIC. Each A1 policy\ + \ is targeted towards one Near-RT RIC.

      Health Check

      API used for supervision\ + \ of the A1 Policy Management Service.

      Service Registry and Supervision

      \ + \

      API used for registering services/clients/rApps. Each A1 Policy can be tagged with an owner.\ + \ If the owner service is registered, then the service can be optionally monitored by a heart-beat supervision\ + \ mechanism, and if the registered service becomes unavailable, then it is removed and all its A1 Policies are \ + \ deleted. Note that services do not need to be registered to create A1 Policies, but unregistered \ + \ services are not supervised. This is a feature that is optional to use.

      " + license: + name: Copyright (C) 2024 - 2025 OpenInfra Foundation Europe. Licensed under the Apache 2 License. + url: http://www.apache.org/licenses/LICENSE-2.0 + contact: + url: https://www.onap.org/ + email: discuss-list@onap.com +externalDocs: + description: 'Based on parts of O-RAN ALLIANCE specification: O-RAN.WG2.R1AP-v07.00' + url: 'https://www.o-ran.org/specifications' +servers: + - url: '{apiRoot}/a1-policy-management/v1' + variables: + apiRoot: + default: 'https://example.com' + description: 'This is the Host:Port or Address where the A1-Policy Management Service can be accessed. + Note: This URL path format aligns with the O-RAN Alliance R1-AP specifications for A1 Policy Management' +tags: + - name: A1 Policy Management + description: > + API used to get, create, update and delete A1 Policy Instances. Also used to query A1 Policy Types. + - name: NearRT-RIC Repository + description: > + API used to get information about registered Near-RT RICs. + - name: Service Registry and Supervision + description: > + API used to manage registered services, and control their keep-alive status via heart-beat messages. + - name: Health Check + description: > + API used to get the health status and statistics of this service. + - name: Configuration + description: > + API used to create or fetch the application configuration. +paths: + /status: + $ref: 'healthcheck-api.yaml#/status' + /rics/{ricId}: + $ref: 'ric-api.yaml#/ric' + /rics: + $ref: 'ric-api.yaml#/rics' + /policy-types: + $ref: 'pms-lcm-api.yaml#/policy-types' + /policy-types/{policyTypeId}: + $ref: 'pms-lcm-api.yaml#/policy-type' + /policies/{policyId}: + $ref: 'pms-lcm-api.yaml#/policy' + /policies/{policyId}/status: + $ref: 'pms-lcm-api.yaml#/policy-status' + /policies: + $ref: 'pms-lcm-api.yaml#/policies' + /configuration: + $ref: 'configuration-api.yaml#/configuration' + /services/{serviceId}/keepalive: + $ref: 'service-api.yaml#/keep-alive' + /services: + $ref: 'service-api.yaml#/services' + /services/{serviceId}: + $ref: 'service-api.yaml#/service' diff --git a/a1-policy-management/open-api-fragments/v3-fragments/pms-lcm-api.yaml b/a1-policy-management/open-api-fragments/v3-fragments/pms-lcm-api.yaml new file mode 100644 index 00000000..3ef0174c --- /dev/null +++ b/a1-policy-management/open-api-fragments/v3-fragments/pms-lcm-api.yaml @@ -0,0 +1,462 @@ +policy-types: + get: + description: Query A1 Policy Type identities using query parameters + operationId: getPolicyTypes + summary: Get A1 Policy Types (getPolicyTypes) + tags: + - A1 Policy Management + parameters: + - description: Select types for the given Near-RT RIC identity. + explode: true + in: query + name: nearRtRicId + required: false + schema: + type: string + style: form + - description: Select types compatible with the given type name (type identity has the format 'typename_version') + explode: true + in: query + name: typeName + required: false + schema: + type: string + style: form + - description: > + Select types that are compatible with the given version. This + parameter is only applicable in conjunction with typeName. As an example + version 1.9.1 is compatible with 1.0.0 but not the other way around. Matching + types will be returned sorted in ascending order. + explode: true + in: query + name: compatibleWithVersion + required: false + schema: + type: string + style: form + - description: Specifies the content type that the client expects to receive in response to the request. + Only application/json is allowed. + in: header + name: Accept + schema: + type: string + example: application/json + responses: + '200': + content: + application/json: + schema: + items: + $ref: 'schemas.yaml#/schemas/PolicyTypeInformation' + type: array + examples: + PolicyTypeInformation: + $ref: 'examples.yaml#/examples/PolicyTypeInformation' + description: OK - Policy Type IDs found Ok + '400': + $ref: 'responses.yaml#/responses/400' + '401': + $ref: 'responses.yaml#/responses/401' + '403': + $ref: 'responses.yaml#/responses/403' + '404': + $ref: 'responses.yaml#/responses/404' + '406': + $ref: 'responses.yaml#/responses/406' + '429': + $ref: 'responses.yaml#/responses/429' + '500': + $ref: 'responses.yaml#/responses/500' + '502': + $ref: 'responses.yaml#/responses/502' + '503': + $ref: 'responses.yaml#/responses/503' + +policy-type: + get: + operationId: getPolicyTypeDefinition + description: Get an A1 Policy Type definition using its policy type ID + summary: Get an A1 Policy Type definition (getPolicyTypeDefinition) + tags: + - A1 Policy Management + parameters: + - explode: false + in: path + name: policyTypeId + required: true + schema: + type: string + style: simple + - description: Specifies the content type that the client expects to receive in response to the request. + Only application/json is allowed. + in: header + name: Accept + schema: + type: string + example: application/json + responses: + '200': + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/PolicyTypeObject' + examples: + PolicyTypeObject: + $ref: 'examples.yaml#/examples/PolicyTypeObject' + description: OK - details and schema of the requested A1 Policy Type + '400': + $ref: 'responses.yaml#/responses/400' + '401': + $ref: 'responses.yaml#/responses/401' + '403': + $ref: 'responses.yaml#/responses/403' + '404': + $ref: 'responses.yaml#/responses/404' + '406': + $ref: 'responses.yaml#/responses/406' + '429': + $ref: 'responses.yaml#/responses/429' + '500': + $ref: 'responses.yaml#/responses/500' + '502': + $ref: 'responses.yaml#/responses/502' + '503': + $ref: 'responses.yaml#/responses/503' + +policy: + put: + operationId: updatePolicy + description: Update an existing A1 Policy instance's policy data using its policy ID. + summary: Update an A1 Policy's policy data (updatePolicy) + tags: + - A1 Policy Management + parameters: + - name: policyId + in: path + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/PolicyObject' + examples: + policyObject: + $ref: 'examples.yaml#/examples/PolicyObject' + responses: + '200': + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/PolicyObject' + description: OK - Policy updated + '400': + $ref: 'responses.yaml#/responses/400' + '401': + $ref: 'responses.yaml#/responses/401' + '403': + $ref: 'responses.yaml#/responses/403' + '404': + $ref: 'responses.yaml#/responses/404' + '406': + $ref: 'responses.yaml#/responses/406' + '411': + $ref: 'responses.yaml#/responses/411' + '413': + $ref: 'responses.yaml#/responses/413' + '415': + $ref: 'responses.yaml#/responses/415' + '423': + $ref: 'responses.yaml#/responses/Locked' + '429': + $ref: 'responses.yaml#/responses/429' + '500': + $ref: 'responses.yaml#/responses/500' + '502': + $ref: 'responses.yaml#/responses/502' + '503': + $ref: 'responses.yaml#/responses/503' + delete: + operationId: deletePolicy + description: Delete an existing A1 Policy instance using its policy ID. + summary: Delete an A1 Policy instance (deletePolicy) + tags: + - A1 Policy Management + parameters: + - explode: false + in: path + name: policyId + required: true + schema: + type: string + style: simple + - description: Specifies the content type that the client expects to receive in response to the request. + Only application/json is allowed. + in: header + name: Accept + schema: + type: string + example: application/json + responses: + '204': + description: 'No Content' + '400': + $ref: 'responses.yaml#/responses/400' + '401': + $ref: 'responses.yaml#/responses/401' + '403': + $ref: 'responses.yaml#/responses/403' + '404': + $ref: 'responses.yaml#/responses/404' + '405': + $ref: 'responses.yaml#/responses/405' + '406': + $ref: 'responses.yaml#/responses/406' + '423': + $ref: 'responses.yaml#/responses/Locked' + '429': + $ref: 'responses.yaml#/responses/429' + '500': + $ref: 'responses.yaml#/responses/500' + '502': + $ref: 'responses.yaml#/responses/502' + '503': + $ref: 'responses.yaml#/responses/503' + get: + operationId: getPolicy + description: Get an A1 Policy instance's policy data using its policy ID + summary: Get an A1 Policy's policy data (getPolicy) + tags: + - A1 Policy Management + parameters: + - explode: false + in: path + name: policyId + required: true + schema: + type: string + style: simple + - description: Specifies the content type that the client expects to receive in response to the request. + Only application/json is allowed. + in: header + name: Accept + schema: + type: string + example: application/json + responses: + '200': + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/PolicyObject' + examples: + policyObject: + $ref: 'examples.yaml#/examples/PolicyObject' + description: OK - Policy found + '400': + $ref: 'responses.yaml#/responses/400' + '401': + $ref: 'responses.yaml#/responses/401' + '403': + $ref: 'responses.yaml#/responses/403' + '404': + $ref: 'responses.yaml#/responses/404' + '406': + $ref: 'responses.yaml#/responses/406' + '429': + $ref: 'responses.yaml#/responses/429' + '500': + $ref: 'responses.yaml#/responses/500' + '502': + $ref: 'responses.yaml#/responses/502' + '503': + $ref: 'responses.yaml#/responses/503' + +policy-status: + get: + operationId: getPolicyStatus + description: Retrieve the status information for an A1 Policy Instance using its policy ID. + summary: Get an A1 Policy Instance's status (getPolicyStatus) + tags: + - A1 Policy Management + parameters: + - explode: false + in: path + name: policyId + required: true + schema: + type: string + style: simple + - description: Specifies the content type that the client expects to receive in response to the request. + Only application/json is allowed. + in: header + name: Accept + schema: + type: string + example: application/json + responses: + '200': + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/PolicyStatusObject' + description: OK + '400': + $ref: 'responses.yaml#/responses/400' + '401': + $ref: 'responses.yaml#/responses/401' + '403': + $ref: 'responses.yaml#/responses/403' + '404': + $ref: 'responses.yaml#/responses/404' + '406': + $ref: 'responses.yaml#/responses/406' + '429': + $ref: 'responses.yaml#/responses/429' + '500': + $ref: 'responses.yaml#/responses/500' + '502': + $ref: 'responses.yaml#/responses/502' + '503': + $ref: 'responses.yaml#/responses/503' + +policies: + get: + operationId: getPolicyIds + description: > + Returns a collection of A1 Policy Instance IDs for policies that match given search criteria. + If several query parameters are defined, the policies matching all conditions are returned. + summary: Query for A1 Policy instances (getPolicyIds) + tags: + - A1 Policy Management + parameters: + - description: Select policies with a given A1 Policy Type ID. + explode: true + in: query + name: policyTypeId + required: false + schema: + type: string + style: form + - description: Select policies for a given Near-RT RIC identity. + explode: true + in: query + name: nearRtRicId + required: false + schema: + type: string + style: form + - description: Select policies owned by a given service (registered or unregistered). + explode: true + in: query + name: serviceId + required: false + schema: + type: string + style: form + - description: Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). + explode: true + in: query + name: typeName + required: false + schema: + type: string + style: form + - description: Specifies the content type that the client expects to receive in response to the request. + Only application/json is allowed. + in: header + name: Accept + schema: + type: string + example: application/json + responses: + '200': + content: + application/json: + schema: + items: + $ref: 'schemas.yaml#/schemas/PolicyInformation' + type: array + description: OK - Policy identities + '400': + $ref: 'responses.yaml#/responses/400' + '401': + $ref: 'responses.yaml#/responses/401' + '403': + $ref: 'responses.yaml#/responses/403' + '404': + $ref: 'responses.yaml#/responses/404' + '406': + $ref: 'responses.yaml#/responses/406' + '429': + $ref: 'responses.yaml#/responses/429' + '500': + $ref: 'responses.yaml#/responses/500' + '502': + $ref: 'responses.yaml#/responses/502' + '503': + $ref: 'responses.yaml#/responses/503' + post: + operationId: createPolicy + description: Create an A1 Policy Instance + summary: Create an A1 Policy Instance (createPolicy) + tags: + - A1 Policy Management + requestBody: + required: true + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/PolicyObjectInformation' + responses: + '201': + description: 'Created' + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/PolicyObjectInformation' + headers: + Location: + description: > + Contains the URI of the newly created A1 Policy Instances. + This URI includes the A1 Policy Instance ID for the newly + created policy instance. + required: true + schema: + type: string + Content-Type: + description: 'Media Type of the response' + schema: + type: string + example: application/json + + '400': + $ref: 'responses.yaml#/responses/400' + '401': + $ref: 'responses.yaml#/responses/401' + '403': + $ref: 'responses.yaml#/responses/403' + '404': + $ref: 'responses.yaml#/responses/404' + '405': + $ref: 'responses.yaml#/responses/405' + '406': + $ref: 'responses.yaml#/responses/406' + '409': + $ref: 'responses.yaml#/responses/409' + '413': + $ref: 'responses.yaml#/responses/413' + '415': + $ref: 'responses.yaml#/responses/415' + '423': + $ref: 'responses.yaml#/responses/Locked' + '429': + $ref: 'responses.yaml#/responses/429' + '500': + $ref: 'responses.yaml#/responses/500' + '502': + $ref: 'responses.yaml#/responses/502' + '503': + $ref: 'responses.yaml#/responses/503' \ No newline at end of file diff --git a/a1-policy-management/open-api-fragments/v3-fragments/responses.yaml b/a1-policy-management/open-api-fragments/v3-fragments/responses.yaml new file mode 100644 index 00000000..4b26f093 --- /dev/null +++ b/a1-policy-management/open-api-fragments/v3-fragments/responses.yaml @@ -0,0 +1,95 @@ +responses: + '400': + description: Bad Request + content: + application/problem+json: + schema: + $ref: 'schemas.yaml#/schemas/ProblemDetails' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: 'schemas.yaml#/schemas/ProblemDetails' + '403': + description: Forbidden + content: + application/problem+json: + schema: + $ref: 'schemas.yaml#/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/problem+json: + schema: + $ref: 'schemas.yaml#/schemas/ProblemDetails' + '405': + description: Method Not Allowed + content: + application/problem+json: + schema: + $ref: 'schemas.yaml#/schemas/ProblemDetails' + '406': + description: Not Acceptable + content: + application/problem+json: + schema: + $ref: 'schemas.yaml#/schemas/ProblemDetails' + '409': + description: Conflict + content: + application/problem+json: + schema: + $ref: 'schemas.yaml#/schemas/ProblemDetails' + '411': + description: Length Required + content: + application/problem+json: + schema: + $ref: 'schemas.yaml#/schemas/ProblemDetails' + '413': + description: Payload Too Large + content: + application/problem+json: + schema: + $ref: 'schemas.yaml#/schemas/ProblemDetails' + '415': + description: Unsupported Media Type + content: + application/problem+json: + schema: + $ref: 'schemas.yaml#/schemas/ProblemDetails' + '429': + description: Too Many Requests + content: + application/problem+json: + schema: + $ref: 'schemas.yaml#/schemas/ProblemDetails' + '500': + description: Internal Server Error + content: + application/problem+json: + schema: + $ref: 'schemas.yaml#/schemas/ProblemDetails' + '502': + description: Bad Gateway + content: + application/problem+json: + schema: + $ref: 'schemas.yaml#/schemas/ProblemDetails' + '503': + description: Service Unavailable + content: + application/problem+json: + schema: + $ref: 'schemas.yaml#/schemas/ProblemDetails' + Locked: + description: Locked - HTTP Status code which can be used when the state is Locked + content: + application/problem+json: + schema: + $ref: 'schemas.yaml#/schemas/ErrorInformation' + example: + status: 423 + title: Locked + detail: State is Locked in the provided request. \ No newline at end of file diff --git a/a1-policy-management/open-api-fragments/v3-fragments/ric-api.yaml b/a1-policy-management/open-api-fragments/v3-fragments/ric-api.yaml new file mode 100644 index 00000000..2b381544 --- /dev/null +++ b/a1-policy-management/open-api-fragments/v3-fragments/ric-api.yaml @@ -0,0 +1,72 @@ +ric: + get: + operationId: getRic + description: Get information about a Near-RT RIC + summary: Get a Near-RT RIC (getRic) + tags: + - NearRT-RIC Repository + parameters: + - description: The identity of a Near-RT RIC to get information for. + explode: true + in: path + name: ricId + required: true + schema: + type: string + nullable: false + - description: Specifies the content type that the client expects to receive in response to the request. + Only application/json is allowed. + in: header + name: Accept + schema: + type: string + example: application/json + responses: + "200": + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/RicInfo' + examples: + ric_info: + $ref: 'examples.yaml#/examples/RicInfo' + description: OK - Near-RT RIC is found OK + "404": + $ref: 'responses.yaml#/responses/404' +rics: + get: + operationId: getRics + description: Get all Near-RT RICs that supports a given A1 Policy Type ID + summary: Get Near-RT RICs for A1 Policy Type (getRics) + tags: + - NearRT-RIC Repository + parameters: + - description: > + The identity of an A1 Policy Type. If given, all Near-RT RICs supporting + the A1 Policy Type are returned. + explode: true + in: query + name: policyTypeId + required: false + schema: + type: string + style: form + - description: Specifies the content type that the client expects to receive in response to the request. + Only application/json is allowed. + in: header + name: Accept + schema: + type: string + example: application/json + responses: + "200": + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/RicInfoList' + examples: + ric_info_list: + $ref: 'examples.yaml#/examples/RicInfoList' + description: OK + "404": + $ref: 'responses.yaml#/responses/404' \ No newline at end of file diff --git a/a1-policy-management/open-api-fragments/v3-fragments/schemas.yaml b/a1-policy-management/open-api-fragments/v3-fragments/schemas.yaml new file mode 100644 index 00000000..86f02a30 --- /dev/null +++ b/a1-policy-management/open-api-fragments/v3-fragments/schemas.yaml @@ -0,0 +1,310 @@ +schemas: + PolicyTypeInformation: + description: >- + A data tuple to indicate that an identified A1 Policy Type is supported at an identified Near-RT RIC. + type: object + properties: + policyTypeId: + description: A1 Policy Type identifier + type: string + nearRtRicId: + $ref: '#/schemas/NearRtRicId' + required: + - policyTypeId + - nearRtRicId + example: + policyTypeId: STD_QOS2_0.1.0 + nearRtRicId: ric_g3_2 + PolicyObjectInformation: + description: Information to create an A1 Policy Instance + type: object + properties: + nearRtRicId: + description: Identity of the target Near-RT RIC + type: string + example: + 'Near-RT-Ric-ID1' + transient: + default: false + description: > + If true, the policy is automatically deleted if the targeted Near-RT RIC restarts + or recovers. If false, the A1 Policy Instance remains, and is re-pushed to the targeted + Near-RT RIC after a restart or recovery. If false, the A1 Policy Instance is maintained and + must be deleted separately in the event of Near-RT RIC restart or recovery. Default is false. + nullable: false + type: boolean + policyId: + description: > + An optional identity to be used for the new A1 Policy Instance. + If this value is present, it must be unique. If not present the new A1 + Policy Instance will be assigned a newly generated unique ID, and the + new ID can be extracted from the 'Location' header in the response. + type: string + example: + 'POLICY-ID1' + serviceId: + description: the identity of the service owning the policy. This can be + used to group the policies (it is possible to get all policies associated + to a service). Note that the service does not need to be registered. + If the service is registered, the newly created A1 Policy Instance will be + subject to the same supervision rules as the the service's other policies. + type: string + example: + 'rApp 1' + default: "" + policyObject: + $ref: '#/schemas/PolicyObject' + policyTypeId: + description: A1 Policy Type identity + type: string + example: ORAN_QOS_1.0.0 '(typeName_SemVersion)' + required: + - nearRtRicId + - policyObject + - policyTypeId + ErrorInformation: + description: Problem as defined in https://tools.ietf.org/html/rfc7807 + properties: + detail: + description: A human-readable explanation specific to this occurrence of the problem. + example: Policy type not found + type: string + title: + description: A specific error name + type: string + example: Not Found + status: + description: | + The HTTP status code generated by the origin server for this occurrence of the problem. + example: 404 + format: int32 + type: integer + type: object + PolicyObject: + description: > + Policy Object is a JSON representation policy data for an A1 Policy Instance. + The schema for this policy data is defined in the corresponding A1 Policy Type. + type: object + PolicyTypeObject: + description: An A1 Policy Type, as defined in O-RAN Alliance A1TD + type: object + properties: + policySchema: + $ref: '#/schemas/PolicySchema' + statusSchema: + $ref: '#/schemas/StatusSchema' + required: + - policySchema + example: + policySchema: + "$schema": http://json-schema.org/draft-07/schema# + title: STD_QOS_0_2_0 + description: Policy data schema for STD_QOS_0.2.0 A1 Policy Instances. + type: object + properties: + scope: + type: object + properties: + ueId: + type: string + qosId: + type: string + additionalProperties: false + required: + - ueId + - qosId + qosObjectives: + type: object + properties: + priorityLevel: + type: number + additionalProperties: false + required: + - priorityLevel + statusSchema: + "$schema": http://json-schema.org/draft-07/schema# + title: STD_QOS_0.2.0 + description: Status schema for STD_QOS_0.2.0 A1 Policy Instances. + type: object + properties: + enforceStatus: + type: string + enforceReason: + type: string + additionalProperties: false + required: + - enforceStatus + PolicySchema: + description: > + A schema to define the policy data contents of A1 Policy Instances. + Policy data schemas are Policy Type specific. + All A1 Policy Instances of an A1 Policy Type should comply with the type's policy data schema. + type: object + StatusSchema: + description: > + A schema to define the contents of the status information for A1 Policy Instances. + Status schemas are Policy Type specific. + All status information for all A1 Policy Instances of an A1 Policy Type should comply + with the type's status schema. + type: object + PolicyStatusObject: + description: > + A generic policy status object that can be used to transport any policy status. + Additionally, a schema for policy status can be defined in the corresponding A1 Policy Type. + type: object + void: + description: Void/empty + type: object + StatusInfo: + properties: + status: + description: Status text + type: string + type: object + RicInfo: + description: Information for a Near-RT RIC + properties: + ricId: + description: Identity of the Near-RT RIC + type: string + managedElementIds: + description: Identities for managed entities + items: + description: Identity for a managed entity + type: string + type: array + state: + description: Represents the state of a Near-RT RIC + enum: + - UNAVAILABLE + - AVAILABLE + - SYNCHRONIZING + - CONSISTENCY_CHECK + type: string + policyTypeIds: + description: Supported A1 Policy Types + items: + description: Supported A1 Policy Type ID + type: string + type: array + type: object + ServiceRegistrationInfo: + description: Information for a service to be registered + properties: + callbackUrl: + description: Callback URL for notifying of Near-RT RIC state changes + type: string + serviceId: + description: Identity of the service + type: string + keepAliveIntervalSeconds: + description: > + Keep alive interval for the service. This is used to enable + optional heartbeat supervision of the service. If set (> 0) the registered + service should regularly invoke a 'keepalive' REST call. When a service + fails to invoke this 'keepalive' call within the configured time, the + service is considered unavailable. An unavailable service will be automatically + deregistered and its policies will be deleted. Value 0 means timeout + supervision is disabled. + format: int64 + type: integer + required: + - serviceId + type: object + ServiceStatus: + description: Information about a previously registered service + properties: + callbackUrl: + description: Callback URL for notifying of Near-RT RIC state changes + type: string + serviceId: + description: Identity of the service + type: string + keepAliveIntervalSeconds: + description: > + Keep alive interval (seconds) for the service. This is used to enable + optional heartbeat supervision of the service. If set (> 0) the registered + service should regularly invoke a 'keepalive' REST call. When a service + fails to invoke this 'keepalive' call within the configured time, the + service is considered unavailable. An unavailable service will be automatically + deregistered and its policies will be deleted. Value 0 means timeout + supervision is disabled. + format: int64 + type: integer + timeSinceLastActivitySeconds: + description: Time (seconds) since last recorded operation by the service + format: int64 + type: integer + type: object + RicInfoList: + description: Collection of Near-RT RIC information objects + properties: + rics: + description: List of Near-RT RIC information objects + items: + $ref: '#/schemas/RicInfo' + type: array + type: object + NearRtRicId: + description: Identity of the Near-RT RIC + type: string + PolicyInformation: + description: > + Information tuple for a single A1 Policy Instance. + Contains the A1 Policy Instance ID, and the ID of the Near-RT RIC where the policy is created. + type: object + properties: + policyId: + description: Identity of the A1 Policy Instance + type: string + nearRtRicId: + $ref: '#/schemas/NearRtRicId' + required: + - policyId + - nearRtRicId + ServiceStatusList: + properties: + serviceList: + description: List of Service Status objects, describing a collection of registered services. + items: + $ref: '#/schemas/ServiceStatus' + type: array + type: object + ServiceCallbackInfo: + description: | + Information transferred in Service callbacks, + if a callback URL was provided for a registered service + properties: + ricId: + description: Identity of a Near-RT RIC + type: string + eventType: + description: > + values: + AVAILABLE: the Near-RT RIC has become available for A1 Policy management + enum: + - AVAILABLE + type: string + required: + - eventType + - ricId + type: object + ProblemDetails: + description: Object to carry details about a problem in an HTTP response according to IETF RFC 7807 + type: object + properties: + type: + description: URI reference according to IETF RFC 3986 that identifies the problem type + type: string + title: + description: Human-readable summary of the problem type + type: string + status: + description: HTTP status code + type: number + detail: + description: Human-readable explanation + type: string + instance: + description: URI reference that identifies the specific occurrence of the problem + type: string \ No newline at end of file diff --git a/a1-policy-management/open-api-fragments/v3-fragments/service-api.yaml b/a1-policy-management/open-api-fragments/v3-fragments/service-api.yaml new file mode 100644 index 00000000..12366e8b --- /dev/null +++ b/a1-policy-management/open-api-fragments/v3-fragments/service-api.yaml @@ -0,0 +1,172 @@ +keep-alive: + put: + operationId: keepAliveService + description: A registered service should invoke this operation regularly to + indicate that it is still alive. If a registered service fails to invoke some operation, + or this operation, before the end of a timeout period the service will be deregistered + and all its A1 policies wil be removed and the service is deleted. + This operation is only intended for registered services. (This timeout can be set or disabled when + each service is initially registered). Unregistered services do not need to invoke this operation, + since the optional keep-alive monitoring feature can only be enabled for registered services. + summary: Heartbeat message from a service (keepAliveService) + tags: + - Service Registry and Supervision + parameters: + - explode: false + in: path + name: serviceId + required: true + schema: + type: string + style: simple + - description: Specifies the content type that the client expects to receive in response to the request. + Only application/json is allowed. + in: header + name: Accept + schema: + type: string + example: application/json + responses: + "200": + content: + 'application/json': + schema: + type: object + description: OK - Service supervision timer refreshed, OK + "404": + $ref: 'responses.yaml#/responses/404' + +services: + get: + operationId: getServices + description: > + Get information about all registered services, or a single registered service. + If the service ID of a registered service is included in the query, information about that + service is returned. Otherwise Information about all registered is returned. + This operation does not retrieve information about unregistered services. + summary: Get Services (getServices) + tags: + - Service Registry and Supervision + parameters: + - description: The identity of the registered service + explode: true + in: query + name: serviceId + required: false + schema: + type: string + style: form + - description: Specifies the content type that the client expects to receive in response to the request. + Only application/json is allowed. + in: header + name: Accept + schema: + type: string + example: application/json + responses: + "200": + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/ServiceStatusList' + examples: + service_status_list: + $ref: 'examples.yaml#/examples/ServiceStatusList' + description: OK + "404": + $ref: 'responses.yaml#/responses/404' + put: + operationId: putService + description: > + Register a single service, or update a previous registration. + Service registration is required to get callbacks about available NearRT RICs + and to enable supervision of the service's active status. If a registered + service becomes inactive, its policies can be automatically deleted. + A1 Policy instances can also be created for unregistered services. + If an unregistered service is later registered, the service's policies are + retained when the service becomes registered. This feature is optional to use. + summary: Register or update a Service (putService) + tags: + - Service Registry and Supervision + requestBody: + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/ServiceRegistrationInfo' + required: true + responses: + "200": + content: + 'application/json': + schema: + type: object + description: OK - Service updated + "201": + content: + 'application/json': + schema: + type: object + description: Created - Service created + "400": + $ref: 'responses.yaml#/responses/400' + callbacks: + RICStatus: + "{$request.body#/callback_url}": + post: + operationId: serviceCallback + description: | + Callouts to indicate Near-RT RIC status changes relevant for Services. + The URL invoked by this callback is provided at Service registration. + summary: Callback for Near-RT RIC status (serviceCallback) + tags: + - Service Registry and Supervision + requestBody: + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/ServiceCallbackInfo' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: 'schemas.yaml#/schemas/void' + description: OK + "404": + $ref: 'responses.yaml#/responses/404' + +service: + delete: + operationId: deleteService + description: > + Unregister a registered Service using its service ID. + Only registered services can be unregistered. All A1 Policy Instances + for the previously registered service will be removed. + tags: + - Service Registry and Supervision + summary: Unregister a Service (deleteService) + parameters: + - explode: false + in: path + name: serviceId + required: true + schema: + type: string + style: simple + - description: Specifies the content type that the client expects to receive in response to the request. + Only application/json is allowed. + in: header + name: Accept + schema: + type: string + example: application/json + responses: + "204": + content: + 'application/json': + schema: + type: object + description: No Content - Service unregistered + "404": + $ref: 'responses.yaml#/responses/404' \ No newline at end of file diff --git a/a1-policy-management/pom.xml b/a1-policy-management/pom.xml index 29368772..67090756 100644 --- a/a1-policy-management/pom.xml +++ b/a1-policy-management/pom.xml @@ -26,7 +26,7 @@ org.onap.ccsdk.parent spring-boot-34-starter-parent - 3.0.2 + 3.1.1-SNAPSHOT org.onap.ccsdk.oran @@ -47,7 +47,6 @@ 0.2.6 2.0.1.Final 2.2.15 - 3.4.0 2.22.0 2.35.0 2.16.1 @@ -58,9 +57,13 @@ 3.0.0-M8 0.8.8 ${project.version} - 2.27.24 + 2.30.11 1.6.0 + + 1.41.0 + 2.7.0-alpha false + 8.0 @@ -294,7 +297,12 @@ org.springframework.boot spring-boot-actuator-autoconfigure - 3.3.0 + ${spring.boot.version} + + + net.logstash.logback + logstash-logback-encoder + ${version.logback} @@ -302,14 +310,14 @@ io.opentelemetry opentelemetry-bom - 1.46.0 + ${opentelemetry-bom.version} pom import io.opentelemetry.instrumentation opentelemetry-instrumentation-bom-alpha - 2.12.0-alpha + ${opentelemetry-instrumentation-bom-alpha.version} pom import @@ -427,6 +435,38 @@ openapi-generator-maven-plugin 7.7.0 + + openapi-yaml-gen + + generate + + compile + + ${project.basedir}/open-api-fragments/v2-fragments/pms-api.yaml + openapi-yaml + open-api-fragments/custom-openapi-license-template + ${project.basedir}/api/offeredapis/swagger + + pms-api.yaml + + + + + openapi-yaml-gen-v3 + + generate + + compile + + ${project.basedir}/open-api-fragments/v3-fragments/pms-api-v3.yaml + openapi-yaml + open-api-fragments/custom-openapi-license-template + ${project.basedir}/api/offeredapis/swagger + + pms-api-v3.yaml + + + generate-openapi-json prepare-package @@ -434,7 +474,7 @@ generate - ${project.basedir}/api/offeredapis/swagger/pms-api.yaml + ${project.basedir}/open-api-fragments/v2-fragments/pms-api.yaml openapi ${project.basedir}/api/offeredapis/swagger @@ -449,7 +489,7 @@ generate - ${project.basedir}/api/offeredapis/swagger/pms-api-v3.yaml + ${project.basedir}/open-api-fragments/v3-fragments/pms-api-v3.yaml openapi ${project.basedir}/api/offeredapis/swagger @@ -465,7 +505,7 @@ generate - ${project.basedir}/api/offeredapis/swagger/pms-api-v3.yaml + ${project.basedir}/open-api-fragments/v3-fragments/pms-api-v3.yaml openapi A1PolicyManagement ${project.basedir}/api/offeredapis/swagger/custom @@ -552,7 +592,7 @@ generate - ${project.basedir}/api/offeredapis/swagger/pms-api.yaml + ${project.basedir}/open-api-fragments/v2-fragments/pms-api.yaml ${project.groupId}.a1policymanagementservice.controllers.v2 ${project.groupId}.a1policymanagementservice.controllers.api.v2 ${project.groupId}.a1policymanagementservice.models.v2 @@ -582,7 +622,7 @@ generate - ${project.basedir}/api/offeredapis/swagger/pms-api-v3.yaml + ${project.basedir}/open-api-fragments/v3-fragments/pms-api-v3.yaml ${project.groupId}.a1policymanagementservice.controllers.v3 ${project.groupId}.a1policymanagementservice.controllers.api.v3 ${project.groupId}.a1policymanagementservice.models.v3 diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/BeanFactory.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/BeanFactory.java index 4d1fa331..4d825f85 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/BeanFactory.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/BeanFactory.java @@ -3,7 +3,7 @@ * ONAP : ccsdk oran * ====================================================================== * Copyright (C) 2019-2020 Nordix Foundation. All rights reserved. - * Copyright (C) 2023-2024 OpenInfra Foundation Europe. All rights reserved. + * Copyright (C) 2023-2025 OpenInfra Foundation Europe. All rights reserved. * ====================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,7 +37,7 @@ import org.springframework.context.annotation.Configuration; @Configuration public class BeanFactory { - @Value("${server.http-port}") + @Value("${server.http-port:0}") private int httpPort = 0; @Bean diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/AsyncRestClientFactory.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/AsyncRestClientFactory.java index 204af9c0..6d642a31 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/AsyncRestClientFactory.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/AsyncRestClientFactory.java @@ -3,6 +3,8 @@ * ONAP : ccsdk oran * ====================================================================== * Copyright (C) 2019-2022 Nordix Foundation. All rights reserved. + * Modifications Copyright (C) 2025 OpenInfra Foundation Europe. + * All rights reserved. * ====================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -59,7 +61,12 @@ public class AsyncRestClientFactory { public AsyncRestClientFactory(WebClientConfig clientConfig, SecurityContext securityContext) { if (clientConfig != null) { - this.sslContextFactory = new CachingSslContextFactory(clientConfig); + if (clientConfig.isSslEnabled()) { + this.sslContextFactory = new CachingSslContextFactory(clientConfig); + } else { + this.sslContextFactory = null; + logger.debug("SSL is turned OFF for the web client"); + } this.httpProxyConfig = clientConfig.getHttpProxyConfig(); } else { logger.warn("No configuration for web client defined, HTTPS will not work"); diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ApplicationConfig.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ApplicationConfig.java index d3b51461..360369c0 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ApplicationConfig.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ApplicationConfig.java @@ -3,7 +3,8 @@ * ONAP : ccsdk oran * ====================================================================== * Copyright (C) 2019-2020 Nordix Foundation. All rights reserved. - * Copyright (C) 2023-2024 OpenInfra Foundation Europe. All rights reserved. + * Modifications Copyright (C) 2023-2025 OpenInfra Foundation Europe. + * All rights reserved. * ====================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,20 +23,16 @@ package org.onap.ccsdk.oran.a1policymanagementservice.configuration; import com.google.common.base.Strings; - import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Map; - import lombok.Getter; import lombok.Setter; - import org.onap.ccsdk.oran.a1policymanagementservice.configuration.WebClientConfig.HttpProxyConfig; import org.onap.ccsdk.oran.a1policymanagementservice.exceptions.ServiceException; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.context.properties.EnableConfigurationProperties; - import reactor.core.publisher.Flux; import reactor.netty.transport.ProxyProvider; @@ -43,36 +40,40 @@ import reactor.netty.transport.ProxyProvider; public class ApplicationConfig { @Getter - @Value("${app.filepath}") + @Value("${app.filepath:null}") private String localConfigurationFilePath; @Getter - @Value("${app.config-file-schema-path:}") + @Value("${app.config-file-schema-path:null}") private String configurationFileSchemaPath; @Getter @Value("${app.vardata-directory:null}") private String vardataDirectory; - @Value("${server.ssl.key-store-type}") + @Getter + @Value("${server.ssl.enabled:true}") + private boolean sslEnabled; + + @Value("${server.ssl.key-store-type:null}") private String sslKeyStoreType = ""; - @Value("${server.ssl.key-store-password}") + @Value("${server.ssl.key-store-password:null}") private String sslKeyStorePassword = ""; - @Value("${server.ssl.key-store}") + @Value("${server.ssl.key-store:null}") private String sslKeyStore = ""; - @Value("${server.ssl.key-password}") + @Value("${server.ssl.key-password:null}") private String sslKeyPassword = ""; - @Value("${app.webclient.trust-store-used}") + @Value("${app.webclient.trust-store-used:false}") private boolean sslTrustStoreUsed = false; - @Value("${app.webclient.trust-store-password}") + @Value("${app.webclient.trust-store-password:null}") private String sslTrustStorePassword = ""; - @Value("${app.webclient.trust-store}") + @Value("${app.webclient.trust-store:null}") private String sslTrustStore = ""; @Value("${app.webclient.http.proxy-host:}") @@ -110,6 +111,18 @@ public class ApplicationConfig { @Value("${app.database-enabled:}") private boolean databaseEnabled; + public enum ValidateSchema { + NONE, + INFO, + WARN, + FAIL + } + + @Getter + @Setter + @Value("${app.validate-policy-instance-schema:NONE}") + private ValidateSchema validatePolicyInstanceSchema; + private Map ricConfigs = new HashMap<>(); private WebClientConfig webClientConfig = null; @@ -125,17 +138,26 @@ public class ApplicationConfig { .httpProxyPort(this.httpProxyPort) // .httpProxyType(ProxyProvider.Proxy.valueOf(this.httpProxyType)) // .build(); + if (sslEnabled) { + this.webClientConfig = WebClientConfig.builder() // + .sslEnabled(true) + .keyStoreType(this.sslKeyStoreType) // + .keyStorePassword(this.sslKeyStorePassword) // + .keyStore(this.sslKeyStore) // + .keyPassword(this.sslKeyPassword) // + .isTrustStoreUsed(this.sslTrustStoreUsed) // + .trustStore(this.sslTrustStore) // + .trustStorePassword(this.sslTrustStorePassword) // + .httpProxyConfig(httpProxyConfig) // + .build(); + } else { + this.webClientConfig = WebClientConfig.builder() // + .sslEnabled(false) + .isTrustStoreUsed(false) + .httpProxyConfig(httpProxyConfig) // + .build(); + } - this.webClientConfig = WebClientConfig.builder() // - .keyStoreType(this.sslKeyStoreType) // - .keyStorePassword(this.sslKeyStorePassword) // - .keyStore(this.sslKeyStore) // - .keyPassword(this.sslKeyPassword) // - .isTrustStoreUsed(this.sslTrustStoreUsed) // - .trustStore(this.sslTrustStore) // - .trustStorePassword(this.sslTrustStorePassword) // - .httpProxyConfig(httpProxyConfig) // - .build(); } return this.webClientConfig; } diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ApplicationConfigParser.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ApplicationConfigParser.java index f5f0f7e7..24c1d258 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ApplicationConfigParser.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ApplicationConfigParser.java @@ -2,7 +2,7 @@ * ========================LICENSE_START================================= * ONAP : ccsdk oran * ====================================================================== - * Copyright (C) 2019-2020 Nordix Foundation. All rights reserved. + * Copyright (C) 2019-2025 OpenInfra Foundation Europe. All rights reserved. * ====================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -148,13 +148,20 @@ public class ApplicationConfigParser { "Configuration error, controller configuration not found: " + controllerName); } - RicConfig ricConfig = RicConfig.builder() // - .ricId(get(ricJsonObj, "name", "id", "ricId").getAsString()) // - .baseUrl(get(ricJsonObj, "baseUrl").getAsString()) // - .managedElementIds(parseManagedElementIds(get(ricJsonObj, "managedElementIds").getAsJsonArray())) // + RicConfig.RicConfigBuilder ricConfigBuilder = RicConfig.builder() + .ricId(get(ricJsonObj, "name", "id", "ricId").getAsString()) + .baseUrl(get(ricJsonObj, "baseUrl").getAsString()) .controllerConfig(controllerConfig) - .customAdapterClass(getString(ricJsonObj, "customAdapterClass", "")) // - .build(); + .customAdapterClass(getString(ricJsonObj, "customAdapterClass", "")); + + if (ricJsonObj.has("managedElementIds")) { + ricConfigBuilder + .managedElementIds(parseManagedElementIds(get(ricJsonObj, "managedElementIds").getAsJsonArray())); + } else { + ricConfigBuilder.managedElementIds(null); + } + + RicConfig ricConfig = ricConfigBuilder.build(); if (!ricConfig.getBaseUrl().isEmpty()) { result.add(ricConfig); } else { diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/WebClientConfig.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/WebClientConfig.java index ab2958c6..1f22d995 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/WebClientConfig.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/WebClientConfig.java @@ -3,6 +3,8 @@ * ONAP : ccsdk oran * ====================================================================== * Copyright (C) 2020-2023 Nordix Foundation. All rights reserved. + * Modifications Copyright (C) 2025 OpenInfra Foundation Europe. + * All rights reserved. * ====================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,13 +25,15 @@ package org.onap.ccsdk.oran.a1policymanagementservice.configuration; import lombok.Builder; import lombok.Getter; import lombok.ToString; - import reactor.netty.transport.ProxyProvider; @Builder @Getter @ToString public class WebClientConfig { + + private boolean sslEnabled; + private String keyStoreType; private String keyStorePassword; diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/RicRepositoryController.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/RicRepositoryController.java index 53abcd71..ee3ce6d2 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/RicRepositoryController.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/RicRepositoryController.java @@ -41,9 +41,7 @@ import org.springframework.web.bind.annotation.RestController; import org.springframework.web.server.ServerWebExchange; import reactor.core.publisher.Mono; -import java.util.ArrayList; -import java.util.List; -import java.util.Set; +import java.util.*; @RestController("ricRepositoryControllerV2") @RequiredArgsConstructor @@ -124,9 +122,16 @@ public class RicRepositoryController implements NearRtRicRepositoryApi { } private RicInfo toRicInfo(Ric ric) { - return new RicInfo().ricId(ric.id()) - .managedElementIds((List) ric.getManagedElementIds()) + RicInfo ricInfo = new RicInfo().ricId(ric.id()) .policytypeIds((List) ric.getSupportedPolicyTypeNames()) .state(toRicState(ric.getState())); + + if (ric.getConfig().getManagedElementIds() == null) { + ricInfo.setManagedElementIds(new ArrayList<>()); + } else { + ricInfo.managedElementIds((List) ric.getConfig().getManagedElementIds()); + } + + return ricInfo; } } diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v3/PolicyControllerV3.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v3/PolicyControllerV3.java index 5034f84f..bc953327 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v3/PolicyControllerV3.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v3/PolicyControllerV3.java @@ -70,7 +70,7 @@ public class PolicyControllerV3 implements A1PolicyManagementApi { } @Override - public Mono>> getAllPolicies(String policyTypeId, String nearRtRicId, String serviceId, String typeName, String accept, ServerWebExchange exchange) throws Exception { + public Mono>> getPolicyIds(String policyTypeId, String nearRtRicId, String serviceId, String typeName, String accept, ServerWebExchange exchange) throws Exception { return policyService.getPolicyIdsService(policyTypeId, nearRtRicId, serviceId, typeName, exchange) .doOnError(errorHandlingService::handleError); } @@ -88,7 +88,7 @@ public class PolicyControllerV3 implements A1PolicyManagementApi { } @Override - public Mono> putPolicy(String policyId, Mono body, ServerWebExchange exchange) throws Exception { + public Mono> updatePolicy(String policyId, Mono body, ServerWebExchange exchange) throws Exception { return body.flatMap(payload -> policyService.putPolicyService(policyId, payload, exchange)) .doOnError(errorHandlingService::handleError); } diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v3/RicRepositoryControllerV3.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v3/RicRepositoryControllerV3.java index ce2769e6..ff33c7c9 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v3/RicRepositoryControllerV3.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v3/RicRepositoryControllerV3.java @@ -40,8 +40,7 @@ import org.springframework.web.bind.annotation.RestController; import org.springframework.web.server.ServerWebExchange; import reactor.core.publisher.Mono; -import java.util.List; -import java.util.Set; +import java.util.*; @RestController("ricRepositoryControllerV3") @RequiredArgsConstructor @@ -93,10 +92,17 @@ public class RicRepositoryControllerV3 implements NearRtRicRepositoryApi { } private RicInfo toRicInfo(Ric ric) { - return new RicInfo().ricId(ric.id()) - .managedElementIds((List) ric.getManagedElementIds()) + RicInfo ricInfo = new RicInfo().ricId(ric.id()) .policyTypeIds((List) ric.getSupportedPolicyTypeNames()) .state(toRicState(ric.getState())); + + if (ric.getConfig().getManagedElementIds() == null) { + ricInfo.setManagedElementIds(new ArrayList<>()); + } else { + ricInfo.managedElementIds((List) ric.getConfig().getManagedElementIds()); + } + + return ricInfo; } private RicInfo.StateEnum toRicState(Ric.RicState state) { diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v3/ServiceControllerV3.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v3/ServiceControllerV3.java index d29e37a6..81d864fa 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v3/ServiceControllerV3.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v3/ServiceControllerV3.java @@ -2,7 +2,7 @@ * ========================LICENSE_START================================= * ONAP : ccsdk oran * ====================================================================== - * Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved. + * Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved. * ====================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -67,7 +67,7 @@ public class ServiceControllerV3 implements ServiceRegistryAndSupervisionApi { } @Override - public Mono> keepAliveService(String serviceId, String accept, Mono body, ServerWebExchange exchange) throws Exception { + public Mono> keepAliveService(String serviceId, String accept, ServerWebExchange exchange) throws Exception { return serviceController.keepAliveService(serviceId, exchange); } diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/service/v3/PolicyService.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/service/v3/PolicyService.java index f2ee6e18..5f92c9ac 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/service/v3/PolicyService.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/service/v3/PolicyService.java @@ -70,16 +70,18 @@ public class PolicyService { Ric ric = rics.getRic(policyObjectInfo.getNearRtRicId()); PolicyType policyType = policyTypes.getType(policyObjectInfo.getPolicyTypeId()); Policy policy = helper.buildPolicy(policyObjectInfo, policyType, ric, helper.policyIdGeneration(policyObjectInfo), serverWebExchange); + if (Boolean.FALSE.equals(helper.performPolicySchemaValidation(policy, policyType))) + return Mono.error(new ServiceException("Policy Type Schema validation failed in create", HttpStatus.BAD_REQUEST)); return helper.isPolicyAlreadyCreated(policy,policies) .doOnError(errorHandlingService::handleError) .flatMap(policyBuilt -> authorizationService.authCheck(serverWebExchange, policy, AccessType.WRITE) - .doOnError(errorHandlingService::handleError) - .flatMap(policyNotUsed -> ric.getLock().lock(Lock.LockType.SHARED, "createPolicy")) - .flatMap(grant -> postPolicy(policy, grant)) - .map(locationHeaderValue -> - new ResponseEntity(policyObjectInfo,helper.createHttpHeaders( - "location",helper.buildURI(policy.getId(), serverWebExchange)), HttpStatus.CREATED)) - .doOnError(errorHandlingService::handleError)); + .doOnError(errorHandlingService::handleError) + .flatMap(policyNotUsed -> ric.getLock().lock(Lock.LockType.SHARED, "createPolicy")) + .flatMap(grant -> postPolicy(policy, grant)) + .map(locationHeaderValue -> + new ResponseEntity(policyObjectInfo,helper.createHttpHeaders( + "location",helper.buildURI(policy.getId(), serverWebExchange)), HttpStatus.CREATED)) + .doOnError(errorHandlingService::handleError)); } catch (Exception ex) { return Mono.error(ex); } @@ -105,6 +107,9 @@ public class PolicyService { PolicyObjectInformation pos = new PolicyObjectInformation(existingPolicy.getRic().getConfig().getRicId(), body, existingPolicy.getType().getId()); Policy updatedPolicy = helper.buildPolicy(pos, existingPolicy.getType(), existingPolicy.getRic(), policyId, exchange); + PolicyType policyType = policyTypes.getType(pos.getPolicyTypeId()); + if (Boolean.FALSE.equals(helper.performPolicySchemaValidation(updatedPolicy, policyType))) + return Mono.error(new ServiceException("Policy Type Schema validation failed in update", HttpStatus.BAD_REQUEST)); Ric ric = existingPolicy.getRic(); return authorizationService.authCheck(exchange, updatedPolicy, AccessType.WRITE) .doOnError(errorHandlingService::handleError) @@ -162,7 +167,7 @@ public class PolicyService { public Mono> getPolicyService(String policyId, ServerWebExchange serverWebExchange) throws EntityNotFoundException{ - Policy policy = policies.getPolicy(policyId); + Policy policy = policies.getPolicy(policyId); return authorizationService.authCheck(serverWebExchange, policy, AccessType.READ) .map(x -> new ResponseEntity(policy.getJson(), HttpStatus.OK)) .doOnError(errorHandlingService::handleError); @@ -231,4 +236,4 @@ public class PolicyService { .map(successResponse -> new ResponseEntity(successResponse, HttpStatus.OK)) .doOnError(errorHandlingService::handleError); } -} +} \ No newline at end of file diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/util/v3/Helper.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/util/v3/Helper.java index 8f3be34a..3199e9c3 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/util/v3/Helper.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/util/v3/Helper.java @@ -23,6 +23,9 @@ package org.onap.ccsdk.oran.a1policymanagementservice.util.v3; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import lombok.RequiredArgsConstructor; +import org.everit.json.schema.loader.SchemaLoader; +import org.json.JSONObject; +import org.onap.ccsdk.oran.a1policymanagementservice.configuration.ApplicationConfig; import org.onap.ccsdk.oran.a1policymanagementservice.exceptions.InvalidRequestException; import org.onap.ccsdk.oran.a1policymanagementservice.exceptions.ServiceException; import org.onap.ccsdk.oran.a1policymanagementservice.models.v3.PolicyInformation; @@ -52,6 +55,8 @@ import java.util.stream.Collectors; @RequiredArgsConstructor public class Helper { + private final ApplicationConfig applicationConfig; + @Autowired private TokenService tokenService; @@ -107,6 +112,53 @@ public class Helper { return true; } + private boolean policyTypeSchemaValidation(Policy policy, PolicyType policyType) { + try { + JSONObject schemaJson = new JSONObject(policyType.getSchema()); + var schema = SchemaLoader.load(schemaJson); + JSONObject policyJson = new JSONObject(policy.getJson()); + + // PUT request body is not automatically deserialized - so we manually extract the desired policy object + if (policyJson.has("policyObject")) { + policyJson = policyJson.getJSONObject("policyObject"); + } + + schema.validate(policyJson); + logger.info("Policy type schema validation successful"); + return true; // Validation passed + } catch (Exception e) { + logger.error("Policy type schema validation failed", e); + return false; // Validation failed + } + } + + public Boolean performPolicySchemaValidation(Policy policy, PolicyType policyType) { + + switch (applicationConfig.getValidatePolicyInstanceSchema()) { + case INFO: + if (policyTypeSchemaValidation(policy, policyType)) { + return true; + } + logger.info("Policy Schema validation failed but not enforced."); + return true; + case WARN: + if (policyTypeSchemaValidation(policy, policyType)) { + return true; + } + logger.warn("Policy Schema validation failed but not enforced."); + return true; + case FAIL: + if (policyTypeSchemaValidation(policy, policyType)) { + return true; + } + logger.error("Policy Schema validation failed."); + return false; + default: + logger.info("Policy schema validation disabled."); + return true; + } + } + public String policyIdGeneration(PolicyObjectInformation policyObjectInfo) { if (policyObjectInfo.getPolicyId() == null || policyObjectInfo.getPolicyId().isEmpty() || policyObjectInfo.getPolicyId().isBlank()) diff --git a/a1-policy-management/src/main/resources/logback-json.xml b/a1-policy-management/src/main/resources/logback-json.xml new file mode 100644 index 00000000..3c22aeac --- /dev/null +++ b/a1-policy-management/src/main/resources/logback-json.xml @@ -0,0 +1,70 @@ + + + + + + + + version + 1.2.0 + + + timestamp + yyyy-MM-dd'T'HH:mm:ss.SSSZ + + + true + + { + "service_id": "${SERVICE_ID:-a1pms}", + "message": "%msg", + "facility": "%X{facility}", + "subject": "%X{subject}", + "extra_data": { + "logger": "%logger", + "thread_info": { + "thread_name": "%thread" + }, + "dst": { + "trace_id": "%mdc{traceId}" + }, + "exception": { + "stack_trace": "%xEx" + } + }, + "metadata": { + "application_id": "${APP_ID:-a1pms}" + } + } + + + + + + + + + + + + + + diff --git a/a1-policy-management/src/main/resources/logback-plain.xml b/a1-policy-management/src/main/resources/logback-plain.xml new file mode 100644 index 00000000..014a983a --- /dev/null +++ b/a1-policy-management/src/main/resources/logback-plain.xml @@ -0,0 +1,35 @@ + + + + + + %d{yyyy-MM-dd'T'HH:mm:ss.SSSZ} [%thread] %-5level %logger - %msg [facility=%X{facility}, subject=%X{subject}, traceId=%mdc{traceId}] %n%xEx + + + + + + + + + + \ No newline at end of file diff --git a/a1-policy-management/src/main/resources/logback-stream.xml b/a1-policy-management/src/main/resources/logback-stream.xml new file mode 100644 index 00000000..9cfb863b --- /dev/null +++ b/a1-policy-management/src/main/resources/logback-stream.xml @@ -0,0 +1,80 @@ + + + + + localhost:5044 + + + + version + 1.2.0 + + + timestamp + yyyy-MM-dd'T'HH:mm:ss.SSSZ + + + true + + { + "service_id": "${SERVICE_ID:-a1pms}", + "message": "%msg", + "facility": "%X{facility}", + "subject": "%X{subject}", + "extra_data": { + "logger": "%logger", + "thread_info": { + "thread_name": "%thread" + }, + "dst": { + "trace_id": "%mdc{traceId}" + }, + "exception": { + "stack_trace": "%xEx" + } + }, + "metadata": { + "application_id": "${APP_ID:-a1pms}" + } + } + + + + + + + + + + + %d{yyyy-MM-dd'T'HH:mm:ss.SSSZ} [%thread] %-5level %logger - %msg [facility=%X{facility}, subject=%X{subject}, traceId=%mdc{traceId}] %n%xEx + + + + + + + + + + + + diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ApplicationTest.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ApplicationTest.java index 5ed8642a..864a1c53 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ApplicationTest.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ApplicationTest.java @@ -3,6 +3,8 @@ * ONAP : ccsdk oran * ====================================================================== * Copyright (C) 2019-2023 Nordix Foundation. All rights reserved. + * Modifications Copyright (C) 2025 OpenInfra Foundation Europe. + * All rights reserved. * ====================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1170,6 +1172,7 @@ class ApplicationTest { private AsyncRestClient restClient(String baseUrl, boolean useTrustValidation) { WebClientConfig config = this.applicationConfig.getWebClientConfig(); config = WebClientConfig.builder() + .sslEnabled(config.isSslEnabled()) .keyStoreType(config.getKeyStoreType()) .keyStorePassword(config.getKeyStorePassword()) .keyStore(config.getKeyStore()) @@ -1185,8 +1188,12 @@ class ApplicationTest { } - private String baseUrl() { - return "https://localhost:" + port; + public String baseUrl() { + if (applicationConfig.isSslEnabled()) { + return "https://localhost:" + port; + } else { + return "http://localhost:" + port; + } } private AsyncRestClient restClient(boolean useTrustValidation) { diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ConfigurationControllerTest.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ConfigurationControllerTest.java index e46b8367..05f82c6d 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ConfigurationControllerTest.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ConfigurationControllerTest.java @@ -1,6 +1,8 @@ /*- * ========================LICENSE_START================================= * Copyright (C) 2020-2023 Nordix Foundation. All rights reserved. + * Modifications Copyright (C) 2025 OpenInfra Foundation Europe. + * All rights reserved. * ====================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -64,8 +66,6 @@ import reactor.test.StepVerifier; "app.config-file-schema-path=/application_configuration_schema.json" // }) class ConfigurationControllerTest { - @Autowired - ApplicationContext context; @Autowired ApplicationConfig applicationConfig; @@ -166,19 +166,28 @@ class ConfigurationControllerTest { private AsyncRestClient restClient() { WebClientConfig config = this.applicationConfig.getWebClientConfig(); - config = WebClientConfig.builder() // - .keyStoreType(config.getKeyStoreType()) // - .keyStorePassword(config.getKeyStorePassword()) // - .keyStore(config.getKeyStore()) // - .keyPassword(config.getKeyPassword()) // - .isTrustStoreUsed(false) // - .trustStore(config.getTrustStore()) // - .trustStorePassword(config.getTrustStorePassword()) // - .httpProxyConfig(config.getHttpProxyConfig()) // - .build(); - - AsyncRestClientFactory f = new AsyncRestClientFactory(config, new SecurityContext("")); - return f.createRestClientNoHttpProxy("https://localhost:" + port); + if (applicationConfig.isSslEnabled()) { + config = WebClientConfig.builder() // + .sslEnabled(applicationConfig.isSslEnabled()) + .keyStoreType(config.getKeyStoreType()) // + .keyStorePassword(config.getKeyStorePassword()) // + .keyStore(config.getKeyStore()) // + .keyPassword(config.getKeyPassword()) // + .isTrustStoreUsed(config.isTrustStoreUsed()) // + .trustStore(config.getTrustStore()) // + .trustStorePassword(config.getTrustStorePassword()) // + .httpProxyConfig(config.getHttpProxyConfig()) // + .build(); + + AsyncRestClientFactory f = new AsyncRestClientFactory(config, new SecurityContext("")); + return f.createRestClientNoHttpProxy("https://localhost:" + port); + } else { + config = WebClientConfig.builder() + .httpProxyConfig(config.getHttpProxyConfig()) + .build(); + AsyncRestClientFactory f = new AsyncRestClientFactory(config, new SecurityContext("")); + return f.createRestClientNoHttpProxy("http://localhost:" + port); + } } } diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v3/ConfigurationControllerV3Test.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v3/ConfigurationControllerV3Test.java index d9fa63a9..666b37e0 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v3/ConfigurationControllerV3Test.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v3/ConfigurationControllerV3Test.java @@ -1,6 +1,6 @@ /*- * ========================LICENSE_START================================= - * Copyright (C) 2020-2023 Nordix Foundation. All rights reserved. + * Copyright (C) 2020-2025 OpenInfra Foundation Europe. All rights reserved. * ====================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -53,6 +53,10 @@ import static org.hamcrest.CoreMatchers.equalTo; "app.config-file-schema-path=/application_configuration_schema.json" // }) class ConfigurationControllerV3Test { + + @Autowired + private RefreshConfigTask refreshConfigTask; + @Autowired ApplicationContext context; @@ -119,6 +123,46 @@ class ConfigurationControllerV3Test { testHelperTest.testSuccessResponse(responseGetConfigMono, HttpStatus.OK, responseBody -> responseBody.contains("config")); } + @Test + void testPutConfigurationMeNull() throws Exception { + Mono> responseEntityMono = testHelperTest.restClientV3().putForEntity("/configuration", + testHelperTest.configAsStringMeNull()); + testHelperTest.testSuccessResponse(responseEntityMono, HttpStatus.OK, Objects::isNull); + //put Valid Configuration With New Ric should Update Repository. So, will wait until the ric size is 2 + await().until(rics::size, equalTo(2)); + //test Get Configuration + Mono> responseGetConfigMono = testHelperTest.restClientV3().getForEntity("/configuration"); + testHelperTest.testSuccessResponse(responseGetConfigMono, HttpStatus.OK, responseBody -> !responseBody.contains("\"managedElementIds\"")); + + refreshConfigTask.start(); + + Mono> responseGetRicsMono = testHelperTest.restClientV3().getForEntity("/rics"); + testHelperTest.testSuccessResponse(responseGetRicsMono, HttpStatus.OK, responseBody -> responseBody.contains("\"managedElementIds\":[]")); + + Mono> responseGetRicMono = testHelperTest.restClientV3().getForEntity("/rics/ric1"); + testHelperTest.testSuccessResponse(responseGetRicMono, HttpStatus.OK, responseBody -> responseBody.contains("\"managedElementIds\":[]")); + } + + @Test + void testPutConfigurationMeEmpty() throws Exception { + Mono> responseEntityMono = testHelperTest.restClientV3().putForEntity("/configuration", + testHelperTest.configAsStringMeEmpty()); + testHelperTest.testSuccessResponse(responseEntityMono, HttpStatus.OK, Objects::isNull); + //put Valid Configuration With New Ric should Update Repository. So, will wait until the ric size is 2 + await().until(rics::size, equalTo(2)); + //test Get Configuration + Mono> responseGetConfigMono = testHelperTest.restClientV3().getForEntity("/configuration"); + testHelperTest.testSuccessResponse(responseGetConfigMono, HttpStatus.OK, responseBody -> responseBody.contains("\"managedElementIds\":[]")); + + refreshConfigTask.start(); + + Mono> responseGetRicsMono = testHelperTest.restClientV3().getForEntity("/rics"); + testHelperTest.testSuccessResponse(responseGetRicsMono, HttpStatus.OK, responseBody -> responseBody.contains("\"managedElementIds\":[]")); + + Mono> responseGetRicMono = testHelperTest.restClientV3().getForEntity("/rics/ric1"); + testHelperTest.testSuccessResponse(responseGetRicMono, HttpStatus.OK, responseBody -> responseBody.contains("\"managedElementIds\":[]")); + } + @Test void testHealthCheck() { Mono> responseHealthCheckMono = testHelperTest.restClientV3().getForEntity("/status"); diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v3/PolicyControllerV3Test.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v3/PolicyControllerV3Test.java index 26c10d2a..36e88238 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v3/PolicyControllerV3Test.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v3/PolicyControllerV3Test.java @@ -110,6 +110,16 @@ class PolicyControllerV3Test { + "ImV4cCI6MzAwMDAwMDAwMCwiY2xpZW50X2lkIjoibXljbGllbnQiLCJyb2xlIjoidXNlciJ9." + "O5QN_SWN4J1mWKyXk_-PCvOA6GF3ypv1rSdg2uTb_Ls"; + private final String bearerTokenUpn = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9." + + "eyJpc3MiOiJleGFtcGxlX2lzc3VlciIsInVwbiI6IjEyMzQ1Njc4OTAiLCJhdWQiOiJteWNsaWVu" + + "dCIsImV4cCI6MzAwMDAwMDAwMCwiY2xpZW50X2lkIjoibXljbGllbnQiLCJyb2xlIjoidXNlciJ9." + + "z3OqH4_a2jzt4XOJlUB5r9seP2ppkdYVdK1LYZXkSh4"; + + private final String bearerTokenPrefUser = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9." + + "eyJpc3MiOiJleGFtcGxlX2lzc3VlciIsInByZWZlcnJlZF91c2VybmFtZSI6IjEyMzQ1Njc4OTAiLCJh" + + "dWQiOiJteWNsaWVudCIsImV4cCI6MzAwMDAwMDAwMCwiY2xpZW50X2lkIjoibXljbGllbnQiLCJyb2xlIjoidXNlciJ9." + + "vt5K1E68zHUBkvK8lTXSLHXH6gvHdZ1RwyrhPx9qQ-Q"; + private final String emptyBearerToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IiJ9." + "eyJpYXQiOjE1MTYyMzkwMjJ9.uE72OfhNzhIFuyHhZyI0eYVPG6QJ7s7A-SVeKsLubCQ"; @@ -117,6 +127,7 @@ class PolicyControllerV3Test { void init() { testHelperTest.port = port; this.applicationConfig.setAuthProviderUrl(testHelperTest.baseUrl() + OpenPolicyAgentSimulatorController.ACCESS_CONTROL_URL); + this.applicationConfig.setValidatePolicyInstanceSchema(ApplicationConfig.ValidateSchema.NONE); } @AfterEach @@ -152,7 +163,94 @@ class PolicyControllerV3Test { Mono> responseMono = testHelperTest.restClientV3().postForEntity(url, policyBody); testHelperTest.testSuccessResponse(responseMono, HttpStatus.CREATED, responseBody -> responseBody.contains("{\"scope\":{\"ueId\":\"ue5100\",\"qosId\":\"qos5100\"},\"qosObjectives\":{\"priorityLevel\":5100.0}}")); - testHelperTest.testSuccessHeader(responseMono, "location", headerValue -> headerValue.contains("https://localhost:" + port + "/a1-policy-management/v1/policies/")); + testHelperTest.testSuccessHeader(responseMono, "location", headerValue -> headerValue.contains(testHelperTest.baseUrl() + "/a1-policy-management/v1/policies/")); + } + + + @Test + @DisplayName("test Create Policy Success when schema validation set to FAIL") + void testPolicyTypeSchemaValidationFail() throws Exception { + this.applicationConfig.setValidatePolicyInstanceSchema(ApplicationConfig.ValidateSchema.FAIL); + String nonRtRicId = "ric.1"; + String policyTypeName = "type1_1.2.3"; + String url = "/policies"; + testHelperTest.addPolicyType(policyTypeName, nonRtRicId); + String policyBody = testHelperTest.postPolicyBody(nonRtRicId, policyTypeName, ""); + Mono> responseMono = testHelperTest.restClientV3().postForEntity(url, policyBody); + testHelperTest.testSuccessResponse(responseMono, HttpStatus.CREATED, responseBody -> + responseBody.contains("{\"scope\":{\"ueId\":\"ue5100\",\"qosId\":\"qos5100\"},\"qosObjectives\":{\"priorityLevel\":5100.0}}")); + testHelperTest.testSuccessHeader(responseMono, "location", headerValue -> headerValue.contains(testHelperTest.baseUrl() + "/a1-policy-management/v1/policies/")); + } + + + @Test + @DisplayName("test Create Policy Success when schema validation set to INFO") + void testPolicyTypeSchemaValidationInfo() throws Exception { + this.applicationConfig.setValidatePolicyInstanceSchema(ApplicationConfig.ValidateSchema.INFO); + String nonRtRicId = "ric.1"; + String policyTypeName = "type1_1.2.3"; + String url = "/policies"; + testHelperTest.addPolicyType(policyTypeName, nonRtRicId); + String policyBody = testHelperTest.postPolicyBody(nonRtRicId, policyTypeName, ""); + Mono> responseMono = testHelperTest.restClientV3().postForEntity(url, policyBody); + testHelperTest.testSuccessResponse(responseMono, HttpStatus.CREATED, responseBody -> + responseBody.contains("{\"scope\":{\"ueId\":\"ue5100\",\"qosId\":\"qos5100\"},\"qosObjectives\":{\"priorityLevel\":5100.0}}")); + testHelperTest.testSuccessHeader(responseMono, "location", headerValue -> headerValue.contains(testHelperTest.baseUrl() + "/a1-policy-management/v1/policies/")); + } + + + @Test + @DisplayName("test Create Policy Success when schema validation set to WARN") + void testPolicyTypeSchemaValidationWarn() throws Exception { + this.applicationConfig.setValidatePolicyInstanceSchema(ApplicationConfig.ValidateSchema.WARN); + String nonRtRicId = "ric.1"; + String policyTypeName = "type1_1.2.3"; + String url = "/policies"; + testHelperTest.addPolicyType(policyTypeName, nonRtRicId); + String policyBody = testHelperTest.postPolicyBody(nonRtRicId, policyTypeName, ""); + Mono> responseMono = testHelperTest.restClientV3().postForEntity(url, policyBody); + testHelperTest.testSuccessResponse(responseMono, HttpStatus.CREATED, responseBody -> + responseBody.contains("{\"scope\":{\"ueId\":\"ue5100\",\"qosId\":\"qos5100\"},\"qosObjectives\":{\"priorityLevel\":5100.0}}")); + testHelperTest.testSuccessHeader(responseMono, "location", headerValue -> headerValue.contains(testHelperTest.baseUrl() + "/a1-policy-management/v1/policies/")); + } + + @Test + @DisplayName("test bad Create Policy when schema validation set to FAIL") + void testBadPolicyTypeSchemaValidationFail() throws Exception { + this.applicationConfig.setValidatePolicyInstanceSchema(ApplicationConfig.ValidateSchema.FAIL); + String nonRtRicId = "ric.1"; + String policyTypeName = "type1_1.2.3"; + String url = "/policies"; + testHelperTest.addPolicyType(policyTypeName, nonRtRicId); + String policyBody = testHelperTest.postBadPolicyBody(nonRtRicId, policyTypeName, ""); + Mono> responseMono = testHelperTest.restClientV3().postForEntity(url, policyBody); + testHelperTest.testErrorCode(responseMono, HttpStatus.BAD_REQUEST, "Policy Type Schema validation failed"); + } + + @Test + @DisplayName("test bad Create Policy when schema validation set to INFO") + void testBadPolicyTypeSchemaValidationInfo() throws Exception { + this.applicationConfig.setValidatePolicyInstanceSchema(ApplicationConfig.ValidateSchema.INFO); + String nonRtRicId = "ric.1"; + String policyTypeName = "type1_1.2.3"; + String url = "/policies"; + testHelperTest.addPolicyType(policyTypeName, nonRtRicId); + String policyBody = testHelperTest.postBadPolicyBody(nonRtRicId, policyTypeName, ""); + Mono> responseMono = testHelperTest.restClientV3().postForEntity(url, policyBody); + testHelperTest.testSuccessHeader(responseMono, "location", headerValue -> headerValue.contains(testHelperTest.baseUrl() + "/a1-policy-management/v1/policies/")); + } + + @Test + @DisplayName("test bad Create Policy when schema validation set to WARN") + void testBadPolicyTypeSchemaValidationWarn() throws Exception { + this.applicationConfig.setValidatePolicyInstanceSchema(ApplicationConfig.ValidateSchema.WARN); + String nonRtRicId = "ric.1"; + String policyTypeName = "type1_1.2.3"; + String url = "/policies"; + testHelperTest.addPolicyType(policyTypeName, nonRtRicId); + String policyBody = testHelperTest.postBadPolicyBody(nonRtRicId, policyTypeName, ""); + Mono> responseMono = testHelperTest.restClientV3().postForEntity(url, policyBody); + testHelperTest.testSuccessHeader(responseMono, "location", headerValue -> headerValue.contains(testHelperTest.baseUrl() + "/a1-policy-management/v1/policies/")); } @Test @@ -164,7 +262,7 @@ class PolicyControllerV3Test { testHelperTest.addPolicyType(policyTypeName, nonRtRicId); String policyBody = testHelperTest.postPolicyBody(nonRtRicId, policyTypeName, "1"); Mono> responseMono = testHelperTest.restClientV3().postForEntity(url, policyBody); - testHelperTest.testSuccessHeader(responseMono, "location", headerValue -> headerValue.contains("https://localhost:" + port + "/a1-policy-management/v1/policies/1")); + testHelperTest.testSuccessHeader(responseMono, "location", headerValue -> headerValue.contains(testHelperTest.baseUrl() + "/a1-policy-management/v1/policies/1")); } @Test @@ -320,6 +418,113 @@ class PolicyControllerV3Test { responseBody.contains("{\"scope\":{\"ueId\":\"ue5200\",\"qosId\":\"qos5200\"},\"qosObjectives\":{\"priorityLevel\":5200.0}")); } + + @Test + @DisplayName("test Update Policy Success when schema validation set to FAIL") + void testUpdatePolicyTypeSchemaValidationFail() throws Exception { + this.applicationConfig.setValidatePolicyInstanceSchema(ApplicationConfig.ValidateSchema.FAIL); + String nonRtRicId = "ric.1"; + String policyTypeName = "type1_1.2.3"; + String url = "/policies"; + testHelperTest.addPolicyType(policyTypeName, nonRtRicId); + String policyBodyForPost = testHelperTest.postPolicyBody(nonRtRicId, policyTypeName, "policyOne"); + testHelperTest.restClientV3().postForEntity(url, policyBodyForPost).block(); + String policyBodyForPut = testHelperTest.putPolicyBody(nonRtRicId, policyTypeName, "policyOne", "ue5200", + "qos5200", "5200.0"); + testHelperTest.restClientV3().putForEntity(url+"/policyOne", policyBodyForPut).block(); + Mono> responseMonoGet = testHelperTest.restClientV3().getForEntity(url+"/policyOne"); + testHelperTest.testSuccessResponse(responseMonoGet, HttpStatus.OK, responseBody -> + responseBody.contains("{\"scope\":{\"ueId\":\"ue5200\",\"qosId\":\"qos5200\"},\"qosObjectives\":{\"priorityLevel\":5200.0}")); + } + + + @Test + @DisplayName("test Update Policy Success when schema validation set to INFO") + void testUpdatePolicyTypeSchemaValidationInfo() throws Exception { + this.applicationConfig.setValidatePolicyInstanceSchema(ApplicationConfig.ValidateSchema.INFO); + String nonRtRicId = "ric.1"; + String policyTypeName = "type1_1.2.3"; + String url = "/policies"; + testHelperTest.addPolicyType(policyTypeName, nonRtRicId); + String policyBodyForPost = testHelperTest.postPolicyBody(nonRtRicId, policyTypeName, "policyOne"); + testHelperTest.restClientV3().postForEntity(url, policyBodyForPost).block(); + String policyBodyForPut = testHelperTest.putPolicyBody(nonRtRicId, policyTypeName, "policyOne", "ue5200", + "qos5200", "5200.0"); + testHelperTest.restClientV3().putForEntity(url+"/policyOne", policyBodyForPut).block(); + Mono> responseMonoGet = testHelperTest.restClientV3().getForEntity(url+"/policyOne"); + testHelperTest.testSuccessResponse(responseMonoGet, HttpStatus.OK, responseBody -> + responseBody.contains("{\"scope\":{\"ueId\":\"ue5200\",\"qosId\":\"qos5200\"},\"qosObjectives\":{\"priorityLevel\":5200.0}")); + } + + + @Test + @DisplayName("test Update Policy Success when schema validation set to WARN") + void testUpdatePolicyTypeSchemaValidationWarn() throws Exception { + this.applicationConfig.setValidatePolicyInstanceSchema(ApplicationConfig.ValidateSchema.WARN); + String nonRtRicId = "ric.1"; + String policyTypeName = "type1_1.2.3"; + String url = "/policies"; + testHelperTest.addPolicyType(policyTypeName, nonRtRicId); + String policyBodyForPost = testHelperTest.postPolicyBody(nonRtRicId, policyTypeName, "policyOne"); + testHelperTest.restClientV3().postForEntity(url, policyBodyForPost).block(); + String policyBodyForPut = testHelperTest.putPolicyBody(nonRtRicId, policyTypeName, "policyOne", "ue5200", + "qos5200", "5200.0"); + testHelperTest.restClientV3().putForEntity(url+"/policyOne", policyBodyForPut).block(); + Mono> responseMonoGet = testHelperTest.restClientV3().getForEntity(url+"/policyOne"); + testHelperTest.testSuccessResponse(responseMonoGet, HttpStatus.OK, responseBody -> + responseBody.contains("{\"scope\":{\"ueId\":\"ue5200\",\"qosId\":\"qos5200\"},\"qosObjectives\":{\"priorityLevel\":5200.0}")); + } + + @Test + @DisplayName("test bad Update Policy when schema validation set to FAIL") + void testUpdateBadPolicyTypeSchemaValidationFail() throws Exception { + this.applicationConfig.setValidatePolicyInstanceSchema(ApplicationConfig.ValidateSchema.FAIL); + String nonRtRicId = "ric.1"; + String policyTypeName = "type1_1.2.3"; + String url = "/policies"; + testHelperTest.addPolicyType(policyTypeName, nonRtRicId); + String policyBodyForPost = testHelperTest.postPolicyBody(nonRtRicId, policyTypeName, "policyOne"); + testHelperTest.restClientV3().postForEntity(url, policyBodyForPost).block(); + String policyBodyForPut = testHelperTest.putBadPolicyBody(nonRtRicId, policyTypeName, "policyOne", "ue5200", + "qos5200", "5200.0", "bar"); + Mono> responseMono = testHelperTest.restClientV3().putForEntity(url+"/policyOne", policyBodyForPut); + testHelperTest.testErrorCode(responseMono, HttpStatus.BAD_REQUEST, "Policy Type Schema validation failed"); + } + + @Test + @DisplayName("test bad Update Policy when schema validation set to WARN") + void testUpdateBadPolicyTypeSchemaValidationWarn() throws Exception { + this.applicationConfig.setValidatePolicyInstanceSchema(ApplicationConfig.ValidateSchema.WARN); + String nonRtRicId = "ric.1"; + String policyTypeName = "type1_1.2.3"; + String url = "/policies"; + testHelperTest.addPolicyType(policyTypeName, nonRtRicId); + String policyBodyForPost = testHelperTest.postPolicyBody(nonRtRicId, policyTypeName, "policyOne"); + testHelperTest.restClientV3().postForEntity(url, policyBodyForPost).block(); + String policyBodyForPut = testHelperTest.putBadPolicyBody(nonRtRicId, policyTypeName, "policyOne", "ue5200", + "qos5200", "5200.0", "bar"); + Mono> responseMono = testHelperTest.restClientV3().putForEntity(url+"/policyOne", policyBodyForPut); + testHelperTest.testSuccessResponse(responseMono, HttpStatus.OK, responseBody -> + responseBody.contains("{\"scope\":{\"ueId\":\"ue5200\",\"qosId\":\"qos5200\",\"foo\":\"bar\"},\"qosObjectives\":{\"priorityLevel\":5200.0}}")); + } + + @Test + @DisplayName("test bad Update Policy when schema validation set to INFO") + void testUpdateBadPolicyTypeSchemaValidationInfo() throws Exception { + this.applicationConfig.setValidatePolicyInstanceSchema(ApplicationConfig.ValidateSchema.INFO); + String nonRtRicId = "ric.1"; + String policyTypeName = "type1_1.2.3"; + String url = "/policies"; + testHelperTest.addPolicyType(policyTypeName, nonRtRicId); + String policyBodyForPost = testHelperTest.postPolicyBody(nonRtRicId, policyTypeName, "policyOne"); + testHelperTest.restClientV3().postForEntity(url, policyBodyForPost).block(); + String policyBodyForPut = testHelperTest.putBadPolicyBody(nonRtRicId, policyTypeName, "policyOne", "ue5200", + "qos5200", "5200.0", "bar"); + Mono> responseMono = testHelperTest.restClientV3().putForEntity(url+"/policyOne", policyBodyForPut); + testHelperTest.testSuccessResponse(responseMono, HttpStatus.OK, responseBody -> + responseBody.contains("{\"scope\":{\"ueId\":\"ue5200\",\"qosId\":\"qos5200\",\"foo\":\"bar\"},\"qosObjectives\":{\"priorityLevel\":5200.0}}")); + } + private void postPolicyWithTokenAndVerify(String clientId, String serviceId, String result) throws IOException { testHelperTest.addPolicyType("type1_1.2.3", "ric.1"); String policyBody = testHelperTest.postPolicyBody("ric.1", "type1_1.2.3", "1"); @@ -341,6 +546,18 @@ class PolicyControllerV3Test { postPolicyWithTokenAndVerify(bearerToken, null, "myclient"); } + @Test + @DisplayName("client_id VALID + service_id NULL/EMPTY = client_id with subject as upn") + void testPostPolicyWithTokenUpn() throws IOException { + postPolicyWithTokenAndVerify(bearerTokenUpn, null, "myclient"); + } + + @Test + @DisplayName("client_id VALID + service_id NULL/EMPTY = client_id with subject as preferred_username") + void testPostPolicyWithTokenPrefUser() throws IOException { + postPolicyWithTokenAndVerify(bearerTokenPrefUser, null, "myclient"); + } + @Test @DisplayName("client_id VALID + service_id VALID = service_id") void testPostPolicyWithTokenAndServiceID() throws IOException { diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/datastore/S3ObjectStoreTest.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/datastore/S3ObjectStoreTest.java index 941b7770..e05ddf31 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/datastore/S3ObjectStoreTest.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/datastore/S3ObjectStoreTest.java @@ -2,7 +2,7 @@ * ========================LICENSE_START================================= * ONAP : ccsdk oran * ====================================================================== - * Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved. + * Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved. * ====================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,9 +50,12 @@ class S3ObjectStoreTest { private static S3ObjectStore s3ObjectStore; private static final String bucketName = "s3bucket"; + private static final String localstackVersion = "4.1.0"; + + @SuppressWarnings("resource") // @Testcontainers will manage the lifecycle of the container. @Container private static final LocalStackContainer localstack = - new LocalStackContainer(DockerImageName.parse("localstack/localstack:0.11.3")) + new LocalStackContainer(DockerImageName.parse("localstack/localstack:" + localstackVersion)) .withServices(LocalStackContainer.Service.S3); @BeforeAll diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/service/v3/PolicyServiceTest.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/service/v3/PolicyServiceTest.java index f2b74ef3..8e0d3c1c 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/service/v3/PolicyServiceTest.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/service/v3/PolicyServiceTest.java @@ -122,6 +122,7 @@ class PolicyServiceTest { Policy policy = testHelperTest.buidTestPolicy(testHelperTest.policyObjectInfo(nonRtRicId, policyTypeName), "122344-5674"); when(helper.jsonSchemaValidation(any())).thenReturn(Boolean.TRUE); when(helper.buildPolicy(any(),any(), any(), any(), any())).thenReturn(policy); + when(helper.performPolicySchemaValidation(any(), any())).thenReturn(Boolean.TRUE); when(helper.isPolicyAlreadyCreated(any(), any())).thenReturn(Mono.error(new ServiceException ("Same policy content already created with policy ID: 122344-5674", HttpStatus.BAD_REQUEST))); Mono> responseMono = policyService.createPolicyService(testHelperTest.policyObjectInfo(nonRtRicId, policyTypeName), serverWebExchange); @@ -136,6 +137,7 @@ class PolicyServiceTest { testHelperTest.addPolicyType(policyTypeName, nonRtRicId); ServerWebExchange serverWebExchange = Mockito.mock(DefaultServerWebExchange.class); when(helper.jsonSchemaValidation(any())).thenReturn(Boolean.TRUE); + when(helper.performPolicySchemaValidation(any(), any())).thenReturn(Boolean.TRUE); when(helper.isPolicyAlreadyCreated(any(), any())).thenReturn(Mono.just(Policy.builder().build())); when(authorizationService.authCheck(any(), any(), any())).thenReturn(Mono.error(new ServiceException("Not authorized", HttpStatus.UNAUTHORIZED))); Mono> responseMono = policyService.createPolicyService(testHelperTest.policyObjectInfo(nonRtRicId, policyTypeName), serverWebExchange); @@ -189,6 +191,7 @@ class PolicyServiceTest { when(helper.buildPolicy(any(),any(), any(), any(), any())).thenReturn(updatedPolicy); when(helper.checkRicStateIdle(any())).thenReturn(Mono.just(updatedPolicy.getRic())); when(helper.checkSupportedType(any(), any())).thenReturn(Mono.just(updatedPolicy.getRic())); + when(helper.performPolicySchemaValidation(any(), any())).thenReturn(Boolean.TRUE); when(authorizationService.authCheck(any(), any(), any())).thenReturn(Mono.just(updatedPolicy)); Mono> responseMono = policyService.putPolicyService(policy.getId(), updatedPolicyObjectInfo.getPolicyObject(), serverWebExchange); testHelperTest.testSuccessResponse(responseMono, HttpStatus.OK, responseBody -> { diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/utils/v3/ReactiveEntryExitFilterDisableTest.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/utils/v3/ReactiveEntryExitFilterDisableTest.java index 54b9d295..94ab47db 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/utils/v3/ReactiveEntryExitFilterDisableTest.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/utils/v3/ReactiveEntryExitFilterDisableTest.java @@ -1,3 +1,23 @@ +/*- + * ========================LICENSE_START================================= + * ONAP : ccsdk oran + * ====================================================================== + * Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved. + * ====================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================LICENSE_END=================================== + */ + package org.onap.ccsdk.oran.a1policymanagementservice.utils.v3; import org.junit.jupiter.api.AfterAll; @@ -24,7 +44,6 @@ import java.lang.invoke.MethodHandles; import java.nio.file.Path; import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertTrue; @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @ExtendWith({OutputCaptureExtension.class}) @@ -74,7 +93,7 @@ class ReactiveEntryExitFilterDisableTest { Mono> responseMono = testHelperTest.restClientV3().postForEntity(url, policyBody); testHelperTest.testSuccessResponse(responseMono, HttpStatus.CREATED, responseBody -> responseBody.contains("{\"scope\":{\"ueId\":\"ue5100\",\"qosId\":\"qos5100\"},\"qosObjectives\":{\"priorityLevel\":5100.0}}")); - testHelperTest.testSuccessHeader(responseMono, "location", headerValue -> headerValue.contains("https://localhost:" + port + "/a1-policy-management/v1/policies/")); + testHelperTest.testSuccessHeader(responseMono, "location", headerValue -> headerValue.contains(testHelperTest.baseUrl() + "/a1-policy-management/v1/policies/")); assertFalse(capturedOutput.getOut().contains("Request received with path: /a1-policy-management/v1/policies")); assertFalse(capturedOutput.getOut().contains("the Status code of the response: 201 CREATED")); assertFalse(capturedOutput.getOut().contains("the response is:")); diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/utils/v3/ReactiveEntryExitFilterTest.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/utils/v3/ReactiveEntryExitFilterTest.java index 9e0f60ea..0086c1eb 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/utils/v3/ReactiveEntryExitFilterTest.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/utils/v3/ReactiveEntryExitFilterTest.java @@ -1,3 +1,23 @@ +/*- + * ========================LICENSE_START================================= + * ONAP : ccsdk oran + * ====================================================================== + * Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved. + * ====================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================LICENSE_END=================================== + */ + package org.onap.ccsdk.oran.a1policymanagementservice.utils.v3; import org.junit.jupiter.api.AfterAll; @@ -74,7 +94,7 @@ class ReactiveEntryExitFilterTest { Mono> responseMono = testHelperTest.restClientV3().postForEntity(url, policyBody); testHelperTest.testSuccessResponse(responseMono, HttpStatus.CREATED, responseBody -> responseBody.contains("{\"scope\":{\"ueId\":\"ue5100\",\"qosId\":\"qos5100\"},\"qosObjectives\":{\"priorityLevel\":5100.0}}")); - testHelperTest.testSuccessHeader(responseMono, "location", headerValue -> headerValue.contains("https://localhost:" + port + "/a1-policy-management/v1/policies/")); + testHelperTest.testSuccessHeader(responseMono, "location", headerValue -> headerValue.contains(testHelperTest.baseUrl() + "/a1-policy-management/v1/policies/")); assertTrue(capturedOutput.getOut().contains("Request received with path: /a1-policy-management/v1/policies")); assertTrue(capturedOutput.getOut().contains("the Status code of the response: 201 CREATED")); assertTrue(capturedOutput.getOut().contains("the response is:")); diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/utils/v3/TestHelperTest.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/utils/v3/TestHelperTest.java index 78ab385c..d6f64f50 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/utils/v3/TestHelperTest.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/utils/v3/TestHelperTest.java @@ -2,7 +2,7 @@ * ========================LICENSE_START================================= * ONAP : ccsdk oran * ====================================================================== - * Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved. + * Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved. * ====================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -93,6 +93,7 @@ public class TestHelperTest { public AsyncRestClient restClient(String baseUrl, boolean useTrustValidation) { WebClientConfig config = this.applicationConfig.getWebClientConfig(); config = WebClientConfig.builder() + .sslEnabled(config.isSslEnabled()) .keyStoreType(config.getKeyStoreType()) .keyStorePassword(config.getKeyStorePassword()) .keyStore(config.getKeyStore()) @@ -109,7 +110,11 @@ public class TestHelperTest { } public String baseUrl() { - return "https://localhost:" + port; + if (applicationConfig.isSslEnabled()) { + return "https://localhost:" + port; + } else { + return "http://localhost:" + port; + } } public AsyncRestClient restClientV3(boolean useTrustValidation) { @@ -169,6 +174,12 @@ public class TestHelperTest { policyObjectInfo.setPolicyId(policyId); return gson.toJson(policyObjectInfo); } + public String postBadPolicyBody(String nearRtRicId, String policyTypeName, String policyId) { + PolicyObjectInformation policyObjectInfo = new PolicyObjectInformation(nearRtRicId, dummyBadPolicyObject(), policyTypeName); + if (policyId != null && !policyId.isEmpty() && !policyId.isBlank()) + policyObjectInfo.setPolicyId(policyId); + return gson.toJson(policyObjectInfo); + } public String putPolicyBody(String nearRtRicId, String policyTypeName, String policyId, String ueId, String qosId, String priorityLevel) { @@ -179,6 +190,15 @@ public class TestHelperTest { return gson.toJson(policyObjectInfo); } + public String putBadPolicyBody(String nearRtRicId, String policyTypeName, String policyId, String ueId, String qosId, + String priorityLevel, String foo) { + PolicyObjectInformation policyObjectInfo = new PolicyObjectInformation(nearRtRicId, dummyBadPolicyObjectForPut( + ueId, qosId, priorityLevel, foo), policyTypeName); + if (policyId != null && !policyId.isEmpty() && !policyId.isBlank()) + policyObjectInfo.setPolicyId(policyId); + return gson.toJson(policyObjectInfo); + } + public PolicyObjectInformation policyObjectInfo(String nearRtRicId, String policyTypeName) { return gson.fromJson(postPolicyBody(nearRtRicId, policyTypeName, ""), PolicyObjectInformation.class); } @@ -195,6 +215,19 @@ public class TestHelperTest { " }").getAsJsonObject(); } + public JsonObject dummyBadPolicyObjectForPut(String... values) { + return JsonParser.parseString("{\n" + + " \"scope\": {\n" + + " \"ueId\": \"" + values[0] + "\",\n" + + " \"qosId\": \"" + values[1] + "\",\n" + + " \"foo\": \"" + values[3] + "\"\n" + + " },\n" + + " \"qosObjectives\": {\n" + + " \"priorityLevel\": " + values[2] + "\n" + + " }\n" + + " }").getAsJsonObject(); + } + public JsonObject dummyPolicyObject() { return JsonParser.parseString("{\n" + " \"scope\": {\n" + @@ -207,6 +240,19 @@ public class TestHelperTest { " }").getAsJsonObject(); } + public JsonObject dummyBadPolicyObject() { + return JsonParser.parseString("{\n" + + " \"scope\": {\n" + + " \"ueId\": \"ue5100\",\n" + + " \"qosId\": \"qos5100\",\n" + + " \"foo\": \"bar\"\n" + + " },\n" + + " \"qosObjectives\": {\n" + + " \"priorityLevel\": 5100.0\n" + + " }\n" + + " }").getAsJsonObject(); + } + public Policy buidTestPolicy(PolicyObjectInformation policyInfo, String id) throws Exception{ return Policy.builder().ric(rics.getRic(policyInfo.getNearRtRicId())) .type(policyTypes.getType(policyInfo.getPolicyTypeId())) @@ -282,4 +328,16 @@ public class TestHelperTest { new File(Objects.requireNonNull(getClass().getClassLoader().getResource("test_application_configuration.json")).getFile()); return FileUtils.readFileToString(configFile, "UTF-8"); } + + public String configAsStringMeNull() throws Exception { + File configFile = + new File(Objects.requireNonNull(getClass().getClassLoader().getResource("test_application_configuration_me_null.json")).getFile()); + return FileUtils.readFileToString(configFile, "UTF-8"); + } + + public String configAsStringMeEmpty() throws Exception { + File configFile = + new File(Objects.requireNonNull(getClass().getClassLoader().getResource("test_application_configuration_me_empty.json")).getFile()); + return FileUtils.readFileToString(configFile, "UTF-8"); + } } diff --git a/a1-policy-management/src/test/resources/test_application_configuration_me_empty.json b/a1-policy-management/src/test/resources/test_application_configuration_me_empty.json new file mode 100644 index 00000000..0bb0985d --- /dev/null +++ b/a1-policy-management/src/test/resources/test_application_configuration_me_empty.json @@ -0,0 +1,32 @@ +{ + "config": { + "description": "Test", + "controller": [ + { + "name": "controller1", + "baseUrl": "http://localhost:8083/", + "userName": "user", + "password": "password" + } + ], + "ric": [ + { + "name": "ric1", + "controller": "controller1", + "baseUrl": "http://localhost:8083/", + "customAdapterClass": "org.onap.ccsdk.oran.a1policymanagementservice.clients.StdA1ClientVersion2$Factory", + "managedElementIds": [] + }, + { + "name": "ric2", + "baseUrl": "http://localhost:8085/", + "managedElementIds": [] + }, + { + "name": "ric3_noBaseURL", + "baseUrl": "", + "managedElementIds": [] + } + ] + } +} diff --git a/a1-policy-management/src/test/resources/test_application_configuration_me_null.json b/a1-policy-management/src/test/resources/test_application_configuration_me_null.json new file mode 100644 index 00000000..4fa7ff96 --- /dev/null +++ b/a1-policy-management/src/test/resources/test_application_configuration_me_null.json @@ -0,0 +1,29 @@ +{ + "config": { + "description": "Test", + "controller": [ + { + "name": "controller1", + "baseUrl": "http://localhost:8083/", + "userName": "user", + "password": "password" + } + ], + "ric": [ + { + "name": "ric1", + "controller": "controller1", + "baseUrl": "http://localhost:8083/", + "customAdapterClass": "org.onap.ccsdk.oran.a1policymanagementservice.clients.StdA1ClientVersion2$Factory" + }, + { + "name": "ric2", + "baseUrl": "http://localhost:8085/" + }, + { + "name": "ric3_noBaseURL", + "baseUrl": "" + } + ] + } +} diff --git a/docs/architecture/architecture.rst b/docs/architecture/architecture.rst index bf47c91c..c308a399 100755 --- a/docs/architecture/architecture.rst +++ b/docs/architecture/architecture.rst @@ -1,6 +1,8 @@ -.. SPDX-License-Identifier: CC-BY-4.0 -.. Copyright 2023 Nordix Foundation. All rights reserved. -.. Copyright 2024 OpenInfra Foundation Europe. All rights reserved. +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. Copyright 2022-2024 Nordix Foundation +.. Copyright 2024-202% OpenInfra Foundation Europe + .. _architecture: @@ -23,7 +25,7 @@ Architecture Review This picture provides a overview of ONAP's A1 Controller architecture, integration with other components and API resource/operation provided. -.. image:: ../media/ONAP-A1ControllerArchitecture.png +.. image:: ../media/ONAP-A1ControllerArchitecture-Paris.png :width: 500pt The A1 Policy Management Service provides an API for accessing of A1 Policies. The A1-PMS diff --git a/docs/guide/developer-guide.rst b/docs/guide/developer-guide.rst index 30d17430..f22e0365 100644 --- a/docs/guide/developer-guide.rst +++ b/docs/guide/developer-guide.rst @@ -1,7 +1,7 @@ .. This work is licensed under a Creative Commons Attribution 4.0 International License. .. http://creativecommons.org/licenses/by/4.0 -.. Copyright 2023 Nordix Foundation. All rights reserved. -.. Copyright 2024 OpenInfra Foundation Europe. All rights reserved. +.. Copyright 2022-2024 Nordix Foundation. All rights reserved. +.. Copyright 2024-2025 OpenInfra Foundation Europe. All rights reserved. .. _developer_guide: @@ -10,7 +10,7 @@ Developer Guide This document provides a quickstart for developers of the CCSDK functions for O-RAN A1 Policies. -.. image:: ../media/ONAP-A1ControllerArchitecture-NewDelhiOslo.png +.. image:: ../media/ONAP-A1ControllerArchitecture-Paris.png :width: 500pt Additional guides for developers can be found on the `ONAP wiki (Development Guides) `_. @@ -24,7 +24,8 @@ Each resource is implemented independently in a sub-directory corresponding to i A1 Policy Management Service ++++++++++++++++++++++++++++ -The ONAP CCSDK A1 Policy Management Service (A1-PMS) is a Java 17 web application built using the Spring Framework. +The ONAP CCSDK A1 Policy Management Service (A1-PMS) is a Java 17 web application built using +the Spring Framework. Using Spring Boot dependencies, it runs as a standalone application. A1 Policy Management Service provides a REST API for managing A1 Policies. It provides support for: @@ -40,7 +41,8 @@ A1 Policy Management Service provides a REST API for managing A1 Policies. It pr * Create/Modify/Delete operations for A1 Policy Instances in each near-RT RIC * Query functions to check the status of each near-RT RIC, and their A1 Policy Instances. -The A1 Policy Management Service can be accessed over the REST API. See :ref:`pms_api` for more information about the API. +The A1 Policy Management Service can be accessed over the REST APIs. See :ref:`pms_api` for more +information about the API. The configured A1 Policies are stored persistently, and can survive service restart. This state information can be stored in a persistent volume or in an S3 Object Store bucket. @@ -56,7 +58,6 @@ dependency management tool (see *pom.xml* file at root level). For example: - `Lombok `_ to generate code, such as getters and setters - `Awaitility `_ to test asynchronous functionality - To get a complete list of all dependencies, use command "mvn dependency:tree". Configuration diff --git a/docs/media/ONAP-A1ControllerArchitecture-Paris.png b/docs/media/ONAP-A1ControllerArchitecture-Paris.png new file mode 100644 index 00000000..53323a09 Binary files /dev/null and b/docs/media/ONAP-A1ControllerArchitecture-Paris.png differ diff --git a/docs/offeredapis/offeredapis.rst b/docs/offeredapis/offeredapis.rst index 6b50873c..3041122a 100644 --- a/docs/offeredapis/offeredapis.rst +++ b/docs/offeredapis/offeredapis.rst @@ -22,7 +22,7 @@ Overall architecture for O-RAN A1 Policy functions This picture provides a overview of ONAP's A1 Controller architecture, integration with other ONAP components and API resource/operation provided. -.. image:: ../media/ONAP-A1ControllerArchitecture.png +.. image:: ../media/ONAP-A1ControllerArchitecture-Paris.png :width: 500pt API Table diff --git a/docs/offeredapis/openapitoolgen/offeredapis/pms-api/index.html b/docs/offeredapis/openapitoolgen/offeredapis/pms-api/index.html index 38e9caed..697ddf6c 100644 --- a/docs/offeredapis/openapitoolgen/offeredapis/pms-api/index.html +++ b/docs/offeredapis/openapitoolgen/offeredapis/pms-api/index.html @@ -2,7 +2,7 @@ - ONAP CCSDK A1 Policy Management Service + ONAP CCSDK - Pre-Spec A1 Policy Management API @@ -864,7 +864,7 @@ ul.nav-tabs { "detail" : { "type" : "string", "description" : " A human-readable explanation specific to this occurrence of the problem.", - "example" : "Policy type not found" + "example" : "A1 Policy Type not found" }, "title" : { "type" : "string", @@ -895,7 +895,7 @@ ul.nav-tabs { }, "policy_type_id" : { "type" : "string", - "description" : "Policy type identifier" + "description" : "A1 Policy Type identifier" } }, "description" : "input" @@ -952,14 +952,14 @@ ul.nav-tabs { }, "transient" : { "type" : "boolean", - "description" : "if true, the policy is deleted at RIC restart. If false, its value is maintained by this service until explicitly deleted. Default false.", + "description" : "If true, the policy is automatically deleted if the targeted Near-RT RIC restarts or recovers. If false, the A1 Policy Instance remains, and is re-pushed to the targeted Near-RT RIC after a restart or recovery. If false, the A1 Policy Instance is maintained and must be deleted separately in the event of Near-RT RIC restart or recovery. Default is false.\n", "nullable" : false, "example" : false, "default" : false }, "service_id" : { "type" : "string", - "description" : "the identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated to a service). Note that the service does not need to be registered.", + "description" : "The identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated to a service). Note that the service does not need to be registered. If the service is registered, the A1 Policy Instance will be subject to the same supervision rules as the the service's other policies.\n", "default" : "" }, "policy_data" : { @@ -972,7 +972,7 @@ ul.nav-tabs { }, "policytype_id" : { "type" : "string", - "description" : "identity of the policy type" + "description" : "identity of the A1 Policy Type" } }, "description" : "Information for one A1-P Policy" @@ -1009,24 +1009,24 @@ ul.nav-tabs { "properties" : { "policy_schema" : { "type" : "object", - "description" : "Policy type json schema. The schema is a json object following http://json-schema.org/draft-07/schema" + "description" : "A1 Policy Type json schema. The schema is a json object following http://json-schema.org/draft-07/schema" } }, - "description" : "Contains policy type schema definition" + "description" : "Contains A1 Policy Type schema definition" }; defs["policy_type_id_list"] = { "type" : "object", "properties" : { "policytype_ids" : { "type" : "array", - "description" : "Policy type identities", + "description" : "A1 Policy Type identities", "items" : { "type" : "string", - "description" : "Policy type identities" + "description" : "A1 Policy Type identities" } } }, - "description" : "Information about policy types" + "description" : "Information about A1 Policy Types" }; defs["ric_info"] = { "type" : "object", @@ -1050,10 +1050,10 @@ ul.nav-tabs { }, "policytype_ids" : { "type" : "array", - "description" : "supported policy types", + "description" : "supported A1 Policy Types", "items" : { "type" : "string", - "description" : "supported policy types" + "description" : "supported A1 Policy Types" } } }, @@ -1082,11 +1082,11 @@ ul.nav-tabs { }, "event_type" : { "type" : "string", - "description" : "values:\nAVAILABLE: the Near-RT RIC has become available for A1 Policy management", + "description" : "values: \n AVAILABLE: the Near-RT RIC has become available for A1 Policy management\n", "enum" : [ "AVAILABLE" ] } }, - "description" : "Information transferred as in Service callbacks (callback_url)" + "description" : "Information transferred in Service callbacks, \nif a callback URL was provided for a registered service\n" }; defs["service_registration_info"] = { "required" : [ "service_id" ], @@ -1094,7 +1094,7 @@ ul.nav-tabs { "properties" : { "callback_url" : { "type" : "string", - "description" : "callback for notifying of Near-RT RIC state changes" + "description" : "Callback for notifying of Near-RT RIC state changes" }, "service_id" : { "type" : "string", @@ -1102,7 +1102,7 @@ ul.nav-tabs { }, "keep_alive_interval_seconds" : { "type" : "integer", - "description" : "keep alive interval for the service. This is used to enable optional heartbeat supervision of the service. If set (> 0) the registered service should regularly invoke a 'keepalive' REST call. When a service fails to invoke this 'keepalive' call within the configured time, the service is considered unavailable. An unavailable service will be automatically deregistered and its policies will be deleted. Value 0 means timeout supervision is disabled.", + "description" : "Keep alive interval for the service. This is used to enable optional heartbeat supervision of the service. If set (> 0) the registered service should regularly invoke a 'keepalive' REST call. When a service fails to invoke this 'keepalive' call within the configured time, the service is considered unavailable. An unavailable service will be automatically deregistered and its policies will be deleted. Value 0 means timeout supervision is disabled.\n", "format" : "int64" } }, @@ -1240,7 +1240,7 @@ ul.nav-tabs {
      -

      ONAP CCSDK A1 Policy Management Service

      +

      ONAP CCSDK - Pre-Spec A1 Policy Management API

      @@ -1250,7 +1250,7 @@ ul.nav-tabs {
      Version: 1.3.0

      -

      General

      The ONAP CCSDK A1 Policy Management Service provides a REST API for managemecnt of A1 policies.
      The main tasks of the service are:

      • A1 Policy creation, modification and deletion.
      • Monitoring and maintaining consistency of the SMO view of A1 policies and the Near-RT RICs
      • Maintaining a view of supported Near-RT RIC policy types
      • Supervision of using services (R-APPs). When a service is unavailable, its policies are removed.

      APIs provided or defined by the service

      A1 Policy Management

      This is an API for management of A1 Policies.

      • A1 Policy retrieval, creation, modification and deletion.
      • Retrieval of supported A1 Policy types for a Near-RT RIC
      • Retrieval of status for existing A1 policies

      Management of configuration

      API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.

      Service callbacks

      These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.

      NearRT-RIC Repository

      This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted for one Near-RT RIC.

      Health Check

      API used for supervision of the PMS component.

      Service Registry and Supervision

      API used for registering services that uses PMS. Each A1 policy is optionally owned by a service. PMS can supervise each registered service by a heart-beat supervision and will automatically remove policies for unavailable services. Note that a service does not need to be registered in order to create A1 Policies. This is a feature that is optional to use.

      Authorization API

      API used for access control of A1 Policy access. If configured, an external authorization provider is requested to grant access to the A1 Policy type.

      Spring Boot Actuator

      Provides generic functions used to monitor and manage the Spring web application.

      +

      General

      The ONAP CCSDK A1 Policy Management Service provides a REST API for managing A1 policies.
      This document describes an older pre-spec API set to perform tasks for:

      • A1 Policy creation, modification and deletion.
      • Monitoring and maintaining consistency of the SMO view of A1 Policies and the Near-RT RICs
      • Maintaining a view of each Near-RT RIC's supported A1 Policy Types
      • Supervision of registered services (rApps). When a registered service is unavailable, its policies are removed.

      APIs provided or defined by the service

      A1 Policy Management (Older pre-spec version)

      This is an older API for managing A1 Policies:

      • A1 Policy retrieval, creation, modification and deletion.
      • Retrieval of supported A1 Policy Types for a Near-RT RIC
      • Retrieval of status for existing A1 policies

      Management of configuration

      API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.

      Service Callbacks

      These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.

      NearRT-RIC Repository (Older version)

      This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted towards one Near-RT RIC.

      Health Check

      API used for supervision of the A1 Policy Management Service .

      Service Registry and Supervision

      API used for registering services/clients/rApps. Each A1 Policy can be tagged with an owner. If the owner service is registered, then the service can be monitored by a heart-beat supervision mechanism, and if the registered service becomes unavailable, then its A1 Policies are removed. Note that services do not need to be registered to create A1 Policies, but unregistered services are not supervised. This is a feature that is optional to use.

      Authorization API

      API used for access control of A1 Policy access. If configured, an external authorization provider is requested to grant access to the A1 Policy Type.

      Spring Boot Actuator

      Provides built-in functions used to monitor and configure the Spring web application hosting the service.

      @@ -1262,12 +1262,12 @@ ul.nav-tabs {

      deletePolicy

      -

      Delete a policy

      +

      Delete an A1 Policy instance (deletePolicy)

      -

      Deleting the policy using the Policy's Policy ID.

      +

      Delete an A1 Policy instance using its policy ID.


      /a1-policy/v2/policies/{policy_id}
      @@ -1371,7 +1371,7 @@ public class A1PolicyManagementApiExample { A1PolicyManagementApi *apiInstance = [[A1PolicyManagementApi alloc] init]; String *policyId = policyId_example; // (default to null) -// Delete a policy +// Delete an A1 Policy instance (deletePolicy) [apiInstance deletePolicyWith:policyId completionHandler: ^(Object output, NSError* error) { if (output) { @@ -1385,10 +1385,10 @@ String *policyId = policyId_example; // (default to null)
      -
      var OnapCcsdkA1PolicyManagementService = require('onap_ccsdk_a1_policy_management_service');
      +                              
      var OnapCcsdkPreSpecA1PolicyManagementApi = require('onap_ccsdk_pre_spec_a1_policy_management_api');
       
       // Create an instance of the API class
      -var api = new OnapCcsdkA1PolicyManagementService.A1PolicyManagementApi()
      +var api = new OnapCcsdkPreSpecA1PolicyManagementApi.A1PolicyManagementApi()
       var policyId = policyId_example; // {String} 
       
       var callback = function(error, data, response) {
      @@ -1424,7 +1424,7 @@ namespace Example
                   var policyId = policyId_example;  // String |  (default to null)
       
                   try {
      -                // Delete a policy
      +                // Delete an A1 Policy instance (deletePolicy)
                       Object result = apiInstance.deletePolicy(policyId);
                       Debug.WriteLine(result);
                   } catch (Exception e) {
      @@ -1483,7 +1483,7 @@ api_instance = openapi_client.A1PolicyManagementApi()
       policyId = policyId_example # String |  (default to null)
       
       try:
      -    # Delete a policy
      +    # Delete an A1 Policy instance (deletePolicy)
           api_response = api_instance.delete_policy(policyId)
           pprint(api_response)
       except ApiException as e:
      @@ -1709,12 +1709,12 @@ pub fn main() {
                             

      getPolicy

      -

      +

      Get an A1 Policy instance (getPolicy)

      -

      Returns a policy

      +

      Get an A1 Policy instance using its policy ID


      /a1-policy/v2/policies/{policy_id}
      @@ -1818,6 +1818,7 @@ public class A1PolicyManagementApiExample { A1PolicyManagementApi *apiInstance = [[A1PolicyManagementApi alloc] init]; String *policyId = policyId_example; // (default to null) +// Get an A1 Policy instance (getPolicy) [apiInstance getPolicyWith:policyId completionHandler: ^(policy_info output, NSError* error) { if (output) { @@ -1831,10 +1832,10 @@ String *policyId = policyId_example; // (default to null)
      -
      var OnapCcsdkA1PolicyManagementService = require('onap_ccsdk_a1_policy_management_service');
      +                              
      var OnapCcsdkPreSpecA1PolicyManagementApi = require('onap_ccsdk_pre_spec_a1_policy_management_api');
       
       // Create an instance of the API class
      -var api = new OnapCcsdkA1PolicyManagementService.A1PolicyManagementApi()
      +var api = new OnapCcsdkPreSpecA1PolicyManagementApi.A1PolicyManagementApi()
       var policyId = policyId_example; // {String} 
       
       var callback = function(error, data, response) {
      @@ -1870,6 +1871,7 @@ namespace Example
                   var policyId = policyId_example;  // String |  (default to null)
       
                   try {
      +                // Get an A1 Policy instance (getPolicy)
                       policy_info result = apiInstance.getPolicy(policyId);
                       Debug.WriteLine(result);
                   } catch (Exception e) {
      @@ -1928,6 +1930,7 @@ api_instance = openapi_client.A1PolicyManagementApi()
       policyId = policyId_example # String |  (default to null)
       
       try:
      +    # Get an A1 Policy instance (getPolicy)
           api_response = api_instance.get_policy(policyId)
           pprint(api_response)
       except ApiException as e:
      @@ -2146,12 +2149,13 @@ pub fn main() {
                             

      getPolicyIds

      -

      Query policy identities

      +

      Query A1 Policy Instances (getPolicyIds)

      -

      Returns a list of A1 policies matching given search criteria. <br>If several query parameters are defined, the policies matching all conditions are returned.

      +

      Retrieve a list of A1 Policy Instance IDs for policies that match given search criteria. If multiple query parameters are given, the policies matching all conditions are returned. +


      /a1-policy/v2/policies
      @@ -2195,10 +2199,11 @@ public class A1PolicyManagementApiExample { // Create an instance of the API class A1PolicyManagementApi apiInstance = new A1PolicyManagementApi(); - String policytypeId = policytypeId_example; // String | Select policies of a given policy type identity. + String policytypeId = policytypeId_example; // String | Select policies of a given A1 Policy Type ID. String ricId = ricId_example; // String | Select policies of a given Near-RT RIC identity. - String serviceId = serviceId_example; // String | Select policies owned by a given service. - String typeName = typeName_example; // String | Select policies of types with the given type name (type identity has the format ) + String serviceId = serviceId_example; // String | Select policies owned by a given service. (Both registered and unregistered services) + String typeName = typeName_example; // String | Select policies of types with the given A1 Policy Type name (type names have the format 'typename_version') + try { policy_id_list result = apiInstance.getPolicyIds(policytypeId, ricId, serviceId, typeName); @@ -2217,10 +2222,11 @@ public class A1PolicyManagementApiExample { final api_instance = DefaultApi(); -final String policytypeId = new String(); // String | Select policies of a given policy type identity. +final String policytypeId = new String(); // String | Select policies of a given A1 Policy Type ID. final String ricId = new String(); // String | Select policies of a given Near-RT RIC identity. -final String serviceId = new String(); // String | Select policies owned by a given service. -final String typeName = new String(); // String | Select policies of types with the given type name (type identity has the format ) +final String serviceId = new String(); // String | Select policies owned by a given service. (Both registered and unregistered services) +final String typeName = new String(); // String | Select policies of types with the given A1 Policy Type name (type names have the format 'typename_version') + try { final result = await api_instance.getPolicyIds(policytypeId, ricId, serviceId, typeName); @@ -2238,10 +2244,11 @@ try { public class A1PolicyManagementApiExample { public static void main(String[] args) { A1PolicyManagementApi apiInstance = new A1PolicyManagementApi(); - String policytypeId = policytypeId_example; // String | Select policies of a given policy type identity. + String policytypeId = policytypeId_example; // String | Select policies of a given A1 Policy Type ID. String ricId = ricId_example; // String | Select policies of a given Near-RT RIC identity. - String serviceId = serviceId_example; // String | Select policies owned by a given service. - String typeName = typeName_example; // String | Select policies of types with the given type name (type identity has the format ) + String serviceId = serviceId_example; // String | Select policies owned by a given service. (Both registered and unregistered services) + String typeName = typeName_example; // String | Select policies of types with the given A1 Policy Type name (type names have the format 'typename_version') + try { policy_id_list result = apiInstance.getPolicyIds(policytypeId, ricId, serviceId, typeName); @@ -2262,12 +2269,13 @@ public class A1PolicyManagementApiExample { // Create an instance of the API class A1PolicyManagementApi *apiInstance = [[A1PolicyManagementApi alloc] init]; -String *policytypeId = policytypeId_example; // Select policies of a given policy type identity. (optional) (default to null) +String *policytypeId = policytypeId_example; // Select policies of a given A1 Policy Type ID. (optional) (default to null) String *ricId = ricId_example; // Select policies of a given Near-RT RIC identity. (optional) (default to null) -String *serviceId = serviceId_example; // Select policies owned by a given service. (optional) (default to null) -String *typeName = typeName_example; // Select policies of types with the given type name (type identity has the format ) (optional) (default to null) +String *serviceId = serviceId_example; // Select policies owned by a given service. (Both registered and unregistered services) (optional) (default to null) +String *typeName = typeName_example; // Select policies of types with the given A1 Policy Type name (type names have the format 'typename_version') + (optional) (default to null) -// Query policy identities +// Query A1 Policy Instances (getPolicyIds) [apiInstance getPolicyIdsWith:policytypeId ricId:ricId serviceId:serviceId @@ -2284,15 +2292,16 @@ String *typeName = typeName_example; // Select policies of types with the given
      -
      var OnapCcsdkA1PolicyManagementService = require('onap_ccsdk_a1_policy_management_service');
      +                              
      var OnapCcsdkPreSpecA1PolicyManagementApi = require('onap_ccsdk_pre_spec_a1_policy_management_api');
       
       // Create an instance of the API class
      -var api = new OnapCcsdkA1PolicyManagementService.A1PolicyManagementApi()
      +var api = new OnapCcsdkPreSpecA1PolicyManagementApi.A1PolicyManagementApi()
       var opts = {
      -  'policytypeId': policytypeId_example, // {String} Select policies of a given policy type identity.
      +  'policytypeId': policytypeId_example, // {String} Select policies of a given A1 Policy Type ID.
         'ricId': ricId_example, // {String} Select policies of a given Near-RT RIC identity.
      -  'serviceId': serviceId_example, // {String} Select policies owned by a given service.
      -  'typeName': typeName_example // {String} Select policies of types with the given type name (type identity has the format )
      +  'serviceId': serviceId_example, // {String} Select policies owned by a given service. (Both registered and unregistered services)
      +  'typeName': typeName_example // {String} Select policies of types with the given A1 Policy Type name  (type names have the format 'typename_version')
      +
       };
       
       var callback = function(error, data, response) {
      @@ -2325,13 +2334,14 @@ namespace Example
       
                   // Create an instance of the API class
                   var apiInstance = new A1PolicyManagementApi();
      -            var policytypeId = policytypeId_example;  // String | Select policies of a given policy type identity. (optional)  (default to null)
      +            var policytypeId = policytypeId_example;  // String | Select policies of a given A1 Policy Type ID. (optional)  (default to null)
                   var ricId = ricId_example;  // String | Select policies of a given Near-RT RIC identity. (optional)  (default to null)
      -            var serviceId = serviceId_example;  // String | Select policies owned by a given service. (optional)  (default to null)
      -            var typeName = typeName_example;  // String | Select policies of types with the given type name (type identity has the format ) (optional)  (default to null)
      +            var serviceId = serviceId_example;  // String | Select policies owned by a given service. (Both registered and unregistered services) (optional)  (default to null)
      +            var typeName = typeName_example;  // String | Select policies of types with the given A1 Policy Type name  (type names have the format 'typename_version')
      + (optional)  (default to null)
       
                   try {
      -                // Query policy identities
      +                // Query A1 Policy Instances (getPolicyIds)
                       policy_id_list result = apiInstance.getPolicyIds(policytypeId, ricId, serviceId, typeName);
                       Debug.WriteLine(result);
                   } catch (Exception e) {
      @@ -2349,10 +2359,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
       
       // Create an instance of the API class
       $api_instance = new OpenAPITools\Client\Api\A1PolicyManagementApi();
      -$policytypeId = policytypeId_example; // String | Select policies of a given policy type identity.
      +$policytypeId = policytypeId_example; // String | Select policies of a given A1 Policy Type ID.
       $ricId = ricId_example; // String | Select policies of a given Near-RT RIC identity.
      -$serviceId = serviceId_example; // String | Select policies owned by a given service.
      -$typeName = typeName_example; // String | Select policies of types with the given type name (type identity has the format )
      +$serviceId = serviceId_example; // String | Select policies owned by a given service. (Both registered and unregistered services)
      +$typeName = typeName_example; // String | Select policies of types with the given A1 Policy Type name  (type names have the format 'typename_version')
      +
       
       try {
           $result = $api_instance->getPolicyIds($policytypeId, $ricId, $serviceId, $typeName);
      @@ -2370,10 +2381,11 @@ use WWW::OPenAPIClient::A1PolicyManagementApi;
       
       # Create an instance of the API class
       my $api_instance = WWW::OPenAPIClient::A1PolicyManagementApi->new();
      -my $policytypeId = policytypeId_example; # String | Select policies of a given policy type identity.
      +my $policytypeId = policytypeId_example; # String | Select policies of a given A1 Policy Type ID.
       my $ricId = ricId_example; # String | Select policies of a given Near-RT RIC identity.
      -my $serviceId = serviceId_example; # String | Select policies owned by a given service.
      -my $typeName = typeName_example; # String | Select policies of types with the given type name (type identity has the format )
      +my $serviceId = serviceId_example; # String | Select policies owned by a given service. (Both registered and unregistered services)
      +my $typeName = typeName_example; # String | Select policies of types with the given A1 Policy Type name  (type names have the format 'typename_version')
      +
       
       eval {
           my $result = $api_instance->getPolicyIds(policytypeId => $policytypeId, ricId => $ricId, serviceId => $serviceId, typeName => $typeName);
      @@ -2393,13 +2405,14 @@ from pprint import pprint
       
       # Create an instance of the API class
       api_instance = openapi_client.A1PolicyManagementApi()
      -policytypeId = policytypeId_example # String | Select policies of a given policy type identity. (optional) (default to null)
      +policytypeId = policytypeId_example # String | Select policies of a given A1 Policy Type ID. (optional) (default to null)
       ricId = ricId_example # String | Select policies of a given Near-RT RIC identity. (optional) (default to null)
      -serviceId = serviceId_example # String | Select policies owned by a given service. (optional) (default to null)
      -typeName = typeName_example # String | Select policies of types with the given type name (type identity has the format ) (optional) (default to null)
      +serviceId = serviceId_example # String | Select policies owned by a given service. (Both registered and unregistered services) (optional) (default to null)
      +typeName = typeName_example # String | Select policies of types with the given A1 Policy Type name  (type names have the format 'typename_version')
      + (optional) (default to null)
       
       try:
      -    # Query policy identities
      +    # Query A1 Policy Instances (getPolicyIds)
           api_response = api_instance.get_policy_ids(policytypeId=policytypeId, ricId=ricId, serviceId=serviceId, typeName=typeName)
           pprint(api_response)
       except ApiException as e:
      @@ -2453,7 +2466,7 @@ pub fn main() {
                       
       
                           
      -Select policies of a given policy type identity. +Select policies of a given A1 Policy Type ID.
      @@ -2493,7 +2506,7 @@ Select policies of a given Near-RT RIC identity.
      -Select policies owned by a given service. +Select policies owned by a given service. (Both registered and unregistered services)
      @@ -2513,7 +2526,8 @@ Select policies owned by a given service.
      -Select policies of types with the given type name (type identity has the format <typename_version>) +Select policies of types with the given A1 Policy Type name (type names have the format 'typename_version') +
      @@ -2681,12 +2695,13 @@ Select policies of types with the given type name (type identity has the format

      getPolicyInstances

      -

      Query for A1 policy instances

      +

      Query for A1 Policy instances (getPolicyInstances)

      -

      Returns a list of A1 policies matching given search criteria. <br>If several query parameters are defined, the policies matching all conditions are returned.

      +

      Returns a collection of A1 Policy Instance information for policies that match given search criteria. If several query parameters are defined, the policies matching all conditions are returned. +


      /a1-policy/v2/policy-instances
      @@ -2730,10 +2745,10 @@ public class A1PolicyManagementApiExample { // Create an instance of the API class A1PolicyManagementApi apiInstance = new A1PolicyManagementApi(); - String policytypeId = policytypeId_example; // String | Select policies with a given type identity. + String policytypeId = policytypeId_example; // String | Select policies with a given A1 Policy Type ID. String ricId = ricId_example; // String | Select policies for a given Near-RT RIC identity. - String serviceId = serviceId_example; // String | Select policies owned by a given service. - String typeName = typeName_example; // String | Select policies of a given type name (type identity has the format ) + String serviceId = serviceId_example; // String | Select policies owned by a given service (registered or unregistered). + String typeName = typeName_example; // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). try { policy_info_list result = apiInstance.getPolicyInstances(policytypeId, ricId, serviceId, typeName); @@ -2752,10 +2767,10 @@ public class A1PolicyManagementApiExample { final api_instance = DefaultApi(); -final String policytypeId = new String(); // String | Select policies with a given type identity. +final String policytypeId = new String(); // String | Select policies with a given A1 Policy Type ID. final String ricId = new String(); // String | Select policies for a given Near-RT RIC identity. -final String serviceId = new String(); // String | Select policies owned by a given service. -final String typeName = new String(); // String | Select policies of a given type name (type identity has the format ) +final String serviceId = new String(); // String | Select policies owned by a given service (registered or unregistered). +final String typeName = new String(); // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). try { final result = await api_instance.getPolicyInstances(policytypeId, ricId, serviceId, typeName); @@ -2773,10 +2788,10 @@ try { public class A1PolicyManagementApiExample { public static void main(String[] args) { A1PolicyManagementApi apiInstance = new A1PolicyManagementApi(); - String policytypeId = policytypeId_example; // String | Select policies with a given type identity. + String policytypeId = policytypeId_example; // String | Select policies with a given A1 Policy Type ID. String ricId = ricId_example; // String | Select policies for a given Near-RT RIC identity. - String serviceId = serviceId_example; // String | Select policies owned by a given service. - String typeName = typeName_example; // String | Select policies of a given type name (type identity has the format ) + String serviceId = serviceId_example; // String | Select policies owned by a given service (registered or unregistered). + String typeName = typeName_example; // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). try { policy_info_list result = apiInstance.getPolicyInstances(policytypeId, ricId, serviceId, typeName); @@ -2797,12 +2812,12 @@ public class A1PolicyManagementApiExample { // Create an instance of the API class A1PolicyManagementApi *apiInstance = [[A1PolicyManagementApi alloc] init]; -String *policytypeId = policytypeId_example; // Select policies with a given type identity. (optional) (default to null) +String *policytypeId = policytypeId_example; // Select policies with a given A1 Policy Type ID. (optional) (default to null) String *ricId = ricId_example; // Select policies for a given Near-RT RIC identity. (optional) (default to null) -String *serviceId = serviceId_example; // Select policies owned by a given service. (optional) (default to null) -String *typeName = typeName_example; // Select policies of a given type name (type identity has the format ) (optional) (default to null) +String *serviceId = serviceId_example; // Select policies owned by a given service (registered or unregistered). (optional) (default to null) +String *typeName = typeName_example; // Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). (optional) (default to null) -// Query for A1 policy instances +// Query for A1 Policy instances (getPolicyInstances) [apiInstance getPolicyInstancesWith:policytypeId ricId:ricId serviceId:serviceId @@ -2819,15 +2834,15 @@ String *typeName = typeName_example; // Select policies of a given type name (ty
      -
      var OnapCcsdkA1PolicyManagementService = require('onap_ccsdk_a1_policy_management_service');
      +                              
      var OnapCcsdkPreSpecA1PolicyManagementApi = require('onap_ccsdk_pre_spec_a1_policy_management_api');
       
       // Create an instance of the API class
      -var api = new OnapCcsdkA1PolicyManagementService.A1PolicyManagementApi()
      +var api = new OnapCcsdkPreSpecA1PolicyManagementApi.A1PolicyManagementApi()
       var opts = {
      -  'policytypeId': policytypeId_example, // {String} Select policies with a given type identity.
      +  'policytypeId': policytypeId_example, // {String} Select policies with a given A1 Policy Type ID.
         'ricId': ricId_example, // {String} Select policies for a given Near-RT RIC identity.
      -  'serviceId': serviceId_example, // {String} Select policies owned by a given service.
      -  'typeName': typeName_example // {String} Select policies of a given type name (type identity has the format )
      +  'serviceId': serviceId_example, // {String} Select policies owned by a given service (registered or unregistered).
      +  'typeName': typeName_example // {String} Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
       };
       
       var callback = function(error, data, response) {
      @@ -2860,13 +2875,13 @@ namespace Example
       
                   // Create an instance of the API class
                   var apiInstance = new A1PolicyManagementApi();
      -            var policytypeId = policytypeId_example;  // String | Select policies with a given type identity. (optional)  (default to null)
      +            var policytypeId = policytypeId_example;  // String | Select policies with a given A1 Policy Type ID. (optional)  (default to null)
                   var ricId = ricId_example;  // String | Select policies for a given Near-RT RIC identity. (optional)  (default to null)
      -            var serviceId = serviceId_example;  // String | Select policies owned by a given service. (optional)  (default to null)
      -            var typeName = typeName_example;  // String | Select policies of a given type name (type identity has the format ) (optional)  (default to null)
      +            var serviceId = serviceId_example;  // String | Select policies owned by a given service (registered or unregistered). (optional)  (default to null)
      +            var typeName = typeName_example;  // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). (optional)  (default to null)
       
                   try {
      -                // Query for A1 policy instances
      +                // Query for A1 Policy instances (getPolicyInstances)
                       policy_info_list result = apiInstance.getPolicyInstances(policytypeId, ricId, serviceId, typeName);
                       Debug.WriteLine(result);
                   } catch (Exception e) {
      @@ -2884,10 +2899,10 @@ require_once(__DIR__ . '/vendor/autoload.php');
       
       // Create an instance of the API class
       $api_instance = new OpenAPITools\Client\Api\A1PolicyManagementApi();
      -$policytypeId = policytypeId_example; // String | Select policies with a given type identity.
      +$policytypeId = policytypeId_example; // String | Select policies with a given A1 Policy Type ID.
       $ricId = ricId_example; // String | Select policies for a given Near-RT RIC identity.
      -$serviceId = serviceId_example; // String | Select policies owned by a given service.
      -$typeName = typeName_example; // String | Select policies of a given type name (type identity has the format )
      +$serviceId = serviceId_example; // String | Select policies owned by a given service (registered or unregistered).
      +$typeName = typeName_example; // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
       
       try {
           $result = $api_instance->getPolicyInstances($policytypeId, $ricId, $serviceId, $typeName);
      @@ -2905,10 +2920,10 @@ use WWW::OPenAPIClient::A1PolicyManagementApi;
       
       # Create an instance of the API class
       my $api_instance = WWW::OPenAPIClient::A1PolicyManagementApi->new();
      -my $policytypeId = policytypeId_example; # String | Select policies with a given type identity.
      +my $policytypeId = policytypeId_example; # String | Select policies with a given A1 Policy Type ID.
       my $ricId = ricId_example; # String | Select policies for a given Near-RT RIC identity.
      -my $serviceId = serviceId_example; # String | Select policies owned by a given service.
      -my $typeName = typeName_example; # String | Select policies of a given type name (type identity has the format )
      +my $serviceId = serviceId_example; # String | Select policies owned by a given service (registered or unregistered).
      +my $typeName = typeName_example; # String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
       
       eval {
           my $result = $api_instance->getPolicyInstances(policytypeId => $policytypeId, ricId => $ricId, serviceId => $serviceId, typeName => $typeName);
      @@ -2928,13 +2943,13 @@ from pprint import pprint
       
       # Create an instance of the API class
       api_instance = openapi_client.A1PolicyManagementApi()
      -policytypeId = policytypeId_example # String | Select policies with a given type identity. (optional) (default to null)
      +policytypeId = policytypeId_example # String | Select policies with a given A1 Policy Type ID. (optional) (default to null)
       ricId = ricId_example # String | Select policies for a given Near-RT RIC identity. (optional) (default to null)
      -serviceId = serviceId_example # String | Select policies owned by a given service. (optional) (default to null)
      -typeName = typeName_example # String | Select policies of a given type name (type identity has the format ) (optional) (default to null)
      +serviceId = serviceId_example # String | Select policies owned by a given service (registered or unregistered). (optional) (default to null)
      +typeName = typeName_example # String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). (optional) (default to null)
       
       try:
      -    # Query for A1 policy instances
      +    # Query for A1 Policy instances (getPolicyInstances)
           api_response = api_instance.get_policy_instances(policytypeId=policytypeId, ricId=ricId, serviceId=serviceId, typeName=typeName)
           pprint(api_response)
       except ApiException as e:
      @@ -2988,7 +3003,7 @@ pub fn main() {
                       
       
                           
      -Select policies with a given type identity. +Select policies with a given A1 Policy Type ID.
      @@ -3028,7 +3043,7 @@ Select policies for a given Near-RT RIC identity.
      -Select policies owned by a given service. +Select policies owned by a given service (registered or unregistered).
      @@ -3048,7 +3063,7 @@ Select policies owned by a given service.
      -Select policies of a given type name (type identity has the format <typename_version>) +Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
      @@ -3062,7 +3077,7 @@ Select policies of a given type name (type identity has the format <typename_

      -

      -
      -
      +
      +
      -

      getPolicy

      -

      Get an A1 Policy's policy data (getPolicy)

      +

      getPolicyIds

      +

      Query for A1 Policy instances (getPolicyIds)

      -

      Get an A1 Policy instance's policy data using its policy ID

      +

      Returns a collection of A1 Policy Instance IDs for policies that match given search criteria. If several query parameters are defined, the policies matching all conditions are returned. +


      -
      /policies/{policyId}
      +
      /policies

      Usage and SDK Samples

      -
      +
      curl -X GET \
        -H "Accept: application/json,application/problem+json" \
      - "https://example.com/a1-policy-management/v1/policies/{policyId}"
      + "https://example.com/a1-policy-management/v1/policies?policyTypeId=policyTypeId_example&nearRtRicId=nearRtRicId_example&serviceId=serviceId_example&typeName=typeName_example"
       
      -
      +
      import org.openapitools.client.*;
       import org.openapitools.client.auth.*;
       import org.openapitools.client.model.*;
      @@ -5197,14 +5106,17 @@ public class A1PolicyManagementApiExample {
       
               // Create an instance of the API class
               A1PolicyManagementApi apiInstance = new A1PolicyManagementApi();
      -        String policyId = policyId_example; // String | 
      +        String policyTypeId = policyTypeId_example; // String | Select policies with a given A1 Policy Type ID.
      +        String nearRtRicId = nearRtRicId_example; // String | Select policies for a given Near-RT RIC identity.
      +        String serviceId = serviceId_example; // String | Select policies owned by a given service (registered or unregistered).
      +        String typeName = typeName_example; // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
               String accept = application/json; // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
       
               try {
      -            Object result = apiInstance.getPolicy(policyId, accept);
      +            array[PolicyInformation] result = apiInstance.getPolicyIds(policyTypeId, nearRtRicId, serviceId, typeName, accept);
                   System.out.println(result);
               } catch (ApiException e) {
      -            System.err.println("Exception when calling A1PolicyManagementApi#getPolicy");
      +            System.err.println("Exception when calling A1PolicyManagementApi#getPolicyIds");
                   e.printStackTrace();
               }
           }
      @@ -5212,59 +5124,71 @@ public class A1PolicyManagementApiExample {
       
      -
      +
      import 'package:openapi/api.dart';
       
       final api_instance = DefaultApi();
       
      -final String policyId = new String(); // String | 
      +final String policyTypeId = new String(); // String | Select policies with a given A1 Policy Type ID.
      +final String nearRtRicId = new String(); // String | Select policies for a given Near-RT RIC identity.
      +final String serviceId = new String(); // String | Select policies owned by a given service (registered or unregistered).
      +final String typeName = new String(); // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
       final String accept = new String(); // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
       
       try {
      -    final result = await api_instance.getPolicy(policyId, accept);
      +    final result = await api_instance.getPolicyIds(policyTypeId, nearRtRicId, serviceId, typeName, accept);
           print(result);
       } catch (e) {
      -    print('Exception when calling DefaultApi->getPolicy: $e\n');
      +    print('Exception when calling DefaultApi->getPolicyIds: $e\n');
       }
       
       
      -
      +
      import org.openapitools.client.api.A1PolicyManagementApi;
       
       public class A1PolicyManagementApiExample {
           public static void main(String[] args) {
               A1PolicyManagementApi apiInstance = new A1PolicyManagementApi();
      -        String policyId = policyId_example; // String | 
      +        String policyTypeId = policyTypeId_example; // String | Select policies with a given A1 Policy Type ID.
      +        String nearRtRicId = nearRtRicId_example; // String | Select policies for a given Near-RT RIC identity.
      +        String serviceId = serviceId_example; // String | Select policies owned by a given service (registered or unregistered).
      +        String typeName = typeName_example; // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
               String accept = application/json; // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
       
               try {
      -            Object result = apiInstance.getPolicy(policyId, accept);
      +            array[PolicyInformation] result = apiInstance.getPolicyIds(policyTypeId, nearRtRicId, serviceId, typeName, accept);
                   System.out.println(result);
               } catch (ApiException e) {
      -            System.err.println("Exception when calling A1PolicyManagementApi#getPolicy");
      +            System.err.println("Exception when calling A1PolicyManagementApi#getPolicyIds");
                   e.printStackTrace();
               }
           }
       }
      -
      +
      
       
       // Create an instance of the API class
       A1PolicyManagementApi *apiInstance = [[A1PolicyManagementApi alloc] init];
      -String *policyId = policyId_example; //  (default to null)
      +String *policyTypeId = policyTypeId_example; // Select policies with a given A1 Policy Type ID. (optional) (default to null)
      +String *nearRtRicId = nearRtRicId_example; // Select policies for a given Near-RT RIC identity. (optional) (default to null)
      +String *serviceId = serviceId_example; // Select policies owned by a given service (registered or unregistered). (optional) (default to null)
      +String *typeName = typeName_example; // Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). (optional) (default to null)
       String *accept = application/json; // Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. (optional) (default to null)
       
      -// Get an A1 Policy's policy data (getPolicy)
      -[apiInstance getPolicyWith:policyId
      +// Query for A1 Policy instances (getPolicyIds)
      +[apiInstance getPolicyIdsWith:policyTypeId
      +    nearRtRicId:nearRtRicId
      +    serviceId:serviceId
      +    typeName:typeName
           accept:accept
      -              completionHandler: ^(Object output, NSError* error) {
      +              completionHandler: ^(array[PolicyInformation] output, NSError* error) {
           if (output) {
               NSLog(@"%@", output);
           }
      @@ -5275,13 +5199,16 @@ String *accept = application/json; // Specifies the content type that the client
       
      -
      +
      var OnapCcsdkA1PolicyManagementApi = require('onap_ccsdk_a1_policy_management_api');
       
       // Create an instance of the API class
       var api = new OnapCcsdkA1PolicyManagementApi.A1PolicyManagementApi()
      -var policyId = policyId_example; // {String} 
       var opts = {
      +  'policyTypeId': policyTypeId_example, // {String} Select policies with a given A1 Policy Type ID.
      +  'nearRtRicId': nearRtRicId_example, // {String} Select policies for a given Near-RT RIC identity.
      +  'serviceId': serviceId_example, // {String} Select policies owned by a given service (registered or unregistered).
      +  'typeName': typeName_example, // {String} Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
         'accept': application/json // {String} Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
       };
       
      @@ -5292,14 +5219,14 @@ var callback = function(error, data, response) {
           console.log('API called successfully. Returned data: ' + data);
         }
       };
      -api.getPolicy(policyId, opts, callback);
      +api.getPolicyIds(opts, callback);
       
      - -
      +
      using System;
       using System.Diagnostics;
       using Org.OpenAPITools.Api;
      @@ -5308,22 +5235,25 @@ using Org.OpenAPITools.Model;
       
       namespace Example
       {
      -    public class getPolicyExample
      +    public class getPolicyIdsExample
           {
               public void main()
               {
       
                   // Create an instance of the API class
                   var apiInstance = new A1PolicyManagementApi();
      -            var policyId = policyId_example;  // String |  (default to null)
      +            var policyTypeId = policyTypeId_example;  // String | Select policies with a given A1 Policy Type ID. (optional)  (default to null)
      +            var nearRtRicId = nearRtRicId_example;  // String | Select policies for a given Near-RT RIC identity. (optional)  (default to null)
      +            var serviceId = serviceId_example;  // String | Select policies owned by a given service (registered or unregistered). (optional)  (default to null)
      +            var typeName = typeName_example;  // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). (optional)  (default to null)
                   var accept = application/json;  // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. (optional)  (default to null)
       
                   try {
      -                // Get an A1 Policy's policy data (getPolicy)
      -                Object result = apiInstance.getPolicy(policyId, accept);
      +                // Query for A1 Policy instances (getPolicyIds)
      +                array[PolicyInformation] result = apiInstance.getPolicyIds(policyTypeId, nearRtRicId, serviceId, typeName, accept);
                       Debug.WriteLine(result);
                   } catch (Exception e) {
      -                Debug.Print("Exception when calling A1PolicyManagementApi.getPolicy: " + e.Message );
      +                Debug.Print("Exception when calling A1PolicyManagementApi.getPolicyIds: " + e.Message );
                   }
               }
           }
      @@ -5331,44 +5261,50 @@ namespace Example
       
      -
      +
      <?php
       require_once(__DIR__ . '/vendor/autoload.php');
       
       // Create an instance of the API class
       $api_instance = new OpenAPITools\Client\Api\A1PolicyManagementApi();
      -$policyId = policyId_example; // String | 
      +$policyTypeId = policyTypeId_example; // String | Select policies with a given A1 Policy Type ID.
      +$nearRtRicId = nearRtRicId_example; // String | Select policies for a given Near-RT RIC identity.
      +$serviceId = serviceId_example; // String | Select policies owned by a given service (registered or unregistered).
      +$typeName = typeName_example; // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
       $accept = application/json; // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
       
       try {
      -    $result = $api_instance->getPolicy($policyId, $accept);
      +    $result = $api_instance->getPolicyIds($policyTypeId, $nearRtRicId, $serviceId, $typeName, $accept);
           print_r($result);
       } catch (Exception $e) {
      -    echo 'Exception when calling A1PolicyManagementApi->getPolicy: ', $e->getMessage(), PHP_EOL;
      +    echo 'Exception when calling A1PolicyManagementApi->getPolicyIds: ', $e->getMessage(), PHP_EOL;
       }
       ?>
      -
      +
      use Data::Dumper;
       use WWW::OPenAPIClient::Configuration;
       use WWW::OPenAPIClient::A1PolicyManagementApi;
       
       # Create an instance of the API class
       my $api_instance = WWW::OPenAPIClient::A1PolicyManagementApi->new();
      -my $policyId = policyId_example; # String | 
      +my $policyTypeId = policyTypeId_example; # String | Select policies with a given A1 Policy Type ID.
      +my $nearRtRicId = nearRtRicId_example; # String | Select policies for a given Near-RT RIC identity.
      +my $serviceId = serviceId_example; # String | Select policies owned by a given service (registered or unregistered).
      +my $typeName = typeName_example; # String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
       my $accept = application/json; # String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
       
       eval {
      -    my $result = $api_instance->getPolicy(policyId => $policyId, accept => $accept);
      +    my $result = $api_instance->getPolicyIds(policyTypeId => $policyTypeId, nearRtRicId => $nearRtRicId, serviceId => $serviceId, typeName => $typeName, accept => $accept);
           print Dumper($result);
       };
       if ($@) {
      -    warn "Exception when calling A1PolicyManagementApi->getPolicy: $@\n";
      +    warn "Exception when calling A1PolicyManagementApi->getPolicyIds: $@\n";
       }
      -
      +
      from __future__ import print_statement
       import time
       import openapi_client
      @@ -5377,26 +5313,32 @@ from pprint import pprint
       
       # Create an instance of the API class
       api_instance = openapi_client.A1PolicyManagementApi()
      -policyId = policyId_example # String |  (default to null)
      +policyTypeId = policyTypeId_example # String | Select policies with a given A1 Policy Type ID. (optional) (default to null)
      +nearRtRicId = nearRtRicId_example # String | Select policies for a given Near-RT RIC identity. (optional) (default to null)
      +serviceId = serviceId_example # String | Select policies owned by a given service (registered or unregistered). (optional) (default to null)
      +typeName = typeName_example # String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). (optional) (default to null)
       accept = application/json # String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. (optional) (default to null)
       
       try:
      -    # Get an A1 Policy's policy data (getPolicy)
      -    api_response = api_instance.get_policy(policyId, accept=accept)
      +    # Query for A1 Policy instances (getPolicyIds)
      +    api_response = api_instance.get_policy_ids(policyTypeId=policyTypeId, nearRtRicId=nearRtRicId, serviceId=serviceId, typeName=typeName, accept=accept)
           pprint(api_response)
       except ApiException as e:
      -    print("Exception when calling A1PolicyManagementApi->getPolicy: %s\n" % e)
      + print("Exception when calling A1PolicyManagementApi->getPolicyIds: %s\n" % e)
      -
      +
      extern crate A1PolicyManagementApi;
       
       pub fn main() {
      -    let policyId = policyId_example; // String
      +    let policyTypeId = policyTypeId_example; // String
      +    let nearRtRicId = nearRtRicId_example; // String
      +    let serviceId = serviceId_example; // String
      +    let typeName = typeName_example; // String
           let accept = application/json; // String
       
           let mut context = A1PolicyManagementApi::Context::default();
      -    let result = client.getPolicy(policyId, accept, &context).wait();
      +    let result = client.getPolicyIds(policyTypeId, nearRtRicId, serviceId, typeName, accept, &context).wait();
       
           println!("{:?}", result);
       }
      @@ -5411,27 +5353,28 @@ pub fn main() {
       
                                 

      Parameters

      -
      Path parameters
      + +
      Header parameters
      - - - - - + + + + + @@ -5439,17 +5382,19 @@ pub fn main() {
      NameDescription
      policyId*
      NameDescription
      Accept -
      +
      String +
      +Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. +
      -
      - Required -
      -
      Header parameters
      + + +
      Query parameters
      - + -
      Name Description
      Accept
      policyTypeId -
      +
      @@ -5457,7 +5402,7 @@ pub fn main() {
      -Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. +Select policies with a given A1 Policy Type ID.
      @@ -5465,29 +5410,86 @@ Specifies the content type that the client expects to receive in response to the
      + nearRtRicId + + + +
      +
      +
      + + String + + +
      +Select policies for a given Near-RT RIC identity. +
      +
      +
      +
      + + + serviceId + +
      +
      +
      + + String + + +
      +Select policies owned by a given service (registered or unregistered). +
      +
      +
      +
      + + + + typeName + + + +
      +
      +
      + + String + + +
      +Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). +
      +
      +
      +
      + + + +

      Responses

      -

      -

      +

      +

      -
      @@ -9594,11 +9594,11 @@ Select types that are compatible with the given version. This parameter is only

      -
      -
      +
      +
      -

      putPolicy

      -

      Update an A1 Policy's policy data (putPolicy)

      +

      updatePolicy

      +

      Update an A1 Policy's policy data (updatePolicy)

      @@ -9611,23 +9611,23 @@ Select types that are compatible with the given version. This parameter is only

      Usage and SDK Samples

      -
      +
      curl -X PUT \
        -H "Accept: application/json,application/problem+json" \
        -H "Content-Type: application/json" \
      @@ -9635,7 +9635,7 @@ Select types that are compatible with the given version. This parameter is only
        -d ''
       
      -
      +
      import org.openapitools.client.*;
       import org.openapitools.client.auth.*;
       import org.openapitools.client.model.*;
      @@ -9653,10 +9653,10 @@ public class A1PolicyManagementApiExample {
               Object body = Object; // Object | 
       
               try {
      -            Object result = apiInstance.putPolicy(policyId, body);
      +            Object result = apiInstance.updatePolicy(policyId, body);
                   System.out.println(result);
               } catch (ApiException e) {
      -            System.err.println("Exception when calling A1PolicyManagementApi#putPolicy");
      +            System.err.println("Exception when calling A1PolicyManagementApi#updatePolicy");
                   e.printStackTrace();
               }
           }
      @@ -9664,7 +9664,7 @@ public class A1PolicyManagementApiExample {
       
      -
      +
      import 'package:openapi/api.dart';
       
       final api_instance = DefaultApi();
      @@ -9673,16 +9673,16 @@ final String policyId = new String(); // String |
       final Object body = new Object(); // Object | 
       
       try {
      -    final result = await api_instance.putPolicy(policyId, body);
      +    final result = await api_instance.updatePolicy(policyId, body);
           print(result);
       } catch (e) {
      -    print('Exception when calling DefaultApi->putPolicy: $e\n');
      +    print('Exception when calling DefaultApi->updatePolicy: $e\n');
       }
       
       
      -
      +
      import org.openapitools.client.api.A1PolicyManagementApi;
       
       public class A1PolicyManagementApiExample {
      @@ -9692,20 +9692,20 @@ public class A1PolicyManagementApiExample {
               Object body = Object; // Object | 
       
               try {
      -            Object result = apiInstance.putPolicy(policyId, body);
      +            Object result = apiInstance.updatePolicy(policyId, body);
                   System.out.println(result);
               } catch (ApiException e) {
      -            System.err.println("Exception when calling A1PolicyManagementApi#putPolicy");
      +            System.err.println("Exception when calling A1PolicyManagementApi#updatePolicy");
                   e.printStackTrace();
               }
           }
       }
      -
      +
      
       
       // Create an instance of the API class
      @@ -9713,8 +9713,8 @@ A1PolicyManagementApi *apiInstance = [[A1PolicyManagementApi alloc] init];
       String *policyId = policyId_example; //  (default to null)
       Object *body = Object; // 
       
      -// Update an A1 Policy's policy data (putPolicy)
      -[apiInstance putPolicyWith:policyId
      +// Update an A1 Policy's policy data (updatePolicy)
      +[apiInstance updatePolicyWith:policyId
           body:body
                     completionHandler: ^(Object output, NSError* error) {
           if (output) {
      @@ -9727,7 +9727,7 @@ Object *body = Object; //
       
      -
      +
      var OnapCcsdkA1PolicyManagementApi = require('onap_ccsdk_a1_policy_management_api');
       
       // Create an instance of the API class
      @@ -9742,14 +9742,14 @@ var callback = function(error, data, response) {
           console.log('API called successfully. Returned data: ' + data);
         }
       };
      -api.putPolicy(policyId, body, callback);
      +api.updatePolicy(policyId, body, callback);
       
      - -
      +
      using System;
       using System.Diagnostics;
       using Org.OpenAPITools.Api;
      @@ -9758,7 +9758,7 @@ using Org.OpenAPITools.Model;
       
       namespace Example
       {
      -    public class putPolicyExample
      +    public class updatePolicyExample
           {
               public void main()
               {
      @@ -9769,11 +9769,11 @@ namespace Example
                   var body = Object;  // Object | 
       
                   try {
      -                // Update an A1 Policy's policy data (putPolicy)
      -                Object result = apiInstance.putPolicy(policyId, body);
      +                // Update an A1 Policy's policy data (updatePolicy)
      +                Object result = apiInstance.updatePolicy(policyId, body);
                       Debug.WriteLine(result);
                   } catch (Exception e) {
      -                Debug.Print("Exception when calling A1PolicyManagementApi.putPolicy: " + e.Message );
      +                Debug.Print("Exception when calling A1PolicyManagementApi.updatePolicy: " + e.Message );
                   }
               }
           }
      @@ -9781,7 +9781,7 @@ namespace Example
       
      -
      +
      <?php
       require_once(__DIR__ . '/vendor/autoload.php');
       
      @@ -9791,15 +9791,15 @@ $policyId = policyId_example; // String |
       $body = Object; // Object | 
       
       try {
      -    $result = $api_instance->putPolicy($policyId, $body);
      +    $result = $api_instance->updatePolicy($policyId, $body);
           print_r($result);
       } catch (Exception $e) {
      -    echo 'Exception when calling A1PolicyManagementApi->putPolicy: ', $e->getMessage(), PHP_EOL;
      +    echo 'Exception when calling A1PolicyManagementApi->updatePolicy: ', $e->getMessage(), PHP_EOL;
       }
       ?>
      -
      +
      use Data::Dumper;
       use WWW::OPenAPIClient::Configuration;
       use WWW::OPenAPIClient::A1PolicyManagementApi;
      @@ -9810,15 +9810,15 @@ my $policyId = policyId_example; # String |
       my $body = WWW::OPenAPIClient::Object::Object->new(); # Object | 
       
       eval {
      -    my $result = $api_instance->putPolicy(policyId => $policyId, body => $body);
      +    my $result = $api_instance->updatePolicy(policyId => $policyId, body => $body);
           print Dumper($result);
       };
       if ($@) {
      -    warn "Exception when calling A1PolicyManagementApi->putPolicy: $@\n";
      +    warn "Exception when calling A1PolicyManagementApi->updatePolicy: $@\n";
       }
      -
      +
      from __future__ import print_statement
       import time
       import openapi_client
      @@ -9831,14 +9831,14 @@ policyId = policyId_example # String |  (default to null)
       body = Object # Object | 
       
       try:
      -    # Update an A1 Policy's policy data (putPolicy)
      -    api_response = api_instance.put_policy(policyId, body)
      +    # Update an A1 Policy's policy data (updatePolicy)
      +    api_response = api_instance.update_policy(policyId, body)
           pprint(api_response)
       except ApiException as e:
      -    print("Exception when calling A1PolicyManagementApi->putPolicy: %s\n" % e)
      + print("Exception when calling A1PolicyManagementApi->updatePolicy: %s\n" % e)
      -
      +
      extern crate A1PolicyManagementApi;
       
       pub fn main() {
      @@ -9846,7 +9846,7 @@ pub fn main() {
           let body = Object; // Object
       
           let mut context = A1PolicyManagementApi::Context::default();
      -    let result = client.putPolicy(policyId, body, &context).wait();
      +    let result = client.updatePolicy(policyId, body, &context).wait();
       
           println!("{:?}", result);
       }
      @@ -9871,7 +9871,7 @@ pub fn main() {
       
       
       
      -    
      +
      @@ -9933,12 +9933,12 @@ $(document).ready(function() { } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_putPolicy_body'); + var result = $('#d2e199_updatePolicy_body'); result.empty(); result.append(view.render()); }); -
      +
      @@ -9947,23 +9947,23 @@ $(document).ready(function() {

      Responses

      -

      -

      +

      +

      -
      diff --git a/docs/offeredapis/openapitoolgen/offeredapis/pms-api/v3/index.html b/docs/offeredapis/openapitoolgen/offeredapis/pms-api/v3/index.html index 71e0c49f..69b5ce4f 100644 --- a/docs/offeredapis/openapitoolgen/offeredapis/pms-api/v3/index.html +++ b/docs/offeredapis/openapitoolgen/offeredapis/pms-api/v3/index.html @@ -1178,12 +1178,12 @@ ul.nav-tabs {
    • deletePolicy
    • -
    • - getAllPolicies -
    • getPolicy
    • +
    • + getPolicyIds +
    • getPolicyStatus
    • @@ -1193,8 +1193,8 @@ ul.nav-tabs {
    • getPolicyTypes
    • -
    • - putPolicy +
    • + updatePolicy
    • @@ -1243,7 +1243,7 @@ ul.nav-tabs {
      Version: 1.0.0

      -

      General

      The ONAP CCSDK A1 Policy Management Service provides a REST API for managing A1 policies.
      This document describes the latest API set to perform tasks for:

      • A1 Policy creation, modification and deletion.
      • Monitoring and maintaining consistency of the SMO view of A1 Policies and the Near-RT RICs
      • Maintaining a view of each Near-RT RIC's supported A1 Policy Types
      • Supervision of registered services (rApps). When a registered service is unavailable, its policies are removed.

      APIs provided or defined by the service

      Note: parts of this API are strongly based on extracts of the O-RAN Alliance R1 Interface specification for A1 Policy Management, and those parts should be considered '� O-RAN ALLIANCE - All rights reserved.'

      A1 Policy Management

      This is the latest API for managing A1 Policies. This API is partially compliant with O-RAN Alliance R1 Interface specifications for A1 Policy Management:

      • A1 Policy retrieval, creation, modification and deletion.
      • Retrieval of supported A1 Policy Types for a Near-RT RIC
      • Retrieval of status for existing A1 policies

      Management of configuration

      API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.

      Service Callbacks

      These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.

      NearRT-RIC Repository (Older version)

      This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted towards one Near-RT RIC.

      Health Check

      API used for supervision of the A1 Policy Management Service.

      Service Registry and Supervision

      API used for registering services/clients/rApps. Each A1 Policy can be tagged with an owner. If the owner service is registered, then the service can be optionally monitored by a heart-beat supervision mechanism, and if the registered service becomes unavailable, then it is removed and all its A1 Policies are deleted. Note that services do not need to be registered to create A1 Policies, but unregistered services are not supervised. This is a feature that is optional to use.

      +

      General

      The ONAP CCSDK A1 Policy Management Service provides a REST API for managing A1 policies.
      This document describes the latest API set to perform tasks for:

      • A1 Policy creation, modification and deletion.
      • Monitoring and maintaining consistency of the SMO view of A1 Policies and the Near-RT RICs
      • Maintaining a view of each Near-RT RIC's supported A1 Policy Types
      • Supervision of registered services (rApps). When a registered service is unavailable, its policies are removed.

      APIs provided or defined by the service

      Note: parts of this API are strongly based on extracts of the O-RAN Alliance R1 Interface specification for A1 Policy Management, and those parts should be considered '© O-RAN ALLIANCE - All rights reserved.'

      A1 Policy Management

      This is the latest API for managing A1 Policies. This API is partially compliant with O-RAN Alliance R1 Interface specifications for A1 Policy Management:

      • A1 Policy retrieval, creation, modification and deletion.
      • Retrieval of supported A1 Policy Types for a Near-RT RIC
      • Retrieval of status for existing A1 policies

      Management of configuration

      API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.

      Service Callbacks

      These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.

      NearRT-RIC Repository (Older version)

      This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted towards one Near-RT RIC.

      Health Check

      API used for supervision of the A1 Policy Management Service.

      Service Registry and Supervision

      API used for registering services/clients/rApps. Each A1 Policy can be tagged with an owner. If the owner service is registered, then the service can be optionally monitored by a heart-beat supervision mechanism, and if the registered service becomes unavailable, then it is removed and all its A1 Policies are deleted. Note that services do not need to be registered to create A1 Policies, but unregistered services are not supervised. This is a feature that is optional to use.

    • @@ -3988,47 +3988,46 @@ Specifies the content type that the client expects to receive in response to the

      -
      -
      +
      +
      -

      getAllPolicies

      -

      Query for A1 Policy instances (getAllPolicies)

      +

      getPolicy

      +

      Get an A1 Policy's policy data (getPolicy)

      -

      Returns a collection of A1 Policy Instance IDs for policies that match given search criteria. If several query parameters are defined, the policies matching all conditions are returned. -

      +

      Get an A1 Policy instance's policy data using its policy ID


      -
      /policies
      +
      /policies/{policyId}

      Usage and SDK Samples

      -
      +
      curl -X GET \
        -H "Accept: application/json,application/problem+json" \
      - "https://example.com/a1-policy-management/v1/policies?policyTypeId=policyTypeId_example&nearRtRicId=nearRtRicId_example&serviceId=serviceId_example&typeName=typeName_example"
      + "https://example.com/a1-policy-management/v1/policies/{policyId}"
       
      -
      +
      import org.openapitools.client.*;
       import org.openapitools.client.auth.*;
       import org.openapitools.client.model.*;
      @@ -4042,17 +4041,14 @@ public class A1PolicyManagementApiExample {
       
               // Create an instance of the API class
               A1PolicyManagementApi apiInstance = new A1PolicyManagementApi();
      -        String policyTypeId = policyTypeId_example; // String | Select policies with a given A1 Policy Type ID.
      -        String nearRtRicId = nearRtRicId_example; // String | Select policies for a given Near-RT RIC identity.
      -        String serviceId = serviceId_example; // String | Select policies owned by a given service (registered or unregistered).
      -        String typeName = typeName_example; // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
      +        String policyId = policyId_example; // String | 
               String accept = application/json; // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
       
               try {
      -            array[PolicyInformation] result = apiInstance.getAllPolicies(policyTypeId, nearRtRicId, serviceId, typeName, accept);
      +            Object result = apiInstance.getPolicy(policyId, accept);
                   System.out.println(result);
               } catch (ApiException e) {
      -            System.err.println("Exception when calling A1PolicyManagementApi#getAllPolicies");
      +            System.err.println("Exception when calling A1PolicyManagementApi#getPolicy");
                   e.printStackTrace();
               }
           }
      @@ -4060,71 +4056,59 @@ public class A1PolicyManagementApiExample {
       
      -
      +
      import 'package:openapi/api.dart';
       
       final api_instance = DefaultApi();
       
      -final String policyTypeId = new String(); // String | Select policies with a given A1 Policy Type ID.
      -final String nearRtRicId = new String(); // String | Select policies for a given Near-RT RIC identity.
      -final String serviceId = new String(); // String | Select policies owned by a given service (registered or unregistered).
      -final String typeName = new String(); // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
      +final String policyId = new String(); // String | 
       final String accept = new String(); // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
       
       try {
      -    final result = await api_instance.getAllPolicies(policyTypeId, nearRtRicId, serviceId, typeName, accept);
      +    final result = await api_instance.getPolicy(policyId, accept);
           print(result);
       } catch (e) {
      -    print('Exception when calling DefaultApi->getAllPolicies: $e\n');
      +    print('Exception when calling DefaultApi->getPolicy: $e\n');
       }
       
       
      -
      +
      import org.openapitools.client.api.A1PolicyManagementApi;
       
       public class A1PolicyManagementApiExample {
           public static void main(String[] args) {
               A1PolicyManagementApi apiInstance = new A1PolicyManagementApi();
      -        String policyTypeId = policyTypeId_example; // String | Select policies with a given A1 Policy Type ID.
      -        String nearRtRicId = nearRtRicId_example; // String | Select policies for a given Near-RT RIC identity.
      -        String serviceId = serviceId_example; // String | Select policies owned by a given service (registered or unregistered).
      -        String typeName = typeName_example; // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
      +        String policyId = policyId_example; // String | 
               String accept = application/json; // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
       
               try {
      -            array[PolicyInformation] result = apiInstance.getAllPolicies(policyTypeId, nearRtRicId, serviceId, typeName, accept);
      +            Object result = apiInstance.getPolicy(policyId, accept);
                   System.out.println(result);
               } catch (ApiException e) {
      -            System.err.println("Exception when calling A1PolicyManagementApi#getAllPolicies");
      +            System.err.println("Exception when calling A1PolicyManagementApi#getPolicy");
                   e.printStackTrace();
               }
           }
       }
      -
      +
      
       
       // Create an instance of the API class
       A1PolicyManagementApi *apiInstance = [[A1PolicyManagementApi alloc] init];
      -String *policyTypeId = policyTypeId_example; // Select policies with a given A1 Policy Type ID. (optional) (default to null)
      -String *nearRtRicId = nearRtRicId_example; // Select policies for a given Near-RT RIC identity. (optional) (default to null)
      -String *serviceId = serviceId_example; // Select policies owned by a given service (registered or unregistered). (optional) (default to null)
      -String *typeName = typeName_example; // Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). (optional) (default to null)
      +String *policyId = policyId_example; //  (default to null)
       String *accept = application/json; // Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. (optional) (default to null)
       
      -// Query for A1 Policy instances (getAllPolicies)
      -[apiInstance getAllPoliciesWith:policyTypeId
      -    nearRtRicId:nearRtRicId
      -    serviceId:serviceId
      -    typeName:typeName
      +// Get an A1 Policy's policy data (getPolicy)
      +[apiInstance getPolicyWith:policyId
           accept:accept
      -              completionHandler: ^(array[PolicyInformation] output, NSError* error) {
      +              completionHandler: ^(Object output, NSError* error) {
           if (output) {
               NSLog(@"%@", output);
           }
      @@ -4135,16 +4119,13 @@ String *accept = application/json; // Specifies the content type that the client
       
      -
      +
      var OnapCcsdkA1PolicyManagementApi = require('onap_ccsdk_a1_policy_management_api');
       
       // Create an instance of the API class
       var api = new OnapCcsdkA1PolicyManagementApi.A1PolicyManagementApi()
      +var policyId = policyId_example; // {String} 
       var opts = {
      -  'policyTypeId': policyTypeId_example, // {String} Select policies with a given A1 Policy Type ID.
      -  'nearRtRicId': nearRtRicId_example, // {String} Select policies for a given Near-RT RIC identity.
      -  'serviceId': serviceId_example, // {String} Select policies owned by a given service (registered or unregistered).
      -  'typeName': typeName_example, // {String} Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
         'accept': application/json // {String} Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
       };
       
      @@ -4155,14 +4136,14 @@ var callback = function(error, data, response) {
           console.log('API called successfully. Returned data: ' + data);
         }
       };
      -api.getAllPolicies(opts, callback);
      +api.getPolicy(policyId, opts, callback);
       
      - -
      +
      using System;
       using System.Diagnostics;
       using Org.OpenAPITools.Api;
      @@ -4171,25 +4152,22 @@ using Org.OpenAPITools.Model;
       
       namespace Example
       {
      -    public class getAllPoliciesExample
      +    public class getPolicyExample
           {
               public void main()
               {
       
                   // Create an instance of the API class
                   var apiInstance = new A1PolicyManagementApi();
      -            var policyTypeId = policyTypeId_example;  // String | Select policies with a given A1 Policy Type ID. (optional)  (default to null)
      -            var nearRtRicId = nearRtRicId_example;  // String | Select policies for a given Near-RT RIC identity. (optional)  (default to null)
      -            var serviceId = serviceId_example;  // String | Select policies owned by a given service (registered or unregistered). (optional)  (default to null)
      -            var typeName = typeName_example;  // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). (optional)  (default to null)
      +            var policyId = policyId_example;  // String |  (default to null)
                   var accept = application/json;  // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. (optional)  (default to null)
       
                   try {
      -                // Query for A1 Policy instances (getAllPolicies)
      -                array[PolicyInformation] result = apiInstance.getAllPolicies(policyTypeId, nearRtRicId, serviceId, typeName, accept);
      +                // Get an A1 Policy's policy data (getPolicy)
      +                Object result = apiInstance.getPolicy(policyId, accept);
                       Debug.WriteLine(result);
                   } catch (Exception e) {
      -                Debug.Print("Exception when calling A1PolicyManagementApi.getAllPolicies: " + e.Message );
      +                Debug.Print("Exception when calling A1PolicyManagementApi.getPolicy: " + e.Message );
                   }
               }
           }
      @@ -4197,50 +4175,44 @@ namespace Example
       
      -
      +
      <?php
       require_once(__DIR__ . '/vendor/autoload.php');
       
       // Create an instance of the API class
       $api_instance = new OpenAPITools\Client\Api\A1PolicyManagementApi();
      -$policyTypeId = policyTypeId_example; // String | Select policies with a given A1 Policy Type ID.
      -$nearRtRicId = nearRtRicId_example; // String | Select policies for a given Near-RT RIC identity.
      -$serviceId = serviceId_example; // String | Select policies owned by a given service (registered or unregistered).
      -$typeName = typeName_example; // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
      +$policyId = policyId_example; // String | 
       $accept = application/json; // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
       
       try {
      -    $result = $api_instance->getAllPolicies($policyTypeId, $nearRtRicId, $serviceId, $typeName, $accept);
      +    $result = $api_instance->getPolicy($policyId, $accept);
           print_r($result);
       } catch (Exception $e) {
      -    echo 'Exception when calling A1PolicyManagementApi->getAllPolicies: ', $e->getMessage(), PHP_EOL;
      +    echo 'Exception when calling A1PolicyManagementApi->getPolicy: ', $e->getMessage(), PHP_EOL;
       }
       ?>
      -
      +
      use Data::Dumper;
       use WWW::OPenAPIClient::Configuration;
       use WWW::OPenAPIClient::A1PolicyManagementApi;
       
       # Create an instance of the API class
       my $api_instance = WWW::OPenAPIClient::A1PolicyManagementApi->new();
      -my $policyTypeId = policyTypeId_example; # String | Select policies with a given A1 Policy Type ID.
      -my $nearRtRicId = nearRtRicId_example; # String | Select policies for a given Near-RT RIC identity.
      -my $serviceId = serviceId_example; # String | Select policies owned by a given service (registered or unregistered).
      -my $typeName = typeName_example; # String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
      +my $policyId = policyId_example; # String | 
       my $accept = application/json; # String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
       
       eval {
      -    my $result = $api_instance->getAllPolicies(policyTypeId => $policyTypeId, nearRtRicId => $nearRtRicId, serviceId => $serviceId, typeName => $typeName, accept => $accept);
      +    my $result = $api_instance->getPolicy(policyId => $policyId, accept => $accept);
           print Dumper($result);
       };
       if ($@) {
      -    warn "Exception when calling A1PolicyManagementApi->getAllPolicies: $@\n";
      +    warn "Exception when calling A1PolicyManagementApi->getPolicy: $@\n";
       }
      -
      +
      from __future__ import print_statement
       import time
       import openapi_client
      @@ -4249,32 +4221,26 @@ from pprint import pprint
       
       # Create an instance of the API class
       api_instance = openapi_client.A1PolicyManagementApi()
      -policyTypeId = policyTypeId_example # String | Select policies with a given A1 Policy Type ID. (optional) (default to null)
      -nearRtRicId = nearRtRicId_example # String | Select policies for a given Near-RT RIC identity. (optional) (default to null)
      -serviceId = serviceId_example # String | Select policies owned by a given service (registered or unregistered). (optional) (default to null)
      -typeName = typeName_example # String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). (optional) (default to null)
      +policyId = policyId_example # String |  (default to null)
       accept = application/json # String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. (optional) (default to null)
       
       try:
      -    # Query for A1 Policy instances (getAllPolicies)
      -    api_response = api_instance.get_all_policies(policyTypeId=policyTypeId, nearRtRicId=nearRtRicId, serviceId=serviceId, typeName=typeName, accept=accept)
      +    # Get an A1 Policy's policy data (getPolicy)
      +    api_response = api_instance.get_policy(policyId, accept=accept)
           pprint(api_response)
       except ApiException as e:
      -    print("Exception when calling A1PolicyManagementApi->getAllPolicies: %s\n" % e)
      + print("Exception when calling A1PolicyManagementApi->getPolicy: %s\n" % e)
      -
      +
      extern crate A1PolicyManagementApi;
       
       pub fn main() {
      -    let policyTypeId = policyTypeId_example; // String
      -    let nearRtRicId = nearRtRicId_example; // String
      -    let serviceId = serviceId_example; // String
      -    let typeName = typeName_example; // String
      +    let policyId = policyId_example; // String
           let accept = application/json; // String
       
           let mut context = A1PolicyManagementApi::Context::default();
      -    let result = client.getAllPolicies(policyTypeId, nearRtRicId, serviceId, typeName, accept, &context).wait();
      +    let result = client.getPolicy(policyId, accept, &context).wait();
       
           println!("{:?}", result);
       }
      @@ -4289,28 +4255,27 @@ pub fn main() {
       
                                 

      Parameters

      - -
      Header parameters
      +
      Path parameters
      - - - - - + + + + + @@ -4318,39 +4283,17 @@ Specifies the content type that the client expects to receive in response to the
      NameDescription
      Accept
      NameDescription
      policyId* -
      +
      String -
      -Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. -
      +
      + Required +
      - - -
      Query parameters
      +
      Header parameters
      - - - - - + - -
      Name Description
      policyTypeId - - -
      -
      -
      - - String - - -
      -Select policies with a given A1 Policy Type ID. -
      -
      -
      -
      -
      nearRtRicId
      Accept -
      +
      @@ -4358,7 +4301,7 @@ Select policies with a given A1 Policy Type ID.
      -Select policies for a given Near-RT RIC identity. +Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
      @@ -4366,66 +4309,29 @@ Select policies for a given Near-RT RIC identity.
      serviceId +
      -
      -
      -
      - - String - -
      -Select policies owned by a given service (registered or unregistered). -
      -
      -
      -
      - - - - typeName - - - -
      -
      -
      - - String - - -
      -Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). -
      -
      -
      -
      - - - -

      Responses

      -

      -

      +

      +

      -

      -
      -
      +
      +
      -

      getPolicy

      -

      Get an A1 Policy's policy data (getPolicy)

      +

      getPolicyIds

      +

      Query for A1 Policy instances (getPolicyIds)

      -

      Get an A1 Policy instance's policy data using its policy ID

      +

      Returns a collection of A1 Policy Instance IDs for policies that match given search criteria. If several query parameters are defined, the policies matching all conditions are returned. +


      -
      /policies/{policyId}
      +
      /policies

      Usage and SDK Samples

      -
      +
      curl -X GET \
        -H "Accept: application/json,application/problem+json" \
      - "https://example.com/a1-policy-management/v1/policies/{policyId}"
      + "https://example.com/a1-policy-management/v1/policies?policyTypeId=policyTypeId_example&nearRtRicId=nearRtRicId_example&serviceId=serviceId_example&typeName=typeName_example"
       
      -
      +
      import org.openapitools.client.*;
       import org.openapitools.client.auth.*;
       import org.openapitools.client.model.*;
      @@ -5228,14 +5137,17 @@ public class A1PolicyManagementApiExample {
       
               // Create an instance of the API class
               A1PolicyManagementApi apiInstance = new A1PolicyManagementApi();
      -        String policyId = policyId_example; // String | 
      +        String policyTypeId = policyTypeId_example; // String | Select policies with a given A1 Policy Type ID.
      +        String nearRtRicId = nearRtRicId_example; // String | Select policies for a given Near-RT RIC identity.
      +        String serviceId = serviceId_example; // String | Select policies owned by a given service (registered or unregistered).
      +        String typeName = typeName_example; // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
               String accept = application/json; // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
       
               try {
      -            Object result = apiInstance.getPolicy(policyId, accept);
      +            array[PolicyInformation] result = apiInstance.getPolicyIds(policyTypeId, nearRtRicId, serviceId, typeName, accept);
                   System.out.println(result);
               } catch (ApiException e) {
      -            System.err.println("Exception when calling A1PolicyManagementApi#getPolicy");
      +            System.err.println("Exception when calling A1PolicyManagementApi#getPolicyIds");
                   e.printStackTrace();
               }
           }
      @@ -5243,59 +5155,71 @@ public class A1PolicyManagementApiExample {
       
      -
      +
      import 'package:openapi/api.dart';
       
       final api_instance = DefaultApi();
       
      -final String policyId = new String(); // String | 
      +final String policyTypeId = new String(); // String | Select policies with a given A1 Policy Type ID.
      +final String nearRtRicId = new String(); // String | Select policies for a given Near-RT RIC identity.
      +final String serviceId = new String(); // String | Select policies owned by a given service (registered or unregistered).
      +final String typeName = new String(); // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
       final String accept = new String(); // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
       
       try {
      -    final result = await api_instance.getPolicy(policyId, accept);
      +    final result = await api_instance.getPolicyIds(policyTypeId, nearRtRicId, serviceId, typeName, accept);
           print(result);
       } catch (e) {
      -    print('Exception when calling DefaultApi->getPolicy: $e\n');
      +    print('Exception when calling DefaultApi->getPolicyIds: $e\n');
       }
       
       
      -
      +
      import org.openapitools.client.api.A1PolicyManagementApi;
       
       public class A1PolicyManagementApiExample {
           public static void main(String[] args) {
               A1PolicyManagementApi apiInstance = new A1PolicyManagementApi();
      -        String policyId = policyId_example; // String | 
      +        String policyTypeId = policyTypeId_example; // String | Select policies with a given A1 Policy Type ID.
      +        String nearRtRicId = nearRtRicId_example; // String | Select policies for a given Near-RT RIC identity.
      +        String serviceId = serviceId_example; // String | Select policies owned by a given service (registered or unregistered).
      +        String typeName = typeName_example; // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
               String accept = application/json; // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
       
               try {
      -            Object result = apiInstance.getPolicy(policyId, accept);
      +            array[PolicyInformation] result = apiInstance.getPolicyIds(policyTypeId, nearRtRicId, serviceId, typeName, accept);
                   System.out.println(result);
               } catch (ApiException e) {
      -            System.err.println("Exception when calling A1PolicyManagementApi#getPolicy");
      +            System.err.println("Exception when calling A1PolicyManagementApi#getPolicyIds");
                   e.printStackTrace();
               }
           }
       }
      -
      +
      
       
       // Create an instance of the API class
       A1PolicyManagementApi *apiInstance = [[A1PolicyManagementApi alloc] init];
      -String *policyId = policyId_example; //  (default to null)
      +String *policyTypeId = policyTypeId_example; // Select policies with a given A1 Policy Type ID. (optional) (default to null)
      +String *nearRtRicId = nearRtRicId_example; // Select policies for a given Near-RT RIC identity. (optional) (default to null)
      +String *serviceId = serviceId_example; // Select policies owned by a given service (registered or unregistered). (optional) (default to null)
      +String *typeName = typeName_example; // Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). (optional) (default to null)
       String *accept = application/json; // Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. (optional) (default to null)
       
      -// Get an A1 Policy's policy data (getPolicy)
      -[apiInstance getPolicyWith:policyId
      +// Query for A1 Policy instances (getPolicyIds)
      +[apiInstance getPolicyIdsWith:policyTypeId
      +    nearRtRicId:nearRtRicId
      +    serviceId:serviceId
      +    typeName:typeName
           accept:accept
      -              completionHandler: ^(Object output, NSError* error) {
      +              completionHandler: ^(array[PolicyInformation] output, NSError* error) {
           if (output) {
               NSLog(@"%@", output);
           }
      @@ -5306,13 +5230,16 @@ String *accept = application/json; // Specifies the content type that the client
       
      -
      +
      var OnapCcsdkA1PolicyManagementApi = require('onap_ccsdk_a1_policy_management_api');
       
       // Create an instance of the API class
       var api = new OnapCcsdkA1PolicyManagementApi.A1PolicyManagementApi()
      -var policyId = policyId_example; // {String} 
       var opts = {
      +  'policyTypeId': policyTypeId_example, // {String} Select policies with a given A1 Policy Type ID.
      +  'nearRtRicId': nearRtRicId_example, // {String} Select policies for a given Near-RT RIC identity.
      +  'serviceId': serviceId_example, // {String} Select policies owned by a given service (registered or unregistered).
      +  'typeName': typeName_example, // {String} Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
         'accept': application/json // {String} Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
       };
       
      @@ -5323,14 +5250,14 @@ var callback = function(error, data, response) {
           console.log('API called successfully. Returned data: ' + data);
         }
       };
      -api.getPolicy(policyId, opts, callback);
      +api.getPolicyIds(opts, callback);
       
      - -
      +
      using System;
       using System.Diagnostics;
       using Org.OpenAPITools.Api;
      @@ -5339,22 +5266,25 @@ using Org.OpenAPITools.Model;
       
       namespace Example
       {
      -    public class getPolicyExample
      +    public class getPolicyIdsExample
           {
               public void main()
               {
       
                   // Create an instance of the API class
                   var apiInstance = new A1PolicyManagementApi();
      -            var policyId = policyId_example;  // String |  (default to null)
      +            var policyTypeId = policyTypeId_example;  // String | Select policies with a given A1 Policy Type ID. (optional)  (default to null)
      +            var nearRtRicId = nearRtRicId_example;  // String | Select policies for a given Near-RT RIC identity. (optional)  (default to null)
      +            var serviceId = serviceId_example;  // String | Select policies owned by a given service (registered or unregistered). (optional)  (default to null)
      +            var typeName = typeName_example;  // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). (optional)  (default to null)
                   var accept = application/json;  // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. (optional)  (default to null)
       
                   try {
      -                // Get an A1 Policy's policy data (getPolicy)
      -                Object result = apiInstance.getPolicy(policyId, accept);
      +                // Query for A1 Policy instances (getPolicyIds)
      +                array[PolicyInformation] result = apiInstance.getPolicyIds(policyTypeId, nearRtRicId, serviceId, typeName, accept);
                       Debug.WriteLine(result);
                   } catch (Exception e) {
      -                Debug.Print("Exception when calling A1PolicyManagementApi.getPolicy: " + e.Message );
      +                Debug.Print("Exception when calling A1PolicyManagementApi.getPolicyIds: " + e.Message );
                   }
               }
           }
      @@ -5362,44 +5292,50 @@ namespace Example
       
      -
      +
      <?php
       require_once(__DIR__ . '/vendor/autoload.php');
       
       // Create an instance of the API class
       $api_instance = new OpenAPITools\Client\Api\A1PolicyManagementApi();
      -$policyId = policyId_example; // String | 
      +$policyTypeId = policyTypeId_example; // String | Select policies with a given A1 Policy Type ID.
      +$nearRtRicId = nearRtRicId_example; // String | Select policies for a given Near-RT RIC identity.
      +$serviceId = serviceId_example; // String | Select policies owned by a given service (registered or unregistered).
      +$typeName = typeName_example; // String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
       $accept = application/json; // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
       
       try {
      -    $result = $api_instance->getPolicy($policyId, $accept);
      +    $result = $api_instance->getPolicyIds($policyTypeId, $nearRtRicId, $serviceId, $typeName, $accept);
           print_r($result);
       } catch (Exception $e) {
      -    echo 'Exception when calling A1PolicyManagementApi->getPolicy: ', $e->getMessage(), PHP_EOL;
      +    echo 'Exception when calling A1PolicyManagementApi->getPolicyIds: ', $e->getMessage(), PHP_EOL;
       }
       ?>
      -
      +
      use Data::Dumper;
       use WWW::OPenAPIClient::Configuration;
       use WWW::OPenAPIClient::A1PolicyManagementApi;
       
       # Create an instance of the API class
       my $api_instance = WWW::OPenAPIClient::A1PolicyManagementApi->new();
      -my $policyId = policyId_example; # String | 
      +my $policyTypeId = policyTypeId_example; # String | Select policies with a given A1 Policy Type ID.
      +my $nearRtRicId = nearRtRicId_example; # String | Select policies for a given Near-RT RIC identity.
      +my $serviceId = serviceId_example; # String | Select policies owned by a given service (registered or unregistered).
      +my $typeName = typeName_example; # String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').
       my $accept = application/json; # String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.
       
       eval {
      -    my $result = $api_instance->getPolicy(policyId => $policyId, accept => $accept);
      +    my $result = $api_instance->getPolicyIds(policyTypeId => $policyTypeId, nearRtRicId => $nearRtRicId, serviceId => $serviceId, typeName => $typeName, accept => $accept);
           print Dumper($result);
       };
       if ($@) {
      -    warn "Exception when calling A1PolicyManagementApi->getPolicy: $@\n";
      +    warn "Exception when calling A1PolicyManagementApi->getPolicyIds: $@\n";
       }
      -
      +
      from __future__ import print_statement
       import time
       import openapi_client
      @@ -5408,26 +5344,32 @@ from pprint import pprint
       
       # Create an instance of the API class
       api_instance = openapi_client.A1PolicyManagementApi()
      -policyId = policyId_example # String |  (default to null)
      +policyTypeId = policyTypeId_example # String | Select policies with a given A1 Policy Type ID. (optional) (default to null)
      +nearRtRicId = nearRtRicId_example # String | Select policies for a given Near-RT RIC identity. (optional) (default to null)
      +serviceId = serviceId_example # String | Select policies owned by a given service (registered or unregistered). (optional) (default to null)
      +typeName = typeName_example # String | Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). (optional) (default to null)
       accept = application/json # String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. (optional) (default to null)
       
       try:
      -    # Get an A1 Policy's policy data (getPolicy)
      -    api_response = api_instance.get_policy(policyId, accept=accept)
      +    # Query for A1 Policy instances (getPolicyIds)
      +    api_response = api_instance.get_policy_ids(policyTypeId=policyTypeId, nearRtRicId=nearRtRicId, serviceId=serviceId, typeName=typeName, accept=accept)
           pprint(api_response)
       except ApiException as e:
      -    print("Exception when calling A1PolicyManagementApi->getPolicy: %s\n" % e)
      + print("Exception when calling A1PolicyManagementApi->getPolicyIds: %s\n" % e)
      -
      +
      extern crate A1PolicyManagementApi;
       
       pub fn main() {
      -    let policyId = policyId_example; // String
      +    let policyTypeId = policyTypeId_example; // String
      +    let nearRtRicId = nearRtRicId_example; // String
      +    let serviceId = serviceId_example; // String
      +    let typeName = typeName_example; // String
           let accept = application/json; // String
       
           let mut context = A1PolicyManagementApi::Context::default();
      -    let result = client.getPolicy(policyId, accept, &context).wait();
      +    let result = client.getPolicyIds(policyTypeId, nearRtRicId, serviceId, typeName, accept, &context).wait();
       
           println!("{:?}", result);
       }
      @@ -5435,52 +5377,95 @@ pub fn main() {
                                   
      -

      Scopes

      - - -
      +

      Scopes

      + + +
      + +

      Parameters

      + + +
      Header parameters
      + + + + + + + + + +
      NameDescription
      Accept + + +
      +
      +
      + + String + + +
      +Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. +
      +
      +
      +
      +
      + + + +
      Query parameters
      + + + + + + + + + +
      NameDescription
      policyTypeId + -

      Parameters

      +
      +
      +
      + + String + -
      Path parameters
      - - - - - - +
      +Select policies with a given A1 Policy Type ID. +
      + + + + + + + -
      NameDescription
      policyId*
      nearRtRicId -
      +
      String +
      +Select policies for a given Near-RT RIC identity. +
      -
      - Required -
      - -
      Header parameters
      - - - - - - + -
      NameDescription
      Accept
      serviceId -
      +
      @@ -5488,7 +5473,7 @@ pub fn main() {
      -Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. +Select policies owned by a given service (registered or unregistered).
      @@ -5496,29 +5481,46 @@ Specifies the content type that the client expects to receive in response to the
      +
      typeName + +
      +
      +
      + + String + +
      +Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). +
      +
      +
      +
      +

      Responses

      -

      -

      +

      +

      -
      @@ -9625,11 +9625,11 @@ Select types that are compatible with the given version. This parameter is only

      -
      -
      +
      +
      -

      putPolicy

      -

      Update an A1 Policy's policy data (putPolicy)

      +

      updatePolicy

      +

      Update an A1 Policy's policy data (updatePolicy)

      @@ -9642,23 +9642,23 @@ Select types that are compatible with the given version. This parameter is only

      Usage and SDK Samples

      -
      +
      curl -X PUT \
        -H "Accept: application/json,application/problem+json" \
        -H "Content-Type: application/json" \
      @@ -9666,7 +9666,7 @@ Select types that are compatible with the given version. This parameter is only
        -d ''
       
      -
      +
      import org.openapitools.client.*;
       import org.openapitools.client.auth.*;
       import org.openapitools.client.model.*;
      @@ -9684,10 +9684,10 @@ public class A1PolicyManagementApiExample {
               Object body = Object; // Object | 
       
               try {
      -            Object result = apiInstance.putPolicy(policyId, body);
      +            Object result = apiInstance.updatePolicy(policyId, body);
                   System.out.println(result);
               } catch (ApiException e) {
      -            System.err.println("Exception when calling A1PolicyManagementApi#putPolicy");
      +            System.err.println("Exception when calling A1PolicyManagementApi#updatePolicy");
                   e.printStackTrace();
               }
           }
      @@ -9695,7 +9695,7 @@ public class A1PolicyManagementApiExample {
       
      -
      +
      import 'package:openapi/api.dart';
       
       final api_instance = DefaultApi();
      @@ -9704,16 +9704,16 @@ final String policyId = new String(); // String |
       final Object body = new Object(); // Object | 
       
       try {
      -    final result = await api_instance.putPolicy(policyId, body);
      +    final result = await api_instance.updatePolicy(policyId, body);
           print(result);
       } catch (e) {
      -    print('Exception when calling DefaultApi->putPolicy: $e\n');
      +    print('Exception when calling DefaultApi->updatePolicy: $e\n');
       }
       
       
      -
      +
      import org.openapitools.client.api.A1PolicyManagementApi;
       
       public class A1PolicyManagementApiExample {
      @@ -9723,20 +9723,20 @@ public class A1PolicyManagementApiExample {
               Object body = Object; // Object | 
       
               try {
      -            Object result = apiInstance.putPolicy(policyId, body);
      +            Object result = apiInstance.updatePolicy(policyId, body);
                   System.out.println(result);
               } catch (ApiException e) {
      -            System.err.println("Exception when calling A1PolicyManagementApi#putPolicy");
      +            System.err.println("Exception when calling A1PolicyManagementApi#updatePolicy");
                   e.printStackTrace();
               }
           }
       }
      -
      +
      
       
       // Create an instance of the API class
      @@ -9744,8 +9744,8 @@ A1PolicyManagementApi *apiInstance = [[A1PolicyManagementApi alloc] init];
       String *policyId = policyId_example; //  (default to null)
       Object *body = Object; // 
       
      -// Update an A1 Policy's policy data (putPolicy)
      -[apiInstance putPolicyWith:policyId
      +// Update an A1 Policy's policy data (updatePolicy)
      +[apiInstance updatePolicyWith:policyId
           body:body
                     completionHandler: ^(Object output, NSError* error) {
           if (output) {
      @@ -9758,7 +9758,7 @@ Object *body = Object; //
       
      -
      +
      var OnapCcsdkA1PolicyManagementApi = require('onap_ccsdk_a1_policy_management_api');
       
       // Create an instance of the API class
      @@ -9773,14 +9773,14 @@ var callback = function(error, data, response) {
           console.log('API called successfully. Returned data: ' + data);
         }
       };
      -api.putPolicy(policyId, body, callback);
      +api.updatePolicy(policyId, body, callback);
       
      - -
      +
      using System;
       using System.Diagnostics;
       using Org.OpenAPITools.Api;
      @@ -9789,7 +9789,7 @@ using Org.OpenAPITools.Model;
       
       namespace Example
       {
      -    public class putPolicyExample
      +    public class updatePolicyExample
           {
               public void main()
               {
      @@ -9800,11 +9800,11 @@ namespace Example
                   var body = Object;  // Object | 
       
                   try {
      -                // Update an A1 Policy's policy data (putPolicy)
      -                Object result = apiInstance.putPolicy(policyId, body);
      +                // Update an A1 Policy's policy data (updatePolicy)
      +                Object result = apiInstance.updatePolicy(policyId, body);
                       Debug.WriteLine(result);
                   } catch (Exception e) {
      -                Debug.Print("Exception when calling A1PolicyManagementApi.putPolicy: " + e.Message );
      +                Debug.Print("Exception when calling A1PolicyManagementApi.updatePolicy: " + e.Message );
                   }
               }
           }
      @@ -9812,7 +9812,7 @@ namespace Example
       
      -
      +
      <?php
       require_once(__DIR__ . '/vendor/autoload.php');
       
      @@ -9822,15 +9822,15 @@ $policyId = policyId_example; // String |
       $body = Object; // Object | 
       
       try {
      -    $result = $api_instance->putPolicy($policyId, $body);
      +    $result = $api_instance->updatePolicy($policyId, $body);
           print_r($result);
       } catch (Exception $e) {
      -    echo 'Exception when calling A1PolicyManagementApi->putPolicy: ', $e->getMessage(), PHP_EOL;
      +    echo 'Exception when calling A1PolicyManagementApi->updatePolicy: ', $e->getMessage(), PHP_EOL;
       }
       ?>
      -
      +
      use Data::Dumper;
       use WWW::OPenAPIClient::Configuration;
       use WWW::OPenAPIClient::A1PolicyManagementApi;
      @@ -9841,15 +9841,15 @@ my $policyId = policyId_example; # String |
       my $body = WWW::OPenAPIClient::Object::Object->new(); # Object | 
       
       eval {
      -    my $result = $api_instance->putPolicy(policyId => $policyId, body => $body);
      +    my $result = $api_instance->updatePolicy(policyId => $policyId, body => $body);
           print Dumper($result);
       };
       if ($@) {
      -    warn "Exception when calling A1PolicyManagementApi->putPolicy: $@\n";
      +    warn "Exception when calling A1PolicyManagementApi->updatePolicy: $@\n";
       }
      -
      +
      from __future__ import print_statement
       import time
       import openapi_client
      @@ -9862,14 +9862,14 @@ policyId = policyId_example # String |  (default to null)
       body = Object # Object | 
       
       try:
      -    # Update an A1 Policy's policy data (putPolicy)
      -    api_response = api_instance.put_policy(policyId, body)
      +    # Update an A1 Policy's policy data (updatePolicy)
      +    api_response = api_instance.update_policy(policyId, body)
           pprint(api_response)
       except ApiException as e:
      -    print("Exception when calling A1PolicyManagementApi->putPolicy: %s\n" % e)
      + print("Exception when calling A1PolicyManagementApi->updatePolicy: %s\n" % e)
      -
      +
      extern crate A1PolicyManagementApi;
       
       pub fn main() {
      @@ -9877,7 +9877,7 @@ pub fn main() {
           let body = Object; // Object
       
           let mut context = A1PolicyManagementApi::Context::default();
      -    let result = client.putPolicy(policyId, body, &context).wait();
      +    let result = client.updatePolicy(policyId, body, &context).wait();
       
           println!("{:?}", result);
       }
      @@ -9902,7 +9902,7 @@ pub fn main() {
       
       
       
      -    
      +
      @@ -9964,12 +9964,12 @@ $(document).ready(function() { } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_putPolicy_body'); + var result = $('#d2e199_updatePolicy_body'); result.empty(); result.append(view.render()); }); -
      +
      @@ -9978,23 +9978,23 @@ $(document).ready(function() {

      Responses

      -

      -

      +

      +

      -
      @@ -11466,7 +11466,7 @@ pub fn main() {

      -

      Replace the current Application Configuration with a new configuration. The new configuration, if accepted, will take effect after a short delay. The new configuration must comply with the Application Configuration schema, which can be found from the the Application Documentation (Developer Guide) +

      Replace the current Application Configuration with a new configuration. The new configuration, if accepted, will take effect after a short delay. The new configuration must comply with the Application Configuration schema, which can be found from the the Application Documentation (Developer Guide)


      @@ -14335,9 +14335,7 @@ The identity of the registered service
      curl -X PUT \
        -H "Accept: application/json,application/problem+json" \
      - -H "Content-Type: application/json" \
      - "https://example.com/a1-policy-management/v1/services/{serviceId}/keepalive" \
      - -d ''
      + "https://example.com/a1-policy-management/v1/services/{serviceId}/keepalive"
       
      @@ -14356,10 +14354,9 @@ public class ServiceRegistryAndSupervisionApiExample { ServiceRegistryAndSupervisionApi apiInstance = new ServiceRegistryAndSupervisionApi(); String serviceId = serviceId_example; // String | String accept = application/json; // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. - String body = body_example; // String | try { - Object result = apiInstance.keepAliveService(serviceId, accept, body); + Object result = apiInstance.keepAliveService(serviceId, accept); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ServiceRegistryAndSupervisionApi#keepAliveService"); @@ -14377,10 +14374,9 @@ final api_instance = DefaultApi(); final String serviceId = new String(); // String | final String accept = new String(); // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. -final String body = new String(); // String | try { - final result = await api_instance.keepAliveService(serviceId, accept, body); + final result = await api_instance.keepAliveService(serviceId, accept); print(result); } catch (e) { print('Exception when calling DefaultApi->keepAliveService: $e\n'); @@ -14397,10 +14393,9 @@ public class ServiceRegistryAndSupervisionApiExample { ServiceRegistryAndSupervisionApi apiInstance = new ServiceRegistryAndSupervisionApi(); String serviceId = serviceId_example; // String | String accept = application/json; // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. - String body = body_example; // String | try { - Object result = apiInstance.keepAliveService(serviceId, accept, body); + Object result = apiInstance.keepAliveService(serviceId, accept); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ServiceRegistryAndSupervisionApi#keepAliveService"); @@ -14420,12 +14415,10 @@ public class ServiceRegistryAndSupervisionApiExample { ServiceRegistryAndSupervisionApi *apiInstance = [[ServiceRegistryAndSupervisionApi alloc] init]; String *serviceId = serviceId_example; // (default to null) String *accept = application/json; // Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. (optional) (default to null) -String *body = body_example; // (optional) // Heartbeat message from a service (keepAliveService) [apiInstance keepAliveServiceWith:serviceId accept:accept - body:body completionHandler: ^(Object output, NSError* error) { if (output) { NSLog(@"%@", output); @@ -14444,8 +14437,7 @@ String *body = body_example; // (optional) var api = new OnapCcsdkA1PolicyManagementApi.ServiceRegistryAndSupervisionApi() var serviceId = serviceId_example; // {String} var opts = { - 'accept': application/json, // {String} Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. - 'body': body_example // {String} + 'accept': application/json // {String} Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. }; var callback = function(error, data, response) { @@ -14480,11 +14472,10 @@ namespace Example var apiInstance = new ServiceRegistryAndSupervisionApi(); var serviceId = serviceId_example; // String | (default to null) var accept = application/json; // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. (optional) (default to null) - var body = body_example; // String | (optional) try { // Heartbeat message from a service (keepAliveService) - Object result = apiInstance.keepAliveService(serviceId, accept, body); + Object result = apiInstance.keepAliveService(serviceId, accept); Debug.WriteLine(result); } catch (Exception e) { Debug.Print("Exception when calling ServiceRegistryAndSupervisionApi.keepAliveService: " + e.Message ); @@ -14503,10 +14494,9 @@ require_once(__DIR__ . '/vendor/autoload.php'); $api_instance = new OpenAPITools\Client\Api\ServiceRegistryAndSupervisionApi(); $serviceId = serviceId_example; // String | $accept = application/json; // String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. -$body = body_example; // String | try { - $result = $api_instance->keepAliveService($serviceId, $accept, $body); + $result = $api_instance->keepAliveService($serviceId, $accept); print_r($result); } catch (Exception $e) { echo 'Exception when calling ServiceRegistryAndSupervisionApi->keepAliveService: ', $e->getMessage(), PHP_EOL; @@ -14523,10 +14513,9 @@ use WWW::OPenAPIClient::ServiceRegistryAndSupervisionApi; my $api_instance = WWW::OPenAPIClient::ServiceRegistryAndSupervisionApi->new(); my $serviceId = serviceId_example; # String | my $accept = application/json; # String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. -my $body = WWW::OPenAPIClient::Object::String->new(); # String | eval { - my $result = $api_instance->keepAliveService(serviceId => $serviceId, accept => $accept, body => $body); + my $result = $api_instance->keepAliveService(serviceId => $serviceId, accept => $accept); print Dumper($result); }; if ($@) { @@ -14545,11 +14534,10 @@ from pprint import pprint api_instance = openapi_client.ServiceRegistryAndSupervisionApi() serviceId = serviceId_example # String | (default to null) accept = application/json # String | Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed. (optional) (default to null) -body = body_example # String | (optional) try: # Heartbeat message from a service (keepAliveService) - api_response = api_instance.keep_alive_service(serviceId, accept=accept, body=body) + api_response = api_instance.keep_alive_service(serviceId, accept=accept) pprint(api_response) except ApiException as e: print("Exception when calling ServiceRegistryAndSupervisionApi->keepAliveService: %s\n" % e) @@ -14561,10 +14549,9 @@ except ApiException as e: pub fn main() { let serviceId = serviceId_example; // String let accept = application/json; // String - let body = body_example; // String let mut context = ServiceRegistryAndSupervisionApi::Context::default(); - let result = client.keepAliveService(serviceId, accept, body, &context).wait(); + let result = client.keepAliveService(serviceId, accept, &context).wait(); println!("{:?}", result); } @@ -14635,54 +14622,6 @@ Specifies the content type that the client expects to receive in response to the -
      Body parameters
      - - - - - - - - - -
      NameDescription
      body -

      - -
      -
      diff --git a/docs/offeredapis/swagger/custom/a1pms-api-custom-v3.json b/docs/offeredapis/swagger/custom/a1pms-api-custom-v3.json index ec085700..9d378bd7 100644 --- a/docs/offeredapis/swagger/custom/a1pms-api-custom-v3.json +++ b/docs/offeredapis/swagger/custom/a1pms-api-custom-v3.json @@ -5,7 +5,7 @@ "email" : "discuss-list@onap.com", "url" : "https://www.onap.org/" }, - "description" : "

      General

      The ONAP CCSDK A1 Policy Management Service provides a REST API for managing A1 policies.
      This document describes the latest API set to perform tasks for:

      • A1 Policy creation, modification and deletion.
      • Monitoring and maintaining consistency of the SMO view of A1 Policies and the Near-RT RICs
      • Maintaining a view of each Near-RT RIC's supported A1 Policy Types
      • Supervision of registered services (rApps). When a registered service is unavailable, its policies are removed.

      APIs provided or defined by the service

      Note: parts of this API are strongly based on extracts of the O-RAN Alliance R1 Interface specification for A1 Policy Management, and those parts should be considered '� O-RAN ALLIANCE - All rights reserved.'

      A1 Policy Management

      This is the latest API for managing A1 Policies. This API is partially compliant with O-RAN Alliance R1 Interface specifications for A1 Policy Management:

      • A1 Policy retrieval, creation, modification and deletion.
      • Retrieval of supported A1 Policy Types for a Near-RT RIC
      • Retrieval of status for existing A1 policies

      Management of configuration

      API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.

      Service Callbacks

      These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.

      NearRT-RIC Repository (Older version)

      This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted towards one Near-RT RIC.

      Health Check

      API used for supervision of the A1 Policy Management Service.

      Service Registry and Supervision

      API used for registering services/clients/rApps. Each A1 Policy can be tagged with an owner. If the owner service is registered, then the service can be optionally monitored by a heart-beat supervision mechanism, and if the registered service becomes unavailable, then it is removed and all its A1 Policies are deleted. Note that services do not need to be registered to create A1 Policies, but unregistered services are not supervised. This is a feature that is optional to use.

      ", + "description" : "

      General

      The ONAP CCSDK A1 Policy Management Service provides a REST API for managing A1 policies.
      This document describes the latest API set to perform tasks for:

      • A1 Policy creation, modification and deletion.
      • Monitoring and maintaining consistency of the SMO view of A1 Policies and the Near-RT RICs
      • Maintaining a view of each Near-RT RIC's supported A1 Policy Types
      • Supervision of registered services (rApps). When a registered service is unavailable, its policies are removed.

      APIs provided or defined by the service

      Note: parts of this API are strongly based on extracts of the O-RAN Alliance R1 Interface specification for A1 Policy Management, and those parts should be considered '© O-RAN ALLIANCE - All rights reserved.'

      A1 Policy Management

      This is the latest API for managing A1 Policies. This API is partially compliant with O-RAN Alliance R1 Interface specifications for A1 Policy Management:

      • A1 Policy retrieval, creation, modification and deletion.
      • Retrieval of supported A1 Policy Types for a Near-RT RIC
      • Retrieval of status for existing A1 policies

      Management of configuration

      API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.

      Service Callbacks

      These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.

      NearRT-RIC Repository (Older version)

      This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted towards one Near-RT RIC.

      Health Check

      API used for supervision of the A1 Policy Management Service.

      Service Registry and Supervision

      API used for registering services/clients/rApps. Each A1 Policy can be tagged with an owner. If the owner service is registered, then the service can be optionally monitored by a heart-beat supervision mechanism, and if the registered service becomes unavailable, then it is removed and all its A1 Policies are deleted. Note that services do not need to be registered to create A1 Policies, but unregistered services are not supervised. This is a feature that is optional to use.

      ", "license" : { "name" : "Copyright (C) 2024 - 2025 OpenInfra Foundation Europe. Licensed under the Apache 2 License.", "url" : "http://www.apache.org/licenses/LICENSE-2.0" @@ -93,19 +93,15 @@ "schema" : { "nullable" : false, "type" : "string" - }, - "style" : "simple" + } }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -154,15 +150,12 @@ "style" : "form" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -231,15 +224,12 @@ "style" : "form" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -370,15 +360,12 @@ "style" : "simple" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -506,15 +493,12 @@ "style" : "simple" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "204" : { @@ -653,15 +637,12 @@ "style" : "simple" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -775,16 +756,14 @@ }, "put" : { "description" : "Update an existing A1 Policy instance's policy data using its policy ID.", - "operationId" : "putPolicy", + "operationId" : "updatePolicy", "parameters" : [ { - "explode" : false, "in" : "path", "name" : "policyId", "required" : true, "schema" : { "type" : "string" - }, - "style" : "simple" + } } ], "requestBody" : { "content" : { @@ -948,7 +927,7 @@ "description" : "Service Unavailable" } }, - "summary" : "Update an A1 Policy's policy data (putPolicy)", + "summary" : "Update an A1 Policy's policy data (updatePolicy)", "tags" : [ "A1 Policy Management" ] } }, @@ -967,15 +946,12 @@ "style" : "simple" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -1086,7 +1062,7 @@ "/policies" : { "get" : { "description" : "Returns a collection of A1 Policy Instance IDs for policies that match given search criteria. If several query parameters are defined, the policies matching all conditions are returned.\n", - "operationId" : "getAllPolicies", + "operationId" : "getPolicyIds", "parameters" : [ { "description" : "Select policies with a given A1 Policy Type ID.", "explode" : true, @@ -1129,15 +1105,12 @@ "style" : "form" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -1244,7 +1217,7 @@ "description" : "Service Unavailable" } }, - "summary" : "Query for A1 Policy instances (getAllPolicies)", + "summary" : "Query for A1 Policy instances (getPolicyIds)", "tags" : [ "A1 Policy Management" ] }, "post" : { @@ -1273,21 +1246,17 @@ "headers" : { "Location" : { "description" : "Contains the URI of the newly created A1 Policy Instances. This URI includes the A1 Policy Instance ID for the newly created policy instance.\n", - "explode" : false, "required" : true, "schema" : { "type" : "string" - }, - "style" : "simple" + } }, "Content-Type" : { "description" : "Media Type of the response", - "explode" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } } }, @@ -1471,7 +1440,7 @@ "tags" : [ "Configuration" ] }, "put" : { - "description" : "Replace the current Application Configuration with a new configuration. The new configuration, if accepted, will take effect after a short delay. The new configuration must comply with the Application Configuration schema, which can be found from the the Application Documentation (Developer Guide) \n", + "description" : "Replace the current Application Configuration with a new configuration. The new configuration, if accepted, will take effect after a short delay. The new configuration must comply with the Application Configuration schema, which can be found from the the Application Documentation (Developer Guide)\n", "operationId" : "putConfiguration", "requestBody" : { "content" : { @@ -1524,26 +1493,13 @@ "style" : "simple" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "string" - } - } - }, - "required" : false - }, "responses" : { "200" : { "content" : { @@ -1586,15 +1542,12 @@ "style" : "form" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -1734,15 +1687,12 @@ "style" : "simple" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "204" : { @@ -1773,22 +1723,6 @@ }, "components" : { "examples" : { - "ServiceStatusList" : { - "description" : "List of service information", - "value" : { - "serviceList" : [ { - "callbackUrl" : "http://callback.url", - "serviceId" : "serviceId1", - "keepAliveIntervalSeconds" : 0, - "timeSinceLastActivitySeconds" : 6 - }, { - "callbackUrl" : "http://callback.url", - "serviceId" : "serviceId2", - "keepAliveIntervalSeconds" : 500, - "timeSinceLastActivitySeconds" : 401 - } ] - } - }, "StatusInfo" : { "value" : { "status" : "success" @@ -1817,48 +1751,6 @@ } ] } }, - "PolicyObject" : { - "value" : { - "scope" : { - "ueId" : { - "guRanUeId" : { - "globalGnbId" : { - "plmnId" : { - "mcc" : "123", - "mnc" : "45" - }, - "gnbId" : { - "gnbIdLength" : 24, - "gnbIdValue" : 12345678 - } - }, - "RanUeId" : "a31c510b20e64a74" - } - }, - "groupId" : { - "spId" : 123 - }, - "qosId" : { - "5qI" : 1 - }, - "cellId" : { - "plmnId" : { - "mcc" : "123", - "mnc" : "45" - }, - "cId" : { - "ncI" : 123 - } - } - }, - "qosObjectives" : { - "gfbr" : 100, - "mfbr" : 200, - "priorityLevel" : 3, - "pdb" : 50 - } - } - }, "PolicyTypeInformation" : { "value" : [ { "policyTypeId" : "STD_QOS2_0.1.0", @@ -1908,9 +1800,77 @@ } } } + }, + "PolicyObject" : { + "value" : { + "scope" : { + "ueId" : { + "guRanUeId" : { + "globalGnbId" : { + "plmnId" : { + "mcc" : "123", + "mnc" : "45" + }, + "gnbId" : { + "gnbIdLength" : 24, + "gnbIdValue" : 12345678 + } + }, + "RanUeId" : "a31c510b20e64a74" + } + }, + "groupId" : { + "spId" : 123 + }, + "qosId" : { + "5qI" : 1 + }, + "cellId" : { + "plmnId" : { + "mcc" : "123", + "mnc" : "45" + }, + "cId" : { + "ncI" : 123 + } + } + }, + "qosObjectives" : { + "gfbr" : 100, + "mfbr" : 200, + "priorityLevel" : 3, + "pdb" : 50 + } + } + }, + "ServiceStatusList" : { + "description" : "List of service information", + "value" : { + "serviceList" : [ { + "callbackUrl" : "http://callback.url", + "serviceId" : "serviceId1", + "keepAliveIntervalSeconds" : 0, + "timeSinceLastActivitySeconds" : 6 + }, { + "callbackUrl" : "http://callback.url", + "serviceId" : "serviceId2", + "keepAliveIntervalSeconds" : 500, + "timeSinceLastActivitySeconds" : 401 + } ] + } } }, "responses" : { + "404" : { + "content" : { + "application/problem+json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemDetails" + } + } + }, + "description" : "Not Found" + }, "400" : { "content" : { "application/problem+json" : { @@ -1941,7 +1901,7 @@ }, "description" : "Forbidden" }, - "404" : { + "406" : { "content" : { "application/problem+json" : { "schema" : { @@ -1949,9 +1909,9 @@ } } }, - "description" : "Not Found" + "description" : "Not Acceptable" }, - "405" : { + "429" : { "content" : { "application/problem+json" : { "schema" : { @@ -1959,9 +1919,9 @@ } } }, - "description" : "Method Not Allowed" + "description" : "Too Many Requests" }, - "406" : { + "500" : { "content" : { "application/problem+json" : { "schema" : { @@ -1969,9 +1929,9 @@ } } }, - "description" : "Not Acceptable" + "description" : "Internal Server Error" }, - "409" : { + "502" : { "content" : { "application/problem+json" : { "schema" : { @@ -1979,9 +1939,9 @@ } } }, - "description" : "Conflict" + "description" : "Bad Gateway" }, - "411" : { + "503" : { "content" : { "application/problem+json" : { "schema" : { @@ -1989,9 +1949,9 @@ } } }, - "description" : "Length Required" + "description" : "Service Unavailable" }, - "413" : { + "411" : { "content" : { "application/problem+json" : { "schema" : { @@ -1999,9 +1959,9 @@ } } }, - "description" : "Payload Too Large" + "description" : "Length Required" }, - "415" : { + "413" : { "content" : { "application/problem+json" : { "schema" : { @@ -2009,9 +1969,9 @@ } } }, - "description" : "Unsupported Media Type" + "description" : "Payload Too Large" }, - "429" : { + "415" : { "content" : { "application/problem+json" : { "schema" : { @@ -2019,19 +1979,24 @@ } } }, - "description" : "Too Many Requests" + "description" : "Unsupported Media Type" }, - "500" : { + "Locked" : { "content" : { "application/problem+json" : { + "example" : { + "status" : 423, + "title" : "Locked", + "detail" : "State is Locked in the provided request." + }, "schema" : { - "$ref" : "#/components/schemas/ProblemDetails" + "$ref" : "#/components/schemas/ErrorInformation" } } }, - "description" : "Internal Server Error" + "description" : "Locked - HTTP Status code which can be used when the state is Locked" }, - "502" : { + "405" : { "content" : { "application/problem+json" : { "schema" : { @@ -2039,9 +2004,9 @@ } } }, - "description" : "Bad Gateway" + "description" : "Method Not Allowed" }, - "503" : { + "409" : { "content" : { "application/problem+json" : { "schema" : { @@ -2049,106 +2014,111 @@ } } }, - "description" : "Service Unavailable" - }, - "Locked" : { - "content" : { - "application/problem+json" : { - "example" : { - "status" : 423, - "title" : "Locked", - "detail" : "State is Locked in the provided request." - }, - "schema" : { - "$ref" : "#/components/schemas/ErrorInformation" - } - } - }, - "description" : "Locked - HTTP Status code which can be used when the state is Locked" + "description" : "Conflict" } }, "schemas" : { - "PolicyTypeInformation" : { - "description" : "A data tuple to indicate that an identified A1 Policy Type is supported at an identified Near-RT RIC.", - "example" : { - "policyTypeId" : "STD_QOS2_0.1.0", - "nearRtRicId" : "ric_g3_2" - }, + "StatusInfo" : { "properties" : { - "policyTypeId" : { - "description" : "A1 Policy Type identifier", + "status" : { + "description" : "Status text", "type" : "string" - }, - "nearRtRicId" : { - "$ref" : "#/components/schemas/NearRtRicId" } }, - "required" : [ "nearRtRicId", "policyTypeId" ], "type" : "object" }, - "PolicyObjectInformation" : { - "description" : "Information to create an A1 Policy Instance", + "ProblemDetails" : { + "description" : "Object to carry details about a problem in an HTTP response according to IETF RFC 7807", "properties" : { - "nearRtRicId" : { - "description" : "Identity of the target Near-RT RIC", - "example" : "Near-RT-Ric-ID1", + "type" : { + "description" : "URI reference according to IETF RFC 3986 that identifies the problem type", "type" : "string" }, - "transient" : { - "default" : false, - "description" : "If true, the policy is automatically deleted if the targeted Near-RT RIC restarts or recovers. If false, the A1 Policy Instance remains, and is re-pushed to the targeted Near-RT RIC after a restart or recovery. If false, the A1 Policy Instance is maintained and must be deleted separately in the event of Near-RT RIC restart or recovery. Default is false.\n", - "nullable" : false, - "type" : "boolean" - }, - "policyId" : { - "description" : "An optional identity to be used for the new A1 Policy Instance. If this value is present, it must be unique. If not present the new A1 Policy Instance will be assigned a newly generated unique ID, and the new ID can be extracted from the 'Location' header in the response.\n", - "example" : "POLICY-ID1", + "title" : { + "description" : "Human-readable summary of the problem type", "type" : "string" }, - "serviceId" : { - "default" : "", - "description" : "the identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated to a service). Note that the service does not need to be registered. If the service is registered, the newly created A1 Policy Instance will be subject to the same supervision rules as the the service's other policies.", - "example" : "rApp 1", - "type" : "string" + "status" : { + "description" : "HTTP status code", + "type" : "number" }, - "policyObject" : { - "$ref" : "#/components/schemas/PolicyObject" + "detail" : { + "description" : "Human-readable explanation", + "type" : "string" }, - "policyTypeId" : { - "description" : "A1 Policy Type identity", - "example" : "ORAN_QOS_1.0.0 '(typeName_SemVersion)'", + "instance" : { + "description" : "URI reference that identifies the specific occurrence of the problem", "type" : "string" } }, - "required" : [ "nearRtRicId", "policyObject", "policyTypeId" ], "type" : "object" }, - "ErrorInformation" : { - "description" : "Problem as defined in https://tools.ietf.org/html/rfc7807", + "RicInfo" : { + "description" : "Information for a Near-RT RIC", "properties" : { - "detail" : { - "description" : "A human-readable explanation specific to this occurrence of the problem.", - "example" : "Policy type not found", + "ricId" : { + "description" : "Identity of the Near-RT RIC", "type" : "string" }, - "title" : { - "description" : "A specific error name", - "example" : "Not Found", + "managedElementIds" : { + "description" : "Identities for managed entities", + "items" : { + "description" : "Identity for a managed entity", + "type" : "string" + }, + "type" : "array" + }, + "state" : { + "description" : "Represents the state of a Near-RT RIC", + "enum" : [ "UNAVAILABLE", "AVAILABLE", "SYNCHRONIZING", "CONSISTENCY_CHECK" ], "type" : "string" }, - "status" : { - "description" : "The HTTP status code generated by the origin server for this occurrence of the problem.\n", - "example" : 404, - "format" : "int32", - "type" : "integer" + "policyTypeIds" : { + "description" : "Supported A1 Policy Types", + "items" : { + "description" : "Supported A1 Policy Type ID", + "type" : "string" + }, + "type" : "array" } }, "type" : "object" }, - "PolicyObject" : { - "description" : "Policy Object is a JSON representation policy data for an A1 Policy Instance. The schema for this policy data is defined in the corresponding A1 Policy Type. \n", + "RicInfoList" : { + "description" : "Collection of Near-RT RIC information objects", + "properties" : { + "rics" : { + "description" : "List of Near-RT RIC information objects", + "items" : { + "$ref" : "#/components/schemas/RicInfo" + }, + "type" : "array" + } + }, "type" : "object" }, + "PolicyTypeInformation" : { + "description" : "A data tuple to indicate that an identified A1 Policy Type is supported at an identified Near-RT RIC.", + "example" : { + "policyTypeId" : "STD_QOS2_0.1.0", + "nearRtRicId" : "ric_g3_2" + }, + "properties" : { + "policyTypeId" : { + "description" : "A1 Policy Type identifier", + "type" : "string" + }, + "nearRtRicId" : { + "$ref" : "#/components/schemas/NearRtRicId" + } + }, + "required" : [ "nearRtRicId", "policyTypeId" ], + "type" : "object" + }, + "NearRtRicId" : { + "description" : "Identity of the Near-RT RIC", + "type" : "string" + }, "PolicyTypeObject" : { "description" : "An A1 Policy Type, as defined in O-RAN Alliance A1TD", "example" : { @@ -2219,72 +2189,101 @@ "description" : "A schema to define the contents of the status information for A1 Policy Instances. Status schemas are Policy Type specific. All status information for all A1 Policy Instances of an A1 Policy Type should comply with the type's status schema.\n", "type" : "object" }, - "PolicyStatusObject" : { - "description" : "A generic policy status object that can be used to transport any policy status. Additionally, a schema for policy status can be defined in the corresponding A1 Policy Type.\n", - "type" : "object" - }, - "void" : { - "description" : "Void/empty", + "PolicyObject" : { + "description" : "Policy Object is a JSON representation policy data for an A1 Policy Instance. The schema for this policy data is defined in the corresponding A1 Policy Type.\n", "type" : "object" }, - "StatusInfo" : { + "ErrorInformation" : { + "description" : "Problem as defined in https://tools.ietf.org/html/rfc7807", "properties" : { - "status" : { - "description" : "Status text", + "detail" : { + "description" : "A human-readable explanation specific to this occurrence of the problem.", + "example" : "Policy type not found", + "type" : "string" + }, + "title" : { + "description" : "A specific error name", + "example" : "Not Found", "type" : "string" + }, + "status" : { + "description" : "The HTTP status code generated by the origin server for this occurrence of the problem.\n", + "example" : 404, + "format" : "int32", + "type" : "integer" } }, "type" : "object" }, - "RicInfo" : { - "description" : "Information for a Near-RT RIC", + "PolicyStatusObject" : { + "description" : "A generic policy status object that can be used to transport any policy status. Additionally, a schema for policy status can be defined in the corresponding A1 Policy Type.\n", + "type" : "object" + }, + "PolicyInformation" : { + "description" : "Information tuple for a single A1 Policy Instance. Contains the A1 Policy Instance ID, and the ID of the Near-RT RIC where the policy is created.\n", "properties" : { - "ricId" : { - "description" : "Identity of the Near-RT RIC", - "type" : "string" - }, - "managedElementIds" : { - "description" : "Identities for managed entities", - "items" : { - "description" : "Identity for a managed entity", - "type" : "string" - }, - "type" : "array" - }, - "state" : { - "description" : "Represents the state of a Near-RT RIC", - "enum" : [ "UNAVAILABLE", "AVAILABLE", "SYNCHRONIZING", "CONSISTENCY_CHECK" ], + "policyId" : { + "description" : "Identity of the A1 Policy Instance", "type" : "string" }, - "policyTypeIds" : { - "description" : "Supported A1 Policy Types", - "items" : { - "description" : "Supported A1 Policy Type ID", - "type" : "string" - }, - "type" : "array" + "nearRtRicId" : { + "$ref" : "#/components/schemas/NearRtRicId" } }, + "required" : [ "nearRtRicId", "policyId" ], "type" : "object" }, - "ServiceRegistrationInfo" : { - "description" : "Information for a service to be registered", + "PolicyObjectInformation" : { + "description" : "Information to create an A1 Policy Instance", "properties" : { - "callbackUrl" : { - "description" : "Callback URL for notifying of Near-RT RIC state changes", + "nearRtRicId" : { + "description" : "Identity of the target Near-RT RIC", + "example" : "Near-RT-Ric-ID1", + "type" : "string" + }, + "transient" : { + "default" : false, + "description" : "If true, the policy is automatically deleted if the targeted Near-RT RIC restarts or recovers. If false, the A1 Policy Instance remains, and is re-pushed to the targeted Near-RT RIC after a restart or recovery. If false, the A1 Policy Instance is maintained and must be deleted separately in the event of Near-RT RIC restart or recovery. Default is false.\n", + "nullable" : false, + "type" : "boolean" + }, + "policyId" : { + "description" : "An optional identity to be used for the new A1 Policy Instance. If this value is present, it must be unique. If not present the new A1 Policy Instance will be assigned a newly generated unique ID, and the new ID can be extracted from the 'Location' header in the response.\n", + "example" : "POLICY-ID1", "type" : "string" }, "serviceId" : { - "description" : "Identity of the service", + "default" : "", + "description" : "the identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated to a service). Note that the service does not need to be registered. If the service is registered, the newly created A1 Policy Instance will be subject to the same supervision rules as the the service's other policies.", + "example" : "rApp 1", "type" : "string" }, - "keepAliveIntervalSeconds" : { - "description" : "Keep alive interval for the service. This is used to enable optional heartbeat supervision of the service. If set (> 0) the registered service should regularly invoke a 'keepalive' REST call. When a service fails to invoke this 'keepalive' call within the configured time, the service is considered unavailable. An unavailable service will be automatically deregistered and its policies will be deleted. Value 0 means timeout supervision is disabled.\n", - "format" : "int64", - "type" : "integer" + "policyObject" : { + "$ref" : "#/components/schemas/PolicyObject" + }, + "policyTypeId" : { + "description" : "A1 Policy Type identity", + "example" : "ORAN_QOS_1.0.0 '(typeName_SemVersion)'", + "type" : "string" + } + }, + "required" : [ "nearRtRicId", "policyObject", "policyTypeId" ], + "type" : "object" + }, + "void" : { + "description" : "Void/empty", + "type" : "object" + }, + "ServiceStatusList" : { + "properties" : { + "serviceList" : { + "description" : "List of Service Status objects, describing a collection of registered services.", + "items" : { + "$ref" : "#/components/schemas/ServiceStatus" + }, + "type" : "array" } }, - "required" : [ "serviceId" ], "type" : "object" }, "ServiceStatus" : { @@ -2311,47 +2310,24 @@ }, "type" : "object" }, - "RicInfoList" : { - "description" : "Collection of Near-RT RIC information objects", - "properties" : { - "rics" : { - "description" : "List of Near-RT RIC information objects", - "items" : { - "$ref" : "#/components/schemas/RicInfo" - }, - "type" : "array" - } - }, - "type" : "object" - }, - "NearRtRicId" : { - "description" : "Identity of the Near-RT RIC", - "type" : "string" - }, - "PolicyInformation" : { - "description" : "Information tuple for a single A1 Policy Instance. Contains the A1 Policy Instance ID, and the ID of the Near-RT RIC where the policy is created.\n", + "ServiceRegistrationInfo" : { + "description" : "Information for a service to be registered", "properties" : { - "policyId" : { - "description" : "Identity of the A1 Policy Instance", + "callbackUrl" : { + "description" : "Callback URL for notifying of Near-RT RIC state changes", "type" : "string" }, - "nearRtRicId" : { - "$ref" : "#/components/schemas/NearRtRicId" - } - }, - "required" : [ "nearRtRicId", "policyId" ], - "type" : "object" - }, - "ServiceStatusList" : { - "properties" : { - "serviceList" : { - "description" : "List of Service Status objects, describing a collection of registered services.", - "items" : { - "$ref" : "#/components/schemas/ServiceStatus" - }, - "type" : "array" + "serviceId" : { + "description" : "Identity of the service", + "type" : "string" + }, + "keepAliveIntervalSeconds" : { + "description" : "Keep alive interval for the service. This is used to enable optional heartbeat supervision of the service. If set (> 0) the registered service should regularly invoke a 'keepalive' REST call. When a service fails to invoke this 'keepalive' call within the configured time, the service is considered unavailable. An unavailable service will be automatically deregistered and its policies will be deleted. Value 0 means timeout supervision is disabled.\n", + "format" : "int64", + "type" : "integer" } }, + "required" : [ "serviceId" ], "type" : "object" }, "ServiceCallbackInfo" : { @@ -2369,32 +2345,6 @@ }, "required" : [ "eventType", "ricId" ], "type" : "object" - }, - "ProblemDetails" : { - "description" : "Object to carry details about a problem in an HTTP response according to IETF RFC 7807", - "properties" : { - "type" : { - "description" : "URI reference according to IETF RFC 3986 that identifies the problem type", - "type" : "string" - }, - "title" : { - "description" : "Human-readable summary of the problem type", - "type" : "string" - }, - "status" : { - "description" : "HTTP status code", - "type" : "number" - }, - "detail" : { - "description" : "Human-readable explanation", - "type" : "string" - }, - "instance" : { - "description" : "URI reference that identifies the specific occurrence of the problem", - "type" : "string" - } - }, - "type" : "object" } } } diff --git a/docs/offeredapis/swagger/pms-api-v3.json b/docs/offeredapis/swagger/pms-api-v3.json index ec085700..9d378bd7 100644 --- a/docs/offeredapis/swagger/pms-api-v3.json +++ b/docs/offeredapis/swagger/pms-api-v3.json @@ -5,7 +5,7 @@ "email" : "discuss-list@onap.com", "url" : "https://www.onap.org/" }, - "description" : "

      General

      The ONAP CCSDK A1 Policy Management Service provides a REST API for managing A1 policies.
      This document describes the latest API set to perform tasks for:

      • A1 Policy creation, modification and deletion.
      • Monitoring and maintaining consistency of the SMO view of A1 Policies and the Near-RT RICs
      • Maintaining a view of each Near-RT RIC's supported A1 Policy Types
      • Supervision of registered services (rApps). When a registered service is unavailable, its policies are removed.

      APIs provided or defined by the service

      Note: parts of this API are strongly based on extracts of the O-RAN Alliance R1 Interface specification for A1 Policy Management, and those parts should be considered '� O-RAN ALLIANCE - All rights reserved.'

      A1 Policy Management

      This is the latest API for managing A1 Policies. This API is partially compliant with O-RAN Alliance R1 Interface specifications for A1 Policy Management:

      • A1 Policy retrieval, creation, modification and deletion.
      • Retrieval of supported A1 Policy Types for a Near-RT RIC
      • Retrieval of status for existing A1 policies

      Management of configuration

      API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.

      Service Callbacks

      These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.

      NearRT-RIC Repository (Older version)

      This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted towards one Near-RT RIC.

      Health Check

      API used for supervision of the A1 Policy Management Service.

      Service Registry and Supervision

      API used for registering services/clients/rApps. Each A1 Policy can be tagged with an owner. If the owner service is registered, then the service can be optionally monitored by a heart-beat supervision mechanism, and if the registered service becomes unavailable, then it is removed and all its A1 Policies are deleted. Note that services do not need to be registered to create A1 Policies, but unregistered services are not supervised. This is a feature that is optional to use.

      ", + "description" : "

      General

      The ONAP CCSDK A1 Policy Management Service provides a REST API for managing A1 policies.
      This document describes the latest API set to perform tasks for:

      • A1 Policy creation, modification and deletion.
      • Monitoring and maintaining consistency of the SMO view of A1 Policies and the Near-RT RICs
      • Maintaining a view of each Near-RT RIC's supported A1 Policy Types
      • Supervision of registered services (rApps). When a registered service is unavailable, its policies are removed.

      APIs provided or defined by the service

      Note: parts of this API are strongly based on extracts of the O-RAN Alliance R1 Interface specification for A1 Policy Management, and those parts should be considered '© O-RAN ALLIANCE - All rights reserved.'

      A1 Policy Management

      This is the latest API for managing A1 Policies. This API is partially compliant with O-RAN Alliance R1 Interface specifications for A1 Policy Management:

      • A1 Policy retrieval, creation, modification and deletion.
      • Retrieval of supported A1 Policy Types for a Near-RT RIC
      • Retrieval of status for existing A1 policies

      Management of configuration

      API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.

      Service Callbacks

      These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.

      NearRT-RIC Repository (Older version)

      This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted towards one Near-RT RIC.

      Health Check

      API used for supervision of the A1 Policy Management Service.

      Service Registry and Supervision

      API used for registering services/clients/rApps. Each A1 Policy can be tagged with an owner. If the owner service is registered, then the service can be optionally monitored by a heart-beat supervision mechanism, and if the registered service becomes unavailable, then it is removed and all its A1 Policies are deleted. Note that services do not need to be registered to create A1 Policies, but unregistered services are not supervised. This is a feature that is optional to use.

      ", "license" : { "name" : "Copyright (C) 2024 - 2025 OpenInfra Foundation Europe. Licensed under the Apache 2 License.", "url" : "http://www.apache.org/licenses/LICENSE-2.0" @@ -93,19 +93,15 @@ "schema" : { "nullable" : false, "type" : "string" - }, - "style" : "simple" + } }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -154,15 +150,12 @@ "style" : "form" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -231,15 +224,12 @@ "style" : "form" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -370,15 +360,12 @@ "style" : "simple" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -506,15 +493,12 @@ "style" : "simple" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "204" : { @@ -653,15 +637,12 @@ "style" : "simple" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -775,16 +756,14 @@ }, "put" : { "description" : "Update an existing A1 Policy instance's policy data using its policy ID.", - "operationId" : "putPolicy", + "operationId" : "updatePolicy", "parameters" : [ { - "explode" : false, "in" : "path", "name" : "policyId", "required" : true, "schema" : { "type" : "string" - }, - "style" : "simple" + } } ], "requestBody" : { "content" : { @@ -948,7 +927,7 @@ "description" : "Service Unavailable" } }, - "summary" : "Update an A1 Policy's policy data (putPolicy)", + "summary" : "Update an A1 Policy's policy data (updatePolicy)", "tags" : [ "A1 Policy Management" ] } }, @@ -967,15 +946,12 @@ "style" : "simple" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -1086,7 +1062,7 @@ "/policies" : { "get" : { "description" : "Returns a collection of A1 Policy Instance IDs for policies that match given search criteria. If several query parameters are defined, the policies matching all conditions are returned.\n", - "operationId" : "getAllPolicies", + "operationId" : "getPolicyIds", "parameters" : [ { "description" : "Select policies with a given A1 Policy Type ID.", "explode" : true, @@ -1129,15 +1105,12 @@ "style" : "form" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -1244,7 +1217,7 @@ "description" : "Service Unavailable" } }, - "summary" : "Query for A1 Policy instances (getAllPolicies)", + "summary" : "Query for A1 Policy instances (getPolicyIds)", "tags" : [ "A1 Policy Management" ] }, "post" : { @@ -1273,21 +1246,17 @@ "headers" : { "Location" : { "description" : "Contains the URI of the newly created A1 Policy Instances. This URI includes the A1 Policy Instance ID for the newly created policy instance.\n", - "explode" : false, "required" : true, "schema" : { "type" : "string" - }, - "style" : "simple" + } }, "Content-Type" : { "description" : "Media Type of the response", - "explode" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } } }, @@ -1471,7 +1440,7 @@ "tags" : [ "Configuration" ] }, "put" : { - "description" : "Replace the current Application Configuration with a new configuration. The new configuration, if accepted, will take effect after a short delay. The new configuration must comply with the Application Configuration schema, which can be found from the the Application Documentation (Developer Guide) \n", + "description" : "Replace the current Application Configuration with a new configuration. The new configuration, if accepted, will take effect after a short delay. The new configuration must comply with the Application Configuration schema, which can be found from the the Application Documentation (Developer Guide)\n", "operationId" : "putConfiguration", "requestBody" : { "content" : { @@ -1524,26 +1493,13 @@ "style" : "simple" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "string" - } - } - }, - "required" : false - }, "responses" : { "200" : { "content" : { @@ -1586,15 +1542,12 @@ "style" : "form" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "200" : { @@ -1734,15 +1687,12 @@ "style" : "simple" }, { "description" : "Specifies the content type that the client expects to receive in response to the request. Only application/json is allowed.", - "explode" : false, "in" : "header", "name" : "Accept", - "required" : false, "schema" : { "example" : "application/json", "type" : "string" - }, - "style" : "simple" + } } ], "responses" : { "204" : { @@ -1773,22 +1723,6 @@ }, "components" : { "examples" : { - "ServiceStatusList" : { - "description" : "List of service information", - "value" : { - "serviceList" : [ { - "callbackUrl" : "http://callback.url", - "serviceId" : "serviceId1", - "keepAliveIntervalSeconds" : 0, - "timeSinceLastActivitySeconds" : 6 - }, { - "callbackUrl" : "http://callback.url", - "serviceId" : "serviceId2", - "keepAliveIntervalSeconds" : 500, - "timeSinceLastActivitySeconds" : 401 - } ] - } - }, "StatusInfo" : { "value" : { "status" : "success" @@ -1817,48 +1751,6 @@ } ] } }, - "PolicyObject" : { - "value" : { - "scope" : { - "ueId" : { - "guRanUeId" : { - "globalGnbId" : { - "plmnId" : { - "mcc" : "123", - "mnc" : "45" - }, - "gnbId" : { - "gnbIdLength" : 24, - "gnbIdValue" : 12345678 - } - }, - "RanUeId" : "a31c510b20e64a74" - } - }, - "groupId" : { - "spId" : 123 - }, - "qosId" : { - "5qI" : 1 - }, - "cellId" : { - "plmnId" : { - "mcc" : "123", - "mnc" : "45" - }, - "cId" : { - "ncI" : 123 - } - } - }, - "qosObjectives" : { - "gfbr" : 100, - "mfbr" : 200, - "priorityLevel" : 3, - "pdb" : 50 - } - } - }, "PolicyTypeInformation" : { "value" : [ { "policyTypeId" : "STD_QOS2_0.1.0", @@ -1908,9 +1800,77 @@ } } } + }, + "PolicyObject" : { + "value" : { + "scope" : { + "ueId" : { + "guRanUeId" : { + "globalGnbId" : { + "plmnId" : { + "mcc" : "123", + "mnc" : "45" + }, + "gnbId" : { + "gnbIdLength" : 24, + "gnbIdValue" : 12345678 + } + }, + "RanUeId" : "a31c510b20e64a74" + } + }, + "groupId" : { + "spId" : 123 + }, + "qosId" : { + "5qI" : 1 + }, + "cellId" : { + "plmnId" : { + "mcc" : "123", + "mnc" : "45" + }, + "cId" : { + "ncI" : 123 + } + } + }, + "qosObjectives" : { + "gfbr" : 100, + "mfbr" : 200, + "priorityLevel" : 3, + "pdb" : 50 + } + } + }, + "ServiceStatusList" : { + "description" : "List of service information", + "value" : { + "serviceList" : [ { + "callbackUrl" : "http://callback.url", + "serviceId" : "serviceId1", + "keepAliveIntervalSeconds" : 0, + "timeSinceLastActivitySeconds" : 6 + }, { + "callbackUrl" : "http://callback.url", + "serviceId" : "serviceId2", + "keepAliveIntervalSeconds" : 500, + "timeSinceLastActivitySeconds" : 401 + } ] + } } }, "responses" : { + "404" : { + "content" : { + "application/problem+json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemDetails" + } + } + }, + "description" : "Not Found" + }, "400" : { "content" : { "application/problem+json" : { @@ -1941,7 +1901,7 @@ }, "description" : "Forbidden" }, - "404" : { + "406" : { "content" : { "application/problem+json" : { "schema" : { @@ -1949,9 +1909,9 @@ } } }, - "description" : "Not Found" + "description" : "Not Acceptable" }, - "405" : { + "429" : { "content" : { "application/problem+json" : { "schema" : { @@ -1959,9 +1919,9 @@ } } }, - "description" : "Method Not Allowed" + "description" : "Too Many Requests" }, - "406" : { + "500" : { "content" : { "application/problem+json" : { "schema" : { @@ -1969,9 +1929,9 @@ } } }, - "description" : "Not Acceptable" + "description" : "Internal Server Error" }, - "409" : { + "502" : { "content" : { "application/problem+json" : { "schema" : { @@ -1979,9 +1939,9 @@ } } }, - "description" : "Conflict" + "description" : "Bad Gateway" }, - "411" : { + "503" : { "content" : { "application/problem+json" : { "schema" : { @@ -1989,9 +1949,9 @@ } } }, - "description" : "Length Required" + "description" : "Service Unavailable" }, - "413" : { + "411" : { "content" : { "application/problem+json" : { "schema" : { @@ -1999,9 +1959,9 @@ } } }, - "description" : "Payload Too Large" + "description" : "Length Required" }, - "415" : { + "413" : { "content" : { "application/problem+json" : { "schema" : { @@ -2009,9 +1969,9 @@ } } }, - "description" : "Unsupported Media Type" + "description" : "Payload Too Large" }, - "429" : { + "415" : { "content" : { "application/problem+json" : { "schema" : { @@ -2019,19 +1979,24 @@ } } }, - "description" : "Too Many Requests" + "description" : "Unsupported Media Type" }, - "500" : { + "Locked" : { "content" : { "application/problem+json" : { + "example" : { + "status" : 423, + "title" : "Locked", + "detail" : "State is Locked in the provided request." + }, "schema" : { - "$ref" : "#/components/schemas/ProblemDetails" + "$ref" : "#/components/schemas/ErrorInformation" } } }, - "description" : "Internal Server Error" + "description" : "Locked - HTTP Status code which can be used when the state is Locked" }, - "502" : { + "405" : { "content" : { "application/problem+json" : { "schema" : { @@ -2039,9 +2004,9 @@ } } }, - "description" : "Bad Gateway" + "description" : "Method Not Allowed" }, - "503" : { + "409" : { "content" : { "application/problem+json" : { "schema" : { @@ -2049,106 +2014,111 @@ } } }, - "description" : "Service Unavailable" - }, - "Locked" : { - "content" : { - "application/problem+json" : { - "example" : { - "status" : 423, - "title" : "Locked", - "detail" : "State is Locked in the provided request." - }, - "schema" : { - "$ref" : "#/components/schemas/ErrorInformation" - } - } - }, - "description" : "Locked - HTTP Status code which can be used when the state is Locked" + "description" : "Conflict" } }, "schemas" : { - "PolicyTypeInformation" : { - "description" : "A data tuple to indicate that an identified A1 Policy Type is supported at an identified Near-RT RIC.", - "example" : { - "policyTypeId" : "STD_QOS2_0.1.0", - "nearRtRicId" : "ric_g3_2" - }, + "StatusInfo" : { "properties" : { - "policyTypeId" : { - "description" : "A1 Policy Type identifier", + "status" : { + "description" : "Status text", "type" : "string" - }, - "nearRtRicId" : { - "$ref" : "#/components/schemas/NearRtRicId" } }, - "required" : [ "nearRtRicId", "policyTypeId" ], "type" : "object" }, - "PolicyObjectInformation" : { - "description" : "Information to create an A1 Policy Instance", + "ProblemDetails" : { + "description" : "Object to carry details about a problem in an HTTP response according to IETF RFC 7807", "properties" : { - "nearRtRicId" : { - "description" : "Identity of the target Near-RT RIC", - "example" : "Near-RT-Ric-ID1", + "type" : { + "description" : "URI reference according to IETF RFC 3986 that identifies the problem type", "type" : "string" }, - "transient" : { - "default" : false, - "description" : "If true, the policy is automatically deleted if the targeted Near-RT RIC restarts or recovers. If false, the A1 Policy Instance remains, and is re-pushed to the targeted Near-RT RIC after a restart or recovery. If false, the A1 Policy Instance is maintained and must be deleted separately in the event of Near-RT RIC restart or recovery. Default is false.\n", - "nullable" : false, - "type" : "boolean" - }, - "policyId" : { - "description" : "An optional identity to be used for the new A1 Policy Instance. If this value is present, it must be unique. If not present the new A1 Policy Instance will be assigned a newly generated unique ID, and the new ID can be extracted from the 'Location' header in the response.\n", - "example" : "POLICY-ID1", + "title" : { + "description" : "Human-readable summary of the problem type", "type" : "string" }, - "serviceId" : { - "default" : "", - "description" : "the identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated to a service). Note that the service does not need to be registered. If the service is registered, the newly created A1 Policy Instance will be subject to the same supervision rules as the the service's other policies.", - "example" : "rApp 1", - "type" : "string" + "status" : { + "description" : "HTTP status code", + "type" : "number" }, - "policyObject" : { - "$ref" : "#/components/schemas/PolicyObject" + "detail" : { + "description" : "Human-readable explanation", + "type" : "string" }, - "policyTypeId" : { - "description" : "A1 Policy Type identity", - "example" : "ORAN_QOS_1.0.0 '(typeName_SemVersion)'", + "instance" : { + "description" : "URI reference that identifies the specific occurrence of the problem", "type" : "string" } }, - "required" : [ "nearRtRicId", "policyObject", "policyTypeId" ], "type" : "object" }, - "ErrorInformation" : { - "description" : "Problem as defined in https://tools.ietf.org/html/rfc7807", + "RicInfo" : { + "description" : "Information for a Near-RT RIC", "properties" : { - "detail" : { - "description" : "A human-readable explanation specific to this occurrence of the problem.", - "example" : "Policy type not found", + "ricId" : { + "description" : "Identity of the Near-RT RIC", "type" : "string" }, - "title" : { - "description" : "A specific error name", - "example" : "Not Found", + "managedElementIds" : { + "description" : "Identities for managed entities", + "items" : { + "description" : "Identity for a managed entity", + "type" : "string" + }, + "type" : "array" + }, + "state" : { + "description" : "Represents the state of a Near-RT RIC", + "enum" : [ "UNAVAILABLE", "AVAILABLE", "SYNCHRONIZING", "CONSISTENCY_CHECK" ], "type" : "string" }, - "status" : { - "description" : "The HTTP status code generated by the origin server for this occurrence of the problem.\n", - "example" : 404, - "format" : "int32", - "type" : "integer" + "policyTypeIds" : { + "description" : "Supported A1 Policy Types", + "items" : { + "description" : "Supported A1 Policy Type ID", + "type" : "string" + }, + "type" : "array" } }, "type" : "object" }, - "PolicyObject" : { - "description" : "Policy Object is a JSON representation policy data for an A1 Policy Instance. The schema for this policy data is defined in the corresponding A1 Policy Type. \n", + "RicInfoList" : { + "description" : "Collection of Near-RT RIC information objects", + "properties" : { + "rics" : { + "description" : "List of Near-RT RIC information objects", + "items" : { + "$ref" : "#/components/schemas/RicInfo" + }, + "type" : "array" + } + }, "type" : "object" }, + "PolicyTypeInformation" : { + "description" : "A data tuple to indicate that an identified A1 Policy Type is supported at an identified Near-RT RIC.", + "example" : { + "policyTypeId" : "STD_QOS2_0.1.0", + "nearRtRicId" : "ric_g3_2" + }, + "properties" : { + "policyTypeId" : { + "description" : "A1 Policy Type identifier", + "type" : "string" + }, + "nearRtRicId" : { + "$ref" : "#/components/schemas/NearRtRicId" + } + }, + "required" : [ "nearRtRicId", "policyTypeId" ], + "type" : "object" + }, + "NearRtRicId" : { + "description" : "Identity of the Near-RT RIC", + "type" : "string" + }, "PolicyTypeObject" : { "description" : "An A1 Policy Type, as defined in O-RAN Alliance A1TD", "example" : { @@ -2219,72 +2189,101 @@ "description" : "A schema to define the contents of the status information for A1 Policy Instances. Status schemas are Policy Type specific. All status information for all A1 Policy Instances of an A1 Policy Type should comply with the type's status schema.\n", "type" : "object" }, - "PolicyStatusObject" : { - "description" : "A generic policy status object that can be used to transport any policy status. Additionally, a schema for policy status can be defined in the corresponding A1 Policy Type.\n", - "type" : "object" - }, - "void" : { - "description" : "Void/empty", + "PolicyObject" : { + "description" : "Policy Object is a JSON representation policy data for an A1 Policy Instance. The schema for this policy data is defined in the corresponding A1 Policy Type.\n", "type" : "object" }, - "StatusInfo" : { + "ErrorInformation" : { + "description" : "Problem as defined in https://tools.ietf.org/html/rfc7807", "properties" : { - "status" : { - "description" : "Status text", + "detail" : { + "description" : "A human-readable explanation specific to this occurrence of the problem.", + "example" : "Policy type not found", + "type" : "string" + }, + "title" : { + "description" : "A specific error name", + "example" : "Not Found", "type" : "string" + }, + "status" : { + "description" : "The HTTP status code generated by the origin server for this occurrence of the problem.\n", + "example" : 404, + "format" : "int32", + "type" : "integer" } }, "type" : "object" }, - "RicInfo" : { - "description" : "Information for a Near-RT RIC", + "PolicyStatusObject" : { + "description" : "A generic policy status object that can be used to transport any policy status. Additionally, a schema for policy status can be defined in the corresponding A1 Policy Type.\n", + "type" : "object" + }, + "PolicyInformation" : { + "description" : "Information tuple for a single A1 Policy Instance. Contains the A1 Policy Instance ID, and the ID of the Near-RT RIC where the policy is created.\n", "properties" : { - "ricId" : { - "description" : "Identity of the Near-RT RIC", - "type" : "string" - }, - "managedElementIds" : { - "description" : "Identities for managed entities", - "items" : { - "description" : "Identity for a managed entity", - "type" : "string" - }, - "type" : "array" - }, - "state" : { - "description" : "Represents the state of a Near-RT RIC", - "enum" : [ "UNAVAILABLE", "AVAILABLE", "SYNCHRONIZING", "CONSISTENCY_CHECK" ], + "policyId" : { + "description" : "Identity of the A1 Policy Instance", "type" : "string" }, - "policyTypeIds" : { - "description" : "Supported A1 Policy Types", - "items" : { - "description" : "Supported A1 Policy Type ID", - "type" : "string" - }, - "type" : "array" + "nearRtRicId" : { + "$ref" : "#/components/schemas/NearRtRicId" } }, + "required" : [ "nearRtRicId", "policyId" ], "type" : "object" }, - "ServiceRegistrationInfo" : { - "description" : "Information for a service to be registered", + "PolicyObjectInformation" : { + "description" : "Information to create an A1 Policy Instance", "properties" : { - "callbackUrl" : { - "description" : "Callback URL for notifying of Near-RT RIC state changes", + "nearRtRicId" : { + "description" : "Identity of the target Near-RT RIC", + "example" : "Near-RT-Ric-ID1", + "type" : "string" + }, + "transient" : { + "default" : false, + "description" : "If true, the policy is automatically deleted if the targeted Near-RT RIC restarts or recovers. If false, the A1 Policy Instance remains, and is re-pushed to the targeted Near-RT RIC after a restart or recovery. If false, the A1 Policy Instance is maintained and must be deleted separately in the event of Near-RT RIC restart or recovery. Default is false.\n", + "nullable" : false, + "type" : "boolean" + }, + "policyId" : { + "description" : "An optional identity to be used for the new A1 Policy Instance. If this value is present, it must be unique. If not present the new A1 Policy Instance will be assigned a newly generated unique ID, and the new ID can be extracted from the 'Location' header in the response.\n", + "example" : "POLICY-ID1", "type" : "string" }, "serviceId" : { - "description" : "Identity of the service", + "default" : "", + "description" : "the identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated to a service). Note that the service does not need to be registered. If the service is registered, the newly created A1 Policy Instance will be subject to the same supervision rules as the the service's other policies.", + "example" : "rApp 1", "type" : "string" }, - "keepAliveIntervalSeconds" : { - "description" : "Keep alive interval for the service. This is used to enable optional heartbeat supervision of the service. If set (> 0) the registered service should regularly invoke a 'keepalive' REST call. When a service fails to invoke this 'keepalive' call within the configured time, the service is considered unavailable. An unavailable service will be automatically deregistered and its policies will be deleted. Value 0 means timeout supervision is disabled.\n", - "format" : "int64", - "type" : "integer" + "policyObject" : { + "$ref" : "#/components/schemas/PolicyObject" + }, + "policyTypeId" : { + "description" : "A1 Policy Type identity", + "example" : "ORAN_QOS_1.0.0 '(typeName_SemVersion)'", + "type" : "string" + } + }, + "required" : [ "nearRtRicId", "policyObject", "policyTypeId" ], + "type" : "object" + }, + "void" : { + "description" : "Void/empty", + "type" : "object" + }, + "ServiceStatusList" : { + "properties" : { + "serviceList" : { + "description" : "List of Service Status objects, describing a collection of registered services.", + "items" : { + "$ref" : "#/components/schemas/ServiceStatus" + }, + "type" : "array" } }, - "required" : [ "serviceId" ], "type" : "object" }, "ServiceStatus" : { @@ -2311,47 +2310,24 @@ }, "type" : "object" }, - "RicInfoList" : { - "description" : "Collection of Near-RT RIC information objects", - "properties" : { - "rics" : { - "description" : "List of Near-RT RIC information objects", - "items" : { - "$ref" : "#/components/schemas/RicInfo" - }, - "type" : "array" - } - }, - "type" : "object" - }, - "NearRtRicId" : { - "description" : "Identity of the Near-RT RIC", - "type" : "string" - }, - "PolicyInformation" : { - "description" : "Information tuple for a single A1 Policy Instance. Contains the A1 Policy Instance ID, and the ID of the Near-RT RIC where the policy is created.\n", + "ServiceRegistrationInfo" : { + "description" : "Information for a service to be registered", "properties" : { - "policyId" : { - "description" : "Identity of the A1 Policy Instance", + "callbackUrl" : { + "description" : "Callback URL for notifying of Near-RT RIC state changes", "type" : "string" }, - "nearRtRicId" : { - "$ref" : "#/components/schemas/NearRtRicId" - } - }, - "required" : [ "nearRtRicId", "policyId" ], - "type" : "object" - }, - "ServiceStatusList" : { - "properties" : { - "serviceList" : { - "description" : "List of Service Status objects, describing a collection of registered services.", - "items" : { - "$ref" : "#/components/schemas/ServiceStatus" - }, - "type" : "array" + "serviceId" : { + "description" : "Identity of the service", + "type" : "string" + }, + "keepAliveIntervalSeconds" : { + "description" : "Keep alive interval for the service. This is used to enable optional heartbeat supervision of the service. If set (> 0) the registered service should regularly invoke a 'keepalive' REST call. When a service fails to invoke this 'keepalive' call within the configured time, the service is considered unavailable. An unavailable service will be automatically deregistered and its policies will be deleted. Value 0 means timeout supervision is disabled.\n", + "format" : "int64", + "type" : "integer" } }, + "required" : [ "serviceId" ], "type" : "object" }, "ServiceCallbackInfo" : { @@ -2369,32 +2345,6 @@ }, "required" : [ "eventType", "ricId" ], "type" : "object" - }, - "ProblemDetails" : { - "description" : "Object to carry details about a problem in an HTTP response according to IETF RFC 7807", - "properties" : { - "type" : { - "description" : "URI reference according to IETF RFC 3986 that identifies the problem type", - "type" : "string" - }, - "title" : { - "description" : "Human-readable summary of the problem type", - "type" : "string" - }, - "status" : { - "description" : "HTTP status code", - "type" : "number" - }, - "detail" : { - "description" : "Human-readable explanation", - "type" : "string" - }, - "instance" : { - "description" : "URI reference that identifies the specific occurrence of the problem", - "type" : "string" - } - }, - "type" : "object" } } } diff --git a/docs/offeredapis/swagger/pms-api-v3.yaml b/docs/offeredapis/swagger/pms-api-v3.yaml index e08bea1a..482fe319 100644 --- a/docs/offeredapis/swagger/pms-api-v3.yaml +++ b/docs/offeredapis/swagger/pms-api-v3.yaml @@ -19,625 +19,982 @@ openapi: 3.0.3 info: - title: ONAP CCSDK - A1 Policy Management API - version: 1.0.0 - x-api-id: e9776a07-0813-4fca-9801-6f892f0a7c13 - x-audience: external-public - description: "

      General

      The ONAP CCSDK A1 Policy Management Service\ - \ provides a REST API for managing A1 policies.
      This document describes the latest API set - \ to perform tasks for:

      • A1 Policy creation, modification and deletion.
      • Monitoring\ - \ and maintaining consistency of the SMO view of A1 Policies and the Near-RT RICs
      • Maintaining\ - \ a view of each Near-RT RIC's supported A1 Policy Types
      • Supervision of registered services\ - \ (rApps). When a registered service is unavailable, its policies are removed.

      APIs\ - \ provided or defined by the service

      \ - \

      Note: parts of this API are strongly based on extracts of the O-RAN Alliance R1 Interface specification\ - \ for A1 Policy Management, and those parts should be considered '© O-RAN ALLIANCE - All rights reserved.'

      \ - \

      A1 Policy Management

      \ - \

      This is the latest API for managing A1 Policies. This API is partially compliant with O-RAN\ - \ Alliance R1 Interface specifications for A1 Policy Management:

      • A1 Policy retrieval, creation,\ + contact: + email: discuss-list@onap.com + url: https://www.onap.org/ + description: "

        General

        The ONAP CCSDK A1 Policy Management Service provides\ + \ a REST API for managing A1 policies.
        This document describes the latest\ + \ API set to perform tasks for:

        • A1 Policy creation, modification\ + \ and deletion.
        • Monitoring and maintaining consistency of the SMO view\ + \ of A1 Policies and the Near-RT RICs
        • Maintaining a view of each Near-RT\ + \ RIC's supported A1 Policy Types
        • Supervision of registered services (rApps).\ + \ When a registered service is unavailable, its policies are removed.

        APIs\ + \ provided or defined by the service

        Note: parts of this API are strongly\ + \ based on extracts of the O-RAN Alliance R1 Interface specification for A1 Policy\ + \ Management, and those parts should be considered '© O-RAN ALLIANCE - All rights\ + \ reserved.'

        A1 Policy Management

        This is the latest API for managing\ + \ A1 Policies. This API is partially compliant with O-RAN Alliance R1 Interface\ + \ specifications for A1 Policy Management:

        • A1 Policy retrieval, creation,\ \ modification and deletion.
        • Retrieval of supported A1 Policy Types for\ \ a Near-RT RIC
        • Retrieval of status for existing A1 policies

        Management\ \ of configuration

        API for updating and retrieval of the component configuration.\ \ Note that there other ways to maintain the configuration.

        Service Callbacks

        These\ \ are endpoints that are invoked by this service. The callbacks are registered\ - \ in this service at service registration.

        NearRT-RIC Repository (Older version)

        \ - \

        This is an API that provides support for looking up a NearRT-RIC. Each A1 policy\ - \ is targeted towards one Near-RT RIC.

        Health Check

        API used for supervision\ - \ of the A1 Policy Management Service.

        Service Registry and Supervision

        \ - \

        API used for registering services/clients/rApps. Each A1 Policy can be tagged with an owner.\ - \ If the owner service is registered, then the service can be optionally monitored by a heart-beat supervision\ - \ mechanism, and if the registered service becomes unavailable, then it is removed and all its A1 Policies are \ - \ deleted. Note that services do not need to be registered to create A1 Policies, but unregistered \ - \ services are not supervised. This is a feature that is optional to use.

        " + \ in this service at service registration.

        NearRT-RIC Repository (Older\ + \ version)

        This is an API that provides support for looking up a NearRT-RIC.\ + \ Each A1 policy is targeted towards one Near-RT RIC.

        Health Check

        API\ + \ used for supervision of the A1 Policy Management Service.

        Service Registry\ + \ and Supervision

        API used for registering services/clients/rApps. Each\ + \ A1 Policy can be tagged with an owner. If the owner service is registered, then\ + \ the service can be optionally monitored by a heart-beat supervision mechanism,\ + \ and if the registered service becomes unavailable, then it is removed and all\ + \ its A1 Policies are deleted. Note that services do not need to be registered\ + \ to create A1 Policies, but unregistered services are not supervised. This\ + \ is a feature that is optional to use.

        " license: - name: Copyright (C) 2024 - 2025 OpenInfra Foundation Europe. Licensed under the Apache 2 License. + name: Copyright (C) 2024 - 2025 OpenInfra Foundation Europe. Licensed under the + Apache 2 License. url: http://www.apache.org/licenses/LICENSE-2.0 - contact: - url: https://www.onap.org/ - email: discuss-list@onap.com + title: ONAP CCSDK - A1 Policy Management API + version: 1.0.0 + x-api-id: e9776a07-0813-4fca-9801-6f892f0a7c13 + x-audience: external-public externalDocs: - description: 'Based on parts of O-RAN ALLIANCE specification: O-RAN.WG2.R1AP-v07.00' - url: 'https://www.o-ran.org/specifications' + description: "Based on parts of O-RAN ALLIANCE specification: O-RAN.WG2.R1AP-v07.00" + url: https://www.o-ran.org/specifications servers: - - url: '{apiRoot}/a1-policy-management/v1' - variables: - apiRoot: - default: 'https://example.com' - description: 'This is the Host:Port or Address where the A1-Policy Management Service can be accessed. - Note: This URL path format aligns with the O-RAN Alliance R1-AP specifications for A1 Policy Management' +- url: "{apiRoot}/a1-policy-management/v1" + variables: + apiRoot: + default: https://example.com + description: "This is the Host:Port or Address where the A1-Policy Management\ + \ Service can be accessed. Note: This URL path format aligns with the O-RAN\ + \ Alliance R1-AP specifications for A1 Policy Management" tags: - - name: A1 Policy Management - description: > - API used to get, create, update and delete A1 Policy Instances. Also used to query A1 Policy Types. - - name: NearRT-RIC Repository - description: > - API used to get information about registered Near-RT RICs. - - name: Service Registry and Supervision - description: > - API used to manage registered services, and control their keep-alive status via heart-beat messages. - - name: Health Check - description: > - API used to get the health status and statistics of this service. - - name: Configuration - description: > - API used to create or fetch the application configuration. +- description: | + API used to get, create, update and delete A1 Policy Instances. Also used to query A1 Policy Types. + name: A1 Policy Management +- description: | + API used to get information about registered Near-RT RICs. + name: NearRT-RIC Repository +- description: | + API used to manage registered services, and control their keep-alive status via heart-beat messages. + name: Service Registry and Supervision +- description: | + API used to get the health status and statistics of this service. + name: Health Check +- description: | + API used to create or fetch the application configuration. + name: Configuration paths: /status: get: - operationId: getStatus description: Returns status and statistics of this service - summary: Get Status (getStatus) - tags: - - Health Check + operationId: getStatus responses: "200": content: application/json: - schema: - $ref: '#/components/schemas/StatusInfo' examples: status_info: $ref: '#/components/examples/StatusInfo' + schema: + $ref: '#/components/schemas/StatusInfo' description: OK- Service is living Ok "404": - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + summary: Get Status (getStatus) + tags: + - Health Check /rics/{ricId}: get: - operationId: getRic description: Get information about a Near-RT RIC - summary: Get a Near-RT RIC (getRic) - tags: - - NearRT-RIC Repository + operationId: getRic parameters: - - description: The identity of a Near-RT RIC to get information for. - explode: true - in: path - name: ricId - required: true - schema: - type: string - nullable: false - - description: Specifies the content type that the client expects to receive in response to the request. - Only application/json is allowed. - in: header - name: Accept - schema: - type: string - example: application/json + - description: The identity of a Near-RT RIC to get information for. + explode: true + in: path + name: ricId + required: true + schema: + nullable: false + type: string + - description: Specifies the content type that the client expects to receive + in response to the request. Only application/json is allowed. + in: header + name: Accept + schema: + example: application/json + type: string responses: "200": content: application/json: - schema: - $ref: '#/components/schemas/RicInfo' examples: ric_info: $ref: '#/components/examples/RicInfo' + schema: + $ref: '#/components/schemas/RicInfo' description: OK - Near-RT RIC is found OK "404": - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + summary: Get a Near-RT RIC (getRic) + tags: + - NearRT-RIC Repository /rics: get: - operationId: getRics description: Get all Near-RT RICs that supports a given A1 Policy Type ID - summary: Get Near-RT RICs for A1 Policy Type (getRics) - tags: - - NearRT-RIC Repository + operationId: getRics parameters: - - description: > - The identity of an A1 Policy Type. If given, all Near-RT RICs supporting - the A1 Policy Type are returned. - explode: true - in: query - name: policyTypeId - required: false - schema: - type: string - style: form - - description: Specifies the content type that the client expects to receive in response to the request. - Only application/json is allowed. - in: header - name: Accept - schema: - type: string - example: application/json + - description: | + The identity of an A1 Policy Type. If given, all Near-RT RICs supporting the A1 Policy Type are returned. + explode: true + in: query + name: policyTypeId + required: false + schema: + type: string + style: form + - description: Specifies the content type that the client expects to receive + in response to the request. Only application/json is allowed. + in: header + name: Accept + schema: + example: application/json + type: string responses: "200": content: application/json: - schema: - $ref: '#/components/schemas/RicInfoList' examples: ric_info_list: $ref: '#/components/examples/RicInfoList' + schema: + $ref: '#/components/schemas/RicInfoList' description: OK "404": - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + summary: Get Near-RT RICs for A1 Policy Type (getRics) + tags: + - NearRT-RIC Repository /policy-types: get: description: Query A1 Policy Type identities using query parameters operationId: getPolicyTypes - summary: Get A1 Policy Types (getPolicyTypes) - tags: - - A1 Policy Management parameters: - - description: Select types for the given Near-RT RIC identity. - explode: true - in: query - name: nearRtRicId - required: false - schema: - type: string - style: form - - description: Select types compatible with the given type name (type identity has the format 'typename_version') - explode: true - in: query - name: typeName - required: false - schema: - type: string - style: form - - description: > - Select types that are compatible with the given version. This - parameter is only applicable in conjunction with typeName. As an example - version 1.9.1 is compatible with 1.0.0 but not the other way around. Matching - types will be returned sorted in ascending order. - explode: true - in: query - name: compatibleWithVersion - required: false - schema: - type: string - style: form - - description: Specifies the content type that the client expects to receive in response to the request. - Only application/json is allowed. - in: header - name: Accept - schema: - type: string - example: application/json + - description: Select types for the given Near-RT RIC identity. + explode: true + in: query + name: nearRtRicId + required: false + schema: + type: string + style: form + - description: Select types compatible with the given type name (type identity + has the format 'typename_version') + explode: true + in: query + name: typeName + required: false + schema: + type: string + style: form + - description: | + Select types that are compatible with the given version. This parameter is only applicable in conjunction with typeName. As an example version 1.9.1 is compatible with 1.0.0 but not the other way around. Matching types will be returned sorted in ascending order. + explode: true + in: query + name: compatibleWithVersion + required: false + schema: + type: string + style: form + - description: Specifies the content type that the client expects to receive + in response to the request. Only application/json is allowed. + in: header + name: Accept + schema: + example: application/json + type: string responses: - '200': + "200": content: application/json: + examples: + PolicyTypeInformation: + $ref: '#/components/examples/PolicyTypeInformation' schema: items: $ref: '#/components/schemas/PolicyTypeInformation' type: array - examples: - PolicyTypeInformation: - $ref: '#/components/examples/PolicyTypeInformation' description: OK - Policy Type IDs found Ok - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '429': - $ref: '#/components/responses/429' - '500': - $ref: '#/components/responses/500' - '502': - $ref: '#/components/responses/502' - '503': - $ref: '#/components/responses/503' + "400": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Request + "401": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized + "403": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Forbidden + "404": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + "406": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Acceptable + "429": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Too Many Requests + "500": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error + "502": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Gateway + "503": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable + summary: Get A1 Policy Types (getPolicyTypes) + tags: + - A1 Policy Management /policy-types/{policyTypeId}: get: - operationId: getPolicyTypeDefinition description: Get an A1 Policy Type definition using its policy type ID - summary: Get an A1 Policy Type definition (getPolicyTypeDefinition) - tags: - - A1 Policy Management + operationId: getPolicyTypeDefinition parameters: - - explode: false - in: path - name: policyTypeId - required: true - schema: - type: string - style: simple - - description: Specifies the content type that the client expects to receive in response to the request. - Only application/json is allowed. - in: header - name: Accept - schema: - type: string - example: application/json + - explode: false + in: path + name: policyTypeId + required: true + schema: + type: string + style: simple + - description: Specifies the content type that the client expects to receive + in response to the request. Only application/json is allowed. + in: header + name: Accept + schema: + example: application/json + type: string responses: - '200': + "200": content: application/json: - schema: - $ref: '#/components/schemas/PolicyTypeObject' examples: PolicyTypeObject: $ref: '#/components/examples/PolicyTypeObject' + schema: + $ref: '#/components/schemas/PolicyTypeObject' description: OK - details and schema of the requested A1 Policy Type - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '429': - $ref: '#/components/responses/429' - '500': - $ref: '#/components/responses/500' - '502': - $ref: '#/components/responses/502' - '503': - $ref: '#/components/responses/503' - /policies/{policyId}: - put: - operationId: putPolicy - description: Update an existing A1 Policy instance's policy data using its policy ID. - summary: Update an A1 Policy's policy data (putPolicy) + "400": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Request + "401": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized + "403": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Forbidden + "404": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + "406": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Acceptable + "429": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Too Many Requests + "500": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error + "502": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Gateway + "503": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable + summary: Get an A1 Policy Type definition (getPolicyTypeDefinition) tags: - - A1 Policy Management + - A1 Policy Management + /policies/{policyId}: + delete: + description: Delete an existing A1 Policy instance using its policy ID. + operationId: deletePolicy parameters: - - name: policyId - in: path - required: true - schema: - type: string - requestBody: + - explode: false + in: path + name: policyId required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyObject' - examples: - policyObject: - $ref: '#/components/examples/PolicyObject' + schema: + type: string + style: simple + - description: Specifies the content type that the client expects to receive + in response to the request. Only application/json is allowed. + in: header + name: Accept + schema: + example: application/json + type: string responses: - '200': + "204": + description: No Content + "400": content: - application/json: + application/problem+json: schema: - $ref: '#/components/schemas/PolicyObject' - description: OK - Policy updated - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '411': - $ref: '#/components/responses/411' - '413': - $ref: '#/components/responses/413' - '415': - $ref: '#/components/responses/415' - '423': - $ref: '#/components/responses/Locked' - '429': - $ref: '#/components/responses/429' - '500': - $ref: '#/components/responses/500' - '502': - $ref: '#/components/responses/502' - '503': - $ref: '#/components/responses/503' - delete: - operationId: deletePolicy - description: Delete an existing A1 Policy instance using its policy ID. + $ref: '#/components/schemas/ProblemDetails' + description: Bad Request + "401": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized + "403": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Forbidden + "404": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + "405": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Method Not Allowed + "406": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Acceptable + "423": + content: + application/problem+json: + example: + status: 423 + title: Locked + detail: State is Locked in the provided request. + schema: + $ref: '#/components/schemas/ErrorInformation' + description: Locked - HTTP Status code which can be used when the state + is Locked + "429": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Too Many Requests + "500": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error + "502": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Gateway + "503": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable summary: Delete an A1 Policy instance (deletePolicy) tags: - - A1 Policy Management - parameters: - - explode: false - in: path - name: policyId - required: true - schema: - type: string - style: simple - - description: Specifies the content type that the client expects to receive in response to the request. - Only application/json is allowed. - in: header - name: Accept - schema: - type: string - example: application/json - responses: - '204': - description: 'No Content' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '405': - $ref: '#/components/responses/405' - '406': - $ref: '#/components/responses/406' - '423': - $ref: '#/components/responses/Locked' - '429': - $ref: '#/components/responses/429' - '500': - $ref: '#/components/responses/500' - '502': - $ref: '#/components/responses/502' - '503': - $ref: '#/components/responses/503' + - A1 Policy Management get: - operationId: getPolicy description: Get an A1 Policy instance's policy data using its policy ID - summary: Get an A1 Policy's policy data (getPolicy) - tags: - - A1 Policy Management + operationId: getPolicy parameters: - - explode: false - in: path - name: policyId - required: true - schema: - type: string - style: simple - - description: Specifies the content type that the client expects to receive in response to the request. - Only application/json is allowed. - in: header - name: Accept - schema: - type: string - example: application/json + - explode: false + in: path + name: policyId + required: true + schema: + type: string + style: simple + - description: Specifies the content type that the client expects to receive + in response to the request. Only application/json is allowed. + in: header + name: Accept + schema: + example: application/json + type: string responses: - '200': + "200": content: application/json: - schema: - $ref: '#/components/schemas/PolicyObject' examples: policyObject: $ref: '#/components/examples/PolicyObject' + schema: + $ref: '#/components/schemas/PolicyObject' description: OK - Policy found - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '429': - $ref: '#/components/responses/429' - '500': - $ref: '#/components/responses/500' - '502': - $ref: '#/components/responses/502' - '503': - $ref: '#/components/responses/503' - /policies/{policyId}/status: - get: - operationId: getPolicyStatus - description: Retrieve the status information for an A1 Policy Instance using its policy ID. - summary: Get an A1 Policy Instance's status (getPolicyStatus) - tags: - - A1 Policy Management - parameters: - - explode: false - in: path - name: policyId - required: true - schema: - type: string - style: simple - - description: Specifies the content type that the client expects to receive in response to the request. - Only application/json is allowed. - in: header - name: Accept - schema: - type: string - example: application/json - responses: - '200': + "400": content: - application/json: + application/problem+json: schema: - $ref: '#/components/schemas/PolicyStatusObject' - description: OK - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '429': - $ref: '#/components/responses/429' - '500': - $ref: '#/components/responses/500' - '502': - $ref: '#/components/responses/502' - '503': - $ref: '#/components/responses/503' - /policies: - get: - operationId: getAllPolicies - description: > - Returns a collection of A1 Policy Instance IDs for policies that match given search criteria. - If several query parameters are defined, the policies matching all conditions are returned. - summary: Query for A1 Policy instances (getAllPolicies) - tags: - - A1 Policy Management - parameters: - - description: Select policies with a given A1 Policy Type ID. - explode: true - in: query - name: policyTypeId - required: false - schema: - type: string - style: form - - description: Select policies for a given Near-RT RIC identity. - explode: true - in: query - name: nearRtRicId - required: false - schema: - type: string - style: form - - description: Select policies owned by a given service (registered or unregistered). - explode: true - in: query - name: serviceId - required: false - schema: - type: string - style: form - - description: Select policies of a given A1 Policy Type name (type identity has the format 'typename_version'). - explode: true - in: query - name: typeName - required: false - schema: - type: string - style: form - - description: Specifies the content type that the client expects to receive in response to the request. - Only application/json is allowed. - in: header - name: Accept - schema: - type: string - example: application/json - responses: - '200': + $ref: '#/components/schemas/ProblemDetails' + description: Bad Request + "401": content: - application/json: + application/problem+json: schema: - items: - $ref: '#/components/schemas/PolicyInformation' - type: array - description: OK - Policy identities - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '429': - $ref: '#/components/responses/429' - '500': - $ref: '#/components/responses/500' - '502': - $ref: '#/components/responses/502' - '503': - $ref: '#/components/responses/503' - post: - operationId: createPolicy - description: Create an A1 Policy Instance - summary: Create an A1 Policy Instance (createPolicy) + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized + "403": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Forbidden + "404": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + "406": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Acceptable + "429": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Too Many Requests + "500": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error + "502": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Gateway + "503": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable + summary: Get an A1 Policy's policy data (getPolicy) tags: - - A1 Policy Management + - A1 Policy Management + put: + description: Update an existing A1 Policy instance's policy data using its policy + ID. + operationId: updatePolicy + parameters: + - in: path + name: policyId + required: true + schema: + type: string requestBody: + content: + application/json: + examples: + policyObject: + $ref: '#/components/examples/PolicyObject' + schema: + $ref: '#/components/schemas/PolicyObject' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyObject' + description: OK - Policy updated + "400": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Request + "401": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized + "403": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Forbidden + "404": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + "406": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Acceptable + "411": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Length Required + "413": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Payload Too Large + "415": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unsupported Media Type + "423": + content: + application/problem+json: + example: + status: 423 + title: Locked + detail: State is Locked in the provided request. + schema: + $ref: '#/components/schemas/ErrorInformation' + description: Locked - HTTP Status code which can be used when the state + is Locked + "429": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Too Many Requests + "500": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error + "502": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Gateway + "503": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable + summary: Update an A1 Policy's policy data (updatePolicy) + tags: + - A1 Policy Management + /policies/{policyId}/status: + get: + description: Retrieve the status information for an A1 Policy Instance using + its policy ID. + operationId: getPolicyStatus + parameters: + - explode: false + in: path + name: policyId required: true + schema: + type: string + style: simple + - description: Specifies the content type that the client expects to receive + in response to the request. Only application/json is allowed. + in: header + name: Accept + schema: + example: application/json + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyStatusObject' + description: OK + "400": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Request + "401": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized + "403": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Forbidden + "404": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + "406": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Acceptable + "429": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Too Many Requests + "500": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error + "502": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Gateway + "503": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable + summary: Get an A1 Policy Instance's status (getPolicyStatus) + tags: + - A1 Policy Management + /policies: + get: + description: | + Returns a collection of A1 Policy Instance IDs for policies that match given search criteria. If several query parameters are defined, the policies matching all conditions are returned. + operationId: getPolicyIds + parameters: + - description: Select policies with a given A1 Policy Type ID. + explode: true + in: query + name: policyTypeId + required: false + schema: + type: string + style: form + - description: Select policies for a given Near-RT RIC identity. + explode: true + in: query + name: nearRtRicId + required: false + schema: + type: string + style: form + - description: Select policies owned by a given service (registered or unregistered). + explode: true + in: query + name: serviceId + required: false + schema: + type: string + style: form + - description: Select policies of a given A1 Policy Type name (type identity + has the format 'typename_version'). + explode: true + in: query + name: typeName + required: false + schema: + type: string + style: form + - description: Specifies the content type that the client expects to receive + in response to the request. Only application/json is allowed. + in: header + name: Accept + schema: + example: application/json + type: string + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/PolicyInformation' + type: array + description: OK - Policy identities + "400": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Request + "401": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized + "403": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Forbidden + "404": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + "406": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Acceptable + "429": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Too Many Requests + "500": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error + "502": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Gateway + "503": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable + summary: Query for A1 Policy instances (getPolicyIds) + tags: + - A1 Policy Management + post: + description: Create an A1 Policy Instance + operationId: createPolicy + requestBody: content: application/json: schema: $ref: '#/components/schemas/PolicyObjectInformation' + required: true responses: - '201': - description: 'Created' + "201": content: application/json: schema: $ref: '#/components/schemas/PolicyObjectInformation' + description: Created headers: Location: - description: > - Contains the URI of the newly created A1 Policy Instances. - This URI includes the A1 Policy Instance ID for the newly - created policy instance. + description: | + Contains the URI of the newly created A1 Policy Instances. This URI includes the A1 Policy Instance ID for the newly created policy instance. required: true schema: type: string Content-Type: - description: 'Media Type of the response' + description: Media Type of the response schema: - type: string example: application/json - - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '405': - $ref: '#/components/responses/405' - '406': - $ref: '#/components/responses/406' - '409': - $ref: '#/components/responses/409' - '413': - $ref: '#/components/responses/413' - '415': - $ref: '#/components/responses/415' - '423': - $ref: '#/components/responses/Locked' - '429': - $ref: '#/components/responses/429' - '500': - $ref: '#/components/responses/500' - '502': - $ref: '#/components/responses/502' - '503': - $ref: '#/components/responses/503' + type: string + "400": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Request + "401": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized + "403": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Forbidden + "404": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + "405": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Method Not Allowed + "406": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Acceptable + "409": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Conflict + "413": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Payload Too Large + "415": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unsupported Media Type + "423": + content: + application/problem+json: + example: + status: 423 + title: Locked + detail: State is Locked in the provided request. + schema: + $ref: '#/components/schemas/ErrorInformation' + description: Locked - HTTP Status code which can be used when the state + is Locked + "429": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Too Many Requests + "500": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error + "502": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Gateway + "503": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable + summary: Create an A1 Policy Instance (createPolicy) + tags: + - A1 Policy Management /configuration: get: - operationId: getConfiguration description: Returns the entire contents of the Application Configuration. - tags: - - Configuration - summary: Get the Application Configuration (getConfiguration) + operationId: getConfiguration responses: "200": content: @@ -646,17 +1003,18 @@ paths: type: string description: OK - Application configuration received "404": - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + summary: Get the Application Configuration (getConfiguration) + tags: + - Configuration put: + description: | + Replace the current Application Configuration with a new configuration. The new configuration, if accepted, will take effect after a short delay. The new configuration must comply with the Application Configuration schema, which can be found from the the Application Documentation (Developer Guide) operationId: putConfiguration - description: > - Replace the current Application Configuration with a new configuration. - The new configuration, if accepted, will take effect after a short delay. - The new configuration must comply with the Application Configuration schema, - which can be found from the the Application Documentation (Developer Guide) - tags: - - Configuration - summary: Set/Replace the Application Configuration (putConfiguration) requestBody: content: application/json: @@ -666,139 +1024,110 @@ paths: responses: "200": content: - 'application/json': + application/json: schema: $ref: '#/components/schemas/void' description: OK - Configuration updated "400": - $ref: '#/components/responses/400' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Request + summary: Set/Replace the Application Configuration (putConfiguration) + tags: + - Configuration /services/{serviceId}/keepalive: put: + description: "A registered service should invoke this operation regularly to\ + \ indicate that it is still alive. If a registered service fails to invoke\ + \ some operation, or this operation, before the end of a timeout period the\ + \ service will be deregistered and all its A1 policies wil be removed and\ + \ the service is deleted. This operation is only intended for registered services.\ + \ (This timeout can be set or disabled when each service is initially registered).\ + \ Unregistered services do not need to invoke this operation, since the optional\ + \ keep-alive monitoring feature can only be enabled for registered services." operationId: keepAliveService - description: A registered service should invoke this operation regularly to - indicate that it is still alive. If a registered service fails to invoke some operation, - or this operation, before the end of a timeout period the service will be deregistered - and all its A1 policies wil be removed and the service is deleted. - This operation is only intended for registered services. (This timeout can be set or disabled when - each service is initially registered). Unregistered services do not need to invoke this operation, - since the optional keep-alive monitoring feature can only be enabled for registered services. - summary: Heartbeat message from a service (keepAliveService) - tags: - - Service Registry and Supervision parameters: - - explode: false - in: path - name: serviceId - required: true - schema: - type: string - style: simple - - description: Specifies the content type that the client expects to receive in response to the request. - Only application/json is allowed. - in: header - name: Accept - schema: - type: string - example: application/json - requestBody: - required: false - content: - application/json: - schema: - type: string + - explode: false + in: path + name: serviceId + required: true + schema: + type: string + style: simple + - description: Specifies the content type that the client expects to receive + in response to the request. Only application/json is allowed. + in: header + name: Accept + schema: + example: application/json + type: string responses: "200": content: - 'application/json': + application/json: schema: type: object - description: OK - Service supervision timer refreshed, OK + description: "OK - Service supervision timer refreshed, OK" "404": - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + summary: Heartbeat message from a service (keepAliveService) + tags: + - Service Registry and Supervision /services: get: + description: | + Get information about all registered services, or a single registered service. If the service ID of a registered service is included in the query, information about that service is returned. Otherwise Information about all registered is returned. This operation does not retrieve information about unregistered services. operationId: getServices - description: > - Get information about all registered services, or a single registered service. - If the service ID of a registered service is included in the query, information about that - service is returned. Otherwise Information about all registered is returned. - This operation does not retrieve information about unregistered services. - summary: Get Services (getServices) - tags: - - Service Registry and Supervision parameters: - - description: The identity of the registered service - explode: true - in: query - name: serviceId - required: false - schema: - type: string - style: form - - description: Specifies the content type that the client expects to receive in response to the request. - Only application/json is allowed. - in: header - name: Accept - schema: - type: string - example: application/json + - description: The identity of the registered service + explode: true + in: query + name: serviceId + required: false + schema: + type: string + style: form + - description: Specifies the content type that the client expects to receive + in response to the request. Only application/json is allowed. + in: header + name: Accept + schema: + example: application/json + type: string responses: "200": content: application/json: - schema: - $ref: '#/components/schemas/ServiceStatusList' examples: service_status_list: $ref: '#/components/examples/ServiceStatusList' + schema: + $ref: '#/components/schemas/ServiceStatusList' description: OK "404": - $ref: '#/components/responses/404' - put: - operationId: putService - description: > - Register a single service, or update a previous registration. - Service registration is required to get callbacks about available NearRT RICs - and to enable supervision of the service's active status. If a registered - service becomes inactive, its policies can be automatically deleted. - A1 Policy instances can also be created for unregistered services. - If an unregistered service is later registered, the service's policies are - retained when the service becomes registered. This feature is optional to use. - summary: Register or update a Service (putService) - tags: - - Service Registry and Supervision - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ServiceRegistrationInfo' - required: true - responses: - "200": - content: - 'application/json': - schema: - type: object - description: OK - Service updated - "201": content: - 'application/json': + application/problem+json: schema: - type: object - description: Created - Service created - "400": - $ref: '#/components/responses/400' + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + summary: Get Services (getServices) + tags: + - Service Registry and Supervision + put: callbacks: RICStatus: - "{$request.body#/callback_url}": + '{$request.body#/callback_url}': post: + description: "Callouts to indicate Near-RT RIC status changes relevant\ + \ for Services. \nThe URL invoked by this callback is provided at\ + \ Service registration.\n" operationId: serviceCallback - description: | - Callouts to indicate Near-RT RIC status changes relevant for Services. - The URL invoked by this callback is provided at Service registration. - summary: Callback for Near-RT RIC status (serviceCallback) - tags: - - Service Registry and Supervision requestBody: content: application/json: @@ -813,57 +1142,84 @@ paths: $ref: '#/components/schemas/void' description: OK "404": - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + summary: Callback for Near-RT RIC status (serviceCallback) + tags: + - Service Registry and Supervision + x-callback-request: true + description: | + Register a single service, or update a previous registration. Service registration is required to get callbacks about available NearRT RICs and to enable supervision of the service's active status. If a registered service becomes inactive, its policies can be automatically deleted. A1 Policy instances can also be created for unregistered services. If an unregistered service is later registered, the service's policies are retained when the service becomes registered. This feature is optional to use. + operationId: putService + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceRegistrationInfo' + required: true + responses: + "200": + content: + application/json: + schema: + type: object + description: OK - Service updated + "201": + content: + application/json: + schema: + type: object + description: Created - Service created + "400": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Request + summary: Register or update a Service (putService) + tags: + - Service Registry and Supervision /services/{serviceId}: delete: + description: | + Unregister a registered Service using its service ID. Only registered services can be unregistered. All A1 Policy Instances for the previously registered service will be removed. operationId: deleteService - description: > - Unregister a registered Service using its service ID. - Only registered services can be unregistered. All A1 Policy Instances - for the previously registered service will be removed. - tags: - - Service Registry and Supervision - summary: Unregister a Service (deleteService) parameters: - - explode: false - in: path - name: serviceId - required: true - schema: - type: string - style: simple - - description: Specifies the content type that the client expects to receive in response to the request. - Only application/json is allowed. - in: header - name: Accept - schema: - type: string - example: application/json + - explode: false + in: path + name: serviceId + required: true + schema: + type: string + style: simple + - description: Specifies the content type that the client expects to receive + in response to the request. Only application/json is allowed. + in: header + name: Accept + schema: + example: application/json + type: string responses: "204": content: - 'application/json': + application/json: schema: type: object description: No Content - Service unregistered "404": - $ref: '#/components/responses/404' - + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + summary: Unregister a Service (deleteService) + tags: + - Service Registry and Supervision components: - examples: - ServiceStatusList: - description: List of service information - value: - serviceList: - - callbackUrl: http://callback.url - serviceId: serviceId1 - keepAliveIntervalSeconds: 0 - timeSinceLastActivitySeconds: 6 - - callbackUrl: http://callback.url - serviceId: serviceId2 - keepAliveIntervalSeconds: 500 - timeSinceLastActivitySeconds: 401 StatusInfo: value: status: success @@ -871,61 +1227,33 @@ components: value: ricId: ricId1 managedElementIds: - - "Note #1" - - "Athlone small cells" - - "Some optional string" + - "Note #1" + - Athlone small cells + - Some optional string state: UNAVAILABLE policyTypeIds: - - policyTypeId1 - - policyTypeId2 + - policyTypeId1 + - policyTypeId2 RicInfoList: value: rics: - - ricId: ricId1 - managedElementIds: - - "Note #1" - - "Athlone small cells" - - "Fake Cells" - state: UNAVAILABLE - policyTypeIds: - - policyTypeId1 - - policyTypeId2 - - ricId: ricId2 - managedElementIds: - - "My test element" - - "Another test element" - state: UNAVAILABLE - policyTypeIds: - - policyTypeId3 - - policyTypeId4 - PolicyObject: - value: - scope: - ueId: - guRanUeId: - globalGnbId: - plmnId: - mcc: "123" - mnc: "45" - gnbId: - gnbIdLength: 24 - gnbIdValue: 12345678 - RanUeId: 'a31c510b20e64a74' - groupId: - spId: 123 - qosId: - 5qI: 1 - cellId: - plmnId: - mcc: "123" - mnc: "45" - cId: - ncI: 123 - qosObjectives: - gfbr: 100 - mfbr: 200 - priorityLevel: 3 - pdb: 50 + - ricId: ricId1 + managedElementIds: + - "Note #1" + - Athlone small cells + - Fake Cells + state: UNAVAILABLE + policyTypeIds: + - policyTypeId1 + - policyTypeId2 + - ricId: ricId2 + managedElementIds: + - My test element + - Another test element + state: UNAVAILABLE + policyTypeIds: + - policyTypeId3 + - policyTypeId4 PolicyTypeInformation: value: - policyTypeId: STD_QOS2_0.1.0 @@ -939,7 +1267,7 @@ components: PolicyTypeObject: value: policySchema: - "$schema": http://json-schema.org/draft-07/schema# + $schema: http://json-schema.org/draft-07/schema# title: STD_QOS_0_2_0 description: STD QOS2 policy type type: object @@ -953,8 +1281,8 @@ components: type: string additionalProperties: false required: - - ueId - - qosId + - ueId + - qosId qosObjectives: type: object properties: @@ -962,173 +1290,184 @@ components: type: number additionalProperties: false required: - - priorityLevel - + - priorityLevel + PolicyObject: + value: + scope: + ueId: + guRanUeId: + globalGnbId: + plmnId: + mcc: "123" + mnc: "45" + gnbId: + gnbIdLength: 24 + gnbIdValue: 12345678 + RanUeId: a31c510b20e64a74 + groupId: + spId: 123 + qosId: + "5qI": 1 + cellId: + plmnId: + mcc: "123" + mnc: "45" + cId: + ncI: 123 + qosObjectives: + gfbr: 100 + mfbr: 200 + priorityLevel: 3 + pdb: 50 + ServiceStatusList: + description: List of service information + value: + serviceList: + - callbackUrl: http://callback.url + serviceId: serviceId1 + keepAliveIntervalSeconds: 0 + timeSinceLastActivitySeconds: 6 + - callbackUrl: http://callback.url + serviceId: serviceId2 + keepAliveIntervalSeconds: 500 + timeSinceLastActivitySeconds: 401 + responses: + "404": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + "400": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Request + "401": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized + "403": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Forbidden + "406": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Acceptable + "429": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Too Many Requests + "500": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error + "502": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad Gateway + "503": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable + "411": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Length Required + "413": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Payload Too Large + "415": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unsupported Media Type + Locked: + content: + application/problem+json: + example: + status: 423 + title: Locked + detail: State is Locked in the provided request. + schema: + $ref: '#/components/schemas/ErrorInformation' + description: Locked - HTTP Status code which can be used when the state is Locked + "405": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Method Not Allowed + "409": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Conflict schemas: - PolicyTypeInformation: - description: >- - A data tuple to indicate that an identified A1 Policy Type is supported at an identified Near-RT RIC. - type: object + StatusInfo: + example: + status: status properties: - policyTypeId: - description: A1 Policy Type identifier + status: + description: Status text type: string - nearRtRicId: - $ref: '#/components/schemas/NearRtRicId' - required: - - policyTypeId - - nearRtRicId - example: - policyTypeId: STD_QOS2_0.1.0 - nearRtRicId: ric_g3_2 - PolicyObjectInformation: - description: Information to create an A1 Policy Instance type: object + ProblemDetails: + description: Object to carry details about a problem in an HTTP response according + to IETF RFC 7807 properties: - nearRtRicId: - description: Identity of the target Near-RT RIC - type: string - example: - 'Near-RT-Ric-ID1' - transient: - default: false - description: > - If true, the policy is automatically deleted if the targeted Near-RT RIC restarts - or recovers. If false, the A1 Policy Instance remains, and is re-pushed to the targeted - Near-RT RIC after a restart or recovery. If false, the A1 Policy Instance is maintained and - must be deleted separately in the event of Near-RT RIC restart or recovery. Default is false. - nullable: false - type: boolean - policyId: - description: > - An optional identity to be used for the new A1 Policy Instance. - If this value is present, it must be unique. If not present the new A1 - Policy Instance will be assigned a newly generated unique ID, and the - new ID can be extracted from the 'Location' header in the response. - type: string - example: - 'POLICY-ID1' - serviceId: - description: the identity of the service owning the policy. This can be - used to group the policies (it is possible to get all policies associated - to a service). Note that the service does not need to be registered. - If the service is registered, the newly created A1 Policy Instance will be - subject to the same supervision rules as the the service's other policies. + type: + description: URI reference according to IETF RFC 3986 that identifies the + problem type type: string - example: - 'rApp 1' - default: "" - policyObject: - $ref: '#/components/schemas/PolicyObject' - policyTypeId: - description: A1 Policy Type identity + title: + description: Human-readable summary of the problem type type: string - example: ORAN_QOS_1.0.0 '(typeName_SemVersion)' - required: - - nearRtRicId - - policyObject - - policyTypeId - ErrorInformation: - description: Problem as defined in https://tools.ietf.org/html/rfc7807 - properties: + status: + description: HTTP status code + type: number detail: - description: A human-readable explanation specific to this occurrence of the problem. - example: Policy type not found + description: Human-readable explanation type: string - title: - description: A specific error name - type: string - example: Not Found - status: - description: | - The HTTP status code generated by the origin server for this occurrence of the problem. - example: 404 - format: int32 - type: integer - type: object - PolicyObject: - description: > - Policy Object is a JSON representation policy data for an A1 Policy Instance. - The schema for this policy data is defined in the corresponding A1 Policy Type. - type: object - PolicyTypeObject: - description: An A1 Policy Type, as defined in O-RAN Alliance A1TD - type: object - properties: - policySchema: - $ref: '#/components/schemas/PolicySchema' - statusSchema: - $ref: '#/components/schemas/StatusSchema' - required: - - policySchema - example: - policySchema: - "$schema": http://json-schema.org/draft-07/schema# - title: STD_QOS_0_2_0 - description: Policy data schema for STD_QOS_0.2.0 A1 Policy Instances. - type: object - properties: - scope: - type: object - properties: - ueId: - type: string - qosId: - type: string - additionalProperties: false - required: - - ueId - - qosId - qosObjectives: - type: object - properties: - priorityLevel: - type: number - additionalProperties: false - required: - - priorityLevel - statusSchema: - "$schema": http://json-schema.org/draft-07/schema# - title: STD_QOS_0.2.0 - description: Status schema for STD_QOS_0.2.0 A1 Policy Instances. - type: object - properties: - enforceStatus: - type: string - enforceReason: - type: string - additionalProperties: false - required: - - enforceStatus - PolicySchema: - description: > - A schema to define the policy data contents of A1 Policy Instances. - Policy data schemas are Policy Type specific. - All A1 Policy Instances of an A1 Policy Type should comply with the type's policy data schema. - type: object - StatusSchema: - description: > - A schema to define the contents of the status information for A1 Policy Instances. - Status schemas are Policy Type specific. - All status information for all A1 Policy Instances of an A1 Policy Type should comply - with the type's status schema. - type: object - PolicyStatusObject: - description: > - A generic policy status object that can be used to transport any policy status. - Additionally, a schema for policy status can be defined in the corresponding A1 Policy Type. - type: object - void: - description: Void/empty - type: object - StatusInfo: - properties: - status: - description: Status text + instance: + description: URI reference that identifies the specific occurrence of the + problem type: string type: object RicInfo: description: Information for a Near-RT RIC + example: + ricId: ricId + policyTypeIds: + - policyTypeIds + - policyTypeIds + managedElementIds: + - managedElementIds + - managedElementIds + state: UNAVAILABLE properties: ricId: description: Identity of the Near-RT RIC @@ -1142,10 +1481,10 @@ components: state: description: Represents the state of a Near-RT RIC enum: - - UNAVAILABLE - - AVAILABLE - - SYNCHRONIZING - - CONSISTENCY_CHECK + - UNAVAILABLE + - AVAILABLE + - SYNCHRONIZING + - CONSISTENCY_CHECK type: string policyTypeIds: description: Supported A1 Policy Types @@ -1154,31 +1493,235 @@ components: type: string type: array type: object - ServiceRegistrationInfo: - description: Information for a service to be registered + RicInfoList: + description: Collection of Near-RT RIC information objects + example: + rics: + - ricId: ricId + policyTypeIds: + - policyTypeIds + - policyTypeIds + managedElementIds: + - managedElementIds + - managedElementIds + state: UNAVAILABLE + - ricId: ricId + policyTypeIds: + - policyTypeIds + - policyTypeIds + managedElementIds: + - managedElementIds + - managedElementIds + state: UNAVAILABLE properties: - callbackUrl: - description: Callback URL for notifying of Near-RT RIC state changes + rics: + description: List of Near-RT RIC information objects + items: + $ref: '#/components/schemas/RicInfo' + type: array + type: object + PolicyTypeInformation: + description: A data tuple to indicate that an identified A1 Policy Type is supported + at an identified Near-RT RIC. + example: + policyTypeId: STD_QOS2_0.1.0 + nearRtRicId: ric_g3_2 + properties: + policyTypeId: + description: A1 Policy Type identifier type: string - serviceId: - description: Identity of the service + nearRtRicId: + description: Identity of the Near-RT RIC type: string - keepAliveIntervalSeconds: - description: > - Keep alive interval for the service. This is used to enable - optional heartbeat supervision of the service. If set (> 0) the registered - service should regularly invoke a 'keepalive' REST call. When a service - fails to invoke this 'keepalive' call within the configured time, the - service is considered unavailable. An unavailable service will be automatically - deregistered and its policies will be deleted. Value 0 means timeout - supervision is disabled. - format: int64 + required: + - nearRtRicId + - policyTypeId + type: object + NearRtRicId: + description: Identity of the Near-RT RIC + type: string + PolicyTypeObject: + description: "An A1 Policy Type, as defined in O-RAN Alliance A1TD" + example: + policySchema: + $schema: http://json-schema.org/draft-07/schema# + title: STD_QOS_0_2_0 + description: Policy data schema for STD_QOS_0.2.0 A1 Policy Instances. + type: object + properties: + scope: + type: object + properties: + ueId: + type: string + qosId: + type: string + additionalProperties: false + required: + - ueId + - qosId + qosObjectives: + type: object + properties: + priorityLevel: + type: number + additionalProperties: false + required: + - priorityLevel + statusSchema: + $schema: http://json-schema.org/draft-07/schema# + title: STD_QOS_0.2.0 + description: Status schema for STD_QOS_0.2.0 A1 Policy Instances. + type: object + properties: + enforceStatus: + type: string + enforceReason: + type: string + additionalProperties: false + required: + - enforceStatus + properties: + policySchema: + description: | + A schema to define the policy data contents of A1 Policy Instances. Policy data schemas are Policy Type specific. All A1 Policy Instances of an A1 Policy Type should comply with the type's policy data schema. + type: object + statusSchema: + description: | + A schema to define the contents of the status information for A1 Policy Instances. Status schemas are Policy Type specific. All status information for all A1 Policy Instances of an A1 Policy Type should comply with the type's status schema. + type: object + required: + - policySchema + type: object + PolicySchema: + description: | + A schema to define the policy data contents of A1 Policy Instances. Policy data schemas are Policy Type specific. All A1 Policy Instances of an A1 Policy Type should comply with the type's policy data schema. + type: object + StatusSchema: + description: | + A schema to define the contents of the status information for A1 Policy Instances. Status schemas are Policy Type specific. All status information for all A1 Policy Instances of an A1 Policy Type should comply with the type's status schema. + type: object + PolicyObject: + description: | + Policy Object is a JSON representation policy data for an A1 Policy Instance. The schema for this policy data is defined in the corresponding A1 Policy Type. + type: object + ErrorInformation: + description: Problem as defined in https://tools.ietf.org/html/rfc7807 + properties: + detail: + description: A human-readable explanation specific to this occurrence of + the problem. + example: Policy type not found + type: string + title: + description: A specific error name + example: Not Found + type: string + status: + description: | + The HTTP status code generated by the origin server for this occurrence of the problem. + example: 404 + format: int32 type: integer + type: object + PolicyStatusObject: + description: | + A generic policy status object that can be used to transport any policy status. Additionally, a schema for policy status can be defined in the corresponding A1 Policy Type. + type: object + PolicyInformation: + description: | + Information tuple for a single A1 Policy Instance. Contains the A1 Policy Instance ID, and the ID of the Near-RT RIC where the policy is created. + example: + policyId: policyId + nearRtRicId: nearRtRicId + properties: + policyId: + description: Identity of the A1 Policy Instance + type: string + nearRtRicId: + description: Identity of the Near-RT RIC + type: string + required: + - nearRtRicId + - policyId + type: object + PolicyObjectInformation: + description: Information to create an A1 Policy Instance + example: + policyId: POLICY-ID1 + nearRtRicId: Near-RT-Ric-ID1 + transient: false + policyObject: "{}" + serviceId: rApp 1 + policyTypeId: ORAN_QOS_1.0.0 '(typeName_SemVersion)' + properties: + nearRtRicId: + description: Identity of the target Near-RT RIC + example: Near-RT-Ric-ID1 + type: string + transient: + default: false + description: | + If true, the policy is automatically deleted if the targeted Near-RT RIC restarts or recovers. If false, the A1 Policy Instance remains, and is re-pushed to the targeted Near-RT RIC after a restart or recovery. If false, the A1 Policy Instance is maintained and must be deleted separately in the event of Near-RT RIC restart or recovery. Default is false. + nullable: false + type: boolean + policyId: + description: | + An optional identity to be used for the new A1 Policy Instance. If this value is present, it must be unique. If not present the new A1 Policy Instance will be assigned a newly generated unique ID, and the new ID can be extracted from the 'Location' header in the response. + example: POLICY-ID1 + type: string + serviceId: + default: "" + description: "the identity of the service owning the policy. This can be\ + \ used to group the policies (it is possible to get all policies associated\ + \ to a service). Note that the service does not need to be registered.\ + \ If the service is registered, the newly created A1 Policy Instance will\ + \ be subject to the same supervision rules as the the service's other\ + \ policies." + example: rApp 1 + type: string + policyObject: + description: | + Policy Object is a JSON representation policy data for an A1 Policy Instance. The schema for this policy data is defined in the corresponding A1 Policy Type. + type: object + policyTypeId: + description: A1 Policy Type identity + example: ORAN_QOS_1.0.0 '(typeName_SemVersion)' + type: string required: - - serviceId + - nearRtRicId + - policyObject + - policyTypeId + type: object + void: + description: Void/empty + type: object + ServiceStatusList: + example: + serviceList: + - keepAliveIntervalSeconds: 0 + callbackUrl: callbackUrl + timeSinceLastActivitySeconds: 6 + serviceId: serviceId + - keepAliveIntervalSeconds: 0 + callbackUrl: callbackUrl + timeSinceLastActivitySeconds: 6 + serviceId: serviceId + properties: + serviceList: + description: "List of Service Status objects, describing a collection of\ + \ registered services." + items: + $ref: '#/components/schemas/ServiceStatus' + type: array type: object ServiceStatus: description: Information about a previously registered service + example: + keepAliveIntervalSeconds: 0 + callbackUrl: callbackUrl + timeSinceLastActivitySeconds: 6 + serviceId: serviceId properties: callbackUrl: description: Callback URL for notifying of Near-RT RIC state changes @@ -1187,14 +1730,8 @@ components: description: Identity of the service type: string keepAliveIntervalSeconds: - description: > - Keep alive interval (seconds) for the service. This is used to enable - optional heartbeat supervision of the service. If set (> 0) the registered - service should regularly invoke a 'keepalive' REST call. When a service - fails to invoke this 'keepalive' call within the configured time, the - service is considered unavailable. An unavailable service will be automatically - deregistered and its policies will be deleted. Value 0 means timeout - supervision is disabled. + description: | + Keep alive interval (seconds) for the service. This is used to enable optional heartbeat supervision of the service. If set (> 0) the registered service should regularly invoke a 'keepalive' REST call. When a service fails to invoke this 'keepalive' call within the configured time, the service is considered unavailable. An unavailable service will be automatically deregistered and its policies will be deleted. Value 0 means timeout supervision is disabled. format: int64 type: integer timeSinceLastActivitySeconds: @@ -1202,171 +1739,44 @@ components: format: int64 type: integer type: object - RicInfoList: - description: Collection of Near-RT RIC information objects - properties: - rics: - description: List of Near-RT RIC information objects - items: - $ref: '#/components/schemas/RicInfo' - type: array - type: object - NearRtRicId: - description: Identity of the Near-RT RIC - type: string - PolicyInformation: - description: > - Information tuple for a single A1 Policy Instance. - Contains the A1 Policy Instance ID, and the ID of the Near-RT RIC where the policy is created. - type: object + ServiceRegistrationInfo: + description: Information for a service to be registered + example: + keepAliveIntervalSeconds: 0 + callbackUrl: callbackUrl + serviceId: serviceId properties: - policyId: - description: Identity of the A1 Policy Instance + callbackUrl: + description: Callback URL for notifying of Near-RT RIC state changes type: string - nearRtRicId: - $ref: '#/components/schemas/NearRtRicId' + serviceId: + description: Identity of the service + type: string + keepAliveIntervalSeconds: + description: | + Keep alive interval for the service. This is used to enable optional heartbeat supervision of the service. If set (> 0) the registered service should regularly invoke a 'keepalive' REST call. When a service fails to invoke this 'keepalive' call within the configured time, the service is considered unavailable. An unavailable service will be automatically deregistered and its policies will be deleted. Value 0 means timeout supervision is disabled. + format: int64 + type: integer required: - - policyId - - nearRtRicId - ServiceStatusList: - properties: - serviceList: - description: List of Service Status objects, describing a collection of registered services. - items: - $ref: '#/components/schemas/ServiceStatus' - type: array + - serviceId type: object ServiceCallbackInfo: - description: | - Information transferred in Service callbacks, - if a callback URL was provided for a registered service + description: "Information transferred in Service callbacks, \nif a callback\ + \ URL was provided for a registered service\n" + example: + ricId: ricId + eventType: AVAILABLE properties: ricId: description: Identity of a Near-RT RIC type: string eventType: - description: > - values: - AVAILABLE: the Near-RT RIC has become available for A1 Policy management + description: "values: \n AVAILABLE: the Near-RT RIC has become available\ + \ for A1 Policy management\n" enum: - - AVAILABLE + - AVAILABLE type: string required: - - eventType - - ricId - type: object - ProblemDetails: - description: Object to carry details about a problem in an HTTP response according to IETF RFC 7807 + - eventType + - ricId type: object - properties: - type: - description: URI reference according to IETF RFC 3986 that identifies the problem type - type: string - title: - description: Human-readable summary of the problem type - type: string - status: - description: HTTP status code - type: number - detail: - description: Human-readable explanation - type: string - instance: - description: URI reference that identifies the specific occurrence of the problem - type: string - - responses: - '400': - description: Bad Request - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - '401': - description: Unauthorized - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - '403': - description: Forbidden - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - '404': - description: Not Found - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - '405': - description: Method Not Allowed - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - '406': - description: Not Acceptable - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - '409': - description: Conflict - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - '411': - description: Length Required - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - '413': - description: Payload Too Large - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - '415': - description: Unsupported Media Type - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - '429': - description: Too Many Requests - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - '500': - description: Internal Server Error - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - '502': - description: Bad Gateway - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - '503': - description: Service Unavailable - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - Locked: - description: Locked - HTTP Status code which can be used when the state is Locked - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorInformation' - example: - status: 423 - title: Locked - detail: State is Locked in the provided request. diff --git a/docs/offeredapis/swagger/pms-api.json b/docs/offeredapis/swagger/pms-api.json index 036e7fea..c35456a6 100644 --- a/docs/offeredapis/swagger/pms-api.json +++ b/docs/offeredapis/swagger/pms-api.json @@ -3,14 +3,15 @@ "info" : { "contact" : { "email" : "discuss-list@onap.com", + "name" : "ONAP CCSDK Project", "url" : "https://www.onap.org/" }, - "description" : "

        General

        The ONAP CCSDK A1 Policy Management Service provides a REST API for managemecnt of A1 policies.
        The main tasks of the service are:

        • A1 Policy creation, modification and deletion.
        • Monitoring and maintaining consistency of the SMO view of A1 policies and the Near-RT RICs
        • Maintaining a view of supported Near-RT RIC policy types
        • Supervision of using services (R-APPs). When a service is unavailable, its policies are removed.

        APIs provided or defined by the service

        A1 Policy Management

        This is an API for management of A1 Policies.

        • A1 Policy retrieval, creation, modification and deletion.
        • Retrieval of supported A1 Policy types for a Near-RT RIC
        • Retrieval of status for existing A1 policies

        Management of configuration

        API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.

        Service callbacks

        These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.

        NearRT-RIC Repository

        This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted for one Near-RT RIC.

        Health Check

        API used for supervision of the PMS component.

        Service Registry and Supervision

        API used for registering services that uses PMS. Each A1 policy is optionally owned by a service. PMS can supervise each registered service by a heart-beat supervision and will automatically remove policies for unavailable services. Note that a service does not need to be registered in order to create A1 Policies. This is a feature that is optional to use.

        Authorization API

        API used for access control of A1 Policy access. If configured, an external authorization provider is requested to grant access to the A1 Policy type.

        Spring Boot Actuator

        Provides generic functions used to monitor and manage the Spring web application.

        ", + "description" : "

        General

        The ONAP CCSDK A1 Policy Management Service provides a REST API for managing A1 policies.
        This document describes an older pre-spec API set to perform tasks for:

        • A1 Policy creation, modification and deletion.
        • Monitoring and maintaining consistency of the SMO view of A1 Policies and the Near-RT RICs
        • Maintaining a view of each Near-RT RIC's supported A1 Policy Types
        • Supervision of registered services (rApps). When a registered service is unavailable, its policies are removed.

        APIs provided or defined by the service

        A1 Policy Management (Older pre-spec version)

        This is an older API for managing A1 Policies:

        • A1 Policy retrieval, creation, modification and deletion.
        • Retrieval of supported A1 Policy Types for a Near-RT RIC
        • Retrieval of status for existing A1 policies

        Management of configuration

        API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.

        Service Callbacks

        These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.

        NearRT-RIC Repository (Older version)

        This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted towards one Near-RT RIC.

        Health Check

        API used for supervision of the A1 Policy Management Service .

        Service Registry and Supervision

        API used for registering services/clients/rApps. Each A1 Policy can be tagged with an owner. If the owner service is registered, then the service can be monitored by a heart-beat supervision mechanism, and if the registered service becomes unavailable, then its A1 Policies are removed. Note that services do not need to be registered to create A1 Policies, but unregistered services are not supervised. This is a feature that is optional to use.

        Authorization API

        API used for access control of A1 Policy access. If configured, an external authorization provider is requested to grant access to the A1 Policy Type.

        Spring Boot Actuator

        Provides built-in functions used to monitor and configure the Spring web application hosting the service.

        ", "license" : { - "name" : "Copyright (C) 2020-2023 Nordix Foundation, and Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved. Licensed under the Apache 2 License.", + "name" : "Copyright (C) 2020-2023 Nordix Foundation, and Copyright (C) 2024-2025 OpenInfra Foundation Europe. \nAll rights reserved. Licensed under the Apache 2 License.\n", "url" : "http://www.apache.org/licenses/LICENSE-2.0" }, - "title" : "ONAP CCSDK A1 Policy Management Service", + "title" : "ONAP CCSDK - Pre-Spec A1 Policy Management API", "version" : "1.3.0", "x-api-id" : "a31c510b-20e6-4a08-af16-368c44d7fba8", "x-audience" : "external-public" @@ -19,189 +20,53 @@ "url" : "/" } ], "tags" : [ { - "description" : "Older API used to create polices, Policy Instances and get them as individual using an ID or get all policies/Instances.", - "name" : "A1 Policy Management (Older version)" + "description" : "Older pre-spec API used to get, create, update and delete A1 Policy Instances. Also used to query A1 Policy Types.\n", + "name" : "A1 Policy Management" }, { - "description" : "API used to get the NearRT-RIC for the managed element.", + "description" : "Older API used to get information about registered Near-RT RICs.\n", "name" : "NearRT-RIC Repository" }, { - "description" : "API used to keep the service Alive with in the timeout period", + "description" : "Older API used to manage registered services, and control their keep-alive status via heart-beat messages.\n", "name" : "Service Registry and Supervision" }, { - "description" : "API used to get the health status and statistics of this service", + "description" : "API used to get the health status and statistics of this service\n", "name" : "Health Check" }, { - "description" : "Callouts to indicate status schanges relevant for Services.
        Note that these calls are called by A1-PMS, not provided.", - "name" : "Service callbacks" + "description" : "Callout to registered services to indicate a status changes for a Near-RT RIC. Note that these operations are called by the A1 Policy Management Service, not provided.\n", + "name" : "Service Callbacks" }, { - "description" : "API used for authorization of information A1 policy access (this is provided by an authorization producer such as OPA).
        Note that this API is called by A1-PMS, it is not provided.", + "description" : "API used for authorization of information A1 policy access (this is provided by an authorization producer such as OPA). Note that these operations are called by the A1 Policy Management Service, not provided.\n", "name" : "Authorization API" }, { - "description" : "API used to create or fetch the application configuration.", + "description" : "API used to create or fetch the application configuration.\n", "name" : "Configuration" }, { - "description" : "Monitor and interact", + "description" : "API used to monitor and configure the A1-PMS Springboot Service.\n", "externalDocs" : { "description" : "Spring Boot Actuator Web API Documentation", - "url" : "https://docs.spring.io/spring-boot/docs/current/actuator-api/html/" + "url" : "https://docs.spring.io/spring-boot/reference/actuator/endpoints.html" }, - "name" : "Actuator" + "name" : "Actuator API" } ], "paths" : { - "/a1-policy/v2/policy-instances" : { - "get" : { - "description" : "Returns a list of A1 policies matching given search criteria.
        If several query parameters are defined, the policies matching all conditions are returned.", - "operationId" : "getPolicyInstances", - "parameters" : [ { - "description" : "Select policies with a given type identity.", - "explode" : true, - "in" : "query", - "name" : "policytype_id", - "required" : false, - "schema" : { - "type" : "string" - }, - "style" : "form" - }, { - "description" : "Select policies for a given Near-RT RIC identity.", - "explode" : true, - "in" : "query", - "name" : "ric_id", - "required" : false, - "schema" : { - "type" : "string" - }, - "style" : "form" - }, { - "description" : "Select policies owned by a given service.", - "explode" : true, - "in" : "query", - "name" : "service_id", - "required" : false, - "schema" : { - "type" : "string" - }, - "style" : "form" - }, { - "description" : "Select policies of a given type name (type identity has the format )", - "explode" : true, - "in" : "query", - "name" : "type_name", - "required" : false, - "schema" : { - "type" : "string" - }, - "style" : "form" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "examples" : { - "policy_info_list" : { - "$ref" : "#/components/examples/policy_info_list" - } - }, - "schema" : { - "$ref" : "#/components/schemas/policy_info_list" - } - } - }, - "description" : "OK - Returns A1 Policies which matches the criteria" - }, - "404" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/error_information" - } - } - }, - "description" : "Not Found - Near-RT RIC, policy type or service not found" - } - }, - "summary" : "Query for A1 policy instances", - "tags" : [ "A1 Policy Management" ] - } - }, - "/example-authz-check" : { - "post" : { - "description" : "The authorization function decides if access is granted.", - "operationId" : "performAccessControl", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/policy_authorization" - } - } - }, - "required" : true - }, - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/authorization_result" - } - } - }, - "description" : "OK" - }, - "403" : { - "content" : { - "application/problem+json" : { - "example" : { - "status" : 403, - "title" : "Forbidden", - "detail" : "Your role does not allow to perform this action. Contact System Administrator to change your access rights." - }, - "schema" : { - "$ref" : "#/components/schemas/error_information" - } - } - }, - "description" : "Forbidden" - } - }, - "summary" : "Request for access authorization.", - "tags" : [ "Authorization API" ] - } - }, - "/actuator/threaddump" : { + "/status" : { "get" : { - "operationId" : "threaddump", + "description" : "Returns status and statistics of this service", + "operationId" : "getStatusV1", "responses" : { "200" : { "content" : { - "text/plain;charset=UTF-8" : { - "schema" : { - "type" : "object" - } - }, - "application/vnd.spring-boot.actuator.v3+json" : { - "schema" : { - "type" : "object" - } - }, - "application/json" : { - "schema" : { - "type" : "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json" : { + "*/*" : { "schema" : { - "type" : "object" + "type" : "string" } } }, - "description" : "OK" + "description" : "OK - Service is living" } }, - "summary" : "Actuator web endpoint 'threaddump'", - "tags" : [ "Actuator" ], - "x-internal" : true + "summary" : "Get Status (getStatusV1)", + "tags" : [ "Health Check" ] } }, "/a1-policy/v2/status" : { @@ -225,75 +90,16 @@ "description" : "OK- Service is living Ok" } }, + "summary" : "Get Status (getStatus)", "tags" : [ "Health Check" ] } }, - "/actuator/loggers" : { - "get" : { - "operationId" : "loggers", - "responses" : { - "200" : { - "content" : { - "application/vnd.spring-boot.actuator.v3+json" : { - "schema" : { - "type" : "object" - } - }, - "application/json" : { - "schema" : { - "type" : "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json" : { - "schema" : { - "type" : "object" - } - } - }, - "description" : "OK" - } - }, - "summary" : "Actuator web endpoint 'loggers'", - "tags" : [ "Actuator" ], - "x-internal" : true - } - }, - "/actuator/health/**" : { - "get" : { - "operationId" : "health-path", - "responses" : { - "200" : { - "content" : { - "application/vnd.spring-boot.actuator.v3+json" : { - "schema" : { - "type" : "object" - } - }, - "application/json" : { - "schema" : { - "type" : "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json" : { - "schema" : { - "type" : "object" - } - } - }, - "description" : "OK" - } - }, - "summary" : "Actuator web endpoint 'health-path'", - "tags" : [ "Actuator" ], - "x-internal" : true - } - }, "/a1-policy/v2/rics/ric" : { "get" : { - "description" : "Either a Near-RT RIC identity or a Managed Element identity can be specified.
        The intention with Managed Element identity is the ID used in O1 for accessing the traffical element (such as the ID of CU).", + "description" : "Query information about a Near-RT RIC. Either a Near-RT RIC identity or a Managed Element identity can be specified. The intention with Managed Element identity is the ID used in O1 for accessing the traffical element (such as the ID of CU).\n", "operationId" : "getRic", "parameters" : [ { - "description" : "The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned.", + "description" : "The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned.\n", "explode" : true, "in" : "query", "name" : "managed_element_id", @@ -338,43 +144,13 @@ "description" : "Not Found" } }, - "summary" : "Returns info of Near-RT RIC queried by the ric-id and managed-element-id", + "summary" : "Get a Near-RT RIC (getRic)", "tags" : [ "NearRT-RIC Repository" ] } }, - "/actuator/shutdown" : { - "post" : { - "operationId" : "shutdown", - "responses" : { - "200" : { - "content" : { - "application/vnd.spring-boot.actuator.v3+json" : { - "schema" : { - "type" : "object" - } - }, - "application/json" : { - "schema" : { - "type" : "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json" : { - "schema" : { - "type" : "object" - } - } - }, - "description" : "OK" - } - }, - "summary" : "Actuator web endpoint 'shutdown'", - "tags" : [ "Actuator" ], - "x-internal" : true - } - }, "/a1-policy/v2/policy-types" : { "get" : { - "description" : "Query policy type identities", + "description" : "Query A1 Policy Type identities using query parameters", "operationId" : "getPolicyTypes", "parameters" : [ { "description" : "Select types for the given Near-RT RIC identity.", @@ -387,7 +163,7 @@ }, "style" : "form" }, { - "description" : "Select types with the given type name (type identity has the format )", + "description" : "Select types compatible with the given type name (type identity has the format 'typename_version')", "explode" : true, "in" : "query", "name" : "type_name", @@ -432,12 +208,13 @@ "description" : "Not Found" } }, + "summary" : "Get A1 Policy Types (getPolicyTypes)", "tags" : [ "A1 Policy Management" ] } }, "/a1-policy/v2/policies/{policy_id}" : { "delete" : { - "description" : "Deleting the policy using the Policy's Policy ID.", + "description" : "Delete an A1 Policy instance using its policy ID.", "operationId" : "deletePolicy", "parameters" : [ { "explode" : false, @@ -476,11 +253,11 @@ "description" : "Locked - HTTP Status code which can be used when the state is Locked" } }, - "summary" : "Delete a policy", + "summary" : "Delete an A1 Policy instance (deletePolicy)", "tags" : [ "A1 Policy Management" ] }, "get" : { - "description" : "Returns a policy", + "description" : "Get an A1 Policy instance using its policy ID", "operationId" : "getPolicy", "parameters" : [ { "explode" : false, @@ -517,16 +294,18 @@ "description" : "Not Found" } }, + "summary" : "Get an A1 Policy instance (getPolicy)", "tags" : [ "A1 Policy Management" ] } }, - "/actuator/metrics/{requiredMetricName}" : { - "get" : { - "operationId" : "metrics-requiredMetricName", + "/a1-policy/v2/services/{service_id}/keepalive" : { + "put" : { + "description" : "A registered service should invoke this operation regularly to indicate that it is still alive. If a registered service fails to invoke some operation, or this operation, before the end of a timeout period the service will be deregistered and all its A1 policies wil be removed. This operation is only intended for registered services. (This timeout can be set or disabled when each service is initially registered)", + "operationId" : "keepAliveService", "parameters" : [ { "explode" : false, "in" : "path", - "name" : "requiredMetricName", + "name" : "service_id", "required" : true, "schema" : { "type" : "string" @@ -536,299 +315,33 @@ "responses" : { "200" : { "content" : { - "application/vnd.spring-boot.actuator.v3+json" : { - "schema" : { - "type" : "object" - } - }, - "application/json" : { - "schema" : { - "type" : "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json" : { + "*/*" : { "schema" : { "type" : "object" } } }, - "description" : "OK" + "description" : "OK - Service supervision timer refreshed, OK" + }, + "404" : { + "content" : { + "application/problem+json" : { + "example" : [ ] + } + }, + "description" : "Not Found" } }, - "summary" : "Actuator web endpoint 'metrics-requiredMetricName'", - "tags" : [ "Actuator" ], - "x-internal" : true + "summary" : "Heartbeat message from a service (keepAliveService)", + "tags" : [ "Service Registry and Supervision" ] } }, - "/a1-policy/v2/configuration" : { + "/a1-policy/v2/rics" : { "get" : { - "description" : "Returns the contents of the application configuration file", - "operationId" : "getConfiguration", - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "string" - } - } - }, - "description" : "OK - Configuration" - }, - "404" : { - "content" : { - "application/problem+json" : { - "example" : [ ] - } - }, - "description" : "Not Found" - } - }, - "tags" : [ "Configuration" ] - }, - "put" : { - "description" : "Replace the current configuration with the given configuration", - "operationId" : "putConfiguration", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object" - } - } - }, - "required" : true - }, - "responses" : { - "200" : { - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/void" - } - } - }, - "description" : "OK - Configuration updated" - }, - "400" : { - "content" : { - "application/problem+json" : { - "example" : { - "status" : 400, - "title" : "Bad Request", - "detail" : "The provided request is not valid." - }, - "schema" : { - "$ref" : "#/components/schemas/error_information" - } - } - }, - "description" : "Bad Request" - } - }, - "tags" : [ "Configuration" ] - } - }, - "/actuator" : { - "get" : { - "operationId" : "links", - "responses" : { - "200" : { - "content" : { - "application/vnd.spring-boot.actuator.v3+json" : { - "schema" : { - "additionalProperties" : { - "additionalProperties" : { - "$ref" : "#/components/schemas/Link" - }, - "type" : "object" - }, - "type" : "object" - } - }, - "application/json" : { - "schema" : { - "additionalProperties" : { - "additionalProperties" : { - "$ref" : "#/components/schemas/Link" - }, - "type" : "object" - }, - "type" : "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json" : { - "schema" : { - "additionalProperties" : { - "additionalProperties" : { - "$ref" : "#/components/schemas/Link" - }, - "type" : "object" - }, - "type" : "object" - } - } - }, - "description" : "OK" - } - }, - "summary" : "Actuator root web endpoint", - "tags" : [ "Actuator" ], - "x-internal" : true - } - }, - "/actuator/loggers/{name}" : { - "get" : { - "operationId" : "loggers-name", - "parameters" : [ { - "explode" : false, - "in" : "path", - "name" : "name", - "required" : true, - "schema" : { - "type" : "string" - }, - "style" : "simple" - } ], - "responses" : { - "200" : { - "content" : { - "application/vnd.spring-boot.actuator.v3+json" : { - "schema" : { - "type" : "object" - } - }, - "application/json" : { - "schema" : { - "type" : "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json" : { - "schema" : { - "type" : "object" - } - } - }, - "description" : "OK" - } - }, - "summary" : "Actuator web endpoint 'loggers-name'", - "tags" : [ "Actuator" ], - "x-internal" : true - }, - "post" : { - "operationId" : "loggers-name_2", - "parameters" : [ { - "explode" : false, - "in" : "path", - "name" : "name", - "required" : true, - "schema" : { - "type" : "string" - }, - "style" : "simple" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "enum" : [ "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "FATAL", "OFF" ], - "type" : "string" - } - } - } - }, - "responses" : { - "200" : { - "content" : { - "*/*" : { - "schema" : { - "type" : "object" - } - } - }, - "description" : "OK" - } - }, - "summary" : "Actuator web endpoint 'loggers-name'", - "tags" : [ "Actuator" ], - "x-internal" : true - } - }, - "/a1-policy/v2/services/{service_id}/keepalive" : { - "put" : { - "description" : "A registered service should invoke this operation regularly to indicate that it is still alive. If a registered service fails to invoke this operation before the end of a timeout period the service will be deregistered and all its A1 policies wil be removed. (This timeout can be set or disabled when each service is initially registered)", - "operationId" : "keepAliveService", - "parameters" : [ { - "explode" : false, - "in" : "path", - "name" : "service_id", - "required" : true, - "schema" : { - "type" : "string" - }, - "style" : "simple" - } ], - "responses" : { - "200" : { - "content" : { - "*/*" : { - "schema" : { - "type" : "object" - } - } - }, - "description" : "OK - Service supervision timer refreshed, OK" - }, - "404" : { - "content" : { - "application/problem+json" : { - "example" : [ ] - } - }, - "description" : "Not Found" - } - }, - "summary" : "Heartbeat indicates that the service is running", - "tags" : [ "Service Registry and Supervision" ] - } - }, - "/actuator/metrics" : { - "get" : { - "operationId" : "metrics", - "responses" : { - "200" : { - "content" : { - "application/vnd.spring-boot.actuator.v3+json" : { - "schema" : { - "type" : "object" - } - }, - "application/json" : { - "schema" : { - "type" : "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json" : { - "schema" : { - "type" : "object" - } - } - }, - "description" : "OK" - } - }, - "summary" : "Actuator web endpoint 'metrics'", - "tags" : [ "Actuator" ], - "x-internal" : true - } - }, - "/a1-policy/v2/rics" : { - "get" : { - "description" : "The call returns all Near-RT RICs that supports a given policy type identity", + "description" : "Get all Near-RT RICs that supports a given A1 Policy Type ID", "operationId" : "getRics", "parameters" : [ { - "description" : "The identity of a policy type. If given, all Near-RT RICs supporting the policy type are returned", + "description" : "The identity of an A1 Policy Type. If given, all Near-RT RICs supporting the A1 Policy Type are returned.\n", "explode" : true, "in" : "query", "name" : "policytype_id", @@ -863,16 +376,16 @@ "description" : "Not Found" } }, - "summary" : "Query Near-RT RIC information", + "summary" : "Get Near-RT RICs for A1 Policy Type (getRics)", "tags" : [ "NearRT-RIC Repository" ] } }, "/a1-policy/v2/services" : { "get" : { - "description" : "Either information about a registered service with given identity or all registered services are returned.", + "description" : "Get information about all registered services, or a single registered service. If the service ID of a registered service is included in the query, information about that service is returned. Otherwise Information about all registered is returned. This operation does not retrieve information about unregistered services.\n", "operationId" : "getServices", "parameters" : [ { - "description" : "The identity of the service", + "description" : "The identity of the registered service", "explode" : true, "in" : "query", "name" : "service_id", @@ -907,7 +420,7 @@ "description" : "Not Found" } }, - "summary" : "Returns service information", + "summary" : "Get Services (getServices)", "tags" : [ "Service Registry and Supervision" ] }, "put" : { @@ -915,7 +428,7 @@ "RICStatus" : { "{$request.body#/callback_url}" : { "post" : { - "description" : "The URL to this call is registered at Service registration.", + "description" : "Callouts to indicate Near-RT RIC status changes relevant for Services. \nThe URL invoked by this callback is provided at Service registration.\n", "operationId" : "serviceCallback", "requestBody" : { "content" : { @@ -947,13 +460,13 @@ "description" : "Not Found" } }, - "summary" : "Callback for Near-RT RIC status", - "tags" : [ "Service callbacks" ] + "summary" : "Callback for Near-RT RIC status (serviceCallback)", + "tags" : [ "Service Registry and Supervision", "Service Callbacks" ] } } } }, - "description" : "Registering a service is needed to:
        • Get callbacks about available NearRT RICs.
        • Activate supervision of the service. If a service is inactive, its policies will automatically be deleted.
        Policies can be created even if the service is not registerred. This is a feature which it is optional to use.", + "description" : "Register a single service, or update a previous registtration. Service registration is required to get callbacks about available NearRT RICs and to enable supervision of the service's active status. If a registered service becomes inactive, its policies can be automatically deleted. A1 Policy instances can also be created for unregistered services. If an unregistered service is later registered, the service's policies are retained when the service becomes registered. This feature is optional to use.\n", "operationId" : "putService", "requestBody" : { "content" : { @@ -1002,62 +515,13 @@ "description" : "Bad Request" } }, - "summary" : "Register a service", + "summary" : "Register or update a Service (putService)", "tags" : [ "Service Registry and Supervision" ] } }, - "/actuator/info" : { + "/a1-policy/v2/policy-types/{policytype_id}" : { "get" : { - "operationId" : "info", - "responses" : { - "200" : { - "content" : { - "application/vnd.spring-boot.actuator.v3+json" : { - "schema" : { - "type" : "object" - } - }, - "application/json" : { - "schema" : { - "type" : "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json" : { - "schema" : { - "type" : "object" - } - } - }, - "description" : "OK" - } - }, - "summary" : "Actuator web endpoint 'info'", - "tags" : [ "Actuator" ], - "x-internal" : true - } - }, - "/status" : { - "get" : { - "description" : "Returns status and statistics of this service", - "operationId" : "getStatusV1", - "responses" : { - "200" : { - "content" : { - "*/*" : { - "schema" : { - "type" : "string" - } - } - }, - "description" : "OK - Service is living" - } - }, - "tags" : [ "Health Check" ] - } - }, - "/a1-policy/v2/policy-types/{policytype_id}" : { - "get" : { - "description" : "Returns a policy type definition", + "description" : "Get an A1 Policy Type definition using its policy type ID", "operationId" : "getPolicyTypeDefinition", "parameters" : [ { "explode" : false, @@ -1083,7 +547,7 @@ } } }, - "description" : "OK - schema of the given policy type" + "description" : "OK - schema of the requested A1 Policy Type" }, "404" : { "content" : { @@ -1094,65 +558,16 @@ "description" : "Not Found" } }, + "summary" : "Get an A1 Policy Type definition (getPolicyTypeDefinition)", "tags" : [ "A1 Policy Management" ] } }, - "/actuator/logfile" : { - "get" : { - "operationId" : "logfile", - "responses" : { - "200" : { - "content" : { - "text/plain;charset=UTF-8" : { - "schema" : { - "type" : "object" - } - } - }, - "description" : "OK" - } - }, - "summary" : "Actuator web endpoint 'logfile'", - "tags" : [ "Actuator" ], - "x-internal" : true - } - }, - "/actuator/health" : { - "get" : { - "operationId" : "health", - "responses" : { - "200" : { - "content" : { - "application/vnd.spring-boot.actuator.v3+json" : { - "schema" : { - "type" : "object" - } - }, - "application/json" : { - "schema" : { - "type" : "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json" : { - "schema" : { - "type" : "object" - } - } - }, - "description" : "OK" - } - }, - "summary" : "Actuator web endpoint 'health'", - "tags" : [ "Actuator" ], - "x-internal" : true - } - }, "/a1-policy/v2/policies" : { "get" : { - "description" : "Returns a list of A1 policies matching given search criteria.
        If several query parameters are defined, the policies matching all conditions are returned.", + "description" : "Retrieve a list of A1 Policy Instance IDs for policies that match given search criteria. If multiple query parameters are given, the policies matching all conditions are returned.\n", "operationId" : "getPolicyIds", "parameters" : [ { - "description" : "Select policies of a given policy type identity.", + "description" : "Select policies of a given A1 Policy Type ID.", "explode" : true, "in" : "query", "name" : "policytype_id", @@ -1172,7 +587,7 @@ }, "style" : "form" }, { - "description" : "Select policies owned by a given service.", + "description" : "Select policies owned by a given service. (Both registered and unregistered services)", "explode" : true, "in" : "query", "name" : "service_id", @@ -1182,7 +597,7 @@ }, "style" : "form" }, { - "description" : "Select policies of types with the given type name (type identity has the format )", + "description" : "Select policies of types with the given A1 Policy Type name (type names have the format 'typename_version')\n", "explode" : true, "in" : "query", "name" : "type_name", @@ -1217,11 +632,11 @@ "description" : "Not Found" } }, - "summary" : "Query policy identities", + "summary" : "Query A1 Policy Instances (getPolicyIds)", "tags" : [ "A1 Policy Management" ] }, "put" : { - "description" : "Create or update a policy", + "description" : "Create or Update an A1 Policy Instance", "operationId" : "putPolicy", "requestBody" : { "content" : { @@ -1270,12 +685,89 @@ "description" : "Locked - HTTP Status code which can be used when the state is Locked" } }, + "summary" : "Create or Update an A1 Policy Instance (putPolicy)", + "tags" : [ "A1 Policy Management" ] + } + }, + "/a1-policy/v2/policy-instances" : { + "get" : { + "description" : "Returns a collection of A1 Policy Instance information for policies that match given search criteria. If several query parameters are defined, the policies matching all conditions are returned.\n", + "operationId" : "getPolicyInstances", + "parameters" : [ { + "description" : "Select policies with a given A1 Policy Type ID.", + "explode" : true, + "in" : "query", + "name" : "policytype_id", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "form" + }, { + "description" : "Select policies for a given Near-RT RIC identity.", + "explode" : true, + "in" : "query", + "name" : "ric_id", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "form" + }, { + "description" : "Select policies owned by a given service (registered or unregistered).", + "explode" : true, + "in" : "query", + "name" : "service_id", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "form" + }, { + "description" : "Select policies of a given A1 Policy Type name (type identity has the format 'typename_version').", + "explode" : true, + "in" : "query", + "name" : "type_name", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "form" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "examples" : { + "policy_info_list" : { + "$ref" : "#/components/examples/policy_info_list" + } + }, + "schema" : { + "$ref" : "#/components/schemas/policy_info_list" + } + } + }, + "description" : "OK - Returns A1 Policy Instances which match the criteria" + }, + "404" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/error_information" + } + } + }, + "description" : "Not Found - Near-RT RIC, A1 Policy Type or service was not found" + } + }, + "summary" : "Query for A1 Policy instances (getPolicyInstances)", "tags" : [ "A1 Policy Management" ] } }, "/a1-policy/v2/services/{service_id}" : { "delete" : { - "description" : "Unregister a service", + "description" : "Unregister a registered Service using its service ID. Only registered services can be unregistered. All A1 Policy Instances for the previously registered service will be removed.\n", "operationId" : "deleteService", "parameters" : [ { "explode" : false, @@ -1307,32 +799,13 @@ "description" : "Not Found" } }, + "summary" : "Unregister a Service (deleteService)", "tags" : [ "Service Registry and Supervision" ] } }, - "/actuator/heapdump" : { - "get" : { - "operationId" : "heapdump", - "responses" : { - "200" : { - "content" : { - "application/octet-stream" : { - "schema" : { - "type" : "object" - } - } - }, - "description" : "OK" - } - }, - "summary" : "Actuator web endpoint 'heapdump'", - "tags" : [ "Actuator" ], - "x-internal" : true - } - }, "/a1-policy/v2/policies/{policy_id}/status" : { "get" : { - "description" : "Returns a policy status", + "description" : "Retrieve the status information for an A1 Policy Instance.", "operationId" : "getPolicyStatus", "parameters" : [ { "explode" : false, @@ -1369,100 +842,614 @@ "description" : "Not Found" } }, + "summary" : "Get an A1 Policy Instance's status (getPolicyStatus)", "tags" : [ "A1 Policy Management" ] } - } - }, - "components" : { - "examples" : { - "service_status" : { - "description" : "List of service information", - "value" : { - "callback_url" : "callback_url", - "service_id" : "service_id", - "keep_alive_interval_seconds" : 0, - "time_since_last_activity_seconds" : 6 - } - }, - "service_status_list" : { - "description" : "List of service information", - "value" : { - "service_list" : [ { - "callback_url" : "callback_url", - "service_id" : "service_id", - "keep_alive_interval_seconds" : 0, - "time_since_last_activity_seconds" : 6 - }, { - "callback_url" : "callback_url", - "service_id" : "service_id", - "keep_alive_interval_seconds" : 0, - "time_since_last_activity_seconds" : 6 - } ] - } - }, - "policy_type_definition" : { - "description" : "Schema of the given Policy type", - "value" : { - "policy_schema" : "{}" - } - }, - "policy_type_id_list" : { - "description" : "Array of policy type id's", - "value" : { - "policy_type_id_list" : [ "policytype_id", "policytype_id" ] - } - }, - "policy_info" : { - "description" : "Policy information of one A1-P policy", - "value" : { - "ric_id" : "ric_id", - "policy_id" : "policy_id", - "transient" : false, - "service_id" : "service_id", - "policy_data" : "{}", - "status_notification_uri" : "status_notification_uri", - "policytype_id" : "policytype_id" - } - }, - "policy_info_list" : { - "description" : "List of policy information", - "value" : { - "policies" : [ { - "ric_id" : "ric_id", - "policy_id" : "policy_id", - "transient" : false, - "service_id" : "service_id", - "policy_data" : "{}", - "status_notification_uri" : "status_notification_uri", - "policytype_id" : "policytype_id" - }, { - "ric_id" : "ric_id", - "policy_id" : "policy_id", - "transient" : false, - "service_id" : "service_id", - "policy_data" : "{}", - "status_notification_uri" : "status_notification_uri", - "policytype_id" : "policytype_id" - } ] - } + }, + "/a1-policy/v2/configuration" : { + "get" : { + "description" : "Returns the entire contents of the Application Configuration.", + "operationId" : "getConfiguration", + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "string" + } + } + }, + "description" : "OK - Configuration" + }, + "404" : { + "content" : { + "application/problem+json" : { + "example" : [ ] + } + }, + "description" : "Not Found" + } + }, + "summary" : "Get the Application Configuration (getConfiguration)", + "tags" : [ "Configuration" ] }, - "policy_id_list" : { - "description" : "A list of policy identities", - "value" : { - "policy_ids" : [ "some_policy_id", "some_policy_id" ] - } + "put" : { + "description" : "Replace the current Application Configuration with a new configuration. The new configuration, if accepted, will take effect after a short delay. The new configuration must comply with the Application Configuration schema, which can be found from the the Application Documentation (Developer Guide)\n", + "operationId" : "putConfiguration", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object" + } + } + }, + "required" : true + }, + "responses" : { + "200" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/void" + } + } + }, + "description" : "OK - Configuration updated" + }, + "400" : { + "content" : { + "application/problem+json" : { + "example" : { + "status" : 400, + "title" : "Bad Request", + "detail" : "The provided request is not valid." + }, + "schema" : { + "$ref" : "#/components/schemas/error_information" + } + } + }, + "description" : "Bad Request" + } + }, + "summary" : "Set/Replace the Application Configuration (putConfiguration)", + "tags" : [ "Configuration" ] + } + }, + "/example-authz-check" : { + "post" : { + "description" : "A template endpoint for callout requests to an external authorization function. The authorization function, if enabled, decides if individual operations are permitted.\n", + "operationId" : "performAccessControl", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/policy_authorization" + } + } + }, + "required" : true + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/authorization_result" + } + } + }, + "description" : "OK" + }, + "403" : { + "content" : { + "application/problem+json" : { + "example" : { + "status" : 403, + "title" : "Forbidden", + "detail" : "Your role does not allow to perform this action. Contact System Administrator to change your access rights." + }, + "schema" : { + "$ref" : "#/components/schemas/error_information" + } + } + }, + "description" : "Forbidden" + } + }, + "summary" : "Callout request for access authorization (performAccessControl)", + "tags" : [ "Authorization API" ] + } + }, + "/actuator" : { + "get" : { + "description" : "A1-PMS Springboot Service Actuator web endpoint. Returns a set of links to available/enabled actuator endpoints.\n", + "externalDocs" : { + "description" : "Spring Boot Actuator Web API Documentation", + "url" : "https://docs.spring.io/spring-boot/reference/actuator/endpoints.html" + }, + "operationId" : "actuatorLinks", + "responses" : { + "200" : { + "content" : { + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "additionalProperties" : { + "additionalProperties" : { + "$ref" : "#/components/schemas/Link" + }, + "type" : "object" + }, + "type" : "object" + } + }, + "application/json" : { + "schema" : { + "additionalProperties" : { + "additionalProperties" : { + "$ref" : "#/components/schemas/Link" + }, + "type" : "object" + }, + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "additionalProperties" : { + "additionalProperties" : { + "$ref" : "#/components/schemas/Link" + }, + "type" : "object" + }, + "type" : "object" + } + } + }, + "description" : "OK" + } + }, + "summary" : "Actuator endpoint - Root (actuatorLinks)", + "tags" : [ "Actuator API" ], + "x-internal" : true + } + }, + "/actuator/heapdump" : { + "get" : { + "description" : "A1-PMS Springboot Service Actuator web endpoint - HeapDump.\n", + "externalDocs" : { + "description" : "Spring Boot Actuator Web API Documentation", + "url" : "https://docs.spring.io/spring-boot/reference/actuator/endpoints.html" + }, + "operationId" : "actuatorHeapdump", + "responses" : { + "200" : { + "content" : { + "application/octet-stream" : { + "schema" : { + "type" : "object" + } + } + }, + "description" : "OK" + } + }, + "summary" : "Actuator endpoint - Heapdump (actuatorHeapdump)", + "tags" : [ "Actuator API" ], + "x-internal" : true + } + }, + "/actuator/info" : { + "get" : { + "description" : "A1-PMS Springboot Service Actuator web endpoint - Info.\n", + "externalDocs" : { + "description" : "Spring Boot Actuator Web API Documentation", + "url" : "https://docs.spring.io/spring-boot/reference/actuator/endpoints.html" + }, + "operationId" : "actuatorInfo", + "responses" : { + "200" : { + "content" : { + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" + } + }, + "application/json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" + } + } + }, + "description" : "OK" + } + }, + "summary" : "Actuator endpoint - Info (actuatorInfo)", + "tags" : [ "Actuator API" ], + "x-internal" : true + } + }, + "/actuator/threaddump" : { + "get" : { + "description" : "A1-PMS Springboot Service Actuator web endpoint - ThreadDump.\n", + "externalDocs" : { + "description" : "Spring Boot Actuator Web API Documentation", + "url" : "https://docs.spring.io/spring-boot/reference/actuator/endpoints.html" + }, + "operationId" : "actuatorThreaddump", + "responses" : { + "200" : { + "content" : { + "text/plain;charset=UTF-8" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" + } + }, + "application/json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" + } + } + }, + "description" : "OK" + } + }, + "summary" : "Actuator endpoint - Threaddump (actuatorThreaddump)", + "tags" : [ "Actuator API" ], + "x-internal" : true + } + }, + "/actuator/loggers" : { + "get" : { + "description" : "A1-PMS Springboot Service Actuator web endpoint - Get a list of Loggers.\n", + "externalDocs" : { + "description" : "Spring Boot Actuator Web API Documentation", + "url" : "https://docs.spring.io/spring-boot/reference/actuator/endpoints.html" + }, + "operationId" : "actuatorLoggers", + "responses" : { + "200" : { + "content" : { + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" + } + }, + "application/json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" + } + } + }, + "description" : "OK" + } + }, + "summary" : "Actuator endpoint - Get Loggers (actuatorLoggers)", + "tags" : [ "Actuator API" ], + "x-internal" : true + } + }, + "/actuator/loggers/{name}" : { + "get" : { + "description" : "A1-PMS Springboot Service Actuator web endpoint - Get a single named Logger.\n", + "externalDocs" : { + "description" : "Spring Boot Actuator Web API Documentation", + "url" : "https://docs.spring.io/spring-boot/reference/actuator/endpoints.html" + }, + "operationId" : "actuatorGetLogger", + "parameters" : [ { + "explode" : false, + "in" : "path", + "name" : "name", + "required" : true, + "schema" : { + "type" : "string" + }, + "style" : "simple" + } ], + "responses" : { + "200" : { + "content" : { + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" + } + }, + "application/json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" + } + } + }, + "description" : "OK" + } + }, + "summary" : "Actuator endpoint - Get Logger (actuatorGetLogger)", + "tags" : [ "Actuator API" ], + "x-internal" : true }, - "policy_status_info" : { - "description" : "Status for one A1-P Policy", - "value" : { - "last_modified" : "last_modified", - "status" : { - "value" : { - "status" : "status" + "post" : { + "description" : "A1-PMS Springboot Service Actuator web endpoint - Create or Update single named Logger.\n", + "externalDocs" : { + "description" : "Spring Boot Actuator Web API Documentation", + "url" : "https://docs.spring.io/spring-boot/reference/actuator/endpoints.html" + }, + "operationId" : "actuatorSetlogger", + "parameters" : [ { + "explode" : false, + "in" : "path", + "name" : "name", + "required" : true, + "schema" : { + "type" : "string" + }, + "style" : "simple" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "enum" : [ "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "FATAL", "OFF" ], + "type" : "string" + } } } - } - }, + }, + "responses" : { + "200" : { + "content" : { + "*/*" : { + "schema" : { + "type" : "object" + } + } + }, + "description" : "OK" + } + }, + "summary" : "Actuator endpoint - Set Logger (actuatorSetlogger)", + "tags" : [ "Actuator API" ], + "x-internal" : true + } + }, + "/actuator/logfile" : { + "get" : { + "description" : "A1-PMS Springboot Service Actuator web endpoint - Get the Log file.\n", + "externalDocs" : { + "description" : "Spring Boot Actuator Web API Documentation", + "url" : "https://docs.spring.io/spring-boot/reference/actuator/endpoints.html" + }, + "operationId" : "actuatorGetLogFile", + "responses" : { + "200" : { + "content" : { + "text/plain;charset=UTF-8" : { + "schema" : { + "type" : "object" + } + } + }, + "description" : "OK" + } + }, + "summary" : "Actuator endpoint - Log File (actuatorGetLogFile)", + "tags" : [ "Actuator API" ], + "x-internal" : true + } + }, + "/actuator/health" : { + "get" : { + "description" : "A1-PMS Springboot Service Actuator web endpoint - Health Check.\n", + "externalDocs" : { + "description" : "Spring Boot Actuator Web API Documentation", + "url" : "https://docs.spring.io/spring-boot/reference/actuator/endpoints.html" + }, + "operationId" : "actuatorHealth", + "responses" : { + "200" : { + "content" : { + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" + } + }, + "application/json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" + } + } + }, + "description" : "OK" + } + }, + "summary" : "Actuator endpoint - Health (actuatorHealth)", + "tags" : [ "Actuator API" ], + "x-internal" : true + } + }, + "/actuator/health/**" : { + "get" : { + "description" : "A1-PMS Springboot Service Actuator web endpoint - Health Status for an Application Component.\n", + "externalDocs" : { + "description" : "Spring Boot Actuator Web API Documentation", + "url" : "https://docs.spring.io/spring-boot/reference/actuator/endpoints.html" + }, + "operationId" : "actuatorHealthComponent", + "responses" : { + "200" : { + "content" : { + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" + } + }, + "application/json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" + } + } + }, + "description" : "OK" + } + }, + "summary" : "Actuator endpoint - Component Health (actuatorHealthComponent)", + "tags" : [ "Actuator API" ], + "x-internal" : true + } + }, + "/actuator/shutdown" : { + "post" : { + "description" : "A1-PMS Springboot Service Actuator web endpoint - Shutdown the Application.\n", + "externalDocs" : { + "description" : "Spring Boot Actuator Web API Documentation", + "url" : "https://docs.spring.io/spring-boot/reference/actuator/endpoints.html" + }, + "operationId" : "actuatorShutdown", + "responses" : { + "200" : { + "content" : { + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" + } + }, + "application/json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" + } + } + }, + "description" : "OK" + } + }, + "summary" : "Actuator endpoint - Shutdown (actuatorShutdown)", + "tags" : [ "Actuator API" ], + "x-internal" : true + } + }, + "/actuator/metrics" : { + "get" : { + "description" : "A1-PMS Springboot Service Actuator web endpoint - Get a list of Application metrics names.\n", + "externalDocs" : { + "description" : "Spring Boot Actuator Web API Documentation", + "url" : "https://docs.spring.io/spring-boot/reference/actuator/endpoints.html" + }, + "operationId" : "actuatorMetrics", + "responses" : { + "200" : { + "content" : { + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" + } + }, + "application/json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" + } + } + }, + "description" : "OK" + } + }, + "summary" : "Actuator endpoint - Metrics (actuatorMetrics)", + "tags" : [ "Actuator API" ], + "x-internal" : true + } + }, + "/actuator/metrics/{requiredMetricName}" : { + "get" : { + "description" : "A1-PMS Springboot Service Actuator web endpoint - Get the value for a named Application metric.\n", + "externalDocs" : { + "description" : "Spring Boot Actuator Web API Documentation", + "url" : "https://docs.spring.io/spring-boot/reference/actuator/endpoints.html" + }, + "operationId" : "actuatorGetMetric", + "parameters" : [ { + "explode" : false, + "in" : "path", + "name" : "requiredMetricName", + "required" : true, + "schema" : { + "type" : "string" + }, + "style" : "simple" + } ], + "responses" : { + "200" : { + "content" : { + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" + } + }, + "application/json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" + } + } + }, + "description" : "OK" + } + }, + "summary" : "Actuator endpoint - Get Metric (actuatorGetMetric)", + "x-internal" : true + } + } + }, + "components" : { + "examples" : { "status_info" : { "value" : { "status" : "status" @@ -1476,6 +1463,24 @@ "policytype_ids" : [ "some_policytype_id", "some_policytype_id" ] } }, + "policy_type_id_list" : { + "description" : "Array of A1 Policy Type id's", + "value" : { + "policy_type_id_list" : [ "policytype_id", "policytype_id" ] + } + }, + "policy_info" : { + "description" : "Information for an A1 Policy Instance", + "value" : { + "ric_id" : "ric_id1", + "policy_id" : "policy_id1", + "transient" : false, + "service_id" : "service_id1", + "policy_data" : "{}", + "status_notification_uri" : "status_notification_uri", + "policytype_id" : "policytype_id1" + } + }, "ric_info_list" : { "value" : { "rics" : [ { @@ -1490,9 +1495,78 @@ "policytype_ids" : [ "policytype_ids", "policytype_ids" ] } ] } + }, + "service_status_list" : { + "description" : "List of service information", + "value" : { + "service_list" : [ { + "callback_url" : "callback_url", + "service_id" : "service_id", + "keep_alive_interval_seconds" : 0, + "time_since_last_activity_seconds" : 6 + }, { + "callback_url" : "callback_url", + "service_id" : "service_id", + "keep_alive_interval_seconds" : 0, + "time_since_last_activity_seconds" : 6 + } ] + } + }, + "policy_type_definition" : { + "description" : "Schema of the given A1 Policy Type", + "value" : { + "policy_schema" : "{}" + } + }, + "policy_id_list" : { + "description" : "A list of policy identities", + "value" : { + "policy_ids" : [ "some_policy_id", "some_policy_id" ] + } + }, + "policy_info_list" : { + "description" : "List of policy information", + "value" : { + "policies" : [ { + "ric_id" : "ric_id1", + "policy_id" : "policy_id1", + "transient" : false, + "service_id" : "service_id1", + "policy_data" : "{}", + "status_notification_uri" : "status_notification_uri", + "policytype_id" : "policytype_id1" + }, { + "ric_id" : "ric_id2", + "policy_id" : "policy_id2", + "transient" : true, + "service_id" : "service_id2", + "policy_data" : "{}", + "status_notification_uri" : "status_notification_uri", + "policytype_id" : "policytype_id2" + } ] + } + }, + "policy_status_info" : { + "description" : "Status for one A1-P Policy", + "value" : { + "last_modified" : "last_modified", + "status" : { + "value" : { + "status" : "status" + } + } + } } }, "responses" : { + "NotFound" : { + "content" : { + "application/problem+json" : { + "example" : [ ] + } + }, + "description" : "Not Found" + }, "Locked" : { "content" : { "application/problem+json" : { @@ -1537,74 +1611,16 @@ } }, "description" : "Forbidden" - }, - "NotFound" : { - "content" : { - "application/problem+json" : { - "example" : [ ] - } - }, - "description" : "Not Found" } }, - "schemas" : { - "policy_type_definition" : { - "description" : "Contains policy type schema definition", - "properties" : { - "policy_schema" : { - "description" : "Policy type json schema. The schema is a json object following http://json-schema.org/draft-07/schema", - "type" : "object" - } - }, - "type" : "object" - }, - "error_information" : { - "description" : "Problem as defined in https://tools.ietf.org/html/rfc7807", - "properties" : { - "detail" : { - "description" : " A human-readable explanation specific to this occurrence of the problem.", - "example" : "Policy type not found", - "type" : "string" - }, - "title" : { - "description" : "A specific error name", - "example" : "Not Found", - "type" : "string" - }, - "status" : { - "description" : "The HTTP status code generated by the origin server for this occurrence of the problem. ", - "example" : 404, - "format" : "int32", - "type" : "integer" - } - }, - "type" : "object" - }, - "void" : { - "description" : "Void/empty", - "type" : "object" - }, - "status_info" : { - "properties" : { - "status" : { - "description" : "status text", - "type" : "string" - } - }, - "type" : "object" - }, - "authorization_result" : { - "description" : "Result of authorization", - "example" : { - "result" : true - }, + "schemas" : { + "status_info" : { "properties" : { - "result" : { - "description" : "If true, the access is granted", - "type" : "boolean" + "status" : { + "description" : "status text", + "type" : "string" } }, - "required" : [ "result" ], "type" : "object" }, "ric_info" : { @@ -1628,9 +1644,9 @@ "type" : "string" }, "policytype_ids" : { - "description" : "supported policy types", + "description" : "supported A1 Policy Types", "items" : { - "description" : "supported policy types", + "description" : "supported A1 Policy Types", "type" : "string" }, "type" : "array" @@ -1638,49 +1654,106 @@ }, "type" : "object" }, - "service_registration_info" : { - "description" : "Information for one service", + "policy_type_id_list" : { + "description" : "Information about A1 Policy Types", "properties" : { - "callback_url" : { - "description" : "callback for notifying of Near-RT RIC state changes", + "policytype_ids" : { + "description" : "A1 Policy Type identities", + "items" : { + "description" : "A1 Policy Type identities", + "type" : "string" + }, + "type" : "array" + } + }, + "type" : "object" + }, + "policy_info" : { + "description" : "Information for one A1-P Policy", + "properties" : { + "ric_id" : { + "description" : "identity of the target Near-RT RIC", + "type" : "string" + }, + "policy_id" : { + "description" : "identity of the policy", "type" : "string" }, + "transient" : { + "default" : false, + "description" : "If true, the policy is automatically deleted if the targeted Near-RT RIC restarts or recovers. If false, the A1 Policy Instance remains, and is re-pushed to the targeted Near-RT RIC after a restart or recovery. If false, the A1 Policy Instance is maintained and must be deleted separately in the event of Near-RT RIC restart or recovery. Default is false.\n", + "example" : false, + "nullable" : false, + "type" : "boolean" + }, "service_id" : { - "description" : "identity of the service", + "default" : "", + "description" : "The identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated to a service). Note that the service does not need to be registered. If the service is registered, the A1 Policy Instance will be subject to the same supervision rules as the the service's other policies.\n", "type" : "string" }, - "keep_alive_interval_seconds" : { - "description" : "keep alive interval for the service. This is used to enable optional heartbeat supervision of the service. If set (> 0) the registered service should regularly invoke a 'keepalive' REST call. When a service fails to invoke this 'keepalive' call within the configured time, the service is considered unavailable. An unavailable service will be automatically deregistered and its policies will be deleted. Value 0 means timeout supervision is disabled.", - "format" : "int64", + "policy_data" : { + "description" : "the configuration of the policy", + "type" : "object" + }, + "status_notification_uri" : { + "description" : "Callback URI for policy status updates", + "type" : "string" + }, + "policytype_id" : { + "description" : "identity of the A1 Policy Type", + "type" : "string" + } + }, + "required" : [ "policy_data", "policy_id", "policytype_id", "ric_id" ], + "type" : "object" + }, + "void" : { + "description" : "Void/empty", + "type" : "object" + }, + "error_information" : { + "description" : "Problem as defined in https://tools.ietf.org/html/rfc7807", + "properties" : { + "detail" : { + "description" : " A human-readable explanation specific to this occurrence of the problem.", + "example" : "A1 Policy Type not found", + "type" : "string" + }, + "title" : { + "description" : "A specific error name", + "example" : "Not Found", + "type" : "string" + }, + "status" : { + "description" : "The HTTP status code generated by the origin server for this occurrence of the problem. ", + "example" : 404, + "format" : "int32", "type" : "integer" } }, - "required" : [ "service_id" ], "type" : "object" }, - "policy_info_list" : { - "description" : "List of policy information", + "ric_info_list" : { + "description" : "List of Near-RT RIC information", "properties" : { - "policies" : { - "description" : "List of policy information", + "rics" : { + "description" : "List of Near-RT RIC information", "items" : { - "$ref" : "#/components/schemas/policy_info" + "$ref" : "#/components/schemas/ric_info" }, "type" : "array" } }, "type" : "object" }, - "policy_status_info" : { - "description" : "Status for one A1-P Policy", + "service_status_list" : { "properties" : { - "last_modified" : { - "description" : "timestamp, last modification time", - "type" : "string" - }, - "status" : { - "description" : "the Policy status", - "type" : "object" + "service_list" : { + "description" : "List of service information", + "items" : { + "$ref" : "#/components/schemas/service_status" + }, + "type" : "array" } }, "type" : "object" @@ -1708,100 +1781,50 @@ }, "type" : "object" }, - "ric_info_list" : { - "description" : "List of Near-RT RIC information", - "properties" : { - "rics" : { - "description" : "List of Near-RT RIC information", - "items" : { - "$ref" : "#/components/schemas/ric_info" - }, - "type" : "array" - } - }, - "type" : "object" - }, - "input" : { - "description" : "input", + "service_registration_info" : { + "description" : "Information for one service", "properties" : { - "access_type" : { - "description" : "Access type", - "enum" : [ "READ", "WRITE", "DELETE" ], + "callback_url" : { + "description" : "Callback for notifying of Near-RT RIC state changes", "type" : "string" }, - "auth_token" : { - "description" : "Authorization token", + "service_id" : { + "description" : "identity of the service", "type" : "string" }, - "policy_type_id" : { - "description" : "Policy type identifier", - "type" : "string" - } - }, - "required" : [ "access_type", "auth_token", "policy_type_id" ], - "type" : "object" - }, - "policy_authorization" : { - "description" : "Authorization request for A1 policy requests", - "properties" : { - "input" : { - "$ref" : "#/components/schemas/input" + "keep_alive_interval_seconds" : { + "description" : "Keep alive interval for the service. This is used to enable optional heartbeat supervision of the service. If set (> 0) the registered service should regularly invoke a 'keepalive' REST call. When a service fails to invoke this 'keepalive' call within the configured time, the service is considered unavailable. An unavailable service will be automatically deregistered and its policies will be deleted. Value 0 means timeout supervision is disabled.\n", + "format" : "int64", + "type" : "integer" } }, - "required" : [ "input" ], + "required" : [ "service_id" ], "type" : "object" }, - "policy_type_id_list" : { - "description" : "Information about policy types", + "service_callback_info_v2" : { + "description" : "Information transferred in Service callbacks, \nif a callback URL was provided for a registered service\n", "properties" : { - "policytype_ids" : { - "description" : "Policy type identities", - "items" : { - "description" : "Policy type identities", - "type" : "string" - }, - "type" : "array" + "ric_id" : { + "description" : "identity of a Near-RT RIC", + "type" : "string" + }, + "event_type" : { + "description" : "values: \n AVAILABLE: the Near-RT RIC has become available for A1 Policy management\n", + "enum" : [ "AVAILABLE" ], + "type" : "string" } }, + "required" : [ "event_type", "ric_id" ], "type" : "object" }, - "policy_info" : { - "description" : "Information for one A1-P Policy", + "policy_type_definition" : { + "description" : "Contains A1 Policy Type schema definition", "properties" : { - "ric_id" : { - "description" : "identity of the target Near-RT RIC", - "type" : "string" - }, - "policy_id" : { - "description" : "identity of the policy", - "type" : "string" - }, - "transient" : { - "default" : false, - "description" : "if true, the policy is deleted at RIC restart. If false, its value is maintained by this service until explicitly deleted. Default false.", - "example" : false, - "nullable" : false, - "type" : "boolean" - }, - "service_id" : { - "default" : "", - "description" : "the identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated to a service). Note that the service does not need to be registered.", - "type" : "string" - }, - "policy_data" : { - "description" : "the configuration of the policy", + "policy_schema" : { + "description" : "A1 Policy Type json schema. The schema is a json object following http://json-schema.org/draft-07/schema", "type" : "object" - }, - "status_notification_uri" : { - "description" : "Callback URI for policy status updates", - "type" : "string" - }, - "policytype_id" : { - "description" : "identity of the policy type", - "type" : "string" } }, - "required" : [ "policy_data", "policy_id", "policytype_id", "ric_id" ], "type" : "object" }, "policy_id_list" : { @@ -1821,32 +1844,75 @@ }, "type" : "object" }, - "service_status_list" : { + "policy_info_list" : { + "description" : "List of policy information", "properties" : { - "service_list" : { - "description" : "List of service information", + "policies" : { + "description" : "List of policy information", "items" : { - "$ref" : "#/components/schemas/service_status" + "$ref" : "#/components/schemas/policy_info" }, "type" : "array" } }, "type" : "object" }, - "service_callback_info_v2" : { - "description" : "Information transferred as in Service callbacks (callback_url)", + "policy_status_info" : { + "description" : "Status for one A1-P Policy", "properties" : { - "ric_id" : { - "description" : "identity of a Near-RT RIC", + "last_modified" : { + "description" : "timestamp, last modification time", "type" : "string" }, - "event_type" : { - "description" : "values:\nAVAILABLE: the Near-RT RIC has become available for A1 Policy management", - "enum" : [ "AVAILABLE" ], + "status" : { + "description" : "the Policy status", + "type" : "object" + } + }, + "type" : "object" + }, + "policy_authorization" : { + "description" : "Authorization request for A1 policy requests", + "properties" : { + "input" : { + "$ref" : "#/components/schemas/input" + } + }, + "required" : [ "input" ], + "type" : "object" + }, + "input" : { + "description" : "input", + "properties" : { + "access_type" : { + "description" : "Access type", + "enum" : [ "READ", "WRITE", "DELETE" ], + "type" : "string" + }, + "auth_token" : { + "description" : "Authorization token", + "type" : "string" + }, + "policy_type_id" : { + "description" : "A1 Policy Type identifier", "type" : "string" } }, - "required" : [ "event_type", "ric_id" ], + "required" : [ "access_type", "auth_token", "policy_type_id" ], + "type" : "object" + }, + "authorization_result" : { + "description" : "Result of authorization", + "example" : { + "result" : true + }, + "properties" : { + "result" : { + "description" : "If true, the access is granted", + "type" : "boolean" + } + }, + "required" : [ "result" ], "type" : "object" }, "Link" : { diff --git a/docs/offeredapis/swagger/pms-api.yaml b/docs/offeredapis/swagger/pms-api.yaml index 421201e9..5f54504f 100644 --- a/docs/offeredapis/swagger/pms-api.yaml +++ b/docs/offeredapis/swagger/pms-api.yaml @@ -1,6 +1,6 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2020-2023 Nordix Foundation. All rights reserved. # Copyright (C) 2023-2025 OpenInfra Foundation Europe. All rights reserved. -# Modifications Copyright (C) 2021 Pantheon.tech -# Modifications Copyright (C) 2021 Bell Canada # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -19,322 +19,184 @@ openapi: 3.0.3 info: - x-api-id: a31c510b-20e6-4a08-af16-368c44d7fba8 - x-audience: external-public - description: "

        General

        The ONAP CCSDK A1 Policy Management Service\ - \ provides a REST API for managemecnt of A1 policies.
        The main tasks of the\ - \ service are:

        • A1 Policy creation, modification and deletion.
        • Monitoring\ - \ and maintaining consistency of the SMO view of A1 policies and the Near-RT RICs
        • Maintaining\ - \ a view of supported Near-RT RIC policy types
        • Supervision of using services\ - \ (R-APPs). When a service is unavailable, its policies are removed.

        APIs\ - \ provided or defined by the service

        A1 Policy Management

        This\ - \ is an API for management of A1 Policies.

        • A1 Policy retrieval, creation,\ - \ modification and deletion.
        • Retrieval of supported A1 Policy types for\ - \ a Near-RT RIC
        • Retrieval of status for existing A1 policies

        Management\ - \ of configuration

        API for updating and retrieval of the component configuration.\ - \ Note that there other ways to maintain the configuration.

        Service callbacks

        These\ - \ are endpoints that are invoked by this service. The callbacks are registered\ - \ in this service at service registration.

        NearRT-RIC Repository

        This\ - \ is an API that provides support for looking up a NearRT-RIC. Each A1 policy\ - \ is targeted for one Near-RT RIC.

        Health Check

        API used for supervision\ - \ of the PMS component.

        Service Registry and Supervision

        API used\ - \ for registering services that uses PMS. Each A1 policy is optionally owned by\ - \ a service. PMS can supervise each registered service by a heart-beat supervision\ - \ and will automatically remove policies for unavailable services. Note that a\ - \ service does not need to be registered in order to create A1 Policies. This\ - \ is a feature that is optional to use.

        Authorization API

        API used\ - \ for access control of A1 Policy access. If configured, an external authorization\ - \ provider is requested to grant access to the A1 Policy type.

        Spring Boot\ - \ Actuator

        Provides generic functions used to monitor and manage the Spring\ - \ web application.

        " + contact: + email: discuss-list@onap.com + name: ONAP CCSDK Project + url: https://www.onap.org/ + description: "

        General

        The ONAP CCSDK A1 Policy Management Service provides\ + \ a REST API for managing A1 policies.
        This document describes an older pre-spec\ + \ API set to perform tasks for:

        • A1 Policy creation, modification\ + \ and deletion.
        • Monitoring and maintaining consistency of the SMO view\ + \ of A1 Policies and the Near-RT RICs
        • Maintaining a view of each Near-RT\ + \ RIC's supported A1 Policy Types
        • Supervision of registered services (rApps).\ + \ When a registered service is unavailable, its policies are removed.

        APIs\ + \ provided or defined by the service

        A1 Policy Management (Older pre-spec\ + \ version)

        This is an older API for managing A1 Policies:

        • A1\ + \ Policy retrieval, creation, modification and deletion.
        • Retrieval of\ + \ supported A1 Policy Types for a Near-RT RIC
        • Retrieval of status for\ + \ existing A1 policies

        Management of configuration

        API for\ + \ updating and retrieval of the component configuration. Note that there other\ + \ ways to maintain the configuration.

        Service Callbacks

        These are\ + \ endpoints that are invoked by this service. The callbacks are registered in\ + \ this service at service registration.

        NearRT-RIC Repository (Older version)

        \ + \

        This is an API that provides support for looking up a NearRT-RIC. Each A1\ + \ policy is targeted towards one Near-RT RIC.

        Health Check

        API used\ + \ for supervision of the A1 Policy Management Service .

        Service Registry\ + \ and Supervision

        API used for registering services/clients/rApps. Each\ + \ A1 Policy can be tagged with an owner. If the owner service is registered, then\ + \ the service can be monitored by a heart-beat supervision mechanism, and if the\ + \ registered service becomes unavailable, then its A1 Policies are removed. Note\ + \ that services do not need to be registered to create A1 Policies, but unregistered\ + \ services are not supervised. This is a feature that is optional to use.

        Authorization\ + \ API

        API used for access control of A1 Policy access. If configured, an\ + \ external authorization provider is requested to grant access to the A1 Policy\ + \ Type.

        Spring Boot Actuator

        Provides built-in functions used to\ + \ monitor and configure the Spring web application hosting the service.

        " license: - name: Copyright (C) 2020-2023 Nordix Foundation, and Copyright (C) 2024-2025 OpenInfra Foundation Europe. - All rights reserved. Licensed under the Apache 2 License. + name: "Copyright (C) 2020-2023 Nordix Foundation, and Copyright (C) 2024-2025\ + \ OpenInfra Foundation Europe. \nAll rights reserved. Licensed under the Apache\ + \ 2 License.\n" url: http://www.apache.org/licenses/LICENSE-2.0 - title: ONAP CCSDK A1 Policy Management Service + title: ONAP CCSDK - Pre-Spec A1 Policy Management API version: 1.3.0 - contact: - url: https://www.onap.org/ - email: discuss-list@onap.com + x-api-id: a31c510b-20e6-4a08-af16-368c44d7fba8 + x-audience: external-public servers: - - url: / +- url: / tags: - - name: A1 Policy Management (Older version) - description: "Older API used to create polices, Policy Instances and get them as individual - using an ID or get all policies/Instances." - - name: NearRT-RIC Repository - description: "API used to get the NearRT-RIC for the managed element." - - name: Service Registry and Supervision - description: "API used to keep the service Alive with in the timeout period" - - name: Health Check - description: "API used to get the health status and statistics of this service" - - name: Service callbacks - description: "Callouts to indicate status schanges relevant for Services. -
        Note that these calls are called by A1-PMS, not provided." - - name: Authorization API - description: "API used for authorization of information A1 policy access (this is - provided by an authorization producer such as OPA).
        Note that this API is called - by A1-PMS, it is not provided." - - name: Configuration - description: "API used to create or fetch the application configuration." - - name: Actuator - description: Monitor and interact - externalDocs: - description: Spring Boot Actuator Web API Documentation - url: https://docs.spring.io/spring-boot/docs/current/actuator-api/html/ +- description: | + Older pre-spec API used to get, create, update and delete A1 Policy Instances. Also used to query A1 Policy Types. + name: A1 Policy Management +- description: | + Older API used to get information about registered Near-RT RICs. + name: NearRT-RIC Repository +- description: | + Older API used to manage registered services, and control their keep-alive status via heart-beat messages. + name: Service Registry and Supervision +- description: | + API used to get the health status and statistics of this service + name: Health Check +- description: | + Callout to registered services to indicate a status changes for a Near-RT RIC. Note that these operations are called by the A1 Policy Management Service, not provided. + name: Service Callbacks +- description: | + API used for authorization of information A1 policy access (this is provided by an authorization producer such as OPA). Note that these operations are called by the A1 Policy Management Service, not provided. + name: Authorization API +- description: | + API used to create or fetch the application configuration. + name: Configuration +- description: | + API used to monitor and configure the A1-PMS Springboot Service. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + name: Actuator API paths: - /a1-policy/v2/policy-instances: - get: - description: "Returns a list of A1 policies matching given search criteria.\ - \
        If several query parameters are defined, the policies matching all conditions\ - \ are returned." - operationId: getPolicyInstances - parameters: - - description: Select policies with a given type identity. - explode: true - in: query - name: policytype_id - required: false - schema: - type: string - style: form - - description: Select policies for a given Near-RT RIC identity. - explode: true - in: query - name: ric_id - required: false - schema: - type: string - style: form - - description: Select policies owned by a given service. - explode: true - in: query - name: service_id - required: false - schema: - type: string - style: form - - description: Select policies of a given type name (type identity has the format - ) - explode: true - in: query - name: type_name - required: false - schema: - type: string - style: form - responses: - "200": - content: - application/json: - examples: - policy_info_list: - $ref: '#/components/examples/policy_info_list' - schema: - $ref: '#/components/schemas/policy_info_list' - description: OK - Returns A1 Policies which matches the criteria - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/error_information' - description: "Not Found - Near-RT RIC, policy type or service not found" - summary: Query for A1 policy instances - tags: - - A1 Policy Management - /example-authz-check: - post: - description: The authorization function decides if access is granted. - operationId: performAccessControl - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/policy_authorization' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/authorization_result' - description: OK - "403": - $ref: '#/components/responses/Forbidden' - summary: Request for access authorization. - tags: - - Authorization API - /actuator/threaddump: + /status: get: - x-internal: true - operationId: threaddump + description: Returns status and statistics of this service + operationId: getStatusV1 responses: "200": content: - text/plain;charset=UTF-8: - schema: - type: object - application/vnd.spring-boot.actuator.v3+json: - schema: - type: object - application/json: - schema: - type: object - application/vnd.spring-boot.actuator.v2+json: + '*/*': schema: - type: object - description: OK - summary: Actuator web endpoint 'threaddump' + type: string + description: OK - Service is living + summary: Get Status (getStatusV1) tags: - - Actuator + - Health Check /a1-policy/v2/status: get: + description: Returns status and statistics of this service operationId: getStatus responses: "200": content: application/json: - schema: - $ref: '#/components/schemas/status_info' examples: status_info: $ref: '#/components/examples/status_info' - description: OK- Service is living Ok - description: Returns status and statistics of this service - tags: - - Health Check - /actuator/loggers: - get: - x-internal: true - operationId: loggers - responses: - "200": - content: - application/vnd.spring-boot.actuator.v3+json: - schema: - type: object - application/json: - schema: - type: object - application/vnd.spring-boot.actuator.v2+json: - schema: - type: object - description: OK - summary: Actuator web endpoint 'loggers' - tags: - - Actuator - /actuator/health/**: - get: - x-internal: true - operationId: health-path - responses: - "200": - content: - application/vnd.spring-boot.actuator.v3+json: - schema: - type: object - application/json: schema: - type: object - application/vnd.spring-boot.actuator.v2+json: - schema: - type: object - description: OK - summary: Actuator web endpoint 'health-path' + $ref: '#/components/schemas/status_info' + description: OK- Service is living Ok + summary: Get Status (getStatus) tags: - - Actuator + - Health Check /a1-policy/v2/rics/ric: get: - description: Either a Near-RT RIC identity or a Managed Element identity can - be specified.
        The intention with Managed Element identity is the ID used - in O1 for accessing the traffical element (such as the ID of CU). + description: | + Query information about a Near-RT RIC. Either a Near-RT RIC identity or a Managed Element identity can be specified. The intention with Managed Element identity is the ID used in O1 for accessing the traffical element (such as the ID of CU). operationId: getRic parameters: - - description: "The identity of a Managed Element. If given, the Near-RT RIC\ - \ managing the ME is returned." - explode: true - in: query - name: managed_element_id - required: false - schema: - type: string - style: form - - description: The identity of a Near-RT RIC to get information for. - explode: true - in: query - name: ric_id - required: false - schema: - type: string - style: form + - description: | + The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned. + explode: true + in: query + name: managed_element_id + required: false + schema: + type: string + style: form + - description: The identity of a Near-RT RIC to get information for. + explode: true + in: query + name: ric_id + required: false + schema: + type: string + style: form responses: "200": content: application/json: - schema: - $ref: '#/components/schemas/ric_info' examples: ric_info: $ref: '#/components/examples/ric_info' + schema: + $ref: '#/components/schemas/ric_info' description: OK - Near-RT RIC is found "404": - $ref: '#/components/responses/NotFound' - description: NotFound - Requested NearRT-RIC Not Found - summary: Returns info of Near-RT RIC queried by the ric-id and managed-element-id - tags: - - NearRT-RIC Repository - /actuator/shutdown: - post: - x-internal: true - operationId: shutdown - responses: - "200": content: - application/vnd.spring-boot.actuator.v3+json: - schema: - type: object - application/json: - schema: - type: object - application/vnd.spring-boot.actuator.v2+json: - schema: - type: object - description: OK - summary: Actuator web endpoint 'shutdown' + application/problem+json: + example: [] + description: Not Found + summary: Get a Near-RT RIC (getRic) tags: - - Actuator + - NearRT-RIC Repository /a1-policy/v2/policy-types: get: + description: Query A1 Policy Type identities using query parameters operationId: getPolicyTypes parameters: - - description: Select types for the given Near-RT RIC identity. - explode: true - in: query - name: ric_id - required: false - schema: - type: string - style: form - - description: Select types with the given type name (type identity has the - format ) - explode: true - in: query - name: type_name - required: false - schema: - type: string - style: form - - description: Select types that are compatible with the given version. This - parameter is only applicable in conjunction with type_name. As an example - version 1.9.1 is compatible with 1.0.0 but not the other way around. Matching - types will be returned sorted in ascending order. - explode: true - in: query - name: compatible_with_version - required: false - schema: - type: string - style: form + - description: Select types for the given Near-RT RIC identity. + explode: true + in: query + name: ric_id + required: false + schema: + type: string + style: form + - description: Select types compatible with the given type name (type identity + has the format 'typename_version') + explode: true + in: query + name: type_name + required: false + schema: + type: string + style: form + - description: Select types that are compatible with the given version. This + parameter is only applicable in conjunction with type_name. As an example + version 1.9.1 is compatible with 1.0.0 but not the other way around. Matching + types will be returned sorted in ascending order. + explode: true + in: query + name: compatible_with_version + required: false + schema: + type: string + style: form responses: "200": content: @@ -346,23 +208,25 @@ paths: $ref: '#/components/schemas/policy_type_id_list' description: OK - Policy Type IDs Found "404": - $ref: '#/components/responses/NotFound' - description: 'Not Found - Requested Policy Type IDs Not Found' - description: Query policy type identities + content: + application/problem+json: + example: [] + description: Not Found + summary: Get A1 Policy Types (getPolicyTypes) tags: - - A1 Policy Management + - A1 Policy Management /a1-policy/v2/policies/{policy_id}: delete: - description: Deleting the policy using the Policy's Policy ID. + description: Delete an A1 Policy instance using its policy ID. operationId: deletePolicy parameters: - - explode: false - in: path - name: policy_id - required: true - schema: - type: string - style: simple + - explode: false + in: path + name: policy_id + required: true + schema: + type: string + style: simple responses: "200": content: @@ -371,434 +235,650 @@ paths: $ref: '#/components/schemas/void' description: OK - Policy deleted "423": - $ref: '#/components/responses/Locked' - description: 'The requested policy using policy_id is Locked' - summary: Delete a policy + content: + application/problem+json: + example: + status: 423 + title: Locked + detail: Requested resource is in a locked state. + schema: + $ref: '#/components/schemas/error_information' + description: Locked - HTTP Status code which can be used when the state + is Locked + summary: Delete an A1 Policy instance (deletePolicy) tags: - - A1 Policy Management + - A1 Policy Management get: + description: Get an A1 Policy instance using its policy ID operationId: getPolicy parameters: - - explode: false - in: path - name: policy_id - required: true - schema: - type: string - style: simple + - explode: false + in: path + name: policy_id + required: true + schema: + type: string + style: simple responses: "200": content: application/json: - schema: - $ref: '#/components/schemas/policy_info' examples: policy_info: $ref: '#/components/examples/policy_info' + schema: + $ref: '#/components/schemas/policy_info' description: OK - Policy found "404": - $ref: '#/components/responses/NotFound' - description: 'Not Found - Requested Policy using policy_id is not found' - description: Returns a policy + content: + application/problem+json: + example: [] + description: Not Found + summary: Get an A1 Policy instance (getPolicy) tags: - - A1 Policy Management - /actuator/metrics/{requiredMetricName}: - get: - x-internal: true - operationId: metrics-requiredMetricName + - A1 Policy Management + /a1-policy/v2/services/{service_id}/keepalive: + put: + description: "A registered service should invoke this operation regularly to\ + \ indicate that it is still alive. If a registered service fails to invoke\ + \ some operation, or this operation, before the end of a timeout period the\ + \ service will be deregistered and all its A1 policies wil be removed. This\ + \ operation is only intended for registered services. (This timeout can be\ + \ set or disabled when each service is initially registered)" + operationId: keepAliveService parameters: - - explode: false - in: path - name: requiredMetricName - required: true - schema: - type: string - style: simple + - explode: false + in: path + name: service_id + required: true + schema: + type: string + style: simple responses: "200": content: - application/vnd.spring-boot.actuator.v3+json: + '*/*': schema: type: object + description: "OK - Service supervision timer refreshed, OK" + "404": + content: + application/problem+json: + example: [] + description: Not Found + summary: Heartbeat message from a service (keepAliveService) + tags: + - Service Registry and Supervision + /a1-policy/v2/rics: + get: + description: Get all Near-RT RICs that supports a given A1 Policy Type ID + operationId: getRics + parameters: + - description: | + The identity of an A1 Policy Type. If given, all Near-RT RICs supporting the A1 Policy Type are returned. + explode: true + in: query + name: policytype_id + required: false + schema: + type: string + style: form + responses: + "200": + content: application/json: + examples: + ric_info_list: + $ref: '#/components/examples/ric_info_list' schema: - type: object - application/vnd.spring-boot.actuator.v2+json: - schema: - type: object + $ref: '#/components/schemas/ric_info_list' description: OK - summary: Actuator web endpoint 'metrics-requiredMetricName' + "404": + content: + application/problem+json: + example: [] + description: Not Found + summary: Get Near-RT RICs for A1 Policy Type (getRics) tags: - - Actuator - /a1-policy/v2/configuration: + - NearRT-RIC Repository + /a1-policy/v2/services: get: - operationId: getConfiguration + description: | + Get information about all registered services, or a single registered service. If the service ID of a registered service is included in the query, information about that service is returned. Otherwise Information about all registered is returned. This operation does not retrieve information about unregistered services. + operationId: getServices + parameters: + - description: The identity of the registered service + explode: true + in: query + name: service_id + required: false + schema: + type: string + style: form responses: "200": content: application/json: + examples: + service_status_list: + $ref: '#/components/examples/service_status_list' schema: - type: string - description: OK - Configuration + $ref: '#/components/schemas/service_status_list' + description: OK "404": - $ref: '#/components/responses/NotFound' - description: Not Found - Configuration is not found or readable - description: Returns the contents of the application configuration file + content: + application/problem+json: + example: [] + description: Not Found + summary: Get Services (getServices) tags: - - Configuration + - Service Registry and Supervision put: - operationId: putConfiguration + callbacks: + RICStatus: + '{$request.body#/callback_url}': + post: + description: "Callouts to indicate Near-RT RIC status changes relevant\ + \ for Services. \nThe URL invoked by this callback is provided at\ + \ Service registration.\n" + operationId: serviceCallback + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/service_callback_info_v2' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/void' + description: OK + "404": + content: + application/problem+json: + example: [] + description: Not Found + summary: Callback for Near-RT RIC status (serviceCallback) + tags: + - Service Registry and Supervision + - Service Callbacks + x-callback-request: true + description: | + Register a single service, or update a previous registtration. Service registration is required to get callbacks about available NearRT RICs and to enable supervision of the service's active status. If a registered service becomes inactive, its policies can be automatically deleted. A1 Policy instances can also be created for unregistered services. If an unregistered service is later registered, the service's policies are retained when the service becomes registered. This feature is optional to use. + operationId: putService requestBody: content: application/json: schema: - type: object + $ref: '#/components/schemas/service_registration_info' required: true responses: "200": content: '*/*': schema: - $ref: '#/components/schemas/void' - description: OK - Configuration updated + type: object + description: OK - Service updated + "201": + content: + '*/*': + schema: + type: object + description: Created - Service created "400": - $ref: '#/components/responses/BadRequest' - description: Replace the current configuration with the given configuration - tags: - - Configuration - /actuator: - get: - x-internal: true - operationId: links - responses: - "200": content: - application/vnd.spring-boot.actuator.v3+json: + application/problem+json: + example: + status: 400 + title: Bad Request + detail: The provided request is not valid. schema: - additionalProperties: - additionalProperties: - $ref: '#/components/schemas/Link' - type: object - type: object + $ref: '#/components/schemas/error_information' + description: Bad Request + summary: Register or update a Service (putService) + tags: + - Service Registry and Supervision + /a1-policy/v2/policy-types/{policytype_id}: + get: + description: Get an A1 Policy Type definition using its policy type ID + operationId: getPolicyTypeDefinition + parameters: + - explode: false + in: path + name: policytype_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: application/json: + examples: + policy_type_definition: + $ref: '#/components/examples/policy_type_definition' schema: - additionalProperties: - additionalProperties: - $ref: '#/components/schemas/Link' - type: object - type: object - application/vnd.spring-boot.actuator.v2+json: - schema: - additionalProperties: - additionalProperties: - $ref: '#/components/schemas/Link' - type: object - type: object - description: OK - summary: Actuator root web endpoint + $ref: '#/components/schemas/policy_type_definition' + description: OK - schema of the requested A1 Policy Type + "404": + content: + application/problem+json: + example: [] + description: Not Found + summary: Get an A1 Policy Type definition (getPolicyTypeDefinition) tags: - - Actuator - /actuator/loggers/{name}: + - A1 Policy Management + /a1-policy/v2/policies: get: - x-internal: true - operationId: loggers-name + description: | + Retrieve a list of A1 Policy Instance IDs for policies that match given search criteria. If multiple query parameters are given, the policies matching all conditions are returned. + operationId: getPolicyIds parameters: - - explode: false - in: path - name: name - required: true - schema: - type: string - style: simple + - description: Select policies of a given A1 Policy Type ID. + explode: true + in: query + name: policytype_id + required: false + schema: + type: string + style: form + - description: Select policies of a given Near-RT RIC identity. + explode: true + in: query + name: ric_id + required: false + schema: + type: string + style: form + - description: Select policies owned by a given service. (Both registered and + unregistered services) + explode: true + in: query + name: service_id + required: false + schema: + type: string + style: form + - description: | + Select policies of types with the given A1 Policy Type name (type names have the format 'typename_version') + explode: true + in: query + name: type_name + required: false + schema: + type: string + style: form responses: "200": content: - application/vnd.spring-boot.actuator.v3+json: - schema: - type: object application/json: + examples: + policy_id_list: + $ref: '#/components/examples/policy_id_list' schema: - type: object - application/vnd.spring-boot.actuator.v2+json: - schema: - type: object - description: OK - summary: Actuator web endpoint 'loggers-name' + $ref: '#/components/schemas/policy_id_list' + description: OK - Policy identities + "404": + content: + application/problem+json: + example: [] + description: Not Found + summary: Query A1 Policy Instances (getPolicyIds) tags: - - Actuator - post: - x-internal: true - operationId: loggers-name_2 - parameters: - - explode: false - in: path - name: name - required: true - schema: - type: string - style: simple + - A1 Policy Management + put: + description: Create or Update an A1 Policy Instance + operationId: putPolicy requestBody: content: application/json: schema: - enum: - - TRACE - - DEBUG - - INFO - - WARN - - ERROR - - FATAL - - "OFF" - type: string + $ref: '#/components/schemas/policy_info' + required: true responses: "200": content: - '*/*': + application/json: schema: - type: object - description: OK - summary: Actuator web endpoint 'loggers-name' - tags: - - Actuator - /a1-policy/v2/services/{service_id}/keepalive: - put: - description: A registered service should invoke this operation regularly to - indicate that it is still alive. If a registered service fails to invoke this - operation before the end of a timeout period the service will be deregistered - and all its A1 policies wil be removed. (This timeout can be set or disabled - when each service is initially registered) - operationId: keepAliveService - parameters: - - explode: false - in: path - name: service_id - required: true - schema: - type: string - style: simple - responses: - "200": + $ref: '#/components/schemas/void' + description: OK - Policy updated + "201": content: - '*/*': + application/json: schema: - type: object - description: "OK - Service supervision timer refreshed, OK" - "404": - $ref: '#/components/responses/NotFound' - summary: Heartbeat indicates that the service is running + $ref: '#/components/schemas/void' + description: Created - Policy created + "423": + content: + application/problem+json: + example: + status: 423 + title: Locked + detail: Requested resource is in a locked state. + schema: + $ref: '#/components/schemas/error_information' + description: Locked - HTTP Status code which can be used when the state + is Locked + summary: Create or Update an A1 Policy Instance (putPolicy) tags: - - Service Registry and Supervision - /actuator/metrics: + - A1 Policy Management + /a1-policy/v2/policy-instances: get: - x-internal: true - operationId: metrics + description: | + Returns a collection of A1 Policy Instance information for policies that match given search criteria. If several query parameters are defined, the policies matching all conditions are returned. + operationId: getPolicyInstances + parameters: + - description: Select policies with a given A1 Policy Type ID. + explode: true + in: query + name: policytype_id + required: false + schema: + type: string + style: form + - description: Select policies for a given Near-RT RIC identity. + explode: true + in: query + name: ric_id + required: false + schema: + type: string + style: form + - description: Select policies owned by a given service (registered or unregistered). + explode: true + in: query + name: service_id + required: false + schema: + type: string + style: form + - description: Select policies of a given A1 Policy Type name (type identity + has the format 'typename_version'). + explode: true + in: query + name: type_name + required: false + schema: + type: string + style: form responses: "200": content: - application/vnd.spring-boot.actuator.v3+json: + application/json: + examples: + policy_info_list: + $ref: '#/components/examples/policy_info_list' schema: - type: object + $ref: '#/components/schemas/policy_info_list' + description: OK - Returns A1 Policy Instances which match the criteria + "404": + content: application/json: schema: - type: object - application/vnd.spring-boot.actuator.v2+json: + $ref: '#/components/schemas/error_information' + description: "Not Found - Near-RT RIC, A1 Policy Type or service was not\ + \ found" + summary: Query for A1 Policy instances (getPolicyInstances) + tags: + - A1 Policy Management + /a1-policy/v2/services/{service_id}: + delete: + description: | + Unregister a registered Service using its service ID. Only registered services can be unregistered. All A1 Policy Instances for the previously registered service will be removed. + operationId: deleteService + parameters: + - explode: false + in: path + name: service_id + required: true + schema: + type: string + style: simple + responses: + "204": + content: + '*/*': schema: type: object - description: OK - summary: Actuator web endpoint 'metrics' + description: No Content - Service unregistered + "404": + content: + application/problem+json: + example: [] + description: Not Found + summary: Unregister a Service (deleteService) tags: - - Actuator - /a1-policy/v2/rics: + - Service Registry and Supervision + /a1-policy/v2/policies/{policy_id}/status: get: - description: The call returns all Near-RT RICs that supports a given policy - type identity - operationId: getRics + description: Retrieve the status information for an A1 Policy Instance. + operationId: getPolicyStatus parameters: - - description: "The identity of a policy type. If given, all Near-RT RICs supporting\ - \ the policy type are returned" - explode: true - in: query - name: policytype_id - required: false - schema: - type: string - style: form + - explode: false + in: path + name: policy_id + required: true + schema: + type: string + style: simple responses: "200": content: application/json: - schema: - $ref: '#/components/schemas/ric_info_list' examples: - ric_info_list: - $ref: '#/components/examples/ric_info_list' - description: OK + policy_status_info: + $ref: '#/components/examples/policy_status_info' + schema: + $ref: '#/components/schemas/policy_status_info' + description: OK - Policy status "404": - $ref: '#/components/responses/NotFound' - summary: Query Near-RT RIC information + content: + application/problem+json: + example: [] + description: Not Found + summary: Get an A1 Policy Instance's status (getPolicyStatus) tags: - - NearRT-RIC Repository - /a1-policy/v2/services: + - A1 Policy Management + /a1-policy/v2/configuration: get: - description: Either information about a registered service with given identity - or all registered services are returned. - operationId: getServices - parameters: - - description: The identity of the service - explode: true - in: query - name: service_id - required: false - schema: - type: string - style: form + description: Returns the entire contents of the Application Configuration. + operationId: getConfiguration responses: "200": content: application/json: schema: - $ref: '#/components/schemas/service_status_list' - examples: - service_status_list: - $ref: '#/components/examples/service_status_list' - description: OK + type: string + description: OK - Configuration "404": - $ref: '#/components/responses/NotFound' - summary: Returns service information + content: + application/problem+json: + example: [] + description: Not Found + summary: Get the Application Configuration (getConfiguration) tags: - - Service Registry and Supervision + - Configuration put: - description: "Registering a service is needed to:
        • Get callbacks about\ - \ available NearRT RICs.
        • Activate supervision of the service. If a\ - \ service is inactive, its policies will automatically be deleted.
        Policies\ - \ can be created even if the service is not registerred. This is a feature\ - \ which it is optional to use." - operationId: putService + description: | + Replace the current Application Configuration with a new configuration. The new configuration, if accepted, will take effect after a short delay. The new configuration must comply with the Application Configuration schema, which can be found from the the Application Documentation (Developer Guide) + operationId: putConfiguration requestBody: content: application/json: schema: - $ref: '#/components/schemas/service_registration_info' + type: object required: true responses: "200": content: '*/*': schema: - type: object - description: OK - Service updated - "201": + $ref: '#/components/schemas/void' + description: OK - Configuration updated + "400": content: - '*/*': + application/problem+json: + example: + status: 400 + title: Bad Request + detail: The provided request is not valid. schema: - type: object - description: Created - Service created - "400": - $ref: '#/components/responses/BadRequest' - summary: Register a service + $ref: '#/components/schemas/error_information' + description: Bad Request + summary: Set/Replace the Application Configuration (putConfiguration) tags: - - Service Registry and Supervision - callbacks: - RICStatus: - "{$request.body#/callback_url}": - post: - description: The URL to this call is registered at Service registration. - operationId: serviceCallback - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/service_callback_info_v2' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/void' - description: OK - "404": - $ref: '#/components/responses/NotFound' - summary: Callback for Near-RT RIC status - tags: - - Service callbacks - /actuator/info: + - Configuration + /example-authz-check: + post: + description: | + A template endpoint for callout requests to an external authorization function. The authorization function, if enabled, decides if individual operations are permitted. + operationId: performAccessControl + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/policy_authorization' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/authorization_result' + description: OK + "403": + content: + application/problem+json: + example: + status: 403 + title: Forbidden + detail: Your role does not allow to perform this action. Contact System + Administrator to change your access rights. + schema: + $ref: '#/components/schemas/error_information' + description: Forbidden + summary: Callout request for access authorization (performAccessControl) + tags: + - Authorization API + /actuator: get: - x-internal: true - operationId: info + description: | + A1-PMS Springboot Service Actuator web endpoint. Returns a set of links to available/enabled actuator endpoints. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + operationId: actuatorLinks responses: "200": content: application/vnd.spring-boot.actuator.v3+json: schema: + additionalProperties: + additionalProperties: + $ref: '#/components/schemas/Link' + type: object type: object application/json: schema: + additionalProperties: + additionalProperties: + $ref: '#/components/schemas/Link' + type: object type: object application/vnd.spring-boot.actuator.v2+json: schema: + additionalProperties: + additionalProperties: + $ref: '#/components/schemas/Link' + type: object type: object description: OK - summary: Actuator web endpoint 'info' + summary: Actuator endpoint - Root (actuatorLinks) tags: - - Actuator - /status: + - Actuator API + x-internal: true + /actuator/heapdump: get: - operationId: getStatusV1 + description: | + A1-PMS Springboot Service Actuator web endpoint - HeapDump. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + operationId: actuatorHeapdump responses: "200": content: - '*/*': + application/octet-stream: schema: - type: string - description: OK - Service is living - description: Returns status and statistics of this service + type: object + description: OK + summary: Actuator endpoint - Heapdump (actuatorHeapdump) tags: - - Health Check - /a1-policy/v2/policy-types/{policytype_id}: + - Actuator API + x-internal: true + /actuator/info: get: - operationId: getPolicyTypeDefinition - parameters: - - explode: false - in: path - name: policytype_id - required: true - schema: - type: string - style: simple + description: | + A1-PMS Springboot Service Actuator web endpoint - Info. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + operationId: actuatorInfo responses: "200": content: + application/vnd.spring-boot.actuator.v3+json: + schema: + type: object application/json: schema: - $ref: '#/components/schemas/policy_type_definition' - examples: - policy_type_definition: - $ref: '#/components/examples/policy_type_definition' - description: OK - schema of the given policy type - "404": - $ref: '#/components/responses/NotFound' - description: Returns a policy type definition + type: object + application/vnd.spring-boot.actuator.v2+json: + schema: + type: object + description: OK + summary: Actuator endpoint - Info (actuatorInfo) tags: - - A1 Policy Management - /actuator/logfile: - get: + - Actuator API x-internal: true - operationId: logfile + /actuator/threaddump: + get: + description: | + A1-PMS Springboot Service Actuator web endpoint - ThreadDump. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + operationId: actuatorThreaddump responses: "200": content: text/plain;charset=UTF-8: schema: type: object + application/vnd.spring-boot.actuator.v3+json: + schema: + type: object + application/json: + schema: + type: object + application/vnd.spring-boot.actuator.v2+json: + schema: + type: object description: OK - summary: Actuator web endpoint 'logfile' + summary: Actuator endpoint - Threaddump (actuatorThreaddump) tags: - - Actuator - /actuator/health: - get: + - Actuator API x-internal: true - operationId: health + /actuator/loggers: + get: + description: | + A1-PMS Springboot Service Actuator web endpoint - Get a list of Loggers. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + operationId: actuatorLoggers responses: "200": content: @@ -812,257 +892,322 @@ paths: schema: type: object description: OK - summary: Actuator web endpoint 'health' + summary: Actuator endpoint - Get Loggers (actuatorLoggers) tags: - - Actuator - /a1-policy/v2/policies: + - Actuator API + x-internal: true + /actuator/loggers/{name}: get: - description: "Returns a list of A1 policies matching given search criteria.\ - \
        If several query parameters are defined, the policies matching all conditions\ - \ are returned." - operationId: getPolicyIds + description: | + A1-PMS Springboot Service Actuator web endpoint - Get a single named Logger. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + operationId: actuatorGetLogger parameters: - - description: Select policies of a given policy type identity. - explode: true - in: query - name: policytype_id - required: false - schema: - type: string - style: form - - description: Select policies of a given Near-RT RIC identity. - explode: true - in: query - name: ric_id - required: false - schema: - type: string - style: form - - description: Select policies owned by a given service. - explode: true - in: query - name: service_id - required: false - schema: - type: string - style: form - - description: Select policies of types with the given type name (type identity - has the format ) - explode: true - in: query - name: type_name - required: false - schema: - type: string - style: form + - explode: false + in: path + name: name + required: true + schema: + type: string + style: simple responses: "200": content: + application/vnd.spring-boot.actuator.v3+json: + schema: + type: object application/json: - examples: - policy_id_list: - $ref: '#/components/examples/policy_id_list' schema: - $ref: '#/components/schemas/policy_id_list' - description: OK - Policy identities - "404": - $ref: '#/components/responses/NotFound' - summary: Query policy identities + type: object + application/vnd.spring-boot.actuator.v2+json: + schema: + type: object + description: OK + summary: Actuator endpoint - Get Logger (actuatorGetLogger) tags: - - A1 Policy Management - put: - operationId: putPolicy + - Actuator API + x-internal: true + post: + description: | + A1-PMS Springboot Service Actuator web endpoint - Create or Update single named Logger. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + operationId: actuatorSetlogger + parameters: + - explode: false + in: path + name: name + required: true + schema: + type: string + style: simple requestBody: content: application/json: schema: - $ref: '#/components/schemas/policy_info' - required: true + enum: + - TRACE + - DEBUG + - INFO + - WARN + - ERROR + - FATAL + - "OFF" + type: string + responses: + "200": + content: + '*/*': + schema: + type: object + description: OK + summary: Actuator endpoint - Set Logger (actuatorSetlogger) + tags: + - Actuator API + x-internal: true + /actuator/logfile: + get: + description: | + A1-PMS Springboot Service Actuator web endpoint - Get the Log file. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + operationId: actuatorGetLogFile responses: "200": content: + text/plain;charset=UTF-8: + schema: + type: object + description: OK + summary: Actuator endpoint - Log File (actuatorGetLogFile) + tags: + - Actuator API + x-internal: true + /actuator/health: + get: + description: | + A1-PMS Springboot Service Actuator web endpoint - Health Check. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + operationId: actuatorHealth + responses: + "200": + content: + application/vnd.spring-boot.actuator.v3+json: + schema: + type: object application/json: schema: - $ref: '#/components/schemas/void' - description: OK - Policy updated - "201": + type: object + application/vnd.spring-boot.actuator.v2+json: + schema: + type: object + description: OK + summary: Actuator endpoint - Health (actuatorHealth) + tags: + - Actuator API + x-internal: true + /actuator/health/**: + get: + description: | + A1-PMS Springboot Service Actuator web endpoint - Health Status for an Application Component. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + operationId: actuatorHealthComponent + responses: + "200": content: + application/vnd.spring-boot.actuator.v3+json: + schema: + type: object application/json: schema: - $ref: '#/components/schemas/void' - description: Created - Policy created - "423": - $ref: '#/components/responses/Locked' - description: Create or update a policy + type: object + application/vnd.spring-boot.actuator.v2+json: + schema: + type: object + description: OK + summary: Actuator endpoint - Component Health (actuatorHealthComponent) tags: - - A1 Policy Management - /a1-policy/v2/services/{service_id}: - delete: - operationId: deleteService - parameters: - - explode: false - in: path - name: service_id - required: true - schema: - type: string - style: simple + - Actuator API + x-internal: true + /actuator/shutdown: + post: + description: | + A1-PMS Springboot Service Actuator web endpoint - Shutdown the Application. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + operationId: actuatorShutdown responses: - "204": + "200": content: - '*/*': + application/vnd.spring-boot.actuator.v3+json: schema: type: object - description: No Content - Service unregistered - "404": - $ref: '#/components/responses/NotFound' - description: Unregister a service + application/json: + schema: + type: object + application/vnd.spring-boot.actuator.v2+json: + schema: + type: object + description: OK + summary: Actuator endpoint - Shutdown (actuatorShutdown) tags: - - Service Registry and Supervision - /actuator/heapdump: - get: + - Actuator API x-internal: true - operationId: heapdump + /actuator/metrics: + get: + description: | + A1-PMS Springboot Service Actuator web endpoint - Get a list of Application metrics names. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + operationId: actuatorMetrics responses: "200": content: - application/octet-stream: + application/vnd.spring-boot.actuator.v3+json: + schema: + type: object + application/json: + schema: + type: object + application/vnd.spring-boot.actuator.v2+json: schema: type: object description: OK - summary: Actuator web endpoint 'heapdump' + summary: Actuator endpoint - Metrics (actuatorMetrics) tags: - - Actuator - /a1-policy/v2/policies/{policy_id}/status: + - Actuator API + x-internal: true + /actuator/metrics/{requiredMetricName}: get: - operationId: getPolicyStatus + description: | + A1-PMS Springboot Service Actuator web endpoint - Get the value for a named Application metric. + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/reference/actuator/endpoints.html + operationId: actuatorGetMetric parameters: - - explode: false - in: path - name: policy_id - required: true - schema: - type: string - style: simple + - explode: false + in: path + name: requiredMetricName + required: true + schema: + type: string + style: simple responses: "200": content: + application/vnd.spring-boot.actuator.v3+json: + schema: + type: object application/json: schema: - $ref: '#/components/schemas/policy_status_info' - examples: - policy_status_info: - $ref: '#/components/examples/policy_status_info' - description: OK - Policy status - "404": - $ref: '#/components/responses/NotFound' - description: Returns a policy status - tags: - - A1 Policy Management + type: object + application/vnd.spring-boot.actuator.v2+json: + schema: + type: object + description: OK + summary: Actuator endpoint - Get Metric (actuatorGetMetric) + x-internal: true components: - responses: - Locked: - description: "Locked - HTTP Status code which can be used when the state is Locked" - content: - application/problem+json: - schema: - $ref: '#/components/schemas/error_information' - example: - status: 423 - title: Locked - detail: Requested resource is in a locked state. - BadRequest: - description: Bad Request - content: - application/problem+json: - schema: - $ref: '#/components/schemas/error_information' - example: - status: 400 - title: Bad Request - detail: The provided request is not valid. - Forbidden: - description: Forbidden - content: - application/problem+json: - schema: - $ref: '#/components/schemas/error_information' - example: - status: 403 - title: Forbidden - detail: Your role does not allow to perform this action. Contact System Administrator to change your access rights. - NotFound: - description: Not Found - content: - application/problem+json: - example: - [ ] - examples: - service_status: - description: List of service information - value: - callback_url: callback_url - service_id: service_id - keep_alive_interval_seconds: 0 - time_since_last_activity_seconds: 6 - - service_status_list: - description: List of service information + status_info: value: - service_list: - - callback_url: callback_url - service_id: service_id - keep_alive_interval_seconds: 0 - time_since_last_activity_seconds: 6 - - callback_url: callback_url - service_id: service_id - keep_alive_interval_seconds: 0 - time_since_last_activity_seconds: 6 - policy_type_definition: - description: Schema of the given Policy type + status: status + ric_info: value: - policy_schema: "{}" + ric_id: ric_id + managed_element_ids: + - some_managed_element_id + - some_managed_element_id + state: UNAVAILABLE + policytype_ids: + - some_policytype_id + - some_policytype_id policy_type_id_list: - description: Array of policy type id's + description: Array of A1 Policy Type id's value: policy_type_id_list: - - policytype_id - - policytype_id + - policytype_id + - policytype_id policy_info: - description: Policy information of one A1-P policy + description: Information for an A1 Policy Instance value: - ric_id: ric_id - policy_id: policy_id + ric_id: ric_id1 + policy_id: policy_id1 transient: false - service_id: service_id + service_id: service_id1 policy_data: "{}" status_notification_uri: status_notification_uri - policytype_id: policytype_id - policy_info_list: - description: List of policy information + policytype_id: policytype_id1 + ric_info_list: value: - policies: - - ric_id: ric_id - policy_id: policy_id - transient: false - service_id: service_id - policy_data: "{}" - status_notification_uri: status_notification_uri - policytype_id: policytype_id - - ric_id: ric_id - policy_id: policy_id - transient: false - service_id: service_id - policy_data: "{}" - status_notification_uri: status_notification_uri - policytype_id: policytype_id + rics: + - ric_id: ric_id + managed_element_ids: + - some_managed_element_id + - some_managed_element_id + state: UNAVAILABLE + policytype_ids: + - policytype_id + - policytype_id + - ric_id: ric_id + managed_element_ids: + - managed_element_ids + - managed_element_ids + state: UNAVAILABLE + policytype_ids: + - policytype_ids + - policytype_ids + service_status_list: + description: List of service information + value: + service_list: + - callback_url: callback_url + service_id: service_id + keep_alive_interval_seconds: 0 + time_since_last_activity_seconds: 6 + - callback_url: callback_url + service_id: service_id + keep_alive_interval_seconds: 0 + time_since_last_activity_seconds: 6 + policy_type_definition: + description: Schema of the given A1 Policy Type + value: + policy_schema: "{}" policy_id_list: description: A list of policy identities value: policy_ids: - - some_policy_id - - some_policy_id + - some_policy_id + - some_policy_id + policy_info_list: + description: List of policy information + value: + policies: + - ric_id: ric_id1 + policy_id: policy_id1 + transient: false + service_id: service_id1 + policy_data: "{}" + status_notification_uri: status_notification_uri + policytype_id: policytype_id1 + - ric_id: ric_id2 + policy_id: policy_id2 + transient: true + service_id: service_id2 + policy_data: "{}" + status_notification_uri: status_notification_uri + policytype_id: policytype_id2 policy_status_info: description: Status for one A1-P Policy value: @@ -1070,89 +1215,63 @@ components: status: value: status: status + responses: + NotFound: + content: + application/problem+json: + example: [] + description: Not Found + Locked: + content: + application/problem+json: + example: + status: 423 + title: Locked + detail: Requested resource is in a locked state. + schema: + $ref: '#/components/schemas/error_information' + description: Locked - HTTP Status code which can be used when the state is Locked + BadRequest: + content: + application/problem+json: + example: + status: 400 + title: Bad Request + detail: The provided request is not valid. + schema: + $ref: '#/components/schemas/error_information' + description: Bad Request + Forbidden: + content: + application/problem+json: + example: + status: 403 + title: Forbidden + detail: Your role does not allow to perform this action. Contact System + Administrator to change your access rights. + schema: + $ref: '#/components/schemas/error_information' + description: Forbidden + schemas: status_info: - value: - status: status - ric_info: - value: - ric_id: ric_id - managed_element_ids: - - some_managed_element_id - - some_managed_element_id - state: UNAVAILABLE - policytype_ids: - - some_policytype_id - - some_policytype_id - ric_info_list: - value: - rics: - - ric_id: ric_id - managed_element_ids: - - some_managed_element_id - - some_managed_element_id - state: UNAVAILABLE - policytype_ids: - - policytype_id - - policytype_id - - ric_id: ric_id - managed_element_ids: - - managed_element_ids - - managed_element_ids - state: UNAVAILABLE - policytype_ids: - - policytype_ids - - policytype_ids - - schemas: - policy_type_definition: - description: Contains policy type schema definition - type: object - properties: - policy_schema: - description: Policy type json schema. The schema is a json object following - http://json-schema.org/draft-07/schema - type: object - error_information: - description: Problem as defined in https://tools.ietf.org/html/rfc7807 - properties: - detail: - description: ' A human-readable explanation specific to this occurrence - of the problem.' - example: Policy type not found - type: string - title: - description: 'A specific error name' - type: string - example: Not Found - status: - description: 'The HTTP status code generated by the origin server for this - occurrence of the problem. ' - example: 404 - format: int32 - type: integer - type: object - void: - description: Void/empty - type: object - status_info: + example: + status: status properties: status: description: status text type: string type: object - authorization_result: - description: Result of authorization - example: - result: true - properties: - result: - description: "If true, the access is granted" - type: boolean - required: - - result - type: object ric_info: description: Information for a Near-RT RIC + example: + ric_id: ric_id + managed_element_ids: + - managed_element_ids + - managed_element_ids + state: UNAVAILABLE + policytype_ids: + - policytype_ids + - policytype_ids properties: ric_id: description: identity of the Near-RT RIC @@ -1166,60 +1285,153 @@ components: state: description: Represents the states for a Near-RT RIC enum: - - UNAVAILABLE - - AVAILABLE - - SYNCHRONIZING - - CONSISTENCY_CHECK + - UNAVAILABLE + - AVAILABLE + - SYNCHRONIZING + - CONSISTENCY_CHECK type: string policytype_ids: - description: supported policy types + description: supported A1 Policy Types items: - description: supported policy types + description: supported A1 Policy Types type: string type: array type: object - service_registration_info: - description: Information for one service + policy_type_id_list: + description: Information about A1 Policy Types + example: + policytype_ids: + - policytype_ids + - policytype_ids properties: - callback_url: - description: callback for notifying of Near-RT RIC state changes + policytype_ids: + description: A1 Policy Type identities + items: + description: A1 Policy Type identities + type: string + type: array + type: object + policy_info: + description: Information for one A1-P Policy + example: + ric_id: ric_id + policy_id: policy_id + transient: false + service_id: "" + policy_data: "{}" + status_notification_uri: status_notification_uri + policytype_id: policytype_id + properties: + ric_id: + description: identity of the target Near-RT RIC + type: string + policy_id: + description: identity of the policy type: string + transient: + default: false + description: | + If true, the policy is automatically deleted if the targeted Near-RT RIC restarts or recovers. If false, the A1 Policy Instance remains, and is re-pushed to the targeted Near-RT RIC after a restart or recovery. If false, the A1 Policy Instance is maintained and must be deleted separately in the event of Near-RT RIC restart or recovery. Default is false. + example: false + nullable: false + type: boolean service_id: - description: identity of the service + default: "" + description: | + The identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated to a service). Note that the service does not need to be registered. If the service is registered, the A1 Policy Instance will be subject to the same supervision rules as the the service's other policies. + type: string + policy_data: + description: the configuration of the policy + type: object + status_notification_uri: + description: Callback URI for policy status updates + type: string + policytype_id: + description: identity of the A1 Policy Type type: string - keep_alive_interval_seconds: - description: "keep alive interval for the service. This is used to enable\ - \ optional heartbeat supervision of the service. If set (> 0) the registered\ - \ service should regularly invoke a 'keepalive' REST call. When a service\ - \ fails to invoke this 'keepalive' call within the configured time, the\ - \ service is considered unavailable. An unavailable service will be automatically\ - \ deregistered and its policies will be deleted. Value 0 means timeout\ - \ supervision is disabled." - format: int64 - type: integer required: - - service_id + - policy_data + - policy_id + - policytype_id + - ric_id type: object - policy_info_list: - description: List of policy information + void: + description: Void/empty + type: object + error_information: + description: Problem as defined in https://tools.ietf.org/html/rfc7807 + example: + detail: A1 Policy Type not found + title: Not Found + status: 404 properties: - policies: - description: List of policy information + detail: + description: ' A human-readable explanation specific to this occurrence + of the problem.' + example: A1 Policy Type not found + type: string + title: + description: A specific error name + example: Not Found + type: string + status: + description: 'The HTTP status code generated by the origin server for this + occurrence of the problem. ' + example: 404 + format: int32 + type: integer + type: object + ric_info_list: + description: List of Near-RT RIC information + example: + rics: + - ric_id: ric_id + managed_element_ids: + - managed_element_ids + - managed_element_ids + state: UNAVAILABLE + policytype_ids: + - policytype_ids + - policytype_ids + - ric_id: ric_id + managed_element_ids: + - managed_element_ids + - managed_element_ids + state: UNAVAILABLE + policytype_ids: + - policytype_ids + - policytype_ids + properties: + rics: + description: List of Near-RT RIC information items: - $ref: '#/components/schemas/policy_info' + $ref: '#/components/schemas/ric_info' type: array type: object - policy_status_info: - description: Status for one A1-P Policy + service_status_list: + example: + service_list: + - callback_url: callback_url + service_id: service_id + keep_alive_interval_seconds: 0 + time_since_last_activity_seconds: 6 + - callback_url: callback_url + service_id: service_id + keep_alive_interval_seconds: 0 + time_since_last_activity_seconds: 6 properties: - last_modified: - description: "timestamp, last modification time" - type: string - status: - description: the Policy status - type: object + service_list: + description: List of service information + items: + $ref: '#/components/schemas/service_status' + type: array type: object service_status: + example: + callback_url: callback_url + service_id: service_id + keep_alive_interval_seconds: 0 + time_since_last_activity_seconds: 6 properties: callback_url: description: callback for notifying of RIC synchronization @@ -1236,98 +1448,56 @@ components: format: int64 type: integer type: object - ric_info_list: - description: List of Near-RT RIC information - properties: - rics: - description: List of Near-RT RIC information - items: - $ref: '#/components/schemas/ric_info' - type: array - type: object - input: - description: input + service_registration_info: + description: Information for one service properties: - access_type: - description: Access type - enum: - - READ - - WRITE - - DELETE - type: string - auth_token: - description: Authorization token + callback_url: + description: Callback for notifying of Near-RT RIC state changes type: string - policy_type_id: - description: Policy type identifier + service_id: + description: identity of the service type: string + keep_alive_interval_seconds: + description: | + Keep alive interval for the service. This is used to enable optional heartbeat supervision of the service. If set (> 0) the registered service should regularly invoke a 'keepalive' REST call. When a service fails to invoke this 'keepalive' call within the configured time, the service is considered unavailable. An unavailable service will be automatically deregistered and its policies will be deleted. Value 0 means timeout supervision is disabled. + format: int64 + type: integer required: - - access_type - - auth_token - - policy_type_id - type: object - policy_authorization: - description: Authorization request for A1 policy requests - properties: - input: - $ref: '#/components/schemas/input' - required: - - input - type: object - policy_type_id_list: - description: Information about policy types - properties: - policytype_ids: - description: Policy type identities - items: - description: Policy type identities - type: string - type: array + - service_id type: object - policy_info: - description: Information for one A1-P Policy + service_callback_info_v2: + description: "Information transferred in Service callbacks, \nif a callback\ + \ URL was provided for a registered service\n" properties: ric_id: - description: identity of the target Near-RT RIC - type: string - policy_id: - description: identity of the policy - type: string - transient: - default: false - description: "if true, the policy is deleted at RIC restart. If false, its\ - \ value is maintained by this service until explicitly deleted. Default\ - \ false." - example: false - nullable: false - type: boolean - service_id: - description: the identity of the service owning the policy. This can be - used to group the policies (it is possible to get all policies associated - to a service). Note that the service does not need to be registered. - type: string - default: "" - policy_data: - description: the configuration of the policy - type: object - status_notification_uri: - description: Callback URI for policy status updates + description: identity of a Near-RT RIC type: string - policytype_id: - description: identity of the policy type + event_type: + description: "values: \n AVAILABLE: the Near-RT RIC has become available\ + \ for A1 Policy management\n" + enum: + - AVAILABLE type: string required: - - ric_id - - policy_id - - policy_data - - policytype_id + - event_type + - ric_id + type: object + policy_type_definition: + description: Contains A1 Policy Type schema definition + example: + policy_schema: "{}" + properties: + policy_schema: + description: A1 Policy Type json schema. The schema is a json object following + http://json-schema.org/draft-07/schema + type: object type: object policy_id_list: description: A list of policy identities example: policy_ids: - - policy_ids - - policy_ids + - policy_ids + - policy_ids properties: policy_ids: description: Policy identities @@ -1336,29 +1506,83 @@ components: type: string type: array type: object - service_status_list: + policy_info_list: + description: List of policy information + example: + policies: + - ric_id: ric_id + policy_id: policy_id + transient: false + service_id: "" + policy_data: "{}" + status_notification_uri: status_notification_uri + policytype_id: policytype_id + - ric_id: ric_id + policy_id: policy_id + transient: false + service_id: "" + policy_data: "{}" + status_notification_uri: status_notification_uri + policytype_id: policytype_id properties: - service_list: - description: List of service information + policies: + description: List of policy information items: - $ref: '#/components/schemas/service_status' + $ref: '#/components/schemas/policy_info' type: array type: object - service_callback_info_v2: - description: Information transferred as in Service callbacks (callback_url) + policy_status_info: + description: Status for one A1-P Policy + example: + last_modified: last_modified + status: "{}" properties: - ric_id: - description: identity of a Near-RT RIC + last_modified: + description: "timestamp, last modification time" type: string - event_type: - description: "values:\nAVAILABLE: the Near-RT RIC has become available\ - \ for A1 Policy management" + status: + description: the Policy status + type: object + type: object + policy_authorization: + description: Authorization request for A1 policy requests + properties: + input: + $ref: '#/components/schemas/input' + required: + - input + type: object + input: + description: input + properties: + access_type: + description: Access type enum: - - AVAILABLE + - READ + - WRITE + - DELETE type: string + auth_token: + description: Authorization token + type: string + policy_type_id: + description: A1 Policy Type identifier + type: string + required: + - access_type + - auth_token + - policy_type_id + type: object + authorization_result: + description: Result of authorization + example: + result: true + properties: + result: + description: "If true, the access is granted" + type: boolean required: - - event_type - - ric_id + - result type: object Link: properties: @@ -1366,4 +1590,4 @@ components: type: boolean href: type: string - type: object \ No newline at end of file + type: object diff --git a/pom.xml b/pom.xml index fb8e3b51..59caa241 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.onap.ccsdk.parent odlparent-lite - 3.0.1 + 3.1.0