diff options
author | egernug <gerard.nugent@est.tech> | 2022-01-24 13:46:32 +0000 |
---|---|---|
committer | egernug <gerard.nugent@est.tech> | 2022-01-25 10:14:53 +0000 |
commit | e79a2d232fef50f6896a09fb9976052bee966fd5 (patch) | |
tree | e0e36be471e40ed1894748efcf321fdedcc7df0f /docs/sections/apis/pmsh_swagger.json | |
parent | 7e613ed06eef4c0ef008f8fc8585ae48296fe782 (diff) |
[PMSH] Finalise API
Finalised API for release J
Issue-ID: DCAEGEN2-3061
Signed-off-by: egernug <gerard.nugent@est.tech>
Change-Id: I54c13d4d1a1b5576b963f94b690b70d913aef4b8
Diffstat (limited to 'docs/sections/apis/pmsh_swagger.json')
-rw-r--r-- | docs/sections/apis/pmsh_swagger.json | 2229 |
1 files changed, 352 insertions, 1877 deletions
diff --git a/docs/sections/apis/pmsh_swagger.json b/docs/sections/apis/pmsh_swagger.json index 2a6624e6..62957283 100644 --- a/docs/sections/apis/pmsh_swagger.json +++ b/docs/sections/apis/pmsh_swagger.json @@ -5,84 +5,23 @@ "version": "2.0.0", "description": "PM subscription handler enables control of performance management jobs on network functions in ONAP" }, - "produces": [ + "consumes": [ "application/json" ], - "basePath": "/pmsh", - "tags": [ - { - "name": "Existing API", - "description": "Existing API before Public API work" - } + "produces": [ + "application/json" ], + "basePath": "/", "schemes": [ - "https" + "https", + "http" ], "paths": { - "/v1/subscriptions": { - "get": { - "tags": [ - "Existing API" - ], - "description": "Get all defined subscription and their related Network Functions from ONAP.", - "operationId": "mod.api.controller.get_all_sub_to_nf_relations", - "responses": { - "200": { - "description": "OK; Array of subscription are returned as an object", - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "subscription_name": { - "type": "string", - "description": "Name of the Subscription" - }, - "subscription_status": { - "type": "string", - "description": "Status of the Subscription" - }, - "network_functions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "nf_name": { - "type": "string", - "description": "Name of the Network Function" - }, - "nf_sub_status": { - "type": "string", - "description": "Status of the Subscription on the Network Function" - }, - "orchestration_status": { - "type": "string", - "description": "Orchestration status of the Network Function" - } - } - } - } - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "there are no subscription defined" - } - } - } - }, "/healthcheck": { "get": { "operationId": "mod.api.controller.status", "tags": [ - "Existing API" + "HealthCheck" ], "description": "This is the health check endpoint. If this returns a 200, the server is alive.", "responses": { @@ -103,7 +42,7 @@ } }, "503": { - "description": "the pmsh service is unavailable" + "description": "The PMSH service is unavailable" } } } @@ -111,2009 +50,545 @@ "/subscription": { "post": { "tags": [ - "Subscriptions" + "Subscription" ], "description": "Create a PM Subscription", - "operationId": "mod.api.controller.create_subscription", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "operationId": "mod.api.controller.post_subscription", "parameters": [ { "in": "body", "name": "body", - "description": "Subscription object to be created", "required": true, "schema": { - "type": "object", - "properties": { - "subscription": { - "type": "object", - "properties": { - "subscriptionName": { - "type": "string" - }, - "administrativeState": { - "allOf": [ - { - "type": "string" - }, - { - "enum": [ - "UNLOCKED", - "LOCKED", - "FILTERING" - ] - } - ] - }, - "fileBasedGP": { - "type": "integer" - }, - "fileLocation": { - "type": "string" - }, - "nfFilter": { - "type": "object", - "properties": { - "nfNames": { - "type": "array", - "items": { - "type": "string" - } - }, - "modelInvariantIDs": { - "type": "array", - "items": { - "type": "string" - } - }, - "modelVersionIDs": { - "type": "array", - "items": { - "type": "string" - } - }, - "modelNames": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "measurementGroups": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "properties": { - "measurementGroup": { - "type": "object", - "properties": { - "measurementTypes": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "properties": { - "measurementType": { - "type": "string" - } - }, - "required": [ - "measurementType" - ] - } - }, - "managedObjectDNsBasic": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "properties": { - "DN": { - "type": "string" - } - }, - "required": [ - "DN" - ] - } - } - }, - "required": [ - "measurementTypes", - "managedObjectDNsBasic" - ] - } - }, - "required": [ - "measurementGroup" - ] - } - } - }, - "required": [ - "subscriptionName", - "administrativeState", - "fileBasedGP", - "fileLocation", - "nfFilter", - "measurementGroups" - ] - } - } + "$ref": "#/definitions/subscription" } } ], "responses": { "201": { - "description": "successfully created PM Subscription" + "description": "Successfully created PM Subscription" }, - "405": { + "400": { "description": "Invalid input" - } - } - } - }, - "/subscription/{subscriptionName}": { - "get": { - "tags": [ - "Subscriptions" - ], - "description": "Show the subscription", - "operationId": "mod.api.controller.get_subscription", - "parameters": [ - { - "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - } - ], - "responses": { - "200": { - "description": "Requested Subscription returned", - "schema": { - "type": "object", - "properties": { - "subscription": { - "type": "object", - "properties": { - "subscriptionName": { - "type": "string" - }, - "administrativeState": { - "allOf": [ - { - "type": "string" - }, - { - "enum": [ - "UNLOCKED", - "LOCKED", - "FILTERING" - ] - } - ] - }, - "fileBasedGP": { - "type": "integer" - }, - "fileLocation": { - "type": "string" - }, - "nfFilter": { - "type": "object", - "properties": { - "nfNames": { - "type": "array", - "items": { - "type": "string" - } - }, - "modelInvariantIDs": { - "type": "array", - "items": { - "type": "string" - } - }, - "modelVersionIDs": { - "type": "array", - "items": { - "type": "string" - } - }, - "modelNames": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "measurementGroups": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "properties": { - "measurementGroup": { - "type": "object", - "properties": { - "measurementTypes": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "properties": { - "measurementType": { - "type": "string" - } - } - } - }, - "managedObjectDNsBasic": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "properties": { - "DN": { - "type": "string" - } - } - } - } - } - } - } - } - } - } - } - } - } - }, - "401": { - "description": "Unauthorized" }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "there are no subscription defined" + "409": { + "description": "Duplicate data" } } }, - "put": { - "tags": [ - "Subscriptions" - ], - "description": "This is an update for Subscription object", - "consumes": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - }, - { - "in": "body", - "name": "Subscription", - "description": "The subscription object to update", - "schema": { - "type": "object", - "properties": { - "subscription": { - "type": "object", - "properties": { - "subscriptionName": { - "type": "string" - }, - "administrativeState": { - "type": "string", - "enum": [ - "UNLOCKED", - "LOCKED", - "FILTERING" - ] - }, - "fileBasedGP": { - "type": "integer" - }, - "fileLocation": { - "type": "string" - }, - "nfFilter": { - "type": "object", - "properties": { - "nfNames": { - "type": "array", - "items": { - "type": "string" - } - }, - "modelInvariantIDs": { - "type": "array", - "items": { - "type": "string" - } - }, - "modelVersionIDs": { - "type": "array", - "items": { - "type": "string" - } - }, - "modelNames": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "measurementGroups": { - "type": "array", - "items": { - "type": "object", - "properties": { - "measurementGroup": { - "type": "object", - "properties": { - "measurementTypes": { - "type": "array", - "items": { - "type": "object", - "properties": { - "measurementType": { - "type": "string" - } - } - } - }, - "managedObjectDNsBasic": { - "type": "array", - "items": { - "type": "object", - "properties": { - "DN": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "required": [ - "subscriptionName" - ] - } - }, - "required": [ - "subscription" - ] - } - } - ], - "responses": { - "201": { - "description": "Subscription object updated" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Subscription object not found" - } - } - }, - "delete": { - "tags": [ - "Subscriptions" - ], - "description": "This is a delete for Subscription object", - "parameters": [ - { - "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - } - ], - "responses": { - "204": { - "description": "Subscription object deleted" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Subscription object not found" - } - } - } - }, - "/subscription/{subscriptionName}/adminState": { "get": { + "description": "Get all the subscriptions from PMSH.", + "operationId": "mod.api.controller.get_subscriptions", "tags": [ - "adminState" - ], - "description": "Show admin state of a subscription", - "parameters": [ - { - "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - } + "Subscription" ], "responses": { "200": { - "description": "Requested admin state returned", + "description": "OK; Array of subscriptions are returned else empty if not found", "schema": { - "type": "object", - "properties": { - "adminState": { - "type": "string", - "enum": [ - "UNLOCKED", - "LOCKED", - "FILTERING" - ] - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "there are no subscription defined" - } - } - }, - "put": { - "tags": [ - "adminState" - ], - "description": "This is an update for a specific subscription's admin state", - "consumes": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - }, - { - "in": "body", - "name": "adminState", - "description": "The adminState of the subscription object to update", - "schema": { - "type": "object", - "required": [ - "adminState" - ], - "properties": { - "adminState": { - "type": "string", - "enum": [ - "UNLOCKED", - "LOCKED", - "FILTERING" - ] - } + "type": "array", + "items": { + "$ref": "#/definitions/subscription" } } - } - ], - "responses": { - "201": { - "description": "adminState is updated" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" }, - "404": { - "description": "Subscription object not found" + "500": { + "description": "Exception occurred while querying database" } } } }, - "/subscription/{subscriptionName}/fileBasedGP": { + "/subscription/{subscription_name}": { "get": { + "description": "Get the Subscription from PMSH specified by Name", + "operationId": "mod.api.controller.get_subscription_by_name", "tags": [ - "fileBasedGP" + "Subscription" ], - "description": "Show the fileBasedGP of a subscription", "parameters": [ { + "name": "subscription_name", "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true + "required": true, + "description": "Name of the subscription", + "type": "string" } ], "responses": { "200": { - "description": "Requested fileBasedGP returned", + "description": "OK; Requested Subscription was returned", "schema": { - "type": "object", - "properties": { - "fileBasedGP": { - "type": "integer" - } - } + "$ref": "#/definitions/subscription" } }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, "404": { - "description": "there are no subscription defined" - } - } - }, - "put": { - "tags": [ - "fileBasedGP" - ], - "description": "This is an update for a specific subscription's fileBasedGP", - "consumes": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - }, - { - "in": "body", - "name": "fileBasedGP", - "description": "The fileBasedGP field of the subscription object to update", - "schema": { - "type": "object", - "required": [ - "fileBasedGP" - ], - "properties": { - "fileBasedGP": { - "type": "integer" - } - } - } - } - ], - "responses": { - "201": { - "description": "fileBasedGP is updated" - }, - "401": { - "description": "Unauthorized" + "description": "Subscription with specified name not found" }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Subscription object not found" + "500": { + "description": "Exception occurred while querying database" } } }, "delete": { + "description": "Deletes the Subscription from PMSH specified by Name", + "operationId": "mod.api.controller.delete_subscription_by_name", "tags": [ - "fileBasedGP" + "Subscription" ], - "description": "This is a delete for fileBasedGP field on a subscription object", "parameters": [ { + "name": "subscription_name", "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true + "required": true, + "description": "The name of the subscription to delete", + "type": "string" } ], "responses": { "204": { - "description": "fileBasedGP field is deleted" + "description": "Successfully deleted the subscription and returns NO Content" }, - "401": { - "description": "Unauthorized" + "404": { + "description": "Subscription with the specified name not found" }, - "403": { - "description": "Forbidden" + "409": { + "description": "Subscription could not be deleted as it contains measurement groups with state UNLOCKED OR state change to LOCKED was under process" }, - "404": { - "description": "Subscription object not found" + "500": { + "description": "Exception occurred on the server" } } } }, - "/subscription/{subscriptionName}/fileLocation": { - "get": { - "tags": [ - "fileLocation" - ], - "description": "Show the fileLocation of a subscription", - "parameters": [ - { - "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - } - ], - "responses": { - "200": { - "description": "Requested fileLocation returned", - "schema": { - "type": "object", - "properties": { - "fileLocation": { - "type": "string" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "there are no subscription defined" - } - } - }, + "/subscription/{subscription_name}/nfFilter": { "put": { + "description": "Update nfFilter for", "tags": [ - "fileLocation" - ], - "description": "This is an update for a specific subscription's fileLocation", - "consumes": [ - "application/json" + "Subscription" ], "parameters": [ { + "name": "subscription_name", "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true + "required": true, + "description": "Name of the subscription", + "type": "string" }, { + "name": "body", "in": "body", - "name": "fileLocation", - "description": "The fileLocation field of the subscription object to update", + "required": true, "schema": { - "type": "object", - "required": [ - "fileLocation" - ], - "properties": { - "fileBasedGP": { - "type": "string" - } - } + "$ref": "#/definitions/nfFilter" } } ], "responses": { "201": { - "description": "fileLocation is updated" - }, - "401": { - "description": "Unauthorized" + "description": "Successfully updated filter" }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Subscription object not found" - } - } - }, - "delete": { - "tags": [ - "fileLocation" - ], - "description": "This is a delete for fileLocation field on a subscription object", - "parameters": [ - { - "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - } - ], - "responses": { - "204": { - "description": "fileLocation field is deleted" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" + "400": { + "description": "Invalid input" }, - "404": { - "description": "Subscription object not found" + "409": { + "description": "Duplicate data" } } } }, - "/subscription/{subscriptionName}/nfFilter": { + "/subscription/{subscription_name}/measurementGroups/{measurement_group_name}": { "get": { + "description": "Get the measurement group and associated network functions from PMSH by using sub name and meas group name", + "operationId": "mod.api.controller.get_meas_group_with_nfs", "tags": [ - "nfFilter" + "measurement group" ], - "description": "Show the nfFilter of a subscription", "parameters": [ { + "name": "subscription_name", "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - } - ], - "responses": { - "200": { - "description": "Requested nfFilter returned", - "schema": { - "type": "object", - "properties": { - "nfFilter": { - "type": "object", - "properties": { - "nfNames": { - "type": "array", - "items": { - "type": "string" - } - }, - "modelInvariantIDs": { - "type": "array", - "items": { - "type": "string" - } - }, - "modelVersionIDs": { - "type": "array", - "items": { - "type": "string" - } - }, - "modelNames": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "there are no subscription defined" - } - } - }, - "put": { - "tags": [ - "nfFilter" - ], - "description": "This is an update for a specific subscription's nfFilter", - "consumes": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - }, - { - "in": "body", - "name": "nfFilter", - "description": "The nfFilter field of the subscription object to update", - "schema": { - "type": "object", - "properties": { - "nfFilter": { - "type": "object", - "properties": { - "nfNames": { - "type": "array", - "items": { - "type": "string" - } - }, - "modelInvariantIDs": { - "type": "array", - "items": { - "type": "string" - } - }, - "modelVersionIDs": { - "type": "array", - "items": { - "type": "string" - } - }, - "modelNames": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - } - } - } - ], - "responses": { - "201": { - "description": "fileLocation is updated" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Subscription object not found" - } - } - }, - "delete": { - "tags": [ - "nfFilter" - ], - "description": "This is a delete for nfFilter field on a subscription object", - "parameters": [ - { - "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - } - ], - "responses": { - "204": { - "description": "nfFilter field is deleted" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" + "required": true, + "description": "Name of the subscription", + "type": "string" }, - "404": { - "description": "Subscription object not found" - } - } - } - }, - "/subscription/{subscriptionName}/nfFilter/nfNames": { - "get": { - "tags": [ - "nfFilter" - ], - "description": "Show the nfNames of a subscription", - "parameters": [ { + "name": "measurement_group_name", "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true + "required": true, + "description": "Name of the measurement group name", + "type": "string" } ], "responses": { "200": { - "description": "Requested nfNames returned", + "description": "OK; Received requested measurement group with associated NF's", "schema": { - "type": "object", - "properties": { - "nfNames": { - "items": { - "type": "string" - } - } - } + "$ref": "#/definitions/measGroupWithNFs" } }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, "404": { - "description": "there are no subscription defined" - } - } - }, - "put": { - "tags": [ - "nfFilter" - ], - "description": "This is an update for a specific subscription's nfNames", - "consumes": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true + "description": "Measurement group with specified name not found" }, - { - "in": "body", - "name": "nfNames", - "description": "The nfNames field of nfFilter of the subscription object to update", - "schema": { - "type": "object", - "required": [ - "nfNames" - ], - "properties": { - "nfNames": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - } - ], - "responses": { - "201": { - "description": "nfNames is updated" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Subscription object not found" + "500": { + "description": "Exception occurred while querying database" } } }, - "delete": { - "tags": [ - "nfFilter" - ], - "description": "This is a delete for nfNames field on a subscription object", - "parameters": [ - { - "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - } - ], - "responses": { - "204": { - "description": "nfNames field is deleted" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Subscription object not found" - } - } - } - }, - "/subscription/{subscriptionName}/nfFilter/nfinvariantModelIds": { - "get": { + "post": { + "description": "Create a measurement group", "tags": [ - "nfFilter" + "measurement group" ], - "description": "Show the nfinvariantModelIds of a subscription", "parameters": [ { + "name": "subscription_name", "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - } - ], - "responses": { - "200": { - "description": "Requested nfinvariantModelIds returned", - "schema": { - "type": "object", - "properties": { - "nfinvariantModelIds": { - "items": { - "type": "string" - } - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" + "required": true, + "description": "Name of the subscription", + "type": "string" }, - "404": { - "description": "there are no subscription defined" - } - } - }, - "put": { - "tags": [ - "nfFilter" - ], - "description": "This is an update for a specific subscription's nfinvariantModelIds", - "consumes": [ - "application/json" - ], - "parameters": [ { + "name": "measurement_group_name", "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true + "required": true, + "description": "Name of the measurement group name", + "type": "string" }, { + "name": "body", "in": "body", - "name": "nfinvariantModelIds", - "description": "The nfinvariantModelIds field of nfFilter of the subscription object to update", + "required": true, "schema": { - "type": "object", - "required": [ - "nfNames" - ], - "properties": { - "nfinvariantModelIds": { - "type": "array", - "items": { - "type": "string" - } - } - } + "$ref": "#/definitions/measurementGroup" } } ], "responses": { "201": { - "description": "nfNames is updated" + "description": "Successfully created measurement group" }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" + "400": { + "description": "Invalid input" }, - "404": { - "description": "Subscription object not found" + "409": { + "description": "Duplicate data" } } }, "delete": { + "description": "Delete a measurement group", "tags": [ - "nfFilter" - ], - "description": "This is a delete for nfinvariantModelIds field on a subscription object", - "parameters": [ - { - "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - } - ], - "responses": { - "204": { - "description": "nfinvariantModelIds field is deleted" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Subscription object not found" - } - } - } - }, - "/subscription/{subscriptionName}/nfFilter/modelVersionIds": { - "get": { - "tags": [ - "nfFilter" + "measurement group" ], - "description": "Show the modelVersionIds of a subscription", "parameters": [ { + "name": "subscription_name", "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - } - ], - "responses": { - "200": { - "description": "Requested modelVersionIds returned", - "schema": { - "type": "object", - "properties": { - "modelVersionIds": { - "items": { - "type": "string" - } - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "there are no subscription defined" - } - } - }, - "put": { - "tags": [ - "nfFilter" - ], - "description": "This is an update for a specific subscription's modelVersionIds", - "consumes": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - }, - { - "in": "body", - "name": "modelVersionIds", - "description": "The modelVersionIds field of nfFilter of the subscription object to update", - "schema": { - "type": "object", - "required": [ - "modelVersionIds" - ], - "properties": { - "modelVersionIds": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - } - ], - "responses": { - "201": { - "description": "modelVersionIds is updated" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" + "required": true, + "description": "Name of the subscription", + "type": "string" }, - "404": { - "description": "Subscription object not found" - } - } - }, - "delete": { - "tags": [ - "nfFilter" - ], - "description": "This is a delete for modelVersionIds field on a subscription object", - "parameters": [ { + "name": "measurement_group_name", "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true + "required": true, + "description": "Name of the measurement group name", + "type": "string" } ], "responses": { "204": { - "description": "modelVersionIds field is deleted" + "description": "Successfully deleted the measurement group and returns NO Content" }, - "401": { - "description": "Unauthorized" + "404": { + "description": "Measurement group with the specified name not found" }, - "403": { - "description": "Forbidden" + "409": { + "description": "Measurement not deleted because state UNLOCKED OR state change to LOCKED was under process" }, - "404": { - "description": "Subscription object not found" + "500": { + "description": "Exception occurred on the server" } } } }, - "/subscription/{subscriptionName}/nfFilter/modelNames": { - "get": { - "tags": [ - "nfFilter" - ], - "description": "Show the modelNames of a subscription", - "parameters": [ - { - "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - } - ], - "responses": { - "200": { - "description": "Requested modelNames returned", - "schema": { - "type": "object", - "properties": { - "modelNames": { - "items": { - "type": "string" - } - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "there are no subscription defined" - } - } - }, + "/subscription/{subscription_name}/measurementGroups/{measurement_group_name}/{administrativeState}": { "put": { + "description": "Update administrative state for a measurement group", "tags": [ - "nfFilter" - ], - "description": "This is an update for a specific subscription's modelNames", - "consumes": [ - "application/json" + "measurement group" ], "parameters": [ { + "name": "subscription_name", "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - }, - { - "in": "body", - "name": "modelNames", - "description": "The modelNames field of nfFilter of the subscription object to update", - "schema": { - "type": "object", - "required": [ - "modelNames" - ], - "properties": { - "modelNames": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - } - ], - "responses": { - "201": { - "description": "modelNames is updated" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Subscription object not found" - } - } - }, - "delete": { - "tags": [ - "nfFilter" - ], - "description": "This is a delete for modelNames field on a subscription object", - "parameters": [ - { - "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - } - ], - "responses": { - "204": { - "description": "modelNames field is deleted" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" + "required": true, + "description": "Name of the subscription", + "type": "string" }, - "404": { - "description": "Subscription object not found" - } - } - } - }, - "/subscription/{subscriptionName}/measurementGroups": { - "get": { - "tags": [ - "measurementGroups" - ], - "description": "Show the fileBasedGP of a subscription", - "parameters": [ { + "name": "measurement_group_name", "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - } - ], - "responses": { - "200": { - "description": "Requested measurementGroups returned", - "schema": { - "type": "object", - "properties": { - "measurementGroups": { - "type": "array", - "items": { - "type": "object", - "properties": { - "measurementGroup": { - "type": "object", - "properties": { - "measurementTypes": { - "type": "array", - "items": { - "type": "object", - "properties": { - "measurementType": { - "type": "string" - } - } - } - }, - "managedObjectDNsBasic": { - "type": "array", - "items": { - "type": "object", - "properties": { - "DN": { - "type": "string" - } - } - } - } - } - } - } - } - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" + "required": true, + "description": "Name of the measurement group name", + "type": "string" }, - "404": { - "description": "there are no subscription defined" - } - } - }, - "put": { - "tags": [ - "measurementGroups" - ], - "description": "This is an update for a specific subscription's measurementGroups", - "consumes": [ - "application/json" - ], - "parameters": [ { + "name": "administrativeState", "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - }, - { - "in": "body", - "name": "measurementGroups", - "description": "The measurementGroups field of the subscription object to update", - "schema": { - "type": "object", - "properties": { - "measurementGroups": { - "type": "array", - "items": { - "type": "object", - "properties": { - "measurementGroup": { - "type": "object", - "properties": { - "measurementTypes": { - "type": "array", - "items": { - "type": "object", - "properties": { - "measurementType": { - "type": "string" - } - } - } - }, - "managedObjectDNsBasic": { - "type": "array", - "items": { - "type": "object", - "properties": { - "DN": { - "type": "string" - } - } - } - } - } - } - } - } - } - } - } + "required": true, + "description": "New administrative state of measurement group", + "type": "string" } ], "responses": { "201": { - "description": "measurementGroups is updated" - }, - "401": { - "description": "Unauthorized" + "description": "Successfully updated administrative state" }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Subscription object not found" - } - } - }, - "delete": { - "tags": [ - "measurementGroups" - ], - "description": "This is a delete for measurementGroups field on a subscription object", - "parameters": [ - { - "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - } - ], - "responses": { - "204": { - "description": "measurementGroups field is deleted" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" + "400": { + "description": "Invalid input" }, - "404": { - "description": "Subscription object not found" + "409": { + "description": "Duplicate data" } } } - }, - "/subscription/{subscriptionName}/measurementGroups/{measurementGroupName}": { - "get": { - "tags": [ - "measurementGroups" - ], - "description": "Show a measurementGroup of a subscription", - "parameters": [ - { - "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - }, - { - "in": "path", - "name": "measurementGroupName", - "type": "string", - "required": true - } - ], - "responses": { - "200": { - "description": "Requested measurementGroup returned", - "schema": { - "type": "object", - "properties": { - "measurementGroup": { - "type": "object", - "properties": { - "measurementTypes": { - "type": "array", - "items": { - "type": "object", - "properties": { - "measurementType": { - "type": "string" - }, - "managedObjectDNsBasic": { - "type": "array", - "items": { - "type": "object", - "properties": { - "DN": { - "type": "string" - } - } - } - } - } - } - } - } - } + } + }, + "definitions": { + "subscription": { + "type": "object", + "properties": { + "subscription": { + "type": "object", + "properties": { + "subscriptionName": { + "type": "string" + }, + "operationalPolicyName": { + "type": "string" + }, + "controlLoopName": { + "type": "string" + }, + "nfFilter": { + "$ref": "#/definitions/nfFilter" + }, + "measurementGroups": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/measurementGroup" } } }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "there are no subscription defined" - } + "required": [ + "subscriptionName", + "operationalPolicyName", + "nfFilter", + "measurementGroups" + ] } }, - "put": { - "tags": [ - "measurementGroups" - ], - "description": "This is an update for a specific a measurementGroup", - "consumes": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - }, - { - "in": "path", - "name": "measurementGroupName", - "type": "string", - "required": true - }, - { - "in": "body", - "name": "measurementGroup", - "description": "The measurementGroup field of the subscription object to update", - "schema": { - "type": "object", - "properties": { - "measurementGroup": { - "type": "object", - "properties": { - "measurementTypes": { - "type": "array", - "items": { - "type": "object", - "properties": { - "measurementType": { - "type": "string" - }, - "managedObjectDNsBasic": { - "type": "array", - "items": { - "type": "object", - "properties": { - "DN": { - "type": "string" - } - } - } - } - } - } - } - } - } - } - } - } - ], - "responses": { - "201": { - "description": "measurementGroup is updated" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "measurementGroup object not found" + "required": [ + "subscription" + ] + }, + "nfFilter": { + "type": "object", + "description": "At least one valid filter value within nfFilter is required", + "additionalProperties": false, + "properties": { + "nfNames": { + "type": "array", + "items": { + "type": "string" + } + }, + "modelInvariantIDs": { + "type": "array", + "items": { + "type": "string" + } + }, + "modelVersionIDs": { + "type": "array", + "items": { + "type": "string" + } + }, + "modelNames": { + "type": "array", + "items": { + "type": "string" } } }, - "delete": { - "tags": [ - "measurementGroups" - ], - "description": "This is a delete for measurementGroup field on a subscription object", - "parameters": [ - { - "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - }, - { - "in": "path", - "name": "measurementGroupName", - "type": "string", - "required": true - } - ], - "responses": { - "204": { - "description": "measurementGroup field is deleted" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "measurementGroup object not found" - } - } - } + "required": [ + "nfNames", + "modelInvariantIDs", + "modelVersionIDs", + "modelNames" + ] }, - "/subscription/{subscriptionName}/measurementGroups/{measurementGroupName}/measurementTypes": { - "get": { - "tags": [ - "measurementGroups" - ], - "description": "Show the measurementTypes of a subscription", - "parameters": [ - { - "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - }, - { - "in": "path", - "name": "measurementGroupName", - "type": "string", - "required": true - } - ], - "responses": { - "200": { - "description": "Requested measurementTypes returned", - "schema": { - "type": "object", - "properties": { - "measurementTypes": { - "type": "string" - } + "measurementGroup": { + "type": "object", + "properties": { + "measurementGroup": { + "type": "object", + "properties": { + "measurementGroupName": { + "type": "string" + }, + "fileBasedGP": { + "type": "integer" + }, + "fileLocation": { + "type": "string" + }, + "administrativeState": { + "type": "string", + "enum": [ + "LOCKED", + "UNLOCKED" + ] + }, + "measurementTypes": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/measurementType" } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "there are no subscription defined" - } - } - }, - "put": { - "tags": [ - "measurementGroups" - ], - "description": "This is an update for measurementType field in a specific measurementGroup", - "consumes": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - }, - { - "in": "path", - "name": "measurementGroupName", - "type": "string", - "required": true - }, - { - "in": "body", - "name": "measurementTypes", - "description": "The measurementTypes field of the measurementGroup to update", - "schema": { - "type": "object", - "properties": { - "measurementTypes": { - "type": "string" - } + }, + "managedObjectDNsBasic": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/managedObjectDNs" } } - } - ], - "responses": { - "201": { - "description": "measurementType is updated" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" }, - "404": { - "description": "measurementGroup object not found" - } + "allOf": [ + { + "required": [ + "measurementGroupName", + "fileBasedGP", + "fileLocation", + "administrativeState", + "measurementTypes", + "managedObjectDNsBasic" + ] + } + ] } }, - "delete": { - "tags": [ - "measurementGroups" - ], - "description": "This is a delete for measurementType field on a measurementGroup", - "parameters": [ - { - "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - }, - { - "in": "path", - "name": "measurementGroupName", - "type": "string", - "required": true - } - ], - "responses": { - "204": { - "description": "measurementGroup field is deleted" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "measurementGroup object not found" - } + "required": [ + "measurementGroup" + ] + }, + "measurementType": { + "type": "object", + "properties": { + "measurementType": { + "type": "string" } - } + }, + "required": [ + "measurementType" + ] }, - "/subscription/{subscriptionName}/measurementGroups/{measurementGroupName}/managedObjectDNsBasic": { - "get": { - "tags": [ - "measurementGroups" - ], - "description": "Show the managedObjectDNsBasic of a subscription", - "parameters": [ - { - "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - }, - { - "in": "path", - "name": "measurementGroupName", - "type": "string", - "required": true - } - ], - "responses": { - "200": { - "description": "Requested managedObjectDNsBasic returned", - "schema": { - "type": "object", - "properties": { - "managedObjectDNsBasic": { - "type": "string" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "there are no subscription defined" - } + "managedObjectDNs": { + "type": "object", + "properties": { + "DN": { + "type": "string" } }, - "put": { - "tags": [ - "measurementGroups" - ], - "description": "This is an update for managedObjectDNsBasic field in a specific measurementGroup", - "consumes": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - }, - { - "in": "path", - "name": "measurementGroupName", - "type": "string", - "required": true - }, - { - "in": "body", - "name": "managedObjectDNsBasic", - "description": "The managedObjectDNsBasic field of the measurementGroup to update", - "schema": { - "type": "object", - "properties": { - "managedObjectDNsBasic": { - "type": "string" - } + "required": [ + "DN" + ] + }, + "measGroupWithNFs": { + "type": "object", + "properties": { + "subscriptionName": { + "type": "string" + }, + "measurementGroupName": { + "type": "string" + }, + "administrativeState": { + "type": "string", + "enum": [ + "LOCKED", + "UNLOCKED" + ] + }, + "fileBasedGP": { + "type": "integer" + }, + "fileLocation": { + "type": "string" + }, + "measurementTypes": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/measurementType" + } + }, + "managedObjectDNsBasic": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/managedObjectDNs" + } + }, + "network_functions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "nfName": { + "type": "string", + "description": "Name of the Network Function" + }, + "ipv4Address": { + "type": "string", + "description": "Address of the IPV4" + }, + "ipv6Address": { + "type": "string", + "description": "Address of the IPV6" + }, + "nfMgStatus": { + "type": "string", + "description": "status of network function for one meas group" + }, + "modelInvariantId": { + "type": "string", + "description": "ID of the model invariant" + }, + "modelVersionId": { + "type": "string", + "description": "ID of the model version" + }, + "modelName": { + "type": "string", + "description": "Name of the model" + }, + "sdncModelName": { + "type": "string", + "description": "Name of the sdnc model" + }, + "sdncModelVersion": { + "type": "string", + "description": "Version of the sdnc model" } } } - ], - "responses": { - "201": { - "description": "managedObjectDNsBasic is updated" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "measurementGroup object not found" - } - } - }, - "delete": { - "tags": [ - "measurementGroups" - ], - "description": "This is a delete for managedObjectDNsBasic field on a measurementGroup", - "parameters": [ - { - "in": "path", - "name": "subscriptionName", - "type": "string", - "required": true - }, - { - "in": "path", - "name": "measurementGroupName", - "type": "string", - "required": true - } - ], - "responses": { - "204": { - "description": "managedObjectDNsBasic field is deleted" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "measurementGroup object not found" - } } } } } -}
\ No newline at end of file +} |