-
Notifications
You must be signed in to change notification settings - Fork 2
/
STD_A1.yaml
258 lines (243 loc) · 7.86 KB
/
STD_A1.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
openapi: 3.0.0
info:
title: 'A1-P Policy Management Service'
version: 1.1.3
description: |
API for Policy Management Service.
© 2019, O-RAN Alliance.
All rights reserved.
externalDocs:
description: 'ORAN-WG2.A1.AP-v01.01 A1 interface: Application protocol'
url: 'https://www.o-ran.org/specifications'
servers:
- url: '{apiRoot}/A1-P/v1'
variables:
apiRoot:
default: 'https://example.com'
description: 'apiRoot as defined in clause 4.2.1 in ORAN-WG2.A1.AP'
paths:
'/policies':
get:
operationId: a1.get_all_policy_identities
description: 'Get all policy identities'
tags:
- All Policy Identities
responses:
200:
description: 'Array of all policy identities'
content:
application/json:
schema:
type: array
items:
"$ref": "#/components/schemas/PolicyId"
minItems: 0
429:
"$ref": "#/components/responses/429-TooManyRequests"
503:
"$ref": "#/components/responses/503-ServiceUnavailable"
'/policies/{policyId}':
parameters:
- name: policyId
in: path
required: true
schema:
"$ref": "#/components/schemas/PolicyId"
put:
operationId: a1.put_policy
description: 'Create, or update, a policy'
tags:
- Individual Policy Object
parameters:
- name: notificationDestination
in: query
required: false
schema:
"$ref": "#/components/schemas/NotificationDestination"
requestBody:
required: true
content:
application/json:
schema:
"$ref": "#/components/schemas/PolicyObject"
responses:
200:
description: 'The policy was updated'
content:
application/json:
schema:
"$ref": "#/components/schemas/PolicyObject"
201:
description: 'The policy was created'
content:
application/json:
schema:
"$ref": "#/components/schemas/PolicyObject"
headers:
Location:
description: 'Contains the URI of the created policy'
required: true
schema:
type: string
400:
"$ref": "#/components/responses/400-BadRequest"
409:
"$ref": "#/components/responses/409-Conflict"
429:
"$ref": "#/components/responses/429-TooManyRequests"
503:
"$ref": "#/components/responses/503-ServiceUnavailable"
507:
"$ref": "#/components/responses/507-InsufficientStorage"
callbacks:
policyStatusNotification:
'{$request.query.notificationDestination}':
post:
description: 'Notify about status changes for this policy'
requestBody:
required: true
content:
application/json:
schema:
"$ref": "#/components/schemas/PolicyStatusObject"
responses:
204:
description: 'Notification received'
get:
operationId: a1.get_policy
description: 'Query a policy'
tags:
- Individual Policy Object
responses:
200:
description: 'The requested policy'
content:
application/json:
schema:
"$ref": "#/components/schemas/PolicyObject"
404:
"$ref": "#/components/responses/404-NotFound"
409:
"$ref": "#/components/responses/409-Conflict"
429:
"$ref": "#/components/responses/429-TooManyRequests"
503:
"$ref": "#/components/responses/503-ServiceUnavailable"
delete:
operationId: a1.delete_policy
description: 'Delete a policy'
tags:
- Individual Policy Object
responses:
204:
description: 'The policy was deleted'
404:
"$ref": "#/components/responses/404-NotFound"
429:
"$ref": "#/components/responses/429-TooManyRequests"
503:
"$ref": "#/components/responses/503-ServiceUnavailable"
'/policies/{policyId}/status':
parameters:
- name: policyId
in: path
required: true
schema:
"$ref": "#/components/schemas/PolicyId"
get:
operationId: a1.get_policy_status
description: 'Query a policy status'
tags:
- Individual Policy Status Object
responses:
200:
description: 'The requested policy status'
content:
application/json:
schema:
"$ref": "#/components/schemas/PolicyStatusObject"
404:
"$ref": "#/components/responses/404-NotFound"
409:
"$ref": "#/components/responses/409-Conflict"
429:
"$ref": "#/components/responses/429-TooManyRequests"
503:
"$ref": "#/components/responses/503-ServiceUnavailable"
components:
schemas:
#
# Representation objects
#
PolicyObject:
description: 'A generic policy object that can be used to transport any policy. Additionally, a policy shall be valid according to the schema of its specific policy type.'
type: object
PolicyStatusObject:
description: 'A generic policy status object that can be used to transport any policy status. Additionally, a policy status shall be valid according to the schema of its specific policy type.'
type: object
ProblemDetails:
description: 'A problem detail to carry details in a HTTP response according to RFC 7807'
type: object
properties:
type:
type: string
title:
type: string
status:
type: number
detail:
type: string
instance:
type: string
#
# Simple data types
#
NotificationDestination:
description: 'A complete callback URI defined according to IETF RFC 3986 where to send notifications'
type: string
PolicyId:
description: 'Policy identifier assigned by the A1-P Consumer when a policy is created'
type: string
responses:
400-BadRequest:
description: 'Object in payload not properly formulated or not related to the method'
content:
application/problem+json:
schema:
"$ref": "#/components/schemas/ProblemDetails"
404-NotFound:
description: 'No resource found at the URI'
content:
application/problem+json:
schema:
"$ref": "#/components/schemas/ProblemDetails"
405-MethodNotAllowed:
description: 'Method not allowed for the URI'
content:
application/problem+json:
schema:
"$ref": "#/components/schemas/ProblemDetails"
409-Conflict:
description: 'Request could not be processed in the current state of the resource'
content:
application/problem+json:
schema:
"$ref": "#/components/schemas/ProblemDetails"
429-TooManyRequests:
description: 'Too many requests have been sent in a given amount of time'
content:
application/problem+json:
schema:
"$ref": "#/components/schemas/ProblemDetails"
503-ServiceUnavailable:
description: 'The provider is currently unable to handle the request due to a temporary overload'
content:
application/problem+json:
schema:
"$ref": "#/components/schemas/ProblemDetails"
507-InsufficientStorage:
description: 'The method could not be performed on the resource because the provider is unable to store the representation needed to successfully complete the request'
content:
application/problem+json:
schema:
"$ref": "#/components/schemas/ProblemDetails"