2 #==================================================================================
3 # Copyright (c) 2019 AT&T Intellectual Property.
4 # Copyright (c) 2019 Nokia
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
10 # http://www.apache.org/licenses/LICENSE-2.0
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 #==================================================================================
20 # Abstract: Routing Manager's RESTful API definition
25 title: Routing Manager
26 description: "This is the Swagger/OpenAPI 2.0 definition of Routing Manager's Northbound API."
30 url: "http://www.apache.org/licenses/LICENSE-2.0.html"
35 description: "Available handles"
37 # description: "Find out more"
38 # url: "http://127.0.0.1"
40 description: "Available routes"
42 description: "Health of the system"
51 summary: "Retrive the health of Routing Manager"
52 description: "By performing a GET method on the health resource, the API caller is able to retrieve the health of Routing Manager"
53 operationId: "get_health"
56 # - "application/yaml"
59 # - "application/yaml"
62 description: "The health of the system"
64 "$ref": "#/definitions/health-status"
69 summary: "Placeholder for further usage"
70 description: "Placeholder for further usage."
71 operationId: "get_handles"
74 # - "application/yaml"
77 # - "application/yaml"
80 description: "Dummy response"
85 summary: "Provide callback"
86 description: "By performing a POST method on the xapp-handle resource, the API caller is able to perform a callback on Routing Manager."
87 operationId: "provide_xapp_handle"
90 # - "application/yaml"
93 # - "application/yaml"
96 name: "xapp-callback-data"
97 description: "xApp related callback data"
100 $ref: "#/definitions/xapp-callback-data"
103 description: "Invalid data"
105 description: "Callback received"
110 summary: "Add new route"
111 description: "By performing a POST method on the routes resource, the API caller is able to create a new route."
112 operationId: "add_route"
115 # - "application/yaml"
118 # - "application/yaml"
122 description: "Route object that needs to be created"
125 $ref: "#/definitions/route"
128 description: "Invalid route"
130 description: "Route created"
134 summary: "Update an existing route"
135 description: "By performing a PUT method on the routes resource, the API caller is able to update an already existing route."
136 operationId: "update_route"
139 # - "application/yaml"
142 # - "application/yaml"
146 description: "Route object that needs to be updated or created"
149 $ref: "#/definitions/route"
152 description: "Invalid route ID supplied"
154 description: "Route not found"
156 description: "Route updated"
160 summary: "Retrieve the list of routes"
161 description: "By performing a GET method on the routes resource, the API caller is able to retrieve all routes"
162 operationId: "get_routes"
165 # - "application/yaml"
168 # - "application/yaml"
171 description: "All the routes"
173 $ref: "#/definitions/routes"
179 summary: "Find route by ID"
180 description: "Returns a single route"
181 operationId: "get_route_by_id"
187 description: "ID of route to return"
193 description: "successful operation"
195 $ref: "#/definitions/route"
197 description: "Invalid route ID supplied"
199 description: "Route not found"
203 summary: "Updates a route by explicitly referencing it by route-id"
204 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"
205 operationId: "update-route-by-id"
208 # - "application/yaml"
211 # - "application/yaml"
215 description: "ID of route that needs to be updated"
221 description: "The updated route instance"
224 $ref: "#/definitions/route"
227 description: "Invalid route ID supplied"
229 description: "Route updated"
233 summary: "Deletes a route"
234 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"
235 operationId: "delete_route_by_id"
238 # - "application/yaml"
242 description: "ID of the route that needs to be deleted"
248 description: "Invalid route ID supplied"
250 description: "Route not found"
252 description: "Route deleted"
265 $ref: "#/definitions/route"
269 - "id" # not so sure about that
277 "$ref": "#/definitions/xapp-instance"
284 "$ref": "#/definitions/xapp-group"
292 type: "string" # I know...
301 "$ref": "#/definitions/xapp-instance"
314 type: "string" #This should be a JSON object, array of xapps
316 description: "Routing Manager"
317 url: "http://placeholder"