From fea065aa3922ec830d3aac236a53c58e0584ed34 Mon Sep 17 00:00:00 2001 From: elinuxhenrik Date: Mon, 20 Apr 2020 16:46:26 +0200 Subject: [PATCH] Fixed formatting of API documentation Change-Id: Id76bf5af940ca21d93d282837ffd0d6fbb0077f0 Issue-ID: NONRTRIC-158 Signed-off-by: elinuxhenrik --- docs/policy-agent-api.rst | 1238 ++++++++++++++++++--------------------- docs/sdnc-a1-controller-api.rst | 524 ++++++++--------- 2 files changed, 833 insertions(+), 929 deletions(-) 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 diff --git a/docs/sdnc-a1-controller-api.rst b/docs/sdnc-a1-controller-api.rst index d10f5e58..7390abc8 100644 --- a/docs/sdnc-a1-controller-api.rst +++ b/docs/sdnc-a1-controller-api.rst @@ -26,107 +26,103 @@ Get Policy Type POST ++++ - Gets a policy type. +Gets a policy type. - **URL path:** - /restconf/operations/A1-ADAPTER-API:getA1PolicyType +**URL path:** + /restconf/operations/A1-ADAPTER-API:getA1PolicyType - **Parameters:** +**Parameters:** + None. - None. +**Body:** (*Required*) + A JSON. :: - **Body:** (*Required*) - - A JSON. :: - - { - "input": { - "near-rt-ric-url": "" - } - } - - **Responses:** - - 200: - A JSON where the body tag contains the JSON object of the policy type. :: - - { - "output": { - "http-status": "integer", - "body": "{ - - }" - } + { + "input": { + "near-rt-ric-url": "" } - - **Examples:** - - Call: :: - - curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1PolicyType" - -H "Content-Type: application/json" -d "{ - \"input\": { - \"near-rt-ric-url\": \"http://nearRtRic-sim1:8085/a1-p/policytypes/11\" + } + +**Responses:** + 200: + A JSON where the body tag contains the JSON object of the policy type. :: + + { + "output": { + "http-status": "integer", + "body": "{ + + }" } - }" - - Result: - 200 :: - - { - "output": { - "http-status": 200, - "body": "{ - "$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", - "properties": { - "ueId": { - "type": "string" - }, - "sliceId": { - "type": "string" - }, - "qosId": { - "type": "string" - }, - "cellId": { - "type": "string" - } + } + +**Examples:** + **Call**: :: + + curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1PolicyType" + -H "Content-Type: application/json" -d '{ + "input": { + "near-rt-ric-url": "http://nearRtRic-sim1:8085/a1-p/policytypes/11" + } + }' + + Result: + 200 :: + + { + "output": { + "http-status": 200, + "body": "{ + \"$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\", + \"properties\": { + \"ueId\": { + \"type\": \"string\" }, - "additionalProperties": false, - "required": [ - "ueId", - "sliceId" - ] + \"sliceId\": { + \"type\": \"string\" + }, + \"qosId\": { + \"type\": \"string\" + }, + \"cellId\": { + \"type\": \"string\" + } }, - "statement": { - "type": "object", - "properties": { - "qoeScore": { - "type": "number" - }, - "initialBuffering": { - "type": "number" - }, - "reBuffFreq": { - "type": "number" - }, - "stallRatio": { - "type": "number" - } + \"additionalProperties\": false, + \"required\": [ + \"ueId\", + \"sliceId\" + ] + }, + \"statement\": { + \"type\": \"object\", + \"properties\": { + \"qoeScore\": { + \"type\": \"number\" + }, + \"initialBuffering\": { + \"type\": \"number\" }, - "minProperties": 1, - "additionalProperties": false - } + \"reBuffFreq\": { + \"type\": \"number\" + }, + \"stallRatio\": { + \"type\": \"number\" + } + }, + \"minProperties\": 1, + \"additionalProperties\": false } } - } - }" + }" + } + } Put Policy ~~~~~~~~~~ @@ -134,62 +130,58 @@ Put Policy POST ++++ - Creates or updates a policy instance. - - **URL path:** - /restconf/operations/A1-ADAPTER-API:putA1Policy - - **Parameters:** +Creates or updates a policy instance. - None. +**URL path:** + /restconf/operations/A1-ADAPTER-API:putA1Policy - **Body:** (*Required*) +**Parameters:** + None. - A JSON where the body tag contains the JSON object of the policy. :: +**Body:** (*Required*) + A JSON where the body tag contains the JSON object of the policy. :: - { - "input": { - "near-rt-ric-url": "", - "body": "object" - } + { + "input": { + "near-rt-ric-url": "", + "body": "object" } + } - **Responses:** +**Responses:** + 200: + A JSON with the response. :: - 200: - A JSON with the response. :: - - { - "output": { - "http-status": "integer" - } - } - - **Examples:** - - Call: :: - - curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1PolicyType" - -H "Content-Type: application/json" -d "{ - \"input\": { - \"near-rt-ric-url\": \"http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/3d2157af-6a8f-4a7c-810f-38c2f824bf12\", - \"body\": \"{ - \"blocking_rate\":20, - \"enforce\":true, - \"trigger_threshold\":10, - \"window_length\":10 - }\" + { + "output": { + "http-status": "integer" } - }" + } + +**Examples:** + **Call**: :: + + curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1PolicyType" + -H "Content-Type: application/json" -d '{ + "input": { + "near-rt-ric-url": "http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/3d2157af-6a8f-4a7c-810f-38c2f824bf12", + "body": "{ + "blocking_rate":20, + "enforce":true, + "trigger_threshold":10, + "window_length":10 + }" + } + }' - Result: - 200 :: + Result: + 200 :: - { - "output": { - "http-status": 200 - } + { + "output": { + "http-status": 200 } + } Get Policy ~~~~~~~~~~ @@ -197,64 +189,60 @@ Get Policy POST ++++ - Gets a policy instance. +Gets a policy instance. - **URL path:** - /restconf/operations/A1-ADAPTER-API:getA1Policy +**URL path:** + /restconf/operations/A1-ADAPTER-API:getA1Policy - **Parameters:** +**Parameters:** + None. - None. +**Body:** (*Required*) + A JSON. :: - **Body:** (*Required*) - - A JSON. :: - - { - "input": { - "near-rt-ric-url": "" - } - } - - **Responses:** - - 200: - A JSON where the body tag contains the JSON object of the policy. :: - - { - "output": { - "http-status": "integer", - "body": "{ - - }" - } + { + "input": { + "near-rt-ric-url": "" } - - **Examples:** - - Call: :: - - curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1Policy" - -H "Content-Type: application/json" -d "{ - \"input\": { - \"near-rt-ric-url\": \"http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/3d2157af-6a8f-4a7c-810f-38c2f824bf12\" + } + +**Responses:** + 200: + A JSON where the body tag contains the JSON object of the policy. :: + + { + "output": { + "http-status": "integer", + "body": "{ + + }" } - }" - - Result: - 200 :: - - { - "output": { - "http-status": 200, - "body": "{ - \"blocking_rate\": 20, - \"enforce\": true, - \"trigger_threshold\": 10, - \"window_length\": 10 - }" - } + } + +**Examples:** + **Call**: :: + + curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1Policy" + -H "Content-Type: application/json" -d '{ + "input": { + "near-rt-ric-url": "http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/3d2157af-6a8f-4a7c-810f-38c2f824bf12" + } + }' + + Result: + 200 :: + + { + "output": { + "http-status": 200, + "body": "{ + \"blocking_rate\": 20, + \"enforce\": true, + \"trigger_threshold\": 10, + \"window_length\": 10 + }" } + } Delete Policy ~~~~~~~~~~~~~ @@ -262,55 +250,51 @@ Delete Policy POST ++++ - Deletes a policy instance. +Deletes a policy instance. - **URL path:** - /restconf/operations/A1-ADAPTER-API:deleteA1Policy +**URL path:** + /restconf/operations/A1-ADAPTER-API:deleteA1Policy - **Parameters:** +**Parameters:** + None. - None. +**Body:** (*Required*) + A JSON. :: - **Body:** (*Required*) - - A JSON. :: - - { - "input": { - "near-rt-ric-url": "" - } + { + "input": { + "near-rt-ric-url": "" } + } - **Responses:** - - 200: - A JSON with the response. :: +**Responses:** + 200: + A JSON with the response. :: - { - "output": { - "http-status": "integer" - } + { + "output": { + "http-status": "integer" } + } - **Examples:** +**Examples:** + **Call**: :: - Call: :: + curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:deleteA1Policy" + -H "Content-Type: application/json" -d '{ + "input": { + "near-rt-ric-url": "http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/3d2157af-6a8f-4a7c-810f-38c2f824bf12" + } + }' - curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:deleteA1Policy" - -H "Content-Type: application/json" -d "{ - \"input\": { - \"near-rt-ric-url\": \"http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/3d2157af-6a8f-4a7c-810f-38c2f824bf12\" - } - }" - - Result: - 200 :: + Result: + 200 :: - { - "output": { - "http-status": 202 - } + { + "output": { + "http-status": 202 } + } Get Policy Status ~~~~~~~~~~~~~~~~~ @@ -318,60 +302,56 @@ Get Policy Status POST ++++ - Get the status of a policy instance. - - **URL path:** - /restconf/operations/A1-ADAPTER-API:getA1PolicyStatus +Get the status of a policy instance. - **Parameters:** +**URL path:** + /restconf/operations/A1-ADAPTER-API:getA1PolicyStatus - None. +**Parameters:** + None. - **Body:** (*Required*) +**Body:** (*Required*) + A JSON. :: - A JSON. :: - - { - "input": { - "near-rt-ric-url": "" - } + { + "input": { + "near-rt-ric-url": "" } - - **Responses:** - - 200: - A JSON where the body tag contains the JSON object with the policy status according to the API version used. :: - - { - "output": { - "http-status": "integer", - "body": "{ - - }" - } - } - - **Examples:** - - Call: :: - - curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1PolicyStatus" - -H "Content-Type: application/json" -d "{ - \"input\": { - \"near-rt-ric-url\": \"http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/3d2157af-6a8f-4a7c-810f-38c2f824bf12/status\" + } + +**Responses:** + 200: + A JSON where the body tag contains the JSON object with the policy status according to the API version used. :: + + { + "output": { + "http-status": "integer", + "body": "{ + + }" } - }" - - Result: - 200 :: - - { - "output": { - "http-status": 200, - "body": "{ - "instance_status": "IN EFFECT", - "has_been_deleted": "true", - "created_at": "Wed, 01 Apr 2020 07:45:45 GMT" - }" - } + } + +**Examples:** + **Call**: :: + + curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1PolicyStatus" + -H "Content-Type: application/json" -d '{ + "input": { + "near-rt-ric-url": "http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/3d2157af-6a8f-4a7c-810f-38c2f824bf12/status" + } + }' + + Result: + 200 :: + + { + "output": { + "http-status": 200, + "body": "{ + \"instance_status\": \"IN EFFECT\", + \"has_been_deleted\": \"true\", + \"created_at\": \"Wed, 01 Apr 2020 07:45:45 GMT\" + }" } + } -- 2.16.6