Added config and logger module from xapp-fwk. Added Routes related to A1Mediator...
[ric-plt/rtmgr.git] / api / routing_manager.yaml
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 #   This source code is part of the near-RT RIC (RAN Intelligent Controller)
19 #   platform project (RICP).
20 #
21 #==================================================================================
22 #
23 #
24 #
25 #   Abstract:   Routing Manager's RESTful API definition
26 #   Date:       28 August 2019
27 #
28 swagger: "2.0"
29 info:
30   title: Routing Manager
31   description: "This is the Swagger/OpenAPI 2.0 definition of Routing Manager's Northbound API."
32   version: "0.4.0"
33   license:
34     name: "Apache 2.0"
35     url: "http://www.apache.org/licenses/LICENSE-2.0.html"
36 host: "rtmgr"
37 basePath: "/ric/v1"
38 tags:
39 - name: "handle"
40   description: "Available handles"
41 #  externalDocs:
42 #    description: "Find out more"
43 #    url: "http://127.0.0.1"
44 - name: "health"
45   description: "Health of the system"
46 schemes:
47 #- "https"
48 - "http"
49 paths:
50   /health:
51     get:
52       tags:
53       - "health"
54       summary: "Retrive the health of Routing Manager"
55       description: "By performing a GET method on the health resource, the API caller is able to retrieve the health of Routing Manager"
56       operationId: "get_health"
57       consumes:
58       - "application/json"
59 #      - "application/yaml"
60       produces:
61       - "application/json"
62 #      - "application/yaml"
63       responses:
64         200:
65           description: "The health of the system"
66           schema:
67             "$ref": "#/definitions/health-status"
68   /handles:
69     get:
70       tags:
71       - "handle"
72       summary: "Placeholder for further usage"
73       description: "Placeholder for further usage."
74       operationId: "get_handles"
75       consumes:
76       - "application/json"
77 #      - "application/yaml"
78       produces:
79       - "application/json"
80 #      - "application/yaml"
81       responses:
82         200:
83           description: "Dummy response"
84   /handles/xapp-handle:
85     post:
86       tags:
87       - "handle"
88       summary: "Provide callback"
89       description: "By performing a POST method on the xapp-handle resource, the API caller is able to perform a callback on Routing Manager."
90       operationId: "provide_xapp_handle"
91       consumes:
92       - "application/json"
93 #      - "application/yaml"
94       produces:
95       - "application/json"
96 #      - "application/yaml"
97       parameters:
98       - in: "body"
99         name: "xapp-callback-data"
100         description: "xApp related callback data"
101         required: true
102         schema:
103           $ref: "#/definitions/xapp-callback-data"
104       responses:
105         400:
106           description: "Invalid data"
107         201:
108           description: "Callback received"
109   /handles/xapp-subscription-handle:
110     post:
111       tags:
112       - "handle"
113       summary: "API for updating about new xapp subscription"
114       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."
115       operationId: "provide_xapp_subscription_handle"
116       consumes:
117       - "application/json"
118 #      - "application/yaml"
119       produces:
120       - "application/json"
121 #      - "application/yaml"
122       parameters:
123       - in: "body"
124         name: "xapp-subscription-data"
125         description: "xApp related subscription data"
126         required: true
127         schema:
128           $ref: "#/definitions/xapp-subscription-data"
129       responses:
130         400:
131           description: "Invalid data"
132         201:
133           description: "Xapp Subscription data received"
134     delete:
135       tags:
136       - "handle"
137       summary: "API for deleting an xapp subscription"
138       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"
139       operationId: "delete_xapp_subscription_handle"
140       consumes:
141       - "application/json"
142       parameters:
143       - in: "body"
144         name: "xapp-subscription-data"
145         description: "xApp related subscription data"
146         required: true
147         schema:
148           $ref: "#/definitions/xapp-subscription-data"
149       responses:
150         204:
151           description: "Content not found"
152         200:
153           description: "Xapp Subscription deleted"
154   /handles/xapp-subscription-handle/{subscription_id}:
155     put:
156       tags:
157       - "handle"
158       summary: "API for updating the subscriber xApp list"
159       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}."
160       operationId: "update_xapp_subscription_handle"
161       consumes:
162       - "application/json"
163 #      - "application/yaml"
164       produces:
165       - "application/json"
166 #      - "application/yaml"
167       parameters:
168         - in: path
169           name: subscription_id
170           required: true
171           type: integer
172           format: "uint16"
173           description: "Subscription ID"
174         - in: body
175           name: xapp-list
176           description: "xApp list"
177           required: true
178           schema:
179            $ref: "#/definitions/xapp-list"
180       responses:
181         400:
182           description: "Invalid data"
183         201:
184           description: "Xapp list received"
185   
186 definitions:
187   health-status:
188     type: "object"
189     properties:
190       status:
191         type: string
192         enum:
193         - healthy
194         - unhealthy
195   xapp-callback-data:
196     type: "object"
197     properties:
198       id:
199         type: "string"
200       event:
201         type: "string"
202       version:
203         type: "integer"
204         format: "int64"
205       xApps:
206         type: "string" #This should be a JSON object, array of xapps
207   xapp-subscription-data:
208     type: "object"
209     required:
210       - "address"
211       - "port"
212       - "subscription_id"
213     properties:
214       address:
215         type: "string" #This is the xapp instance hostname or ip address
216       port: #xapp instance port address
217         type: "integer"
218         format: "uint16"
219         minimum: 0
220         maximum: 65535
221       subscription_id: #subscription sequence number
222         type: "integer"
223         format: "int32"
224   xapp-list:
225     type: "array"
226     items:
227       $ref: '#/definitions/xapp-element'
228   xapp-element:
229     type: "object"
230     required:
231       - "address"
232       - "port"
233     properties:
234       address:
235         type: "string" #This is the xapp instance hostname or ip address
236       port: #xapp instance port address
237         type: "integer"
238         format: "uint16"
239         minimum: 0
240         maximum: 65535
241
242 externalDocs:
243   description: "Routing Manager"
244   url: "http://placeholder"
245
246