From 1122b01a05d4de22564716b815935bf880703276 Mon Sep 17 00:00:00 2001 From: PatrikBuhr Date: Wed, 20 Jan 2021 12:21:52 +0100 Subject: PMS API Documentation updates Change-Id: I2a02145c48fd4b022b2e17b157760bd7ddb8128f Issue-ID: CCSDK-3077 Signed-off-by: PatrikBuhr --- docs/offeredapis/swagger/pms-api.json | 1439 ++++++++++++++++++++++++++++- docs/offeredapis/swagger/pms-api.yaml | 1611 ++++++++++++++++++++++++++++++++- 2 files changed, 3048 insertions(+), 2 deletions(-) mode change 120000 => 100644 docs/offeredapis/swagger/pms-api.json mode change 120000 => 100644 docs/offeredapis/swagger/pms-api.yaml (limited to 'docs/offeredapis') diff --git a/docs/offeredapis/swagger/pms-api.json b/docs/offeredapis/swagger/pms-api.json deleted file mode 120000 index 5812031c..00000000 --- a/docs/offeredapis/swagger/pms-api.json +++ /dev/null @@ -1 +0,0 @@ -../../../a1-policy-management/api/pms-api.json \ No newline at end of file diff --git a/docs/offeredapis/swagger/pms-api.json b/docs/offeredapis/swagger/pms-api.json new file mode 100644 index 00000000..fe4554bf --- /dev/null +++ b/docs/offeredapis/swagger/pms-api.json @@ -0,0 +1,1438 @@ +{ + "basePath": "/", + "paths": { + "/policy_types": {"get": { + "summary": "Query policy type names", + "deprecated": false, + "produces": ["*/*"], + "operationId": "getPolicyTypesUsingGET_1", + "responses": { + "200": { + "schema": { + "type": "array", + "items": {"type": "string"} + }, + "description": "Policy type names" + }, + "401": {"description": "Unauthorized"}, + "403": {"description": "Forbidden"}, + "404": { + "schema": {"$ref": "#/definitions/error_information"}, + "description": "Near-RT RIC is not found" + } + }, + "parameters": [{ + "in": "query", + "allowEmptyValue": false, + "name": "ric", + "description": "The name of the Near-RT RIC to get types for.", + "type": "string", + "required": false + }], + "tags": ["A1 Policy Management Version 1.0 (deprecated)"] + }}, + "/a1-policy/v2/policy-instances": {"get": { + "summary": "Query for A1 policy instances", + "deprecated": false, + "produces": ["application/json"], + "description": "Returns a list of A1 policies matching given search criteria.
If several query parameters are defined, the policies matching all conditions are returned.", + "operationId": "getPolicyInstancesUsingGET", + "responses": { + "200": { + "schema": {"$ref": "#/definitions/policy_info_list_v2"}, + "description": "Policies" + }, + "401": {"description": "Unauthorized"}, + "403": {"description": "Forbidden"}, + "404": { + "schema": {"$ref": "#/definitions/error_information"}, + "description": "Near-RT RIC, policy type or service not found" + } + }, + "parameters": [ + { + "in": "query", + "allowEmptyValue": false, + "name": "policytype_id", + "description": "The identity of the policy type to get policies for.", + "type": "string", + "required": false + }, + { + "in": "query", + "allowEmptyValue": false, + "name": "ric_id", + "description": "The identity of the Near-RT RIC to get policies for.", + "type": "string", + "required": false + }, + { + "in": "query", + "allowEmptyValue": false, + "name": "service_id", + "description": "The identity of the service to get policies for.", + "type": "string", + "required": false + } + ], + "tags": ["A1 Policy Management Version 2.0"] + }}, + "/a1-policy/v2/status": {"get": { + "summary": "Returns status and statistics of this service", + "deprecated": false, + "produces": ["application/json"], + "operationId": "getStatusUsingGET", + "responses": { + "200": { + "schema": {"$ref": "#/definitions/status_info_v2"}, + "description": "Service is living" + }, + "401": {"description": "Unauthorized"}, + "403": {"description": "Forbidden"}, + "404": {"description": "Not Found"} + }, + "tags": ["A1 Policy Management Version 2.0"] + }}, + "/services": { + "get": { + "summary": "Returns service information", + "deprecated": false, + "produces": ["*/*"], + "operationId": "getServicesUsingGET_1", + "responses": { + "200": { + "schema": { + "type": "array", + "items": {"$ref": "#/definitions/service_status_v1"} + }, + "description": "OK" + }, + "401": {"description": "Unauthorized"}, + "403": {"description": "Forbidden"}, + "404": { + "schema": {"type": "string"}, + "description": "Service is not found" + } + }, + "parameters": [{ + "in": "query", + "allowEmptyValue": false, + "name": "name", + "description": "The name of the service", + "type": "string", + "required": false + }], + "tags": ["A1 Policy Management Version 1.0 (deprecated)"] + }, + "delete": { + "summary": "Delete a service", + "deprecated": false, + "produces": ["*/*"], + "operationId": "deleteServiceUsingDELETE_1", + "responses": { + "200": { + "schema": {"type": "string"}, + "description": "OK" + }, + "401": {"description": "Unauthorized"}, + "204": { + "schema": {"type": "string"}, + "description": "Service deleted" + }, + "403": {"description": "Forbidden"}, + "404": { + "schema": {"type": "string"}, + "description": "Service not found" + } + }, + "parameters": [{ + "in": "query", + "allowEmptyValue": false, + "name": "name", + "description": "The name of the service", + "type": "string", + "required": true + }], + "tags": ["A1 Policy Management Version 1.0 (deprecated)"] + } + }, + "/a1-policy/v2/rics/ric": {"get": { + "summary": "Returns info for one Near-RT RIC", + "deprecated": false, + "produces": ["application/json"], + "description": "Either a Near-RT RIC identity or a Mananged Element identity can be specified.
The intention with Mananged Element identity is the ID used in O1 for accessing the traffical element (such as the ID of CU).", + "operationId": "getRicUsingGET_1", + "responses": { + "200": { + "schema": {"$ref": "#/definitions/ric_info_v2"}, + "description": "Near-RT RIC is found" + }, + "401": {"description": "Unauthorized"}, + "403": {"description": "Forbidden"}, + "404": { + "schema": {"$ref": "#/definitions/error_information"}, + "description": "Near-RT RIC is not found" + } + }, + "parameters": [ + { + "in": "query", + "allowEmptyValue": false, + "name": "managed_element_id", + "description": "The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned.", + "type": "string", + "required": false + }, + { + "in": "query", + "allowEmptyValue": false, + "name": "ric_id", + "description": "The identity of a Near-RT RIC to get information for.", + "type": "string", + "required": false + } + ], + "tags": ["A1 Policy Management Version 2.0"] + }}, + "/a1-policy/v2/policies/{policy_id}": { + "get": { + "summary": "Returns a policy", + "deprecated": false, + "produces": ["application/json"], + "operationId": "getPolicyUsingGET", + "responses": { + "200": { + "schema": {"$ref": "#/definitions/policy_info_v2"}, + "description": "Policy found" + }, + "401": {"description": "Unauthorized"}, + "403": {"description": "Forbidden"}, + "404": { + "schema": {"$ref": "#/definitions/error_information"}, + "description": "Policy is not found" + } + }, + "parameters": [{ + "in": "path", + "name": "policy_id", + "description": "policy_id", + "type": "string", + "required": true + }], + "tags": ["A1 Policy Management Version 2.0"] + }, + "delete": { + "summary": "Delete a policy", + "deprecated": false, + "produces": ["*/*"], + "operationId": "deletePolicyUsingDELETE", + "responses": { + "200": {"description": "Not used"}, + "401": {"description": "Unauthorized"}, + "423": { + "schema": {"$ref": "#/definitions/error_information"}, + "description": "Near-RT RIC is not operational" + }, + "204": {"description": "Policy deleted"}, + "403": {"description": "Forbidden"}, + "404": { + "schema": {"$ref": "#/definitions/error_information"}, + "description": "Policy is not found" + } + }, + "parameters": [{ + "in": "path", + "name": "policy_id", + "description": "policy_id", + "type": "string", + "required": true + }], + "tags": ["A1 Policy Management Version 2.0"] + } + }, + "/a1-policy/v2/policy-types": {"get": { + "summary": "Query policy type identities", + "deprecated": false, + "produces": ["application/json"], + "operationId": "getPolicyTypesUsingGET", + "responses": { + "200": { + "schema": {"$ref": "#/definitions/policytype_id_list_v2"}, + "description": "Policy type IDs" + }, + "401": {"description": "Unauthorized"}, + "403": {"description": "Forbidden"}, + "404": { + "schema": {"$ref": "#/definitions/error_information"}, + "description": "Near-RT RIC is not found" + } + }, + "parameters": [{ + "in": "query", + "allowEmptyValue": false, + "name": "ric_id", + "description": "The identity of the Near-RT RIC to get types for.", + "type": "string", + "required": false + }], + "tags": ["A1 Policy Management Version 2.0"] + }}, + "/a1-policy/v2/configuration": { + "get": { + "summary": "Returns the contents of the configuration file", + "deprecated": false, + "produces": ["application/json"], + "description": "Note that the file contents is not relevant if the Consul is used.", + "operationId": "getConfigurationUsingGET", + "responses": { + "200": { + "schema": {"type": "object"}, + "description": "Configuration" + }, + "401": {"description": "Unauthorized"}, + "403": {"description": "Forbidden"}, + "404": { + "schema": {"$ref": "#/definitions/error_information"}, + "description": "File is not found or readable" + } + }, + "tags": ["Component Configuration"] + }, + "put": { + "summary": "Replace the current configuration file with the given configuration", + "deprecated": false, + "produces": ["*/*"], + "description": "Note that the file is ignored if the Consul is used.", + "operationId": "putConfigurationUsingPUT", + "responses": { + "200": {"description": "Configuration updated"}, + "201": {"description": "Created"}, + "400": { + "schema": {"$ref": "#/definitions/error_information"}, + "description": "Invalid configuration provided" + }, + "401": {"description": "Unauthorized"}, + "500": { + "schema": {"$ref": "#/definitions/error_information"}, + "description": "Something went wrong when replacing the configuration. Try again." + }, + "403": {"description": "Forbidden"}, + "404": {"description": "Not Found"} + }, + "parameters": [{ + "schema": {"type": "object"}, + "in": "body", + "name": "configuration", + "description": "configuration", + "required": true + }], + "tags": ["Component Configuration"], + "consumes": ["application/json"] + } + }, + "/policy": { + "get": { + "summary": "Returns a policy configuration", + "deprecated": false, + "produces": ["*/*"], + "operationId": "getPolicyUsingGET_1", + "responses": { + "200": { + "schema": {"type": "object"}, + "description": "Policy found" + }, + "401": {"description": "Unauthorized"}, + "403": {"description": "Forbidden"}, + "404": { + "schema": {"$ref": "#/definitions/error_information"}, + "description": "Policy is not found" + } + }, + "parameters": [{ + "in": "query", + "allowEmptyValue": false, + "name": "id", + "description": "The identity of the policy instance.", + "type": "string", + "required": true + }], + "tags": ["A1 Policy Management Version 1.0 (deprecated)"] + }, + "delete": { + "summary": "Delete a policy", + "deprecated": false, + "produces": ["*/*"], + "operationId": "deletePolicyUsingDELETE_1", + "responses": { + "200": {"description": "Not used"}, + "401": {"description": "Unauthorized"}, + "423": { + "schema": {"type": "string"}, + "description": "Near-RT RIC is not operational" + }, + "204": {"description": "Policy deleted"}, + "403": {"description": "Forbidden"}, + "404": { + "schema": {"type": "string"}, + "description": "Policy is not found" + } + }, + "parameters": [{ + "in": "query", + "allowEmptyValue": false, + "name": "id", + "description": "The identity of the policy instance.", + "type": "string", + "required": true + }], + "tags": ["A1 Policy Management Version 1.0 (deprecated)"] + }, + "put": { + "summary": "Put a policy", + "deprecated": false, + "produces": ["*/*"], + "operationId": "putPolicyUsingPUT_1", + "responses": { + "200": {"description": "Policy updated"}, + "201": {"description": "Policy created"}, + "401": {"description": "Unauthorized"}, + "423": { + "schema": {"type": "string"}, + "description": "Near-RT RIC is not operational" + }, + "403": {"description": "Forbidden"}, + "404": { + "schema": {"type": "string"}, + "description": "Near-RT RIC or policy type is not found" + } + }, + "parameters": [ + { + "in": "query", + "allowEmptyValue": false, + "name": "id", + "description": "The identity of the policy instance.", + "type": "string", + "required": true + }, + { + "schema": {"type": "object"}, + "in": "body", + "name": "jsonBody", + "description": "jsonBody", + "required": true + }, + { + "in": "query", + "allowEmptyValue": false, + "name": "ric", + "description": "The name of the Near-RT RIC where the policy will be created.", + "type": "string", + "required": true + }, + { + "in": "query", + "allowEmptyValue": false, + "name": "service", + "description": "The name of the service creating the policy.", + "type": "string", + "required": true + }, + { + "default": false, + "in": "query", + "allowEmptyValue": false, + "name": "transient", + "x-example": false, + "description": "If the policy is transient or not (boolean defaulted to false). A policy is transient if it will be forgotten when the service needs to reconnect to the Near-RT RIC.", + "type": "boolean", + "required": false + }, + { + "in": "query", + "allowEmptyValue": false, + "name": "type", + "description": "The name of the policy type.", + "type": "string", + "required": false + } + ], + "tags": ["A1 Policy Management Version 1.0 (deprecated)"], + "consumes": ["application/json"] + } + }, + "/policies": {"get": { + "summary": "Query policies", + "deprecated": false, + "produces": ["*/*"], + "operationId": "getPoliciesUsingGET", + "responses": { + "200": { + "schema": { + "type": "array", + "items": {"$ref": "#/definitions/policy_info_v1"} + }, + "description": "Policies" + }, + "401": {"description": "Unauthorized"}, + "403": {"description": "Forbidden"}, + "404": { + "schema": {"type": "string"}, + "description": "Near-RT RIC or type not found" + } + }, + "parameters": [ + { + "in": "query", + "allowEmptyValue": false, + "name": "ric", + "description": "The name of the Near-RT RIC to get policies for.", + "type": "string", + "required": false + }, + { + "in": "query", + "allowEmptyValue": false, + "name": "service", + "description": "The name of the service to get policies for.", + "type": "string", + "required": false + }, + { + "in": "query", + "allowEmptyValue": false, + "name": "type", + "description": "The name of the policy type to get policies for.", + "type": "string", + "required": false + } + ], + "tags": ["A1 Policy Management Version 1.0 (deprecated)"] + }}, + "/a1-policy/v2/services/{service_id}/keepalive": {"put": { + "summary": "Heartbeat indicates that the service is running", + "deprecated": false, + "produces": ["*/*"], + "operationId": "keepAliveServiceUsingPUT", + "responses": { + "200": { + "schema": {"type": "object"}, + "description": "Service supervision timer refreshed, OK" + }, + "201": {"description": "Created"}, + "401": {"description": "Unauthorized"}, + "403": {"description": "Forbidden"}, + "404": { + "schema": {"$ref": "#/definitions/error_information"}, + "description": "The service is not found, needs re-registration" + } + }, + "parameters": [{ + "in": "path", + "name": "service_id", + "description": "service_id", + "type": "string", + "required": true + }], + "tags": ["A1 Policy Management Version 2.0"], + "consumes": ["application/json"] + }}, + "/policy_schema": {"get": { + "summary": "Returns one policy type schema definition", + "deprecated": false, + "produces": ["*/*"], + "operationId": "getPolicySchemaUsingGET", + "responses": { + "200": { + "schema": {"type": "object"}, + "description": "Policy schema" + }, + "401": {"description": "Unauthorized"}, + "403": {"description": "Forbidden"}, + "404": { + "schema": {"$ref": "#/definitions/error_information"}, + "description": "The policy type is not found" + } + }, + "parameters": [{ + "in": "query", + "allowEmptyValue": false, + "name": "id", + "description": "The identity of the policy type to get the definition for.", + "type": "string", + "required": true + }], + "tags": ["A1 Policy Management Version 1.0 (deprecated)"] + }}, + "/rics": {"get": { + "summary": "Query Near-RT RIC information", + "deprecated": false, + "produces": ["*/*"], + "operationId": "getRicsUsingGET", + "responses": { + "200": { + "schema": { + "type": "array", + "items": {"$ref": "#/definitions/ric_info_v1"} + }, + "description": "OK" + }, + "401": {"description": "Unauthorized"}, + "403": {"description": "Forbidden"}, + "404": { + "schema": {"type": "string"}, + "description": "Policy type is not found" + } + }, + "parameters": [{ + "in": "query", + "allowEmptyValue": false, + "name": "policyType", + "description": "The name of the policy type", + "type": "string", + "required": false + }], + "tags": ["A1 Policy Management Version 1.0 (deprecated)"] + }}, + "/policy_status": {"get": { + "summary": "Returns a policy status", + "deprecated": false, + "produces": ["*/*"], + "operationId": "getPolicyStatusUsingGET_1", + "responses": { + "200": { + "schema": {"type": "object"}, + "description": "Policy status" + }, + "401": {"description": "Unauthorized"}, + "403": {"description": "Forbidden"}, + "404": { + "schema": {"type": "string"}, + "description": "Policy is not found" + } + }, + "parameters": [{ + "in": "query", + "allowEmptyValue": false, + "name": "id", + "description": "The identity of the policy.", + "type": "string", + "required": true + }], + "tags": ["A1 Policy Management Version 1.0 (deprecated)"] + }}, + "/a1-policy/v2/rics": {"get": { + "summary": "Query Near-RT RIC information", + "deprecated": false, + "produces": ["application/json"], + "description": "The call returns all Near-RT RICs that supports a given policy type identity", + "operationId": "getRicsUsingGET_1", + "responses": { + "200": { + "schema": {"$ref": "#/definitions/ric_info_list_v2"}, + "description": "OK" + }, + "401": {"description": "Unauthorized"}, + "403": {"description": "Forbidden"}, + "404": { + "schema": {"$ref": "#/definitions/error_information"}, + "description": "Policy type is not found" + } + }, + "parameters": [{ + "in": "query", + "allowEmptyValue": false, + "name": "policytype_id", + "description": "The identity of a policy type. If given, all Near-RT RICs supporteing the policy type are returned", + "type": "string", + "required": false + }], + "tags": ["A1 Policy Management Version 2.0"] + }}, + "/policy_ids": {"get": { + "summary": "Query policies, only policy identities returned", + "deprecated": false, + "produces": ["*/*"], + "operationId": "getPolicyIdsUsingGET_1", + "responses": { + "200": { + "schema": { + "type": "array", + "items": {"type": "string"} + }, + "description": "Policy identitiess" + }, + "401": {"description": "Unauthorized"}, + "403": {"description": "Forbidden"}, + "404": { + "schema": {"type": "string"}, + "description": "Near-RT RIC or type not found" + } + }, + "parameters": [ + { + "in": "query", + "allowEmptyValue": false, + "name": "ric", + "description": "The name of the Near-RT RIC to get policies for.", + "type": "string", + "required": false + }, + { + "in": "query", + "allowEmptyValue": false, + "name": "service", + "description": "The name of the service to get policies for.", + "type": "string", + "required": false + }, + { + "in": "query", + "allowEmptyValue": false, + "name": "type", + "description": "The name of the policy type to get policies for.", + "type": "string", + "required": false + } + ], + "tags": ["A1 Policy Management Version 1.0 (deprecated)"] + }}, + "/policy_schemas": {"get": { + "summary": "Returns policy type schema definitions", + "deprecated": false, + "produces": ["*/*"], + "operationId": "getPolicySchemasUsingGET", + "responses": { + "200": { + "schema": { + "type": "array", + "items": {"type": "object"} + }, + "description": "Policy schemas" + }, + "401": {"description": "Unauthorized"}, + "403": {"description": "Forbidden"}, + "404": { + "schema": {"$ref": "#/definitions/error_information"}, + "description": "Near-RT RIC is not found" + } + }, + "parameters": [{ + "in": "query", + "allowEmptyValue": false, + "name": "ric", + "description": "The name of the Near-RT RIC to get the definitions for.", + "type": "string", + "required": false + }], + "tags": ["A1 Policy Management Version 1.0 (deprecated)"] + }}, + "/a1-policy/v2/services": { + "get": { + "summary": "Returns service information", + "deprecated": false, + "produces": ["application/json"], + "description": "Either information about a registered service with given identity or all registered services are returned.", + "operationId": "getServicesUsingGET", + "responses": { + "200": { + "schema": {"$ref": "#/definitions/service_list_v2"}, + "description": "OK" + }, + "401": {"description": "Unauthorized"}, + "403": {"description": "Forbidden"}, + "404": { + "schema": {"$ref": "#/definitions/error_information"}, + "description": "Service is not found" + } + }, + "parameters": [{ + "in": "query", + "allowEmptyValue": false, + "name": "service_id", + "description": "The identity of the service", + "type": "string", + "required": false + }], + "tags": ["A1 Policy Management Version 2.0"] + }, + "put": { + "summary": "Register a service", + "deprecated": false, + "produces": ["*/*"], + "description": "Registering a service is needed to: