X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=api%2Fappmgr_rest_api.yaml;h=15d530f163f651c98345824b7ef5857c181ea63e;hb=HEAD;hp=04f4f0a37f64c88dcf0546d0d0003db7a7f51f98;hpb=34e4383c438f87023bc411d9b0baa4a828a7e306;p=ric-plt%2Fappmgr.git diff --git a/api/appmgr_rest_api.yaml b/api/appmgr_rest_api.yaml old mode 100644 new mode 100755 index 04f4f0a..15d530f --- a/api/appmgr_rest_api.yaml +++ b/api/appmgr_rest_api.yaml @@ -1,7 +1,23 @@ +#================================================================================== +# Copyright (c) 2019 AT&T Intellectual Property. +# Copyright (c) 2019 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. +#================================================================================== swagger: '2.0' info: description: This is a draft API for RIC appmgr - version: 0.2.0 + version: 0.3.3 title: RIC appmgr license: name: Apache 2.0 @@ -158,89 +174,7 @@ paths: description: Xapp not found '500': description: Internal error - /xapps/{xAppName}/instances/{xAppInstanceName}/start: - put: - summary: Start given xapp instance - tags: - - xapp - operationId: startXappInstanceByName - produces: - - application/json - parameters: - - name: xAppName - in: path - description: Name of xApp - required: true - type: string - - name: xAppInstanceName - in: path - description: Name of xApp instance to get information - required: true - type: string - responses: - '200': - description: successful operation - '400': - description: Invalid name supplied - '404': - description: Xapp not found - '500': - description: Internal error - /xapps/{xAppName}/instances/{xAppInstanceName}/stop: - put: - summary: Stop given xapp instance - tags: - - xapp - operationId: stopXappInstanceByName - produces: - - application/json - parameters: - - name: xAppName - in: path - description: Name of xApp - required: true - type: string - - name: xAppInstanceName - in: path - description: Name of xApp instance to get information - required: true - type: string - responses: - '200': - description: successful operation - '400': - description: Invalid name supplied - '404': - description: Xapp not found - '500': - description: Internal error /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/ConfigValidationErrors' - '400': - description: Invalid input - '422': - description: Validation of configuration failed - '500': - description: Internal error put: summary: Modify xApp config tags: @@ -281,43 +215,25 @@ paths: $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 config - '400': - description: Invalid parameters supplied - '500': - description: Internal error - /config/{configName}: + /config/{element}: get: - summary: Returns the configuration of a single xapp + summary: Returns the given element of the configuration tags: - xapp - operationId: getXappConfig + operationId: GetConfigElement produces: - application/json parameters: - - name: configName + - name: element in: path - description: Name of xApp + description: Name of configuration element required: true type: string responses: '200': - description: successful query of xApp config + description: successful query of config elements schema: - $ref: '#/definitions/XAppConfig' + $ref: '#/definitions/AllXappConfig' '500': description: Internal error /subscriptions: @@ -429,6 +345,52 @@ paths: description: Successful deletion of subscription '400': description: Invalid subscription supplied + /register: + post: + summary: Register a new xApp + tags: + - xapp + - registration + operationId: registerXapp + consumes: + - application/json + produces: + - application/json + parameters: + - name: registerRequest + in: body + description: New xApp registration + required: true + schema: + $ref: '#/definitions/registerRequest' + responses: + '201': + description: Registration successful + '400': + description: Invalid input + /deregister: + post: + summary: Deregister an existing xApp + tags: + - xapp + - registration + operationId: deregisterXapp + consumes: + - application/json + parameters: + - name: deregisterRequest + in: body + description: Xapp to be unregistered + required: true + schema: + $ref: '#/definitions/deregisterRequest' + responses: + '204': + description: Successful deregistration of xApp + '400': + description: Invalid xApp name supplied + '500': + description: Internal error definitions: AllDeployableXapps: type: array @@ -491,6 +453,10 @@ definitions: type: array items: type: string + policies: + type: array + items: + type: integer XappDescriptor: type: object required: @@ -518,14 +484,12 @@ definitions: ConfigMetadata: type: object required: - - name + - xappName + - namespace properties: - name: + xappName: type: string description: Name of the xApp - configName: - type: string - description: Name of the config map namespace: type: string description: Name of the namespace @@ -549,14 +513,10 @@ definitions: 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 @@ -632,3 +592,36 @@ definitions: $ref: '#/definitions/EventType' xApps: $ref: '#/definitions/AllDeployedXapps' + registerRequest: + type: object + required: + - appName + - appInstanceName + - httpEndpoint + - rmrEndpoint + properties: + appName: + type: string + appVersion: + type: string + configPath: + type: string + appInstanceName: + type: string + httpEndpoint: + type: string + rmrEndpoint: + type: string + config: + type: string + description: Configuration in JSON string format + deregisterRequest: + type: object + required: + - appName + - appInstanceName + properties: + appName: + type: string + appInstanceName: + type: string