Upgrade xapp manager to spec 0.1.3
[portal/ric-dashboard.git] / xapp-mgr-client / src / main / resources / xapp_manager_rest_api_v0_1_3.yaml
@@ -1,24 +1,7 @@
-# ========================LICENSE_START=================================
-# O-RAN-SC
-# %%
-# Copyright (C) 2019 AT&T Intellectual Property and Nokia
-# %%
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ========================LICENSE_END===================================
 swagger: '2.0'
 info:
   description: This is a draft API for RIC appmgr
-  version: 0.1.2
+  version: 0.1.3
   title: RIC appmgr
   license:
     name: Apache 2.0
@@ -29,15 +12,26 @@ schemes:
   - https
   - http
 paths:
-  /health:
-    get:
-      summary: Health check of xApp Manager
-      tags:
+  /health/alive :
+    get :
+      summary     : Health check of xApp Manager - Liveness probe
+      tags        : 
         - health
-      operationId: getHealth
-      responses:
+      operationId : getHealthAlive
+      responses   :
+        '200' :
+          description : Status of xApp Manager is ok
+  /health/ready :
+    get :
+      summary     : Readiness check of xApp Manager - Readiness probe
+      tags        : 
+        - health
+      operationId : getHealthReady
+      responses   :
         '200':
-          description: Status of xApp Manager is ok
+          description : xApp Manager is ready for service
+        '503':
+          description: xApp Manager is not ready for service
   /xapps:
     post:
       summary: Deploy a xapp
@@ -55,11 +49,31 @@ paths:
           schema:
             type: object
             required:
-              - xAppName
+              - name
             properties:
-              xAppName:
+              name:
                 type: string
-                description: Name of the xApp
+                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
       responses:
         '201':
@@ -168,16 +182,16 @@ paths:
       produces:
         - application/json
       parameters:
-        - name: xAppConfig
+        - name: XAppConfig
           in: body
           description: xApp config
           schema:
-            $ref: '#/definitions/xAppConfig'
+            $ref: '#/definitions/XAppConfig'
       responses:
         '201':
           description: xApp config successfully created
           schema:
-            $ref: '#/definitions/xAppConfig'
+            $ref: '#/definitions/XAppConfig'
         '400':
           description: Invalid input
         '422':
@@ -194,16 +208,16 @@ paths:
       produces:
         - application/json
       parameters:
-        - name: xAppConfig
+        - name: XAppConfig
           in: body
           description: xApp config
           schema:
-            $ref: '#/definitions/xAppConfig'
+            $ref: '#/definitions/XAppConfig'
       responses:
         '200':
           description: xApp config successfully modified
           schema:
-            $ref: '#/definitions/xAppConfig'
+            $ref: '#/definitions/XAppConfig'
         '400':
           description: Invalid input
         '422':
@@ -230,11 +244,11 @@ paths:
         - xapp
       operationId: deleteXappConfig
       parameters:
-        - name: xAppConfigInfo
+        - name: ConfigMetadata
           in: body
           description: xApp configuration information
           schema:
-            $ref: '#/definitions/xAppConfigInfo'
+            $ref: '#/definitions/ConfigMetadata'
       responses:
         '204':
           description: Successful deletion of xApp
@@ -294,7 +308,7 @@ paths:
           in: path
           description: ID of subscription
           required: true
-          type: integer
+          type: string
       responses:
         '200':
           description: successful operation
@@ -319,7 +333,7 @@ paths:
           in: path
           description: ID of subscription
           required: true
-          type: integer
+          type: string
         - in: body
           name: subscriptionRequest
           description: Modified subscription
@@ -345,7 +359,7 @@ paths:
           in: path
           description: ID of subscription
           required: true
-          type: integer
+          type: string
       responses:
         '204':
           description: Successful deletion of subscription
@@ -416,18 +430,18 @@ definitions:
         items:
           type: string
           example: LoadIndication
-  xAppConfigInfo:
+  ConfigMetadata:
     type: object
     required:
-      - xAppName
-      - configMapName
+      - name
+      - configName
       - namespace
     properties:
-      xAppName:
+      name:
         type: string
         description: Name of the xApp
         example: xapp-dummy
-      configMapName:
+      configName:
         type: string
         description: Name of the config map
         example: xapp-dummy-config-map
@@ -435,25 +449,25 @@ definitions:
         type: string
         description: Name of the namespace
         example: ricxapp
-  xAppConfig:
+  XAppConfig:
     type: object
     required:
-      - xAppConfigInfo
-      - configSchema
-      - configMap
+      - metadata
+      - descriptor
+      - config
     properties:
-      xAppConfigInfo:
-        $ref: '#/definitions/xAppConfigInfo'
-      configSchema:
+      metadata:
+        $ref: '#/definitions/ConfigMetadata'
+      descriptor:
         type: object
         description: Schema of configuration in JSON format
-      configMap:
+      config:
         type: object
         description: Configuration in JSON format
   AllXappConfig:
     type: array
     items:
-      $ref: '#/definitions/xAppConfig'
+      $ref: '#/definitions/XAppConfig'
   subscriptionRequest:
     type: object
     required: