X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=inline;f=api%2Frouting_manager.yaml;h=7bfbfea9a5a1e4e5455c5cbc7d1f30e5221f7bcb;hb=be9f2684de5ed4afbe22f441cb9db5f268d05af3;hp=11f09a3fbb3aa7e5f74491c4cea6ef9f0b53ea10;hpb=871fa393844ce1b61b8d5218d27687d9fc05803a;p=ric-plt%2Frtmgr.git diff --git a/api/routing_manager.yaml b/api/routing_manager.yaml index 11f09a3..7bfbfea 100644 --- a/api/routing_manager.yaml +++ b/api/routing_manager.yaml @@ -18,30 +18,28 @@ # # # Abstract: Routing Manager's RESTful API definition -# Date: 29 March 2019 +# Date: 28 August 2019 # swagger: "2.0" info: title: Routing Manager description: "This is the Swagger/OpenAPI 2.0 definition of Routing Manager's Northbound API." - version: "0.2.2" + version: "0.4.0" license: name: "Apache 2.0" url: "http://www.apache.org/licenses/LICENSE-2.0.html" host: "rtmgr" -basePath: "/v1" +basePath: "/ric/v1" tags: - name: "handle" description: "Available handles" # externalDocs: # description: "Find out more" # url: "http://127.0.0.1" -- name: "route" - description: "Available routes" - name: "health" description: "Health of the system" schemes: -- "https" +#- "https" - "http" paths: /health: @@ -103,13 +101,13 @@ paths: description: "Invalid data" 201: description: "Callback received" - /routes: + /handles/xapp-subscription-handle: post: tags: - - "route" - summary: "Add new route" - description: "By performing a POST method on the routes resource, the API caller is able to create a new route." - operationId: "add_route" + - "handle" + summary: "API for updating about new xapp subscription" + description: "By performing a POST method on the xapp-subscription-handle resource, the API caller is able to update the Routing manager about the creation of new subscription by an Xapp instance." + operationId: "provide_xapp_subscription_handle" consumes: - "application/json" # - "application/yaml" @@ -118,91 +116,43 @@ paths: # - "application/yaml" parameters: - in: "body" - name: "route" - description: "Route object that needs to be created" + name: "xapp-subscription-data" + description: "xApp related subscription data" required: true schema: - $ref: "#/definitions/route" + $ref: "#/definitions/xapp-subscription-data" responses: 400: - description: "Invalid route" + description: "Invalid data" 201: - description: "Route created" - put: + description: "Xapp Subscription data received" + delete: tags: - - "route" - summary: "Update an existing route" - description: "By performing a PUT method on the routes resource, the API caller is able to update an already existing route." - operationId: "update_route" + - "handle" + summary: "API for deleting an xapp subscription" + description: "By performing the delete operation on xapp-subscription-handle resource, the API caller will be able to update routing manager about the deletion of an xapp's subscription" + operationId: "delete_xapp_subscription_handle" consumes: - "application/json" -# - "application/yaml" - produces: - - "application/json" -# - "application/yaml" parameters: - in: "body" - name: "route" - description: "Route object that needs to be updated or created" + name: "xapp-subscription-data" + description: "xApp related subscription data" required: true schema: - $ref: "#/definitions/route" + $ref: "#/definitions/xapp-subscription-data" responses: - 400: - description: "Invalid route ID supplied" - 404: - description: "Route not found" 204: - description: "Route updated" - get: - tags: - - "route" - summary: "Retrieve the list of routes" - description: "By performing a GET method on the routes resource, the API caller is able to retrieve all routes" - operationId: "get_routes" - consumes: - - "application/json" -# - "application/yaml" - produces: - - "application/json" -# - "application/yaml" - responses: + description: "Content not found" 200: - description: "All the routes" - schema: - $ref: "#/definitions/routes" - - /routes/{route-id}: - get: - tags: - - "route" - summary: "Find route by ID" - description: "Returns a single route" - operationId: "get_route_by_id" - produces: - - "application/json" - parameters: - - name: "route-id" - in: "path" - description: "ID of route to return" - required: true - type: "integer" - format: "int64" - responses: - 200: - description: "successful operation" - schema: - $ref: "#/definitions/route" - 400: - description: "Invalid route ID supplied" - 404: - description: "Route not found" + description: "Xapp Subscription deleted" + /handles/xapp-subscription-handle/{subscription_id}: put: tags: - - "route" - summary: "Updates a route by explicitly referencing it by route-id" - description: "By performing a PUT method on a specific route referenced by the route-id the API caller is able to update that specific route" - operationId: "update-route-by-id" + - "handle" + summary: "API for updating the subscriber xApp list" + description: "By performing a PUT method on a xapp-subscription-handle/{subscription_id} resource, the API caller is able to update the Routing manager about the list of subscriber xApps related to the subscription denoted by the {subsription_id}." + operationId: "update_xapp_subscription_handle" consumes: - "application/json" # - "application/yaml" @@ -210,46 +160,24 @@ paths: - "application/json" # - "application/yaml" parameters: - - name: "route-id" - in: "path" - description: "ID of route that needs to be updated" - required: true - type: "integer" - format: "int64" - - name: "route" - in: "body" - description: "The updated route instance" - required: false - schema: - $ref: "#/definitions/route" - responses: - 400: - description: "Invalid route ID supplied" - 204: - description: "Route updated" - delete: - tags: - - "route" - summary: "Deletes a route" - description: "By performing a DELETE method on a specific route referenced by the route-id, the API caller is able to delete that specific route" - operationId: "delete_route_by_id" - produces: - - "application/json" -# - "application/yaml" - parameters: - - name: "route-id" - in: "path" - description: "ID of the route that needs to be deleted" - required: true - type: "integer" - format: "int64" + - in: path + name: subscription_id + required: true + type: integer + format: "uint16" + description: "Subscription ID" + - in: body + name: xapp-list + description: "xApp list" + required: true + schema: + $ref: "#/definitions/xapp-list" responses: 400: - description: "Invalid route ID supplied" - 404: - description: "Route not found" - 204: - description: "Route deleted" + description: "Invalid data" + 201: + description: "Xapp list received" + definitions: health-status: type: "object" @@ -259,59 +187,55 @@ definitions: enum: - healthy - unhealthy - routes: - type: "array" - items: - $ref: "#/definitions/route" - route: + xapp-callback-data: type: "object" - required: - - "id" # not so sure about that properties: id: + type: "string" + event: + type: "string" + version: type: "integer" format: "int64" - senders: - type: "array" - items: - "$ref": "#/definitions/xapp-instance" - message-type: - type: "integer" - format: "int64" - receiver-groups: - type: "array" - items: - "$ref": "#/definitions/xapp-group" - xapp-instance: + xApps: + type: "string" #This should be a JSON object, array of xapps + xapp-subscription-data: type: "object" required: - - "address" - - "port" + - "address" + - "port" + - "subscription_id" properties: address: - type: "string" # I know... - port: + type: "string" #This is the xapp instance hostname or ip address + port: #xapp instance port address type: "integer" - format: "int32" + format: "uint16" minimum: 0 maximum: 65535 - xapp-group: + subscription_id: #subscription sequence number + type: "integer" + format: "int32" + xapp-list: type: "array" items: - "$ref": "#/definitions/xapp-instance" - xapp-callback-data: + $ref: '#/definitions/xapp-element' + xapp-element: type: "object" + required: + - "address" + - "port" properties: - id: - type: "integer" - format: "int64" - event: - type: "string" - data-version: + address: + type: "string" #This is the xapp instance hostname or ip address + port: #xapp instance port address type: "integer" - format: "int64" - data: - type: "string" #This should be a JSON object, array of xapps + format: "uint16" + minimum: 0 + maximum: 65535 + externalDocs: description: "Routing Manager" url: "http://placeholder" + +