J release: Release container Image
[ric-plt/e2mgr.git] / tools / RoutingManagerSimulator / api / swagger.yaml
1 # ========================LICENSE_START=================================
2 # O-RAN-SC
3 #
4 # Copyright (C) 2019 AT&T Intellectual Property and 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 # ========================LICENSE_END===================================
18
19 # This source code is part of the near-RT RIC (RAN Intelligent Controller)
20 # platform project (RICP).
21
22
23 swagger: "2.0"
24 info:
25   description: "This is the Swagger/OpenAPI 2.0 definition of Routing Manager's Northbound\
26     \ API."
27   version: "0.4.0"
28   title: "Routing Manager"
29   license:
30     name: "Apache 2.0"
31     url: "http://www.apache.org/licenses/LICENSE-2.0.html"
32 host: "rtmgr"
33 basePath: "/ric/v1"
34 tags:
35 - name: "handle"
36   description: "Available handles"
37 - name: "health"
38   description: "Health of the system"
39 schemes:
40 - "http"
41 paths:
42   /health:
43     get:
44       tags:
45       - "health"
46       summary: "Retrive the health of Routing Manager"
47       description: "By performing a GET method on the health resource, the API caller\
48         \ is able to retrieve the health of Routing Manager"
49       operationId: "get_health"
50       consumes:
51       - "application/json"
52       produces:
53       - "application/json"
54       parameters: []
55       responses:
56         "200":
57           description: "The health of the system"
58           schema:
59             $ref: "#/definitions/health-status"
60   /handles:
61     get:
62       tags:
63       - "handle"
64       summary: "Placeholder for further usage"
65       description: "Placeholder for further usage."
66       operationId: "get_handles"
67       consumes:
68       - "application/json"
69       produces:
70       - "application/json"
71       parameters: []
72       responses:
73         "200":
74           description: "Dummy response"
75   /handles/xapp-handle:
76     post:
77       tags:
78       - "handle"
79       summary: "Provide callback"
80       description: "By performing a POST method on the xapp-handle resource, the API\
81         \ caller is able to perform a callback on Routing Manager."
82       operationId: "provide_xapp_handle"
83       consumes:
84       - "application/json"
85       produces:
86       - "application/json"
87       parameters:
88       - in: "body"
89         name: "xapp-callback-data"
90         description: "xApp related callback data"
91         required: true
92         schema:
93           $ref: "#/definitions/xapp-callback-data"
94         x-exportParamName: "XappCallbackData"
95       responses:
96         "201":
97           description: "Callback received"
98         "400":
99           description: "Invalid data"
100   /handles/xapp-subscription-handle:
101     post:
102       tags:
103       - "handle"
104       summary: "API for updating about new xapp subscription"
105       description: "By performing a POST method on the xapp-subscription-handle resource,\
106         \ the API caller is able to update the Routing manager about the creation\
107         \ of new subscription by an Xapp instance."
108       operationId: "provide_xapp_subscription_handle"
109       consumes:
110       - "application/json"
111       produces:
112       - "application/json"
113       parameters:
114       - in: "body"
115         name: "xapp-subscription-data"
116         description: "xApp related subscription data"
117         required: true
118         schema:
119           $ref: "#/definitions/xapp-subscription-data"
120         x-exportParamName: "XappSubscriptionData"
121       responses:
122         "201":
123           description: "Xapp Subscription data received"
124         "400":
125           description: "Invalid data"
126     delete:
127       tags:
128       - "handle"
129       summary: "API for deleting an xapp subscription"
130       description: "By performing the delete operation on xapp-subscription-handle\
131         \ resource, the API caller will be able to update routing manager about the\
132         \ deletion of an xapp's subscription"
133       operationId: "delete_xapp_subscription_handle"
134       consumes:
135       - "application/json"
136       parameters:
137       - in: "body"
138         name: "xapp-subscription-data"
139         description: "xApp related subscription data"
140         required: true
141         schema:
142           $ref: "#/definitions/xapp-subscription-data"
143         x-exportParamName: "XappSubscriptionData"
144       responses:
145         "200":
146           description: "Xapp Subscription deleted"
147         "204":
148           description: "Content not found"
149   /handles/xapp-subscription-handle/{subscription_id}:
150     put:
151       tags:
152       - "handle"
153       summary: "API for updating the subscriber xApp list"
154       description: "By performing a PUT method on a xapp-subscription-handle/{subscription_id}\
155         \ resource, the API caller is able to update the Routing manager about the\
156         \ list of subscriber xApps related to the subscription denoted by the {subsription_id}."
157       operationId: "update_xapp_subscription_handle"
158       consumes:
159       - "application/json"
160       produces:
161       - "application/json"
162       parameters:
163       - name: "subscription_id"
164         in: "path"
165         description: "Subscription ID"
166         required: true
167         type: "integer"
168         format: "uint16"
169         x-exportParamName: "SubscriptionId"
170       - in: "body"
171         name: "xapp-list"
172         description: "xApp list"
173         required: true
174         schema:
175           $ref: "#/definitions/xapp-list"
176         x-exportParamName: "XappList"
177       responses:
178         "201":
179           description: "Xapp list received"
180         "400":
181           description: "Invalid data"
182   /handles/e2t:
183     post:
184       tags:
185       - "handle"
186       summary: "API for establishing platform routes when a new e2t instance gets\
187         \ added to platform"
188       description: "E2T updates its FQDN to E2M  during its initialisation, hence\
189         \ after E2M informs routing manager about new E2T instances FQDN. At this\
190         \ point Routing Mgr would establish platform routes"
191       operationId: "create_new_e2t_handle"
192       consumes:
193       - "application/json"
194       produces:
195       - "application/json"
196       parameters:
197       - in: "body"
198         name: "e2t-data"
199         description: "FQDN of the newly joined E2T instance"
200         required: true
201         schema:
202           $ref: "#/definitions/e2t-data"
203         x-exportParamName: "E2tData"
204       responses:
205         "201":
206           description: "new e2t instance is considered and platform routes are established"
207         "400":
208           description: "Invalid data"
209     delete:
210       tags:
211       - "handle"
212       summary: "API for clearing routes specific to a particular e2T instance"
213       description: "E2M would monitor E2T instances using its keep alive based mechanism\
214         \ during this time if an E2T instance is detected to be dead, E2M would distribute\
215         \ already associated ran's to other available/healthy E2T instances. Here\
216         \ E2M would share E2T instance address to be removed OR which is unhealthy\
217         \ and list of RAN instances to be dissociated and an association list which\
218         \ contains E2T FQDN and associated RAN names"
219       operationId: "delete_e2t_handle"
220       consumes:
221       - "application/json"
222       produces:
223       - "application/json"
224       parameters:
225       - in: "body"
226         name: "e2t-data"
227         description: "FQDN of the newly joined E2T instance"
228         required: true
229         schema:
230           $ref: "#/definitions/e2t-delete-data"
231         x-exportParamName: "E2tData"
232       responses:
233         "201":
234           description: "new e2t instance is considered and platform routes are established"
235         "400":
236           description: "Invalid data"
237   /handles/associate-ran-to-e2t:
238     post:
239       tags:
240       - "handle"
241       summary: "API for associating a ran to e2t instance"
242       description: "By performing a POST method on rane2tmapping, the API caller is\
243         \ able to update the Routing manager about the ran to e2t mapping which would\
244         \ be finally used to distribute routes to corresponding xApp and E2T instance"
245       operationId: "associate_ran_to_e2t_handle"
246       consumes:
247       - "application/json"
248       produces:
249       - "application/json"
250       parameters:
251       - in: "body"
252         name: "ran-e2t-list"
253         description: "ran to e2t mapping"
254         required: true
255         schema:
256           $ref: "#/definitions/ran-e2t-map"
257         x-exportParamName: "RanE2tList"
258       responses:
259         "201":
260           description: "e2t ran mapping recieved, platform routes"
261         "400":
262           description: "Invalid data"
263   /handles/dissociate-ran:
264     post:
265       tags:
266       - "handle"
267       summary: "API to dissociate ran from e2t"
268       description: "By performing a POST method on rane2tmapping, routing manager\
269         \ will dissociate ran name from e2t instance by updating or clearing routes"
270       operationId: "dissociate_ran"
271       consumes:
272       - "application/json"
273       produces:
274       - "application/json"
275       parameters:
276       - in: "body"
277         name: "dissociate-list"
278         description: "list of RAN to dissociate"
279         required: true
280         schema:
281           $ref: "#/definitions/ran-e2t-map"
282         x-exportParamName: "DissociateList"
283       responses:
284         "201":
285           description: "ran instances disociated"
286         "400":
287           description: "Invalid data"
288 definitions:
289   health-status:
290     type: "object"
291     properties:
292       status:
293         type: "string"
294         enum:
295         - "healthy"
296         - "unhealthy"
297     example:
298       status: "healthy"
299   xapp-callback-data:
300     type: "object"
301     properties:
302       id:
303         type: "string"
304       event:
305         type: "string"
306       version:
307         type: "integer"
308         format: "int64"
309       xApps:
310         type: "string"
311   xapp-subscription-data:
312     type: "object"
313     required:
314     - "address"
315     - "port"
316     - "subscription_id"
317     properties:
318       address:
319         type: "string"
320       port:
321         type: "integer"
322         format: "uint16"
323         minimum: 0
324         maximum: 65535
325       subscription_id:
326         type: "integer"
327         format: "int32"
328   xapp-list:
329     type: "array"
330     items:
331       $ref: "#/definitions/xapp-element"
332   xapp-element:
333     type: "object"
334     required:
335     - "address"
336     - "port"
337     properties:
338       address:
339         type: "string"
340       port:
341         type: "integer"
342         format: "uint16"
343         minimum: 0
344         maximum: 65535
345   ran-e2t-map:
346     type: "array"
347     items:
348       $ref: "#/definitions/ran-e2t-element"
349   ran-e2t-element:
350     type: "object"
351     required:
352     - "E2TAddress"
353     properties:
354       E2TAddress:
355         type: "string"
356       ranNamelist:
357         $ref: "#/definitions/ranNamelist"
358   ranNamelist:
359     type: "array"
360     items:
361       type: "string"
362   e2t-data:
363     type: "object"
364     required:
365     - "E2TAddress"
366     properties:
367       E2TAddress:
368         type: "string"
369       ranNamelist:
370         $ref: "#/definitions/ranNamelist"
371   e2t-delete-data:
372     type: "object"
373     required:
374     - "E2TAddress"
375     properties:
376       E2TAddress:
377         type: "string"
378       ranNamelistTobeDissociated:
379         $ref: "#/definitions/ranNamelist"
380       ranAssocList:
381         $ref: "#/definitions/ran-e2t-map"
382 externalDocs:
383   description: "Routing Manager"
384   url: "http://placeholder"