kalnagy | 93cc3e2 | 2019-09-19 11:29:29 +0200 | [diff] [blame^] | 1 | # |
| 2 | #================================================================================== |
| 3 | # Copyright (c) 2019 AT&T Intellectual Property. |
| 4 | # Copyright (c) 2019 Nokia |
| 5 | # |
| 6 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | # you may not use this file except in compliance with the License. |
| 8 | # You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | # See the License for the specific language governing permissions and |
| 16 | # limitations under the License. |
| 17 | #================================================================================== |
| 18 | # |
| 19 | # |
| 20 | # Abstract: Routing Manager's RESTful API definition |
| 21 | # Date: 29 March 2019 |
| 22 | # |
| 23 | swagger: "2.0" |
| 24 | info: |
| 25 | title: Routing Manager |
| 26 | description: "This is the Swagger/OpenAPI 2.0 definition of Routing Manager's Northbound API." |
| 27 | version: "0.3.0" |
| 28 | license: |
| 29 | name: "Apache 2.0" |
| 30 | url: "http://www.apache.org/licenses/LICENSE-2.0.html" |
| 31 | host: "rtmgr" |
| 32 | basePath: "/ric/v1" |
| 33 | tags: |
| 34 | - name: "handle" |
| 35 | description: "Available handles" |
| 36 | # externalDocs: |
| 37 | # description: "Find out more" |
| 38 | # url: "http://127.0.0.1" |
| 39 | - name: "health" |
| 40 | description: "Health of the system" |
| 41 | schemes: |
| 42 | #- "https" |
| 43 | - "http" |
| 44 | paths: |
| 45 | /health: |
| 46 | get: |
| 47 | tags: |
| 48 | - "health" |
| 49 | summary: "Retrive the health of Routing Manager" |
| 50 | description: "By performing a GET method on the health resource, the API caller is able to retrieve the health of Routing Manager" |
| 51 | operationId: "get_health" |
| 52 | consumes: |
| 53 | - "application/json" |
| 54 | # - "application/yaml" |
| 55 | produces: |
| 56 | - "application/json" |
| 57 | # - "application/yaml" |
| 58 | responses: |
| 59 | 200: |
| 60 | description: "The health of the system" |
| 61 | schema: |
| 62 | "$ref": "#/definitions/health-status" |
| 63 | /handles: |
| 64 | get: |
| 65 | tags: |
| 66 | - "handle" |
| 67 | summary: "Placeholder for further usage" |
| 68 | description: "Placeholder for further usage." |
| 69 | operationId: "get_handles" |
| 70 | consumes: |
| 71 | - "application/json" |
| 72 | # - "application/yaml" |
| 73 | produces: |
| 74 | - "application/json" |
| 75 | # - "application/yaml" |
| 76 | responses: |
| 77 | 200: |
| 78 | description: "Dummy response" |
| 79 | /handles/xapp-handle: |
| 80 | post: |
| 81 | tags: |
| 82 | - "handle" |
| 83 | summary: "Provide callback" |
| 84 | description: "By performing a POST method on the xapp-handle resource, the API caller is able to perform a callback on Routing Manager." |
| 85 | operationId: "provide_xapp_handle" |
| 86 | consumes: |
| 87 | - "application/json" |
| 88 | # - "application/yaml" |
| 89 | produces: |
| 90 | - "application/json" |
| 91 | # - "application/yaml" |
| 92 | parameters: |
| 93 | - in: "body" |
| 94 | name: "xapp-callback-data" |
| 95 | description: "xApp related callback data" |
| 96 | required: true |
| 97 | schema: |
| 98 | $ref: "#/definitions/xapp-callback-data" |
| 99 | responses: |
| 100 | 400: |
| 101 | description: "Invalid data" |
| 102 | 201: |
| 103 | description: "Callback received" |
| 104 | /handles/xapp-subscription-handle: |
| 105 | post: |
| 106 | tags: |
| 107 | - "handle" |
| 108 | summary: "API for updating about new xapp subscription" |
| 109 | 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." |
| 110 | operationId: "provide_xapp_subscription_handle" |
| 111 | consumes: |
| 112 | - "application/json" |
| 113 | # - "application/yaml" |
| 114 | produces: |
| 115 | - "application/json" |
| 116 | # - "application/yaml" |
| 117 | parameters: |
| 118 | - in: "body" |
| 119 | name: "xapp-subscription-data" |
| 120 | description: "xApp related subscription data" |
| 121 | required: true |
| 122 | schema: |
| 123 | $ref: "#/definitions/xapp-subscription-data" |
| 124 | responses: |
| 125 | 400: |
| 126 | description: "Invalid data" |
| 127 | 201: |
| 128 | description: "Xapp Subscription data received" |
| 129 | schema: |
| 130 | $ref: "#/definitions/xapp-subscription-data-response" |
| 131 | definitions: |
| 132 | health-status: |
| 133 | type: "object" |
| 134 | properties: |
| 135 | status: |
| 136 | type: string |
| 137 | enum: |
| 138 | - healthy |
| 139 | - unhealthy |
| 140 | xapp-callback-data: |
| 141 | type: "object" |
| 142 | properties: |
| 143 | id: |
| 144 | type: "integer" |
| 145 | format: "int64" |
| 146 | event: |
| 147 | type: "string" |
| 148 | version: |
| 149 | type: "integer" |
| 150 | format: "int64" |
| 151 | xApps: |
| 152 | type: "string" #This should be a JSON object, array of xapps |
| 153 | xapp-subscription-data: |
| 154 | type: "object" |
| 155 | required: |
| 156 | - "address" |
| 157 | - "port" |
| 158 | - "subscription_id" |
| 159 | properties: |
| 160 | address: |
| 161 | type: "string" #This is the xapp instance hostname or ip address |
| 162 | port: #xapp instance port address |
| 163 | type: "integer" |
| 164 | format: "uint16" |
| 165 | minimum: 0 |
| 166 | maximum: 65535 |
| 167 | subscription_id: #subscription sequence number |
| 168 | type: "integer" |
| 169 | format: "int32" |
| 170 | xapp-subscription-data-response: |
| 171 | type: "object" |
| 172 | required: |
| 173 | - "location" |
| 174 | properties: |
| 175 | location: |
| 176 | type: "string" |
| 177 | |
| 178 | externalDocs: |
| 179 | description: "Routing Manager" |
| 180 | url: "http://placeholder" |
| 181 | |