.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0
+.. Copyright (C) 2020 Nordix
.. |nbsp| unicode:: 0xA0
:trim:
* Near-RT RIC Repository
* Health Check
-.. contents:: Operations
- :depth: 4
- :local:
-
-
Service Management
==================
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:
- Something went wrong with the service registration.
+ {
+ "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
~~~~~~~~~
GET
+++
- Query service information.
+Query service information.
- **URL path:**
- /services?name=<service-name>
+**URL path:**
+ /services?name=<service-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=<service-name>
-
- **Parameters:**
+Delete a service.
- name: (*Required*)
- The name of the service.
+**URL path:**
+ /services?name=<service-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
~~~~~~~~~~~~~~~~~~~
-POST
-++++
-
- Heart beat from a service.
-
- **URL path:**
- /services/keepalive?name=<service-name>
-
- **Parameters:**
-
- name: (*Required*)
- The name of the service.
+PUT
++++
- **Responses:**
+Heart beat from a service.
- 200:
- OK
+**URL path:**
+ /services/keepalive?name=<service-name>
- 404:
- Service is not found.
+**Parameters:**
+ name: (*Required*)
+ The name of the service.
- **Examples:**
+**Responses:**
+ 200:
+ OK
+ 404:
+ Service is not found.
- Call: ::
+**Examples:**
+ **Call**: ::
- curl -X POST "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 POST "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:
GET
+++
- Query policy type names.
-
- **URL path:**
- /policy_types?ric=<name-of-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=<name-of-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
~~~~~~~~~~~~~~
GET
+++
- Returns one policy type schema definition.
-
- **URL path:**
- /policy_schema?id=<name-of-type>
-
- **Parameters:**
-
- id: (*Required*)
- The ID of the policy type to get the definition for.
-
- **Responses:**
+Returns one policy type schema definition.
- 200:
- Policy schema as JSON schema.
+**URL path:**
+ /policy_schema?id=<name-of-type>
- 404:
- Policy type is not found.
+**Parameters:**
+ id: (*Required*)
+ The ID of the policy type to get the definition for.
- **Examples:**
+**Responses:**
+ 200:
+ Policy schema as JSON schema.
+ 404:
+ Policy type is not found.
- Call: ::
+**Examples:**
+ **Call**: ::
- curl -X GET "http://localhost:8081/policy_schema?id=STD_PolicyModelUnconstrained_0.2.0"
+ curl -X GET "http://localhost:8081/policy_schema?id=STD_PolicyModelUnconstrained_0.2.0"
- Result:
- 200: ::
+ 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
~~~~~~~~~~~~~~~
GET
+++
- Returns policy type schema definitions.
+Returns policy type schema definitions.
- **URL path:**
- /policy_schemas?ric=<name-of-ric>
+**URL path:**
+ /policy_schemas?ric=<name-of-ric>
- **Parameters:**
+**Parameters:**
+ ric: (*Optional*)
+ The name of the Near |nbh| RT |nbsp| RIC to get the definitions for.
- ric: (*Optional*)
- The name of the Near |nbh| RT |nbsp| RIC to get the definitions for.
+**Responses:**
+ 200:
+ An array of policy schemas as JSON schemas.
+ 404:
+ Near |nbh| RT |nbsp| RIC is not found.
- **Responses:**
+**Examples:**
+ **Call**: ::
- 200:
- An array of policy schemas as JSON schemas.
+ curl -X GET "http://localhost:8081/policy_schemas"
- 404:
- Near |nbh| RT |nbsp| RIC is not found.
+ Result:
+ 200: ::
- **Examples:**
-
- Call: ::
-
- 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**: ::
- Call:
- curl -X GET "http://localhost:8081/policy_schemas?ric=nonexistent"
+ 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
------
GET
+++
- Query policies.
-
- **URL path:**
- /policies?ric=<name-of-ric>&service=<name-of-service>&type=<name-of-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.
+Query policies.
- type: (*Optional*)
- The name of the policy type to get policies for.
+**URL path:**
+ /policies?ric=<name-of-ric>&service=<name-of-service>&type=<name-of-type>
- **Responses:**
+**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.
- 200:
- Array of JSON objects (PolicyInfo). ::
+**Responses:**
+ 200:
+ Array of JSON objects (PolicyInfo). ::
- {
- "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.
-
- **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
~~~~~~~
GET
+++
- Returns a policy configuration.
+Returns a policy configuration.
- **URL path:**
- /policy?id=<policy-id>
+**URL path:**
+ /policy?id=<policy-id>
- **Parameters:**
-
- 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=<policy-id>&ric=<name-of-ric>&service=<name-of-service>&type=<name-of-policy-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 locked.
-
- **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=<policy-id>&ric=<name-of-ric>&service=<name-of-service>&type=<name-of-policy-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=<policy-id>
-
- **Parameters:**
+Deletes a policy. **Note!** Calls to this method will also trigger "*Keep Alive*" for a service which has a
+"*Keep Alive Interval*" registered.
- id: (*Required*)
- The ID of the policy instance.
+**URL path:**
+ /policy?id=<policy-id>
- **Responses:**
+**Parameters:**
+ id: (*Required*)
+ The ID of the policy instance.
- 204:
- Policy deleted.
+**Responses:**
+ 204:
+ Policy deleted.
+ 404:
+ Policy is not found.
+ 423:
+ Near |nbh| RT |nbsp| RIC is not operational.
- 404:
- Policy is not found.
+**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
~~~~~~~~~~~
GET
+++
- Query policy type IDs.
-
- **URL path:**
- /policy_ids?ric=<name-of-ric>&service=<name-of-service>&type=<name-of-policy-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=<name-of-ric>&service=<name-of-service>&type=<name-of-policy-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
~~~~~~~~~~~~~~
GET
+++
- Returns the status of a policy.
-
- **URL path:**
- /policy_status?id=<policy-id>
-
- **Parameters:**
+Returns the status of a policy.
- id: (*Required*)
- The ID of the policy.
+**URL path:**
+ /policy_status?id=<policy-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
======================
GET
+++
- Returns the name of a Near |nbh| RT |nbsp| RIC managing a specific Mananged Element.
-
- **URL path:**
- /ric?managedElementId=<id-of-managed-element>
-
- **Parameters:**
-
- managedElementId: (*Optional*)
- 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=<id-of-managed-element>
- 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
~~~~~
GET
+++
- Query Near |nbh| RT |nbsp| RIC information.
+Query Near |nbh| RT |nbsp| RIC information.
- **URL path:**
- /rics?policyType=<name-of-policy-type>
+ **URL path:**
+ /rics?policyType=<name-of-policy-type>
- **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"
- }
- ]
-
- 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"
- },
- .
- .
- .
- {
- "managedElementIds": [
- "ME 3"
- ],
- "policyTypes": [
- "STD_PolicyModelUnconstrained_0.2.0"
- ],
- "ricName": "Ric X"
- }
- ]
+ [
+ {
+ "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
============
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