From 7c6ca5b446ade0690e2e759ec2ab557f3b1af180 Mon Sep 17 00:00:00 2001 From: "saul.gill" Date: Thu, 6 Mar 2025 17:09:12 +0000 Subject: [PATCH] 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 --- .gitignore | 2 +- .readthedocs.yaml | 2 +- a1-policy-management/Dockerfile | 11 +- .../application_configuration_schema.json | 91 + .../openapitoolgen/offeredapis/pms-api/index.html | 510 ++-- .../offeredapis/pms-api/v3/custom/index.html | 1536 ++++++------ .../offeredapis/pms-api/v3/index.html | 1645 +++++++------ .../api/offeredapis/swagger/README.md | 2 + .../api/offeredapis/swagger/custom/README.md | 2 + .../swagger/custom/a1pms-api-custom-v3.json | 598 +++-- .../api/offeredapis/swagger/pms-api-v3.json | 598 +++-- .../api/offeredapis/swagger/pms-api-v3.yaml | 2486 ++++++++++++-------- .../api/offeredapis/swagger/pms-api.json | 1956 +++++++-------- .../api/offeredapis/swagger/pms-api.yaml | 2148 +++++++++-------- a1-policy-management/config/application.yaml | 14 +- .../license-header.mustache | 18 + .../openapi.mustache | 3 + .../v2-fragments/actuator-api.yaml | 368 +++ .../open-api-fragments/v2-fragments/authz-api.yaml | 24 + .../v2-fragments/configuration-api.yaml | 42 + .../open-api-fragments/v2-fragments/examples.yaml | 104 + .../v2-fragments/healthcheck-api.yaml | 31 + .../open-api-fragments/v2-fragments/pms-api.yaml | 149 ++ .../v2-fragments/pms-lcm-api.yaml | 301 +++ .../open-api-fragments/v2-fragments/responses.yaml | 37 + .../open-api-fragments/v2-fragments/ric-api.yaml | 71 + .../open-api-fragments/v2-fragments/schemas.yaml | 273 +++ .../v2-fragments/service-api.yaml | 150 ++ .../v3-fragments/configuration-api.yaml | 41 + .../open-api-fragments/v3-fragments/examples.yaml | 112 + .../v3-fragments/healthcheck-api.yaml | 19 + .../v3-fragments/pms-api-v3.yaml | 108 + .../v3-fragments/pms-lcm-api.yaml | 462 ++++ .../open-api-fragments/v3-fragments/responses.yaml | 95 + .../open-api-fragments/v3-fragments/ric-api.yaml | 72 + .../open-api-fragments/v3-fragments/schemas.yaml | 310 +++ .../v3-fragments/service-api.yaml | 172 ++ a1-policy-management/pom.xml | 62 +- .../a1policymanagementservice/BeanFactory.java | 4 +- .../clients/AsyncRestClientFactory.java | 9 +- .../configuration/ApplicationConfig.java | 70 +- .../configuration/ApplicationConfigParser.java | 21 +- .../configuration/WebClientConfig.java | 6 +- .../controllers/v2/RicRepositoryController.java | 15 +- .../controllers/v3/PolicyControllerV3.java | 4 +- .../controllers/v3/RicRepositoryControllerV3.java | 14 +- .../controllers/v3/ServiceControllerV3.java | 4 +- .../service/v3/PolicyService.java | 23 +- .../a1policymanagementservice/util/v3/Helper.java | 52 + .../src/main/resources/logback-json.xml | 70 + .../src/main/resources/logback-plain.xml | 35 + .../src/main/resources/logback-stream.xml | 80 + .../controllers/v2/ApplicationTest.java | 11 +- .../v2/ConfigurationControllerTest.java | 39 +- .../v3/ConfigurationControllerV3Test.java | 46 +- .../controllers/v3/PolicyControllerV3Test.java | 221 +- .../datastore/S3ObjectStoreTest.java | 7 +- .../service/v3/PolicyServiceTest.java | 3 + .../v3/ReactiveEntryExitFilterDisableTest.java | 23 +- .../utils/v3/ReactiveEntryExitFilterTest.java | 22 +- .../utils/v3/TestHelperTest.java | 62 +- .../test_application_configuration_me_empty.json | 32 + .../test_application_configuration_me_null.json | 29 + docs/architecture/architecture.rst | 10 +- docs/guide/developer-guide.rst | 13 +- docs/media/ONAP-A1ControllerArchitecture-Paris.png | Bin 0 -> 224640 bytes docs/offeredapis/offeredapis.rst | 2 +- .../openapitoolgen/offeredapis/pms-api/index.html | 510 ++-- .../offeredapis/pms-api/v3/custom/index.html | 1536 ++++++------ .../offeredapis/pms-api/v3/index.html | 1645 +++++++------ .../swagger/custom/a1pms-api-custom-v3.json | 598 +++-- docs/offeredapis/swagger/pms-api-v3.json | 598 +++-- docs/offeredapis/swagger/pms-api-v3.yaml | 2486 ++++++++++++-------- docs/offeredapis/swagger/pms-api.json | 1956 +++++++-------- docs/offeredapis/swagger/pms-api.yaml | 2148 +++++++++-------- pom.xml | 2 +- 76 files changed, 16046 insertions(+), 10985 deletions(-) create mode 100644 a1-policy-management/api/offeredapis/application_configuration_schema.json create mode 100644 a1-policy-management/api/offeredapis/swagger/README.md create mode 100644 a1-policy-management/api/offeredapis/swagger/custom/README.md create mode 100644 a1-policy-management/open-api-fragments/custom-openapi-license-template/license-header.mustache create mode 100644 a1-policy-management/open-api-fragments/custom-openapi-license-template/openapi.mustache create mode 100644 a1-policy-management/open-api-fragments/v2-fragments/actuator-api.yaml create mode 100644 a1-policy-management/open-api-fragments/v2-fragments/authz-api.yaml create mode 100644 a1-policy-management/open-api-fragments/v2-fragments/configuration-api.yaml create mode 100644 a1-policy-management/open-api-fragments/v2-fragments/examples.yaml create mode 100644 a1-policy-management/open-api-fragments/v2-fragments/healthcheck-api.yaml create mode 100644 a1-policy-management/open-api-fragments/v2-fragments/pms-api.yaml create mode 100644 a1-policy-management/open-api-fragments/v2-fragments/pms-lcm-api.yaml create mode 100644 a1-policy-management/open-api-fragments/v2-fragments/responses.yaml create mode 100644 a1-policy-management/open-api-fragments/v2-fragments/ric-api.yaml create mode 100644 a1-policy-management/open-api-fragments/v2-fragments/schemas.yaml create mode 100644 a1-policy-management/open-api-fragments/v2-fragments/service-api.yaml create mode 100644 a1-policy-management/open-api-fragments/v3-fragments/configuration-api.yaml create mode 100644 a1-policy-management/open-api-fragments/v3-fragments/examples.yaml create mode 100644 a1-policy-management/open-api-fragments/v3-fragments/healthcheck-api.yaml create mode 100644 a1-policy-management/open-api-fragments/v3-fragments/pms-api-v3.yaml create mode 100644 a1-policy-management/open-api-fragments/v3-fragments/pms-lcm-api.yaml create mode 100644 a1-policy-management/open-api-fragments/v3-fragments/responses.yaml create mode 100644 a1-policy-management/open-api-fragments/v3-fragments/ric-api.yaml create mode 100644 a1-policy-management/open-api-fragments/v3-fragments/schemas.yaml create mode 100644 a1-policy-management/open-api-fragments/v3-fragments/service-api.yaml create mode 100644 a1-policy-management/src/main/resources/logback-json.xml create mode 100644 a1-policy-management/src/main/resources/logback-plain.xml create mode 100644 a1-policy-management/src/main/resources/logback-stream.xml create mode 100644 a1-policy-management/src/test/resources/test_application_configuration_me_empty.json create mode 100644 a1-policy-management/src/test/resources/test_application_configuration_me_null.json create mode 100644 docs/media/ONAP-A1ControllerArchitecture-Paris.png 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: