X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=docs%2Fpolicy-agent-api.rst;h=cf8bbb24be93ceb5434c2fe5f25a7244874b33df;hb=fea065aa3922ec830d3aac236a53c58e0584ed34;hp=4792bef8d8708405edafba710294a1b71565bdb7;hpb=0a4c38bb5bfc553c6515a447bb70824988830f84;p=nonrtric.git diff --git a/docs/policy-agent-api.rst b/docs/policy-agent-api.rst index 4792bef8..cf8bbb24 100644 --- a/docs/policy-agent-api.rst +++ b/docs/policy-agent-api.rst @@ -60,11 +60,6 @@ The Policy Agent NBI has four distinct parts, described in the sections below: * Near-RT RIC Repository * Health Check -.. contents:: Operations - :depth: 4 - :local: - - Service Management ================== @@ -89,58 +84,53 @@ Service Management Operations PUT +++ - Register a service. - - **URL path:** - /service +Register a service. - **Parameters:** +**URL path:** + /service - None. +**Parameters:** + None. - **Body:** (*Required*) - A JSON object (ServiceRegistrationInfo): :: - - { - "callbackUrl": "string", (An empty string means the service will never get any callbacks.) - "keepAliveIntervalSeconds": 0, (0 means the service will always be considered alive.) - "serviceName": "string" (Required, must be unique.) - } +**Body:** (*Required*) + A JSON object (ServiceRegistrationInfo): :: - **Responses:** - - 200: - Service updated. - - 201: - Service created. - - 400: - The ServiceRegistrationInfo is not accepted. + { + "callbackUrl": "string", (An empty string means the service will never get any callbacks.) + "keepAliveIntervalSeconds": 0, (0 means the service will always be considered alive.) + "serviceName": "string" (Required, must be unique.) + } - **Examples:** +**Responses:** + 200: + Service updated. + 201: + Service created. + 400: + The ServiceRegistrationInfo is not accepted. - Call: :: +**Examples:** + **Call**: :: - curl -X PUT "http://localhost:8081/service" -H "Content-Type: application/json" -d "{ - \"callbackUrl\": \"URL\", - \"keepAliveIntervalSeconds\": 0, - \"serviceName\": \"existing\" - }" + curl -X PUT "http://localhost:8081/service" -H "Content-Type: application/json" -d '{ + "callbackUrl": "URL", + "keepAliveIntervalSeconds": 0, + "serviceName": "existing" + }' - Result: - 201: :: + Result: + 201: :: - OK + OK - Call: :: + **Call**: :: - curl -X PUT "http://localhost:8081/service" -H "Content-Type: application/json" -d "{}" + curl -X PUT "http://localhost:8081/service" -H "Content-Type: application/json" -d "{}" - Result: - 400: :: + Result: + 400: :: - Missing mandatory parameter 'serviceName' + Missing mandatory parameter 'serviceName' /services ~~~~~~~~~ @@ -148,98 +138,90 @@ PUT GET +++ - Query service information. +Query service information. - **URL path:** - /services?name= +**URL path:** + /services?name= - **Parameters:** +**Parameters:** + name: (*Optional*) + The name of the service. - name: (*Optional*) - The name of the service. +**Responses:** + 200: + Array of JSON objects (ServiceStatus). :: - **Responses:** - - 200: - Array of JSON objects (ServiceStatus). :: - - { - "callbackUrl": "string", (Callback URL) - "keepAliveIntervalSeconds": 0, (Policy keep alive interval) - "serviceName": "string", (Identity of the service) - "timeSinceLastActivitySeconds": 0 (Time since last invocation by the service) - } - - 404: - Service is not found. - - **Examples:** + { + "callbackUrl": "string", (Callback URL) + "keepAliveIntervalSeconds": 0, (Policy keep alive interval) + "serviceName": "string", (Identity of the service) + "timeSinceLastActivitySeconds": 0 (Time since last invocation by the service) + } + 404: + Service is not found. - Call: :: +**Examples:** + **Call**: :: - curl -X GET "http://localhost:8081/services?name=existing" + curl -X GET "http://localhost:8081/services?name=existing" - Result: - 200: :: + Result: + 200: :: - [ - { - "serviceName":"existing", - "keepAliveIntervalSeconds":0, - "timeSinceLastActivitySeconds":7224, - "callbackUrl":"URL" - } - ] + [ + { + "serviceName":"existing", + "keepAliveIntervalSeconds":0, + "timeSinceLastActivitySeconds":7224, + "callbackUrl":"URL" + } + ] - Call: :: + **Call**: :: - curl -X GET "http://localhost:8081/services?name=nonexistent" + curl -X GET "http://localhost:8081/services?name=nonexistent" - Result: - 404: :: + Result: + 404: :: - Service not found + Service not found DELETE ++++++ - Delete a service. - - **URL path:** - /services?name= - - **Parameters:** +Delete a service. - name: (*Required*) - The name of the service. +**URL path:** + /services?name= - **Responses:** +**Parameters:** + name: (*Required*) + The name of the service. - 204: - OK +**Responses:** + 204: + OK + 404: + Service not found. - 404: - Service not found. +**Examples:** + **Call**: :: - **Examples:** + curl -X DELETE "http://localhost:8081/services?name=existing" - Call: :: + Result: + 204: :: - curl -X DELETE "http://localhost:8081/services?name=existing" + OK - Result: - 204: :: + **Call**: :: - OK + curl -X DELETE "http://localhost:8081/services?name=nonexistent" - Call: :: + Result: + 404: :: - curl -X DELETE "http://localhost:8081/services?name=nonexistent" - - Result: - 404: :: - - Could not find service: nonexistent + Could not find service: nonexistent /services/keepalive ~~~~~~~~~~~~~~~~~~~ @@ -247,43 +229,39 @@ DELETE PUT +++ - Heart beat from a service. - - **URL path:** - /services/keepalive?name= - - **Parameters:** - - name: (*Required*) - The name of the service. +Heart beat from a service. - **Responses:** +**URL path:** + /services/keepalive?name= - 200: - OK +**Parameters:** + name: (*Required*) + The name of the service. - 404: - Service is not found. +**Responses:** + 200: + OK + 404: + Service is not found. - **Examples:** +**Examples:** + **Call**: :: - Call: :: + curl -X PUT "http://localhost:8081/services/keepalive?name=existing" - curl -X PUT "http://localhost:8081/services/keepalive?name=existing" + Result: + 200: :: - Result: - 200: :: + OK - OK + **Call**: :: - Call: :: + curl -X PUT "http://localhost:8081/services/keepalive?name=nonexistent" - curl -X PUT "http://localhost:8081/services/keepalive?name=nonexistent" + Result: + 404: :: - Result: - 404: :: - - Could not find service: nonexistent + Could not find service: nonexistent .. _policy-management: @@ -318,47 +296,44 @@ A policy type defines a name and a JSON schema that constrains the content of a GET +++ - Query policy type names. - - **URL path:** - /policy_types?ric= - - **Parameters:** +Query policy type names. - ric: (*Optional*) - The name of the Near |nbh| RT |nbsp| RIC to get types for. +**URL path:** + /policy_types?ric= - **Responses:** +**Parameters:** + ric: (*Optional*) + The name of the Near |nbh| RT |nbsp| RIC to get types for. - 200: - Array of policy type names. +**Responses:** - 404: - Near |nbh| RT |nbsp| RIC is not found. + 200: + Array of policy type names. + 404: + Near |nbh| RT |nbsp| RIC is not found. - **Examples:** +**Examples:** + **Call**: :: - Call: :: + curl -X GET "http://localhost:8081/policy_types" - curl -X GET "http://localhost:8081/policy_types" + Result: + 200: :: - Result: - 200: :: + [ + "STD_PolicyModelUnconstrained_0.2.0", + "Example_QoETarget_1.0.0", + "ERIC_QoSNudging_0.2.0" + ] - [ - "STD_PolicyModelUnconstrained_0.2.0", - "Example_QoETarget_1.0.0", - "ERIC_QoSNudging_0.2.0" - ] + **Call**: :: - Call: :: + curl -X GET "http://localhost:8081/policy_types?ric=nonexistent" - curl -X GET "http://localhost:8081/policy_types?ric=nonexistent" + Result: + 404: :: - Result: - 404: :: - - org.oransc.policyagent.exceptions.ServiceException: Could not find ric: nonexistent + org.oransc.policyagent.exceptions.ServiceException: Could not find ric: nonexistent /policy_schema ~~~~~~~~~~~~~~ @@ -366,87 +341,83 @@ GET GET +++ - Returns one policy type schema definition. - - **URL path:** - /policy_schema?id= +Returns one policy type schema definition. - **Parameters:** +**URL path:** + /policy_schema?id= - id: (*Required*) - The ID of the policy type to get the definition for. +**Parameters:** + id: (*Required*) + The ID of the policy type to get the definition for. - **Responses:** +**Responses:** + 200: + Policy schema as JSON schema. + 404: + Policy type is not found. - 200: - Policy schema as JSON schema. +**Examples:** + **Call**: :: - 404: - Policy type is not found. + curl -X GET "http://localhost:8081/policy_schema?id=STD_PolicyModelUnconstrained_0.2.0" - **Examples:** + Result: + 200: :: - Call: :: - - curl -X GET "http://localhost:8081/policy_schema?id=STD_PolicyModelUnconstrained_0.2.0" - - Result: - 200: :: - - { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "STD_PolicyModelUnconstrained_0.2.0", - "description": "Standard model of a policy with unconstrained scope id combinations", - "type": "object", - "properties": { - "scope": { - "type": "object", - "properties": { - "ueId": {"type": "string"}, - "groupId": {"type": "string"} - }, - "minProperties": 1, - "additionalProperties": false + { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "STD_PolicyModelUnconstrained_0.2.0", + "description": "Standard model of a policy with unconstrained scope id combinations", + "type": "object", + "properties": { + "scope": { + "type": "object", + "properties": { + "ueId": {"type": "string"}, + "groupId": {"type": "string"} }, - "qosObjectives": { + "minProperties": 1, + "additionalProperties": false + }, + "qosObjectives": { + "type": "object", + "properties": { + "gfbr": {"type": "number"}, + "mfbr": {"type": "number"} + }, + "additionalProperties": false + }, + "resources": { + "type": "array", + "items": { "type": "object", "properties": { - "gfbr": {"type": "number"}, - "mfbr": {"type": "number"} - }, - "additionalProperties": false - }, - "resources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "cellIdList": { - "type": "array", - "minItems": 1, - "uniqueItems": true, - "items": { - "type": "string" - } - }, - "additionalProperties": false, - "required": ["cellIdList"] - } + "cellIdList": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "additionalProperties": false, + "required": ["cellIdList"] } - }, - "minProperties": 1, - "additionalProperties": false, - "required": ["scope"] - } + } + }, + "minProperties": 1, + "additionalProperties": false, + "required": ["scope"] + } - Call: :: + **Call**: :: - curl -X GET "http://localhost:8081/policy_schema?id=nonexistent" + curl -X GET "http://localhost:8081/policy_schema?id=nonexistent" - Result: - 404: :: + Result: + 404: :: - org.oransc.policyagent.exceptions.ServiceException: Could not find type: nonexistent + org.oransc.policyagent.exceptions.ServiceException: Could not find type: nonexistent /policy_schemas ~~~~~~~~~~~~~~~ @@ -454,72 +425,69 @@ GET GET +++ - Returns policy type schema definitions. - - **URL path:** - /policy_schemas?ric= - - **Parameters:** +Returns policy type schema definitions. - ric: (*Optional*) - The name of the Near |nbh| RT |nbsp| RIC to get the definitions for. +**URL path:** + /policy_schemas?ric= - **Responses:** +**Parameters:** + ric: (*Optional*) + The name of the Near |nbh| RT |nbsp| RIC to get the definitions for. - 200: - An array of policy schemas as JSON schemas. +**Responses:** + 200: + An array of policy schemas as JSON schemas. + 404: + Near |nbh| RT |nbsp| RIC is not found. - 404: - Near |nbh| RT |nbsp| RIC is not found. +**Examples:** + **Call**: :: - **Examples:** + curl -X GET "http://localhost:8081/policy_schemas" - Call: :: + Result: + 200: :: - curl -X GET "http://localhost:8081/policy_schemas" - - Result: - 200: :: - - [{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "STD_PolicyModelUnconstrained_0.2.0", - "description": "Standard model of a policy with unconstrained scope id combinations", - "type": "object", - "properties": { - "scope": { - "type": "object", - . - . - . - "additionalProperties": false, - "required": ["scope"] - }, - . - . - . - { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Example_QoETarget_1.0.0", - "description": "Example QoE Target policy type", - "type": "object", - "properties": { - "scope": { - "type": "object", - . - . - . - "additionalProperties": false, - "required": ["scope"] - }] + [{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "STD_PolicyModelUnconstrained_0.2.0", + "description": "Standard model of a policy with unconstrained scope id combinations", + "type": "object", + "properties": { + "scope": { + "type": "object", + . + . + . + "additionalProperties": false, + "required": ["scope"] + }, + . + . + . + { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Example_QoETarget_1.0.0", + "description": "Example QoE Target policy type", + "type": "object", + "properties": { + "scope": { + "type": "object", + . + . + . + "additionalProperties": false, + "required": ["scope"] + }] - Call: - curl -X GET "http://localhost:8081/policy_schemas?ric=nonexistent" + **Call**: :: + + curl -X GET "http://localhost:8081/policy_schemas?ric=nonexistent" - Result: - 404: :: + Result: + 404: :: - org.oransc.policyagent.exceptions.ServiceException: Could not find ric: nonexistent + org.oransc.policyagent.exceptions.ServiceException: Could not find ric: nonexistent Policy ------ @@ -542,89 +510,83 @@ policy it has created. There are only two exceptions, see below: GET +++ - Query policies. - - **URL path:** - /policies?ric=&service=&type= - - **Parameters:** - - ric: (*Optional*) - The name of the Near |nbh| RT |nbsp| RIC to get policies for. - - service: (*Optional*) - The name of the service to get policies for. - - type: (*Optional*) - The name of the policy type to get policies for. +Query policies. - **Responses:** +**URL path:** + /policies?ric=&service=&type= - 200: - Array of JSON objects (PolicyInfo). :: +**Parameters:** + ric: (*Optional*) + The name of the Near |nbh| RT |nbsp| RIC to get policies for. + service: (*Optional*) + The name of the service to get policies for. + type: (*Optional*) + The name of the policy type to get policies for. - { - "id": "string", (Identity of the policy) - "json": "object", (The configuration of the policy) - "lastModified": "string", (Timestamp, last modification time) - "ric": "string", (Identity of the target Near |nbh| RT |nbsp| RIC) - "service": "string", (The name of the service owning the policy) - "type": "string" (Name of the policy type) - } - - 404: - Near |nbh| RT |nbsp| RIC or policy type not found. +**Responses:** + 200: + Array of JSON objects (PolicyInfo). :: - **Examples:** + { + "id": "string", (Identity of the policy) + "json": "object", (The configuration of the policy) + "lastModified": "string", (Timestamp, last modification time) + "ric": "string", (Identity of the target Near |nbh| RT |nbsp| RIC) + "service": "string", (The name of the service owning the policy) + "type": "string" (Name of the policy type) + } + 404: + Near |nbh| RT |nbsp| RIC or policy type not found. - Call: :: +**Examples:** + **Call**: :: - curl -X GET "http://localhost:8081/policies?ric=existing" + curl -X GET "http://localhost:8081/policies?ric=existing" - Result: - 200: :: + Result: + 200: :: - [ - { - "id": "Policy 1", - "json": { - "scope": { - "ueId": "UE 1", - "groupId": "Group 1" - }, - "qosObjectives": { - "gfbr": 1, - "mfbr": 2 - }, - "cellId": "Cell 1" + [ + { + "id": "Policy 1", + "json": { + "scope": { + "ueId": "UE 1", + "groupId": "Group 1" }, - "lastModified": "Wed, 01 Apr 2020 07:45:45 GMT", - "ric": "existing", - "service": "Service 1", - "type": "STD_PolicyModelUnconstrained_0.2.0" - }, - { - "id": "Policy 2", - "json": { - . - . - . + "qosObjectives": { + "gfbr": 1, + "mfbr": 2 }, - "lastModified": "Wed, 01 Apr 2020 07:45:45 GMT", - "ric": "existing", - "service": "Service 2", - "type": "Example_QoETarget_1.0.0" - } - ] + "cellId": "Cell 1" + }, + "lastModified": "Wed, 01 Apr 2020 07:45:45 GMT", + "ric": "existing", + "service": "Service 1", + "type": "STD_PolicyModelUnconstrained_0.2.0" + }, + { + "id": "Policy 2", + "json": { + . + . + . + }, + "lastModified": "Wed, 01 Apr 2020 07:45:45 GMT", + "ric": "existing", + "service": "Service 2", + "type": "Example_QoETarget_1.0.0" + } + ] - Call: :: + **Call**: :: - curl -X GET "http://localhost:8081/policies?type=nonexistent" + curl -X GET "http://localhost:8081/policies?type=nonexistent" - Result: - 404: :: + Result: + 404: :: - Policy type not found + Policy type not found /policy ~~~~~~~ @@ -632,180 +594,162 @@ GET GET +++ - Returns a policy configuration. - - **URL path:** - /policy?id= +Returns a policy configuration. - **Parameters:** +**URL path:** + /policy?id= - id: (*Required*) - The ID of the policy instance. - - **Responses:** - - 200: - JSON object containing policy information. :: - - { - "id": "string", (ID of policy) - "json": "object", (JSON with policy data speified by the type) - "ownerServiceName": "string", (Name of the service that created the policy) - "ric": "string", (Name of the Near |nbh| RT |nbsp| RIC where the policy resides) - "type": "string", (Name of the policy type of the policy) - "lastModified" (Timestamp, last modification time) - } +**Parameters:** + id: (*Required*) + The ID of the policy instance. - 404: - Policy is not found. +**Responses:** + 200: + JSON object containing policy information. :: - **Examples:** + { + "id": "string", (ID of policy) + "json": "object", (JSON with policy data speified by the type) + "ownerServiceName": "string", (Name of the service that created the policy) + "ric": "string", (Name of the Near |nbh| RT |nbsp| RIC where the policy resides) + "type": "string", (Name of the policy type of the policy) + "lastModified" (Timestamp, last modification time) + } + 404: + Policy is not found. - Call: :: +**Examples:** + **Call**: :: - curl -X GET "http://localhost:8081/policy?id=Policy 1" + curl -X GET "http://localhost:8081/policy?id=Policy 1" - Result: - 200: :: + Result: + 200: :: - { - "id": "Policy 1", - "json", { - "scope": { - "ueId": "UE1 ", - "cellId": "Cell 1" - }, - "qosObjectives": { - "gfbr": 319.5, - "mfbr": 782.75, - "priorityLevel": 268.5, - "pdb": 44.0 - }, - "qoeObjectives": { - "qoeScore": 329.0, - "initialBuffering": 27.75, - "reBuffFreq": 539.0, - "stallRatio": 343.0 - }, - "resources": [] + { + "id": "Policy 1", + "json", { + "scope": { + "ueId": "UE1 ", + "cellId": "Cell 1" }, - "ownerServiceName": "Service 1", - "ric": "ric1", - "type": "STD_PolicyModelUnconstrained_0.2.0", - "lastModified": "Wed, 01 Apr 2020 07:45:45 GMT" - } + "qosObjectives": { + "gfbr": 319.5, + "mfbr": 782.75, + "priorityLevel": 268.5, + "pdb": 44.0 + }, + "qoeObjectives": { + "qoeScore": 329.0, + "initialBuffering": 27.75, + "reBuffFreq": 539.0, + "stallRatio": 343.0 + }, + "resources": [] + }, + "ownerServiceName": "Service 1", + "ric": "ric1", + "type": "STD_PolicyModelUnconstrained_0.2.0", + "lastModified": "Wed, 01 Apr 2020 07:45:45 GMT" + } - Call: :: + **Call**: :: - curl -X GET "http://localhost:8081/policy?id=nonexistent" + curl -X GET "http://localhost:8081/policy?id=nonexistent" - Result: - 404: :: + Result: + 404: :: - Policy is not found + Policy is not found PUT +++ - Create/Update a policy. **Note!** Calls to this method will also trigger "*Keep Alive*" for a service which has a - "*Keep Alive Interval*" registered. - - **URL path:** - /policy?id=&ric=&service=&type= - - **Parameters:** - - id: (*Required*) - The ID of the policy instance. - - ric: (*Required*) - The name of the Near |nbh| RT |nbsp| RIC where the policy will be created. - - service: (*Required*) - The name of the service creating the policy. - - type: (*Optional*) - The name of the policy type. - - **Body:** (*Required*) - A JSON object containing the data specified by the type. - - **Responses:** - - 200: - Policy updated. - - 201: - Policy created. - - 404: - Near |nbh| RT |nbsp| RIC or policy type is not found. - - 423: - Near |nbh| RT |nbsp| RIC is not operational. - - **Examples:** - - Call: :: - - curl -X PUT "http://localhost:8081/policy?id=Policy%201&ric=ric1&service=Service%201&type=STD_PolicyModelUnconstrained_0.2.0" - -H "Content-Type: application/json" - -d "{ - \"scope\": { - \"ueId\": \"UE 1\", - \"cellId\": \"Cell 1\" - }, - \"qosObjectives\": { - \"gfbr\": 319.5, - \"mfbr\": 782.75, - \"priorityLevel\": 268.5, - \"pdb\": 44.0 - }, - \"qoeObjectives\": { - \"qoeScore\": 329.0, - \"initialBuffering\": 27.75, - \"reBuffFreq\": 539.0, - \"stallRatio\": 343.0 - }, - \"resources\": [] - }" +Create/Update a policy. **Note!** Calls to this method will also trigger "*Keep Alive*" for a service which has a +"*Keep Alive Interval*" registered. + +**URL path:** + /policy?id=&ric=&service=&type= + +**Parameters:** + id: (*Required*) + The ID of the policy instance. + ric: (*Required*) + The name of the Near |nbh| RT |nbsp| RIC where the policy will be created. + service: (*Required*) + The name of the service creating the policy. + type: (*Optional*) + The name of the policy type. + +**Body:** (*Required*) + A JSON object containing the data specified by the type. + +**Responses:** + 200: + Policy updated. + 201: + Policy created. + 404: + Near |nbh| RT |nbsp| RIC or policy type is not found. + 423: + Near |nbh| RT |nbsp| RIC is not operational. + +**Examples:** + **Call**: :: + + curl -X PUT "http://localhost:8081/policy?id=Policy%201&ric=ric1&service=Service%201&type=STD_PolicyModelUnconstrained_0.2.0" + -H "Content-Type: application/json" + -d '{ + "scope": { + "ueId": "UE 1", + "cellId": "Cell 1" + }, + "qosObjectives": { + "gfbr": 319.5, + "mfbr": 782.75, + "priorityLevel": 268.5, + "pdb": 44.0 + }, + "qoeObjectives": { + "qoeScore": 329.0, + "initialBuffering": 27.75, + "reBuffFreq": 539.0, + "stallRatio": 343.0 + }, + "resources": [] + }' - Result: - 200 + Result: + 200 DELETE ++++++ - Deletes a policy. **Note!** Calls to this method will also trigger "*Keep Alive*" for a service which has a - "*Keep Alive Interval*" registered. - - **URL path:** - /policy?id= - - **Parameters:** - - id: (*Required*) - The ID of the policy instance. +Deletes a policy. **Note!** Calls to this method will also trigger "*Keep Alive*" for a service which has a +"*Keep Alive Interval*" registered. - **Responses:** +**URL path:** + /policy?id= - 204: - Policy deleted. +**Parameters:** + id: (*Required*) + The ID of the policy instance. - 404: - Policy is not found. +**Responses:** + 204: + Policy deleted. + 404: + Policy is not found. + 423: + Near |nbh| RT |nbsp| RIC is not operational. - 423: - Near |nbh| RT |nbsp| RIC is not operational. +**Examples:** + **Call**: :: - **Examples:** + curl -X DELETE "http://localhost:8081/policy?id=Policy 1" - Call: :: - - curl -X DELETE "http://localhost:8081/policy?id=Policy 1" - - Result: - 204 + Result: + 204 /policy_ids ~~~~~~~~~~~ @@ -813,53 +757,47 @@ DELETE GET +++ - Query policy type IDs. - - **URL path:** - /policy_ids?ric=&service=&type= - - **Parameters:** - - ric: (*Optional*) - The name of the Near |nbh| RT |nbsp| RIC to get policies for. +Query policy type IDs. - service: (*Optional*) - The name of the service to get policies for. +**URL path:** + /policy_ids?ric=&service=&type= - type: (*Optional*) - The name of the policy type to get policies for. +**Parameters:** + ric: (*Optional*) + The name of the Near |nbh| RT |nbsp| RIC to get policies for. + service: (*Optional*) + The name of the service to get policies for. + type: (*Optional*) + The name of the policy type to get policies for. - **Responses:** +**Responses:** + 200: + Array of policy type names. + 404: + RIC or policy type not found. - 200: - Array of policy type names. +**Examples:** + **Call**: :: - 404: - RIC or policy type not found. + curl -X GET "http://localhost:8081/policy_ids" - **Examples:** + Result: + 200: :: - Call: :: + [ + "Policy 1", + "Policy 2", + "Policy 3" + ] - curl -X GET "http://localhost:8081/policy_ids" + **Call**: :: - Result: - 200: :: + curl -X GET "http://localhost:8081/policy_ids?ric=nonexistent" - [ - "Policy 1", - "Policy 2", - "Policy 3" - ] + Result: + 404: :: - Call: :: - - curl -X GET "http://localhost:8081/policy_ids?ric=nonexistent" - - Result: - 404: :: - - Ric not found + Ric not found /policy_status ~~~~~~~~~~~~~~ @@ -867,23 +805,20 @@ GET GET +++ - Returns the status of a policy. - - **URL path:** - /policy_status?id= - - **Parameters:** +Returns the status of a policy. - id: (*Required*) - The ID of the policy. +**URL path:** + /policy_status?id= - **Responses:** +**Parameters:** + id: (*Required*) + The ID of the policy. - 200: - JSON object with policy status. - - 404: - Policy not found. +**Responses:** + 200: + JSON object with policy status. + 404: + Policy not found. Near-RT RIC Repository ====================== @@ -901,41 +836,37 @@ Near-RT RIC GET +++ - Returns the name of a Near |nbh| RT |nbsp| RIC managing a specific Mananged Element. - - **URL path:** - /ric?managedElementId= - - **Parameters:** - - managedElementId: (*Required*) - The ID of the Managed Element. - - **Responses:** +Returns the name of a Near |nbh| RT |nbsp| RIC managing a specific Mananged Element. - 200: - Name of the Near |nbh| RT |nbsp| RIC managing the Managed Element. + **URL path:** + /ric?managedElementId= - 404: - No Near |nbh| RT |nbsp| RIC manages the given Managed Element. +**Parameters:** + managedElementId: (*Required*) + The ID of the Managed Element. - **Examples:** +**Responses:** + 200: + Name of the Near |nbh| RT |nbsp| RIC managing the Managed Element. + 404: + No Near |nbh| RT |nbsp| RIC manages the given Managed Element. - Call: :: +**Examples:** + **Call**: :: - curl -X GET "http://localhost:8081/ric?managedElementId=Node 1" + curl -X GET "http://localhost:8081/ric?managedElementId=Node 1" - Result: - 200: :: + Result: + 200: :: - Ric 1 + Ric 1 - Call: :: + **Call**: :: - curl -X GET "http://localhost:8081/ric?managedElementId=notmanaged" + curl -X GET "http://localhost:8081/ric?managedElementId=notmanaged" - Result: - 404 + Result: + 404 /rics ~~~~~ @@ -943,83 +874,79 @@ GET GET +++ - Query Near |nbh| RT |nbsp| RIC information. +Query Near |nbh| RT |nbsp| RIC information. - **URL path:** - /rics?policyType= + **URL path:** + /rics?policyType= - **Parameters:** +**Parameters:** + policyType: (*Optional*) + The name of the policy type. - policyType: (*Optional*) - The name of the policy type. +**Responses:** + 200: + Array of JSON objects containing Near |nbh| RT |nbsp| RIC information. :: - **Responses:** - - 200: - Array of JSON objects containing Near |nbh| RT |nbsp| RIC information. :: - - [ - { - "managedElementIds": [ - "string" - ], - "policyTypes": [ - "string" - ], - "ricName": "string", - "state": "string" - } - ] - - 404: - Policy type is not found. - - **Examples:** + [ + { + "managedElementIds": [ + "string" + ], + "policyTypes": [ + "string" + ], + "ricName": "string", + "state": "string" + } + ] + 404: + Policy type is not found. - Call: :: +**Examples:** + **Call**: :: - curl -X GET "http://localhost:8081/rics?policyType=STD_PolicyModelUnconstrained_0.2.0" + curl -X GET "http://localhost:8081/rics?policyType=STD_PolicyModelUnconstrained_0.2.0" - Result: - 200: :: + Result: + 200: :: - [ - { - "managedElementIds": [ - "ME 1", - "ME 2" - ], - "policyTypes": [ - "STD_PolicyModelUnconstrained_0.2.0", - "Example_QoETarget_1.0.0", - "ERIC_QoSNudging_0.2.0" - ], - "ricName": "Ric 1", - "state": "AVAILABLE" - }, - . - . - . - { - "managedElementIds": [ - "ME 3" - ], - "policyTypes": [ - "STD_PolicyModelUnconstrained_0.2.0" - ], - "ricName": "Ric X", - "state": "UNAVAILABLE" - } - ] + [ + { + "managedElementIds": [ + "ME 1", + "ME 2" + ], + "policyTypes": [ + "STD_PolicyModelUnconstrained_0.2.0", + "Example_QoETarget_1.0.0", + "ERIC_QoSNudging_0.2.0" + ], + "ricName": "Ric 1", + "state": "AVAILABLE" + }, + . + . + . + { + "managedElementIds": [ + "ME 3" + ], + "policyTypes": [ + "STD_PolicyModelUnconstrained_0.2.0" + ], + "ricName": "Ric X", + "state": "UNAVAILABLE" + } + ] - Call: :: + **Call**: :: - curl -X GET "http://localhost:8081/rics?policyType=nonexistent" + curl -X GET "http://localhost:8081/rics?policyType=nonexistent" - Result: - 404: :: + Result: + 404: :: - Policy type not found + Policy type not found Health Check ============ @@ -1035,28 +962,25 @@ Health Check GET +++ - Returns the status of the Policy Agent. - - **URL path:** - /status - - **Parameters:** - - None. +Returns the status of the Policy Agent. - **Responses:** + **URL path:** + /status - 200: - Service is living. +**Parameters:** + None. - **Examples:** +**Responses:** + 200: + Service is living. - Call: :: +**Examples:** + **Call**: :: - curl -X GET "http://localhost:8081/status" + curl -X GET "http://localhost:8081/status" - Result: - 200 + Result: + 200 **************** A1 through DMaaP