Initial commit of A1
[ric-plt/a1.git] / a1 / openapi.yaml
1 openapi: 3.0.0
2 info:
3   version: 0.8.0
4   title: RIC A1
5 paths:
6   '/ric/policies/{policyname}':
7     parameters:
8       - name: policyname
9         in: path
10         description: the name of the policy to retrieve or replace
11         required: true
12         schema:
13           type: string
14     put:
15       description: >
16           Replace the current operation of policyname with the new parameters (replaces the current policy with the new one specified here).
17
18
19           Until there are standard policy definitions that are defined OUTSIDE of the scope of xapps, this API will be *very underspecified*.
20           This is a known gap, do not despair.
21           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.
22           The return content is also specified as above (in the xapp manifest) in the message_sends_payload_schema field.
23
24
25           Eventually, we need concrete policy defintions that are decoupled from xapp, and then this API description will become more fully specified.
26       tags:
27         - A1 Mediator
28       operationId: a1.controller.put_handler
29       requestBody:
30         content:
31           application/json:
32             schema:
33               type: object
34
35
36       responses:
37         '200':
38           description: >
39             The downstream component responsible for implementing this policy replied with a good response. Check the manifest for response details.
40         '400':
41           description: >
42             Bad PUT body for this policyname
43         '404':
44           description: >
45             there is no policy with this name
46         '502':
47           description: >
48             The xapp that implements this policy replied, but the reply was a "failure", OR there was no status indicating success or failure.
49             This returns an object containing the reason, and the return payload.
50           content:
51             application/json:
52               schema:
53                 type: object
54                 properties:
55                   reason:
56                     type: string
57                     enum: [
58                         "NO STATUS",
59                         "BAD STATUS",
60                         "NOT JSON"
61                     ]
62                   return_payload:
63                     type: object
64
65         '504':
66           description: >
67             the downstream component responsible for handling this policy did not respond (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         '501':
76           description: >
77             "future GET support has been pondered, but this is not currently implemented"U