RIC:1060: Change in PTL
[ric-plt/a1.git] / docs / a1_xapp_contract_openapi.yaml
1 openapi: 3.0.0
2 info:
3   version: 1.0.0
4   title: Contract between A1 and RIC Xapps
5
6 components:
7   schemas:
8
9     policy_type_id:
10       description: >
11         represents a policy type identifier. Currently this is restricted to an integer range.
12       type: integer
13       minimum: 1
14       maximum: 2147483647
15
16     policy_instance_id:
17       description: >
18         represents a policy instance identifier. UUIDs are advisable but can be any string
19       type: string
20       example: "3d2157af-6a8f-4a7c-810f-38c2f824bf12"
21
22     policy_query_schema:
23       type: object
24       required:
25         - policy_type_id
26       additionalProperties: false
27       properties:
28         policy_type_id:
29           "$ref": "#/components/schemas/policy_type_id"
30
31     downstream_message_schema:
32       type: object
33       required:
34         - operation
35         - policy_type_id
36         - policy_instance_id
37         - payload
38       additionalProperties: false
39       properties:
40         operation:
41           description: the operation being performed
42           type: string
43           enum:
44             - CREATE
45             - DELETE
46             - UPDATE
47         policy_type_id:
48           "$ref": "#/components/schemas/policy_type_id"
49         policy_instance_id:
50           "$ref": "#/components/schemas/policy_instance_id"
51         payload:
52           description: payload for this operation
53           type: object
54       example:
55         operation: CREATE
56         policy_type_id: 12345678
57         policy_instance_id: 3d2157af-6a8f-4a7c-810f-38c2f824bf12
58         payload:
59           enforce: true
60           window_length: 10
61           blocking_rate: 20
62           trigger_threshold: 10
63
64     downstream_notification_schema:
65       type: object
66       required:
67         - policy_type_id
68         - policy_instance_id
69         - handler_id
70         - status
71       additionalProperties: false
72       properties:
73         policy_type_id:
74           "$ref": "#/components/schemas/policy_type_id"
75         policy_instance_id:
76           "$ref": "#/components/schemas/policy_instance_id"
77         handler_id:
78           description: >
79             id of the policy handler
80           type: string
81         status:
82           description: >
83             the status of this policy instance in this handler
84           type: string
85           enum:
86             - OK
87             - ERROR
88             - DELETED
89       example:
90         policy_type_id: 12345678
91         policy_instance_id: 3d2157af-6a8f-4a7c-810f-38c2f824bf12
92         handler_id: 1234-5678
93         status: OK