Update lic headers, doc titles
[ric-plt/a1.git] / a1 / openapi.yaml
1 # ==================================================================================
2 #       Copyright (c) 2019 Nokia
3 #       Copyright (c) 2018-2019 AT&T Intellectual Property.
4 #
5 #   Licensed under the Apache License, Version 2.0 (the "License");
6 #   you may not use this file except in compliance with the License.
7 #   You may obtain a copy of the License at
8 #
9 #          http://www.apache.org/licenses/LICENSE-2.0
10 #
11 #   Unless required by applicable law or agreed to in writing, software
12 #   distributed under the License is distributed on an "AS IS" BASIS,
13 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 #   See the License for the specific language governing permissions and
15 #   limitations under the License.
16 # ==================================================================================
17 openapi: 3.0.0
18 info:
19   version: 0.8.0
20   title: RIC A1
21 paths:
22   '/ric/policies/{policyname}':
23     parameters:
24       - name: policyname
25         in: path
26         description: the name of the policy to retrieve or replace
27         required: true
28         schema:
29           type: string
30     put:
31       description: >
32           Replace the current operation of policyname with the new parameters (replaces the current policy with the new one specified here).
33
34
35           Until there are standard policy definitions that are defined OUTSIDE of the scope of xapps, this API will be *very underspecified*.
36           This is a known gap, do not despair.
37           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.
38           The return content is also specified as above (in the xapp manifest) in the message_sends_payload_schema field.
39
40
41           Eventually, we need concrete policy defintions that are decoupled from xapp, and then this API description will become more fully specified.
42       tags:
43         - A1 Mediator
44       operationId: a1.controller.put_handler
45       requestBody:
46         content:
47           application/json:
48             schema:
49               type: object
50
51
52       responses:
53         '200':
54           description: >
55             The downstream component responsible for implementing this policy replied with a good response. Check the manifest for response details.
56         '400':
57           description: >
58             Bad PUT body for this policyname
59         '404':
60           description: >
61             there is no policy with this name
62         '502':
63           description: >
64             The xapp that implements this policy replied, but the reply was a "failure", OR there was no status indicating success or failure.
65             This returns an object containing the reason, and the return payload.
66           content:
67             application/json:
68               schema:
69                 type: object
70                 properties:
71                   reason:
72                     type: string
73                     enum: [
74                         "NO STATUS",
75                         "BAD STATUS",
76                         "NOT JSON"
77                     ]
78                   return_payload:
79                     type: object
80
81         '504':
82           description: >
83             the downstream component responsible for handling this policy did not respond (in time)
84
85     get:
86       description: Get the current state/value of policyname
87       tags:
88         - A1 Mediator
89       operationId: a1.controller.get_handler
90       responses:
91         '501':
92           description: >
93             "future GET support has been pondered, but this is not currently implemented"U