Add ANR spec and client-code generator
[portal/ric-dashboard.git] / anr-xapp-client / src / main / resources / anr_swagger_0.0.3.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 swagger : '2.0'
19 info :
20   description : REST API specification for RIC ANR closed xAPP
21   version     : 0.0.3
22   title       : RIC ANR
23   license:
24     name : Nokia Closed App
25     url  : 'http://www.nokia.com'
26 host     : anr-service
27 basePath : /ric/v1
28 schemes :
29   - http
30 paths :
31   /health/alive :
32     get :
33       summary     : Health check of ANR - Liveness probe
34       tags        : 
35         - health
36       operationId : getHealthAlive
37       responses   :
38         '200' :
39           description : Status of ANR xApp is ok
40   /health/ready :
41     get :
42       summary     : Health check of ANR - Readiness probe
43       tags        : 
44         - health
45       operationId : getHealthReady
46       responses   :
47         '200':
48           description : Status of ANR xApp is ok
49   /ncrt/cell :
50     parameters :
51       - $ref : '#/parameters/ggnbId'
52       - $ref : '#/parameters/startIndex'
53       - $ref : '#/parameters/limit'
54     get :
55       summary     : Returns neighbor cell relation table for all gnodeBs or based on query string
56       tags        : 
57         - ncrt
58       operationId : getNcrtInfo
59       produces  :
60         - application/json
61       responses :
62         '200' :
63           description : successful operation
64           schema      :
65             $ref : '#/definitions/neighborCellRelationTable'
66         '400' :
67           description : Non-existant identifier {ggnbId | neighborCellIdentifier | start Index} in request
68   /ncrt/cell/{cellIdentifier} :
69     parameters :
70       - $ref : '#/parameters/cellIdentifier'
71       - $ref : '#/parameters/startIndex'
72       - $ref : '#/parameters/limit'
73       - $ref : '#/parameters/neighborCellIdentifierNrpci'
74       - $ref : '#/parameters/neighborCellIdentifierNrcgi'
75     get :
76       summary     : Returns neighbor cell relation table for a Source Cell (NR CGI) and optionally a neighbor cell based on query string
77       tags        : 
78         - ncrt
79       operationId : getCellNcrtInfo
80       produces  :
81         - application/json
82       responses :
83         '200' :
84           description : successful operation
85           schema      :
86             $ref : '#/definitions/neighborCellRelationTable'
87         '400' :
88           description : Non-existant identifier {cellIdentifier | neighborCellIdentifierNrpci | neighborCellIdentifierNrcgi} in request
89     put :
90       summary     : Modify neighbor cell relation based on Source Cell NR CGI and Target Cell NR PCI / NR CGI
91       tags        : 
92         - ncrt
93       operationId : modifyNCRT
94       consumes   :
95         - application/json
96       produces   :
97         - application/json
98       parameters :
99         - name        : NCRTModificationParameters
100           in          : body
101           description : Parameters to modify neighbor cell relation
102           required    : true
103           schema :
104             $ref : '#/definitions/neighborCellRelationModTable'
105       responses :
106         '200' :
107           description : Successfully modified neighbor cell relation
108         '400' :
109           description : Modification failed.
110                         { Identifier neighborCellIdentifierNrpci / neighborCellIdentifierNrcgi not provided |
111                           Non-existant identifier {cellIdentifier | neighborCellIdentifierNrpci | neighborCellIdentifierNrcgi} in request |
112                           Invalid data in body
113                         }
114     delete :
115       summary     : Delete neighbor cell relation based on Source Cell NR CGI and Target Cell NR PCI / NR CGI
116       tags        : 
117         - ncrt
118       operationId : deleteNcrt
119       parameters :
120         - name        : NCRTDeletionParameters
121           in          : body
122           description : Parameters to delete neighbor cell relation
123           required    : true
124           schema      :
125             $ref : '#/definitions/neighborCellRelationDelTable'      
126       responses :
127         '204' :
128           description : Successfully deleted neighbor cell relation
129         '400' :
130           description : Deletion failed.
131                         { Identifier neighborCellIdentifierNrpci / neighborCellIdentifierNrcgi not provided |
132                           Non-existant identifier {cellIdentifier | neighborCellIdentifierNrpci | neighborCellIdentifierNrcgi} in request
133                         }
134 parameters :
135   ggnbId :
136     type        : string
137     name        : ggnbId
138     description : Global gNodeB Identifier
139     in          : query
140   startIndex :
141     type        : string
142     name        : startIndex
143     description : Pagination Index
144     in          : query
145   limit :
146     type        : integer
147     name        : limit
148     description : Limit of results that client can handle
149     in          : query
150   cellIdentifier :
151     type        : string
152     name        : cellIdentifier
153     description : Source Cell Identifier (NR CGI)
154     in          : path
155     required    : true
156   neighborCellIdentifierNrpci :
157     type        : string
158     name        : neighborCellIdentifierNrpci
159     description : Neighbor Cell Identifier (NR PCI)
160     in          : query
161   neighborCellIdentifierNrcgi :
162     type        : string
163     name        : neighborCellIdentifierNrcgi
164     description : Neigbhor Cell Identifier (NR CGI)
165     in          : query
166 definitions :
167   neighborCellRelationTable :
168     type : object
169     properties : 
170       ncrtRelations : 
171         type   : array
172         items  :
173           $ref : '#/definitions/neighborCellRelation'
174       startIndex :
175         type        : string
176         description : Index to use in REST API to process multipage results
177         example     : 1245A:6740B
178   neighborCellRelationModTable :
179     type   : array
180     items  :
181       $ref : '#/definitions/neighborCellRelationMod'
182   neighborCellRelationDelTable :
183     type   : array
184     items  : 
185       $ref : '#/definitions/neighborCellRelationDel'
186   neighborCellRelation :
187     type  : object
188     required : 
189       - cellIdentifierNrcgi
190       - neighborCellIdentifierNrpci
191       - neighborCellIdentifierNrcgi
192       - flagNoHo
193       - flagNoXn
194       - flagNoRemove
195     properties :
196       cellIdentifierNrcgi :
197         type        : string
198         description : Source / Serving Cell Identifier (NR CGI)
199         example     : E12345
200       neighborCellIdentifierNrpci :
201         type        : string
202         description : Neighbor Cell Identifier (NR PCI)
203         example     : E12345
204       neighborCellIdentifierNrcgi :
205         type        : string
206         description : Neighbor Cell Identifier (NR CGI)
207         example     : E12345
208       flagNoHo :
209         type        : boolean
210         description : Flag for HANDOVER NOT ALLOWED
211         example     : True
212       flagNoXn :
213         type        : boolean
214         description : Flag for Xn CONNECTION NOT ALLOWED
215         example     : True
216       flagNoRemove :
217         type        : boolean
218         description : Flag for DELETION NOT ALLOWED
219         example     : True
220   neighborCellRelationMod :
221     type      : object
222     required  :
223       - neighbourCellIdentifierType
224       - action
225     properties :
226       neighbourCellIdentifierType :
227         type        : string
228         description : Neighbor Cell Identifier Type
229         enum :
230           - nrpci
231           - nrcgi
232       action :
233         type        : string
234         description : Modification action to be performed
235         enum :
236           - nrpciToNrcgiMapping
237           - flagUpdates
238           - nrcgiMappingAndFlagUpdates
239       neighborCellIdentifierNrpci :
240         type        : string
241         description : Neighbor Cell Identifier (NR PCI)
242         example     : E12345
243       neighborCellIdentifierNrcgi :
244         type        : string
245         description : Neighbor Cell Identifier (NR CGI)
246         example     : E12345
247       flagNoHo :
248         type        : boolean
249         description : Flag for HANDOVER NOT ALLOWED
250         example     : True
251       flagNoXn :
252         type        : boolean
253         description : Flag for Xn CONNECTION NOT ALLOWED
254         example     : True
255       flagNoRemove :
256         type        : boolean
257         description : Flag for DELETION NOT ALLOWED
258         example     : True
259   neighborCellRelationDel :
260     type      : object
261     required  :
262       - idType
263     properties :
264       idType :
265         type        : string
266         description : Modification action to be performed
267         enum :
268           - nrpci
269           - nrcgi
270       neighborCellIdentifierNrpci :
271         type        : string
272         description : Neighbor Cell Identifier (NR PCI)
273         example     : E12345
274       neighborCellIdentifierNrcgi :
275         type        : string
276         description : Neighbor Cell Identifier (NR PCI)
277         example     : E12345