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