1fff00a74e5d34f2600283dabc9e9530645be5f8
[portal/ric-dashboard.git] / a1-med-client / src / main / resources / a1_mediator_0.3.0.yaml
1 # ========================LICENSE_START=================================
2 # ORAN-OSC
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 openapi: 3.0.0
19 info:
20   version: 0.3.0
21   title: RIC A1
22 paths:
23   '/ric/policies/{policyname}':
24     parameters:
25       - name: policyname
26         in: path
27         description: the name of the policy to retrieve or replace
28         required: true
29         schema:
30           type: string
31     put:
32       description: >
33           Replace the current operation of policyname with the new parameters (this replaces the current policy with the new one specified here).
34
35
36           Until there are standard policy definitions that are defined OUTSIDE of the scope of xapps, this API will be *very underspecified*.
37           This is a known gap, do not despair.
38           The PUT body is specified, *currently* in the xapp manifest that implements this policy; the caller should refer to the message_receives_payload_schema field to make this request.
39           The return content is also specified as above (in the xapp manifest) in the message_sends_payload_schema field.
40
41
42           Eventually, we need concrete policy defintions that are decoupled from xapp, and then this API description will become more fully specified.
43
44       tags:
45         - A1 Mediator
46       operationId: a1.controller.put_handler
47       requestBody:
48         content:
49           application/json:
50             schema:
51               type: object
52
53       responses:
54         '200':
55           description: >
56             The downstream component responsible for implementing this policy replied with a good response. Check the manifest for response details.
57         '400':
58           description: >
59             Bad PUT body for this policyname
60         '404':
61           description: there is no policy with this name
62         '409':
63           description: >
64             The xapp that implements this policy replied, but the reply was a "failure". This should be interpreted that the policy was NOT updated successfully.
65         '503':
66           description: >
67             the downstream component responsible for handling this policy did not respond appropriately in time
68
69     get:
70       description: Get the current state/value of policyname
71       tags:
72         - A1 Mediator
73       operationId: a1.controller.get_handler
74       responses:
75         '200':
76           description: >
77             policy state successfully retrieved.
78             TODO, what describes the format returned here?
79             content:
80               application/json:
81                 schema:
82                   type: object
83         '404':
84           description: there is no policy with this name
85