Merge "Improvement of controlpanel dashboard Fix some bugs in the backend to support...
[portal/nonrtric-controlpanel.git] / docs / api.json
1 {
2   "swagger": "2.0",
3   "info": {
4     "description": "Proxies access to Near-RT RIC.",
5     "version": "version not available",
6     "title": "Non-RT RIC Control Panel backend",
7     "termsOfService": "Terms of service",
8     "contact": {
9       "name": "Non-RT RIC Control Panel Dev Team",
10       "url": "http://no-docs-yet.org/",
11       "email": "noreply@O-RAN-SC.org"
12     },
13     "license": {
14       "name": "Apache 2.0 License",
15       "url": "http://www.apache.org/licenses/LICENSE-2.0"
16     }
17   },
18   "basePath": "/",
19   "tags": [
20     {
21       "name": "enrichment-controller",
22       "description": "Enrichment Controller"
23     },
24     {
25       "name": "html-5-paths-controller",
26       "description": "Html 5 Paths Controller"
27     },
28     {
29       "name": "policy-controller",
30       "description": "Policy Controller"
31     }
32   ],
33   "paths": {
34     "/api/enrichment/eijobs": {
35       "get": {
36         "tags": [
37           "enrichment-controller"
38         ],
39         "summary": "Get the EI job definitions for one EI producer",
40         "operationId": "getEiJobsUsingGET",
41         "produces": [
42           "application/json"
43         ],
44         "responses": {
45           "200": {
46             "description": "OK",
47             "schema": {
48               "type": "array",
49               "items": {
50                 "$ref": "#/definitions/ei_job_request"
51               }
52             }
53           },
54           "401": {
55             "description": "Unauthorized"
56           },
57           "403": {
58             "description": "Forbidden"
59           },
60           "404": {
61             "description": "Not Found"
62           }
63         },
64         "deprecated": false
65       }
66     },
67     "/api/enrichment/eiproducers": {
68       "get": {
69         "tags": [
70           "enrichment-controller"
71         ],
72         "summary": "Get EI producers",
73         "operationId": "getEiProducersUsingGET",
74         "produces": [
75           "application/json"
76         ],
77         "responses": {
78           "200": {
79             "description": "OK",
80             "schema": {
81               "type": "array",
82               "items": {
83                 "$ref": "#/definitions/ei_producer"
84               }
85             }
86           },
87           "401": {
88             "description": "Unauthorized"
89           },
90           "403": {
91             "description": "Forbidden"
92           },
93           "404": {
94             "description": "Not Found"
95           }
96         },
97         "deprecated": false
98       }
99     },
100     "/api/policy/policies": {
101       "get": {
102         "tags": [
103           "policy-controller"
104         ],
105         "summary": "Returns the policy instances for the given policy type.",
106         "operationId": "getPolicyInstancesUsingGET",
107         "produces": [
108           "application/json"
109         ],
110         "parameters": [
111           {
112             "name": "type",
113             "in": "query",
114             "description": "type",
115             "required": true,
116             "type": "string"
117           }
118         ],
119         "responses": {
120           "200": {
121             "description": "OK",
122             "schema": {
123               "type": "string"
124             }
125           },
126           "401": {
127             "description": "Unauthorized"
128           },
129           "403": {
130             "description": "Forbidden"
131           },
132           "404": {
133             "description": "Not Found"
134           }
135         },
136         "deprecated": false
137       }
138     },
139     "/api/policy/policies/{policy_instance_id}": {
140       "get": {
141         "tags": [
142           "policy-controller"
143         ],
144         "summary": "Returns a policy instance",
145         "operationId": "getPolicyInstanceUsingGET",
146         "produces": [
147           "application/json"
148         ],
149         "parameters": [
150           {
151             "name": "policy_instance_id",
152             "in": "path",
153             "description": "policy_instance_id",
154             "required": true,
155             "type": "string"
156           }
157         ],
158         "responses": {
159           "200": {
160             "description": "OK",
161             "schema": {
162               "type": "object"
163             }
164           },
165           "401": {
166             "description": "Unauthorized"
167           },
168           "403": {
169             "description": "Forbidden"
170           },
171           "404": {
172             "description": "Not Found"
173           }
174         },
175         "deprecated": false
176       },
177       "put": {
178         "tags": [
179           "policy-controller"
180         ],
181         "summary": "Creates the policy instances for the given policy type.",
182         "operationId": "putPolicyInstanceUsingPUT",
183         "consumes": [
184           "application/json"
185         ],
186         "produces": [
187           "application/json"
188         ],
189         "parameters": [
190           {
191             "in": "body",
192             "name": "instance",
193             "description": "instance",
194             "required": true,
195             "schema": {
196               "type": "string"
197             }
198           },
199           {
200             "name": "policy_instance_id",
201             "in": "path",
202             "description": "policy_instance_id",
203             "required": true,
204             "type": "string"
205           },
206           {
207             "name": "ric",
208             "in": "query",
209             "description": "ric",
210             "required": true,
211             "type": "string"
212           },
213           {
214             "name": "type",
215             "in": "query",
216             "description": "type",
217             "required": true,
218             "type": "string"
219           }
220         ],
221         "responses": {
222           "200": {
223             "description": "OK",
224             "schema": {
225               "type": "string"
226             }
227           },
228           "201": {
229             "description": "Created"
230           },
231           "401": {
232             "description": "Unauthorized"
233           },
234           "403": {
235             "description": "Forbidden"
236           },
237           "404": {
238             "description": "Not Found"
239           }
240         },
241         "deprecated": false
242       },
243       "delete": {
244         "tags": [
245           "policy-controller"
246         ],
247         "summary": "Deletes the policy instances for the given policy type.",
248         "operationId": "deletePolicyInstanceUsingDELETE",
249         "produces": [
250           "application/json"
251         ],
252         "parameters": [
253           {
254             "name": "policy_instance_id",
255             "in": "path",
256             "description": "policy_instance_id",
257             "required": true,
258             "type": "string"
259           },
260           {
261             "name": "type",
262             "in": "query",
263             "description": "type",
264             "required": true,
265             "type": "string"
266           }
267         ],
268         "responses": {
269           "200": {
270             "description": "OK",
271             "schema": {
272               "type": "string"
273             }
274           },
275           "204": {
276             "description": "No Content"
277           },
278           "401": {
279             "description": "Unauthorized"
280           },
281           "403": {
282             "description": "Forbidden"
283           }
284         },
285         "deprecated": false
286       }
287     },
288     "/api/policy/policytypes": {
289       "get": {
290         "tags": [
291           "policy-controller"
292         ],
293         "summary": "Gets the policy types from Near-RT RIC",
294         "operationId": "getAllPolicyTypesUsingGET",
295         "produces": [
296           "application/json"
297         ],
298         "responses": {
299           "200": {
300             "description": "OK",
301             "schema": {
302               "type": "string"
303             }
304           },
305           "401": {
306             "description": "Unauthorized"
307           },
308           "403": {
309             "description": "Forbidden"
310           },
311           "404": {
312             "description": "Not Found"
313           }
314         },
315         "deprecated": false
316       }
317     },
318     "/api/policy/rics": {
319       "get": {
320         "tags": [
321           "policy-controller"
322         ],
323         "summary": "Returns the rics supporting the given policy type.",
324         "operationId": "getRicsSupportingTypeUsingGET",
325         "produces": [
326           "application/json"
327         ],
328         "parameters": [
329           {
330             "name": "policyType",
331             "in": "query",
332             "description": "policyType",
333             "required": true,
334             "type": "string"
335           }
336         ],
337         "responses": {
338           "200": {
339             "description": "OK",
340             "schema": {
341               "type": "string"
342             }
343           },
344           "401": {
345             "description": "Unauthorized"
346           },
347           "403": {
348             "description": "Forbidden"
349           },
350           "404": {
351             "description": "Not Found"
352           }
353         },
354         "deprecated": false
355       }
356     },
357     "/policy": {
358       "get": {
359         "tags": [
360           "html-5-paths-controller"
361         ],
362         "summary": "forwardAngularRoutes",
363         "operationId": "forwardAngularRoutesUsingGET",
364         "produces": [
365           "*/*"
366         ],
367         "responses": {
368           "200": {
369             "description": "OK"
370           },
371           "401": {
372             "description": "Unauthorized"
373           },
374           "403": {
375             "description": "Forbidden"
376           },
377           "404": {
378             "description": "Not Found"
379           }
380         },
381         "deprecated": false
382       }
383     }
384   },
385   "definitions": {
386     "ei_job_request": {
387       "type": "object",
388       "required": [
389         "ei_job_identity"
390       ],
391       "properties": {
392         "ei_job_data": {
393           "type": "object",
394           "description": "Json for the job data"
395         },
396         "ei_job_identity": {
397           "type": "string",
398           "description": "Identity of the EI job"
399         },
400         "ei_type_identity": {
401           "type": "string",
402           "description": "Type identity for the job"
403         },
404         "owner": {
405           "type": "string",
406           "description": "The owner of the job"
407         },
408         "target_uri": {
409           "type": "string",
410           "description": "URI for the target of the EI"
411         }
412       },
413       "title": "ei_job_request",
414       "description": "The EI job"
415     },
416     "ei_producer": {
417       "type": "object",
418       "required": [
419         "ei_producer_id",
420         "ei_producer_types",
421         "status"
422       ],
423       "properties": {
424         "ei_producer_id": {
425           "type": "string",
426           "description": "Idenitity of the EI producer"
427         },
428         "ei_producer_types": {
429           "type": "array",
430           "description": "Types provided by the EI producer",
431           "items": {
432             "type": "string"
433           }
434         },
435         "status": {
436           "type": "string",
437           "description": "Status of the EI producer"
438         }
439       },
440       "title": "ei_producer",
441       "description": "The EI producer"
442     }
443   }
444 }