X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=api%2Fappmgr_rest_api.json;h=9e8f0764dfaaaa64c45358d7e573b1d2141feec0;hb=9135751d00d9526d3dc7aae273f5b25900ca21de;hp=c5a4c0b9f5b401a6ad0b4fdabadb85beb9091480;hpb=193caf9d7e08b84a0b9c1f0352924a7efd77e77c;p=ric-plt%2Fappmgr.git diff --git a/api/appmgr_rest_api.json b/api/appmgr_rest_api.json index c5a4c0b..9e8f076 100644 --- a/api/appmgr_rest_api.json +++ b/api/appmgr_rest_api.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "description": "This is a draft API for RIC appmgr", - "version": "0.0.10", + "version": "0.1.5", "title": "RIC appmgr", "license": { "name": "Apache 2.0", @@ -12,14 +12,16 @@ "host": "hostname", "basePath": "/ric/v1", "schemes": [ - "https", "http" ], "paths": { - "/health": { + "/health/alive": { "get": { - "summary": "Health check of xApp Manager", - "operationId": "getHealth", + "summary": "Health check of xApp Manager - Liveness probe", + "tags": [ + "health" + ], + "operationId": "getHealthAlive", "responses": { "200": { "description": "Status of xApp Manager is ok" @@ -27,9 +29,29 @@ } } }, + "/health/ready": { + "get": { + "summary": "Readiness check of xApp Manager - Readiness probe", + "tags": [ + "health" + ], + "operationId": "getHealthReady", + "responses": { + "200": { + "description": "xApp Manager is ready for service" + }, + "503": { + "description": "xApp Manager is not ready for service" + } + } + } + }, "/xapps": { "post": { "summary": "Deploy a xapp", + "tags": [ + "xapp" + ], "operationId": "deployXapp", "consumes": [ "application/json" @@ -45,12 +67,37 @@ "schema": { "type": "object", "required": [ - "xAppName" + "name" ], "properties": { - "xAppName": { - "type":"string", - "description":"Name of the xApp", + "name": { + "type": "string", + "description": "Name of the xApp.", + "example": "xapp-dummy" + }, + "configName": { + "type": "string", + "description": "Name of the xApp configmap. Overrides the value given in Helm chart value file.", + "example": "xapp-dummy-configmap" + }, + "namespace": { + "type": "string", + "description": "Name of the namespace to which xApp is deployed. Overrides the value given in Helm chart value file.", + "example": "ricxapps" + }, + "serviceName": { + "type": "string", + "description": "Name of the service xApp is providing. Overrides the value given in Helm chart value file.", + "example": "xapp-dummy-service" + }, + "imageRepo": { + "type": "string", + "description": "Name of the docker repository xApp is located. Overrides the value given in Helm chart value file.", + "example": "xapprepo" + }, + "hostname": { + "type": "string", + "description": "Hostname for the pod. Used by messaging library. Overrides the value given in Helm chart value file.", "example": "xapp-dummy" } } @@ -74,6 +121,9 @@ }, "get": { "summary": "Returns the status of all xapps", + "tags": [ + "xapp" + ], "operationId": "getAllXapps", "produces": [ "application/json" @@ -82,7 +132,30 @@ "200": { "description": "successful query of xApps", "schema": { - "$ref": "#/definitions/AllXapps" + "$ref": "#/definitions/AllDeployedXapps" + } + }, + "500": { + "description": "Internal error" + } + } + } + }, + "/xapps/list": { + "get": { + "summary": "Returns the list of all deployable xapps", + "tags": [ + "xapp" + ], + "operationId": "listAllXapps", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "successful list of deployable xApps", + "schema": { + "$ref": "#/definitions/AllDeployableXapps" } }, "500": { @@ -94,6 +167,9 @@ "/xapps/{xAppName}": { "get": { "summary": "Returns the status of a given xapp", + "tags": [ + "xapp" + ], "operationId": "getXappByName", "produces": [ "application/json" @@ -127,6 +203,9 @@ }, "delete": { "summary": "Undeploy an existing xapp", + "tags": [ + "xapp" + ], "operationId": "undeployXapp", "parameters": [ { @@ -153,6 +232,9 @@ "/xapps/{xAppName}/instances/{xAppInstanceName}": { "get": { "summary": "Returns the status of a given xapp", + "tags": [ + "xapp" + ], "operationId": "getXappInstanceByName", "produces": [ "application/json" @@ -192,9 +274,144 @@ } } }, + "/config": { + "post": { + "summary": "Create xApp config", + "tags": [ + "xapp" + ], + "operationId": "createXappConfig", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "XAppConfig", + "in": "body", + "description": "xApp config", + "schema": { + "$ref": "#/definitions/XAppConfig" + } + } + ], + "responses": { + "201": { + "description": "xApp config successfully created", + "schema": { + "$ref": "#/definitions/XAppConfig" + } + }, + "400": { + "description": "Invalid input" + }, + "422": { + "description": "Validation of configuration failed" + }, + "500": { + "description": "Internal error" + } + } + }, + "put": { + "summary": "Modify xApp config", + "tags": [ + "xapp" + ], + "operationId": "ModifyXappConfig", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "XAppConfig", + "in": "body", + "description": "xApp config", + "schema": { + "$ref": "#/definitions/XAppConfig" + } + } + ], + "responses": { + "200": { + "description": "xApp config successfully modified", + "schema": { + "$ref": "#/definitions/XAppConfig" + } + }, + "400": { + "description": "Invalid input" + }, + "422": { + "description": "Validation of configuration failed" + }, + "500": { + "description": "Internal error" + } + } + }, + "get": { + "summary": "Returns the configuration of all xapps", + "tags": [ + "xapp" + ], + "operationId": "getAllXappConfig", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "successful query of xApp config", + "schema": { + "$ref": "#/definitions/AllXappConfig" + } + }, + "500": { + "description": "Internal error" + } + } + }, + "delete": { + "summary": "Delete xApp configuration", + "tags": [ + "xapp" + ], + "operationId": "deleteXappConfig", + "parameters": [ + { + "name": "ConfigMetadata", + "in": "body", + "description": "xApp configuration information", + "schema": { + "$ref": "#/definitions/ConfigMetadata" + } + } + ], + "responses": { + "204": { + "description": "Successful deletion of xApp" + }, + "400": { + "description": "Invalid parameters supplied" + }, + "500": { + "description": "Internal error" + } + } + } + }, "/subscriptions": { "post": { "summary": "Subscribe event", + "tags": [ + "xapp", + "subscriptions" + ], "operationId": "addSubscription", "consumes": [ "application/json" @@ -227,6 +444,10 @@ }, "get": { "summary": "Returns all subscriptions", + "tags": [ + "xapp", + "subscriptions" + ], "operationId": "getSubscriptions", "produces": [ "application/json" @@ -244,6 +465,10 @@ "/subscriptions/{subscriptionId}": { "get": { "summary": "Returns the information of subscription", + "tags": [ + "xapp", + "subscriptions" + ], "operationId": "getSubscriptionById", "produces": [ "application/json" @@ -254,7 +479,7 @@ "in": "path", "description": "ID of subscription", "required": true, - "type": "integer" + "type": "string" } ], "responses": { @@ -274,6 +499,10 @@ }, "put": { "summary": "Modify event subscription", + "tags": [ + "xapp", + "subscriptions" + ], "operationId": "modifySubscription", "consumes": [ "application/json" @@ -287,7 +516,7 @@ "in": "path", "description": "ID of subscription", "required": true, - "type": "integer" + "type": "string" }, { "in": "body", @@ -313,6 +542,10 @@ }, "delete": { "summary": "Unsubscribe event", + "tags": [ + "xapp", + "subscriptions" + ], "description": "", "operationId": "deleteSubscription", "parameters": [ @@ -321,7 +554,7 @@ "in": "path", "description": "ID of subscription", "required": true, - "type": "integer" + "type": "string" } ], "responses": { @@ -336,7 +569,14 @@ } }, "definitions": { - "AllXapps": { + "AllDeployableXapps": { + "type": "array", + "items": { + "type": "string", + "example": "xapp-dummy" + } + }, + "AllDeployedXapps": { "type": "array", "items": { "$ref": "#/definitions/Xapp" @@ -407,22 +647,74 @@ "type": "integer", "example": 32300 }, - "txMessages" : { + "txMessages": { "type": "array", "items": { - "type" : "string", - "example" : "ControlIndication" + "type": "string", + "example": "ControlIndication" } }, - "rxMessages" : { + "rxMessages": { "type": "array", "items": { - "type" : "string", - "example" : "LoadIndication" + "type": "string", + "example": "LoadIndication" } } } }, + "ConfigMetadata": { + "type": "object", + "required": [ + "name", + "configName", + "namespace" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the xApp", + "example": "xapp-dummy" + }, + "configName": { + "type": "string", + "description": "Name of the config map", + "example": "xapp-dummy-config-map" + }, + "namespace": { + "type": "string", + "description": "Name of the namespace", + "example": "ricxapp" + } + } + }, + "XAppConfig": { + "type": "object", + "required": [ + "metadata", + "descriptor", + "config" + ], + "properties": { + "metadata": { + "$ref": "#/definitions/ConfigMetadata" + }, + "descriptor": { + "type": "object", + "description": "Schema of configuration in JSON format" + }, + "config": { + "type": "object", + "description": "Configuration in JSON format" + } + } + }, + "AllXappConfig": { + "type": "array", + "items": { + "$ref": "#/definitions/XAppConfig" + } + }, "subscriptionRequest": { "type": "object", "required": [ @@ -474,6 +766,7 @@ "enum": [ "created", "deleted", + "updated", "all" ] } @@ -502,6 +795,7 @@ "enum": [ "created", "deleted", + "updated", "all" ] }, @@ -533,11 +827,12 @@ "description": "Event to be notified", "enum": [ "created", - "deleted" + "deleted", + "updated" ] }, "xApps": { - "$ref": "#/definitions/AllXapps" + "$ref": "#/definitions/AllDeployedXapps" } } }