93c4fc9b190312d44baf6f59dd72b6ef5fac09ad
[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 #
19 #
20 #   Abstract:   Routing Manager's RESTful API definition
21 #   Date:       28 August 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.4.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   /handles/xapp-subscription-handle/{subscription_id}:
130     put:
131       tags:
132       - "handle"
133       summary: "API for updating the subscriber xApp list"
134       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}."
135       operationId: "update_xapp_subscription_handle"
136       consumes:
137       - "application/json"
138 #      - "application/yaml"
139       produces:
140       - "application/json"
141 #      - "application/yaml"
142       parameters:
143         - in: path
144           name: subscription_id
145           required: true
146           type: integer
147           format: "uint16"
148           description: "Subscription ID"
149         - in: body
150           name: xapp-list
151           description: "xApp list"
152           required: true
153           schema:
154            $ref: "#/definitions/xapp-list"
155       responses:
156         400:
157           description: "Invalid data"
158         201:
159           description: "Xapp list received"
160   
161 definitions:
162   health-status:
163     type: "object"
164     properties:
165       status:
166         type: string
167         enum:
168         - healthy
169         - unhealthy
170   xapp-callback-data:
171     type: "object"
172     properties:
173       id:
174         type: "string"
175       event:
176         type: "string"
177       version:
178         type: "integer"
179         format: "int64"
180       xApps:
181         type: "string" #This should be a JSON object, array of xapps
182   xapp-subscription-data:
183     type: "object"
184     required:
185       - "address"
186       - "port"
187       - "subscription_id"
188     properties:
189       address:
190         type: "string" #This is the xapp instance hostname or ip address
191       port: #xapp instance port address
192         type: "integer"
193         format: "uint16"
194         minimum: 0
195         maximum: 65535
196       subscription_id: #subscription sequence number
197         type: "integer"
198         format: "int32"
199   xapp-list:
200     type: "array"
201     items:
202       $ref: '#/definitions/xapp-element'
203   xapp-element:
204     type: "object"
205     required:
206       - "address"
207       - "port"
208     properties:
209       address:
210         type: "string" #This is the xapp instance hostname or ip address
211       port: #xapp instance port address
212         type: "integer"
213         format: "uint16"
214         minimum: 0
215         maximum: 65535
216
217 externalDocs:
218   description: "Routing Manager"
219   url: "http://placeholder"
220
221