blob: 5c5915c5b227b145670267437bf6c58f492e79e5 [file] [log] [blame]
PatrikBuhr1122b012021-01-20 12:21:52 +01001{
PatrikBuhrfee99552021-02-02 14:06:44 +01002 "components": {"schemas": {
PatrikBuhr1122b012021-01-20 12:21:52 +01003 "error_information": {
4 "description": "Problem as defined in https://tools.ietf.org/html/rfc7807",
5 "type": "object",
PatrikBuhr1122b012021-01-20 12:21:52 +01006 "properties": {
7 "detail": {
8 "description": " A human-readable explanation specific to this occurrence of the problem.",
9 "type": "string",
10 "example": "Policy type not found"
11 },
12 "status": {
13 "format": "int32",
14 "description": "The HTTP status code generated by the origin server for this occurrence of the problem. ",
15 "type": "integer",
PatrikBuhr3b916e42021-10-07 18:03:53 +020016 "example": 404
PatrikBuhr1122b012021-01-20 12:21:52 +010017 }
18 }
19 },
PatrikBuhrfee99552021-02-02 14:06:44 +010020 "void": {
21 "description": "Void/empty",
22 "type": "object"
23 },
PatrikBuhr1122b012021-01-20 12:21:52 +010024 "status_info_v2": {
25 "type": "object",
PatrikBuhr1122b012021-01-20 12:21:52 +010026 "properties": {"status": {
27 "description": "status text",
28 "type": "string"
29 }}
30 },
PatrikBuhrfee99552021-02-02 14:06:44 +010031 "ric_info_v2": {
32 "description": "Information for a Near-RT RIC",
PatrikBuhr1122b012021-01-20 12:21:52 +010033 "type": "object",
PatrikBuhrfee99552021-02-02 14:06:44 +010034 "properties": {
35 "ric_id": {
36 "description": "identity of the Near-RT RIC",
37 "type": "string"
38 },
39 "managed_element_ids": {
40 "description": "O1 identities for managed entities",
41 "type": "array",
42 "items": {
43 "description": "O1 identities for managed entities",
44 "type": "string"
45 }
46 },
47 "state": {
48 "description": "Represents the states for a Near-RT RIC",
49 "type": "string",
50 "enum": [
51 "UNAVAILABLE",
52 "AVAILABLE",
53 "SYNCHRONIZING",
54 "CONSISTENCY_CHECK"
55 ]
56 },
57 "policytype_ids": {
58 "description": "supported policy types",
59 "type": "array",
60 "items": {
61 "description": "supported policy types",
62 "type": "string"
63 }
64 }
65 }
PatrikBuhr1122b012021-01-20 12:21:52 +010066 },
67 "service_registration_info_v2": {
68 "description": "Information for one service",
69 "type": "object",
PatrikBuhr1122b012021-01-20 12:21:52 +010070 "required": ["service_id"],
71 "properties": {
72 "callback_url": {
73 "description": "callback for notifying of Near-RT RIC state changes",
74 "type": "string"
75 },
76 "service_id": {
77 "description": "identity of the service",
78 "type": "string"
79 },
80 "keep_alive_interval_seconds": {
81 "format": "int64",
JohnKeeney08486cf2022-05-24 12:34:49 +010082 "description": "keep alive interval for the service. This is used to enable optional heartbeat supervision of the service. If set (> 0) the registered service should regularly invoke a 'keepalive' REST call. When a service fails to invoke this 'keepalive' call within the configured time, the service is considered unavailable. An unavailable service will be automatically deregistered and its policies will be deleted. Value 0 means timeout supervision is disabled.",
PatrikBuhr1122b012021-01-20 12:21:52 +010083 "type": "integer"
84 }
85 }
86 },
PatrikBuhrfee99552021-02-02 14:06:44 +010087 "policy_info_list_v2": {
88 "description": "List of policy information",
89 "type": "object",
90 "properties": {"policies": {
91 "description": "List of policy information",
92 "type": "array",
93 "items": {"$ref": "#/components/schemas/policy_info_v2"}
94 }}
95 },
PatrikBuhr1122b012021-01-20 12:21:52 +010096 "policy_status_info_v2": {
97 "description": "Status for one A1-P Policy",
98 "type": "object",
PatrikBuhr1122b012021-01-20 12:21:52 +010099 "properties": {
100 "last_modified": {
101 "description": "timestamp, last modification time",
102 "type": "string"
103 },
104 "status": {
105 "description": "the Policy status",
106 "type": "object"
107 }
108 }
109 },
PatrikBuhr1122b012021-01-20 12:21:52 +0100110 "service_status_v2": {
PatrikBuhrfee99552021-02-02 14:06:44 +0100111 "description": "List of service information",
PatrikBuhr1122b012021-01-20 12:21:52 +0100112 "type": "object",
PatrikBuhr1122b012021-01-20 12:21:52 +0100113 "properties": {
114 "callback_url": {
115 "description": "callback for notifying of RIC synchronization",
116 "type": "string"
117 },
118 "service_id": {
119 "description": "identity of the service",
120 "type": "string"
121 },
122 "keep_alive_interval_seconds": {
123 "format": "int64",
124 "description": "policy keep alive timeout",
125 "type": "integer"
126 },
127 "time_since_last_activity_seconds": {
128 "format": "int64",
129 "description": "time since last invocation by the service",
130 "type": "integer"
131 }
132 }
133 },
PatrikBuhrfee99552021-02-02 14:06:44 +0100134 "ric_info_list_v2": {
135 "description": "List of Near-RT RIC information",
136 "type": "object",
137 "properties": {"rics": {
138 "description": "List of Near-RT RIC information",
139 "type": "array",
140 "items": {"$ref": "#/components/schemas/ric_info_v2"}
141 }}
142 },
PatrikBuhr1122b012021-01-20 12:21:52 +0100143 "policytype_v2": {
144 "description": "Policy type",
145 "type": "object",
PatrikBuhr1122b012021-01-20 12:21:52 +0100146 "properties": {"policy_schema": {
JohnKeeney069b4692022-05-12 22:15:14 +0100147 "description": "Policy type json schema. The schema is a json object following http://json-schema.org/draft-07/schema",
PatrikBuhr1122b012021-01-20 12:21:52 +0100148 "type": "object"
149 }}
150 },
PatrikBuhr1122b012021-01-20 12:21:52 +0100151 "policytype_id_list_v2": {
152 "description": "Information about policy types",
153 "type": "object",
PatrikBuhr1122b012021-01-20 12:21:52 +0100154 "properties": {"policytype_ids": {
155 "description": "Policy type identities",
156 "type": "array",
PatrikBuhrfee99552021-02-02 14:06:44 +0100157 "items": {
158 "description": "Policy type identities",
159 "type": "string"
160 }
PatrikBuhr1122b012021-01-20 12:21:52 +0100161 }}
162 },
163 "policy_info_v2": {
164 "description": "Information for one A1-P Policy",
165 "type": "object",
PatrikBuhr1122b012021-01-20 12:21:52 +0100166 "required": [
167 "policy_data",
168 "policy_id",
169 "policytype_id",
170 "ric_id",
171 "service_id"
172 ],
173 "properties": {
174 "ric_id": {
175 "description": "identity of the target Near-RT RIC",
176 "type": "string"
177 },
178 "policy_id": {
179 "description": "identity of the policy",
180 "type": "string"
181 },
182 "transient": {
183 "description": "if true, the policy is deleted at RIC restart. If false, its value is maintained by this service until explicitly deleted. Default false.",
184 "type": "boolean"
185 },
186 "service_id": {
PatrikBuhr3b916e42021-10-07 18:03:53 +0200187 "description": "the identity of the service owning the policy",
PatrikBuhr1122b012021-01-20 12:21:52 +0100188 "type": "string"
189 },
190 "policy_data": {
191 "description": "the configuration of the policy",
192 "type": "object"
193 },
194 "status_notification_uri": {
195 "description": "Callback URI for policy status updates",
196 "type": "string"
197 },
198 "policytype_id": {
199 "description": "identity of the policy type",
200 "type": "string"
201 }
202 }
203 },
PatrikBuhrfee99552021-02-02 14:06:44 +0100204 "policy_id_list_v2": {
205 "description": "A list of policy identities",
206 "type": "object",
207 "properties": {"policy_ids": {
208 "description": "Policy identities",
209 "type": "array",
210 "items": {
211 "description": "Policy identities",
212 "type": "string"
213 }
214 }}
215 },
PatrikBuhr1122b012021-01-20 12:21:52 +0100216 "service_list_v2": {
217 "description": "List of service information",
218 "type": "object",
PatrikBuhr1122b012021-01-20 12:21:52 +0100219 "properties": {"service_list": {
220 "description": "List of service information",
221 "type": "array",
PatrikBuhrfee99552021-02-02 14:06:44 +0100222 "items": {"$ref": "#/components/schemas/service_status_v2"}
PatrikBuhr1122b012021-01-20 12:21:52 +0100223 }}
224 },
225 "service_callback_info_v2": {
226 "description": "Information transferred as in Service callbacks (callback_url)",
227 "type": "object",
PatrikBuhr1122b012021-01-20 12:21:52 +0100228 "required": [
229 "event_type",
230 "ric_id"
231 ],
232 "properties": {
233 "ric_id": {
234 "description": "identity of a Near-RT RIC",
235 "type": "string"
236 },
237 "event_type": {
238 "description": "values:\nAVAILABLE: the Near-RT RIC has become available for A1 Policy management",
239 "type": "string",
240 "enum": ["AVAILABLE"]
241 }
242 }
PatrikBuhr2b277642021-12-27 11:32:58 +0100243 },
244 "Link": {
245 "type": "object",
246 "properties": {
247 "templated": {"type": "boolean"},
248 "href": {"type": "string"}
249 }
PatrikBuhr1122b012021-01-20 12:21:52 +0100250 }
PatrikBuhrfee99552021-02-02 14:06:44 +0100251 }},
252 "openapi": "3.0.1",
253 "paths": {
PatrikBuhrfee99552021-02-02 14:06:44 +0100254 "/a1-policy/v2/policy-instances": {"get": {
255 "summary": "Query for A1 policy instances",
256 "description": "Returns a list of A1 policies matching given search criteria. <br>If several query parameters are defined, the policies matching all conditions are returned.",
257 "operationId": "getPolicyInstances",
258 "responses": {
259 "200": {
260 "description": "Policies",
261 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/policy_info_list_v2"}}}
262 },
263 "404": {
264 "description": "Near-RT RIC, policy type or service not found",
265 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
266 }
267 },
268 "parameters": [
269 {
270 "schema": {"type": "string"},
271 "in": "query",
272 "name": "policytype_id",
PatrikBuhr3b916e42021-10-07 18:03:53 +0200273 "description": "Select policies with a given type identity.",
PatrikBuhrfee99552021-02-02 14:06:44 +0100274 "required": false
275 },
276 {
277 "schema": {"type": "string"},
278 "in": "query",
279 "name": "ric_id",
PatrikBuhr3b916e42021-10-07 18:03:53 +0200280 "description": "Select policies for a given Near-RT RIC identity.",
PatrikBuhrfee99552021-02-02 14:06:44 +0100281 "required": false
282 },
283 {
284 "schema": {"type": "string"},
285 "in": "query",
286 "name": "service_id",
PatrikBuhr3b916e42021-10-07 18:03:53 +0200287 "description": "Select policies owned by a given service.",
288 "required": false
289 },
290 {
291 "schema": {"type": "string"},
292 "in": "query",
293 "name": "type_name",
294 "description": "Select policies of a given type name (type identity has the format <typename_version>)",
PatrikBuhrfee99552021-02-02 14:06:44 +0100295 "required": false
296 }
297 ],
298 "tags": ["A1 Policy Management"]
299 }},
PatrikBuhrde7a5732022-03-31 12:08:56 +0200300 "/actuator/threaddump": {"get": {
301 "summary": "Actuator web endpoint 'threaddump'",
302 "operationId": "threaddump_2",
303 "responses": {"200": {
304 "description": "OK",
305 "content": {"*/*": {"schema": {"type": "object"}}}
306 }},
307 "tags": ["Actuator"]
308 }},
PatrikBuhrfee99552021-02-02 14:06:44 +0100309 "/a1-policy/v2/status": {"get": {
310 "summary": "Returns status and statistics of this service",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100311 "operationId": "getStatus",
PatrikBuhrfee99552021-02-02 14:06:44 +0100312 "responses": {"200": {
313 "description": "Service is living",
314 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/status_info_v2"}}}
315 }},
316 "tags": ["Health Check"]
317 }},
PatrikBuhrde7a5732022-03-31 12:08:56 +0200318 "/actuator/loggers": {"get": {
319 "summary": "Actuator web endpoint 'loggers'",
320 "operationId": "loggers",
321 "responses": {"200": {
322 "description": "OK",
323 "content": {"*/*": {"schema": {"type": "object"}}}
324 }},
325 "tags": ["Actuator"]
326 }},
327 "/actuator/health/**": {"get": {
328 "summary": "Actuator web endpoint 'health-path'",
329 "operationId": "health-path",
PatrikBuhr2b277642021-12-27 11:32:58 +0100330 "responses": {"200": {
331 "description": "OK",
332 "content": {"*/*": {"schema": {"type": "object"}}}
333 }},
334 "tags": ["Actuator"]
335 }},
PatrikBuhrfee99552021-02-02 14:06:44 +0100336 "/a1-policy/v2/rics/ric": {"get": {
337 "summary": "Returns info for one Near-RT RIC",
JohnKeeney069b4692022-05-12 22:15:14 +0100338 "description": "Either a Near-RT RIC identity or a Managed Element identity can be specified.<br>The intention with Managed Element identity is the ID used in O1 for accessing the traffical element (such as the ID of CU).",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100339 "operationId": "getRic",
PatrikBuhrfee99552021-02-02 14:06:44 +0100340 "responses": {
341 "200": {
342 "description": "Near-RT RIC is found",
343 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ric_info_v2"}}}
344 },
345 "404": {
346 "description": "Near-RT RIC is not found",
347 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
348 }
349 },
350 "parameters": [
351 {
352 "schema": {"type": "string"},
353 "in": "query",
354 "name": "managed_element_id",
355 "description": "The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned.",
356 "required": false
357 },
358 {
359 "schema": {"type": "string"},
360 "in": "query",
361 "name": "ric_id",
362 "description": "The identity of a Near-RT RIC to get information for.",
363 "required": false
364 }
365 ],
366 "tags": ["NearRT-RIC Repository"]
367 }},
368 "/a1-policy/v2/policy-types": {"get": {
369 "summary": "Query policy type identities",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100370 "operationId": "getPolicyTypes",
PatrikBuhrfee99552021-02-02 14:06:44 +0100371 "responses": {
372 "200": {
373 "description": "Policy type IDs",
374 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/policytype_id_list_v2"}}}
375 },
376 "404": {
377 "description": "Near-RT RIC is not found",
378 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
379 }
380 },
PatrikBuhr3b916e42021-10-07 18:03:53 +0200381 "parameters": [
382 {
383 "schema": {"type": "string"},
384 "in": "query",
385 "name": "ric_id",
386 "description": "Select types for the given Near-RT RIC identity.",
387 "required": false
388 },
389 {
390 "schema": {"type": "string"},
391 "in": "query",
392 "name": "type_name",
393 "description": "Select types with the given type name (type identity has the format <typename_version>)",
394 "required": false
395 },
396 {
397 "schema": {"type": "string"},
398 "in": "query",
PatrikBuhr3b916e42021-10-07 18:03:53 +0200399 "name": "compatible_with_version",
PatrikBuhrc1b62222021-12-28 13:07:14 +0100400 "description": "Select types that are compatible with the given version. This parameter is only applicable in conjunction with type_name. As an example version 1.9.1 is compatible with 1.0.0 but not the other way around. Matching types will be returned sorted in ascending order.",
PatrikBuhr3b916e42021-10-07 18:03:53 +0200401 "required": false
402 }
403 ],
PatrikBuhrfee99552021-02-02 14:06:44 +0100404 "tags": ["A1 Policy Management"]
405 }},
406 "/a1-policy/v2/policies/{policy_id}": {
407 "get": {
408 "summary": "Returns a policy",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100409 "operationId": "getPolicy",
PatrikBuhrfee99552021-02-02 14:06:44 +0100410 "responses": {
411 "200": {
412 "description": "Policy found",
413 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/policy_info_v2"}}}
414 },
415 "404": {
416 "description": "Policy is not found",
417 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
418 }
419 },
420 "parameters": [{
421 "schema": {"type": "string"},
422 "in": "path",
423 "name": "policy_id",
424 "required": true
425 }],
426 "tags": ["A1 Policy Management"]
427 },
428 "delete": {
429 "summary": "Delete a policy",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100430 "operationId": "deletePolicy",
PatrikBuhrfee99552021-02-02 14:06:44 +0100431 "responses": {
432 "200": {
433 "description": "Not used",
434 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/void"}}}
435 },
436 "423": {
437 "description": "Near-RT RIC is not operational",
438 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
439 },
440 "204": {
441 "description": "Policy deleted",
442 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/void"}}}
443 },
444 "404": {
445 "description": "Policy is not found",
446 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
447 }
448 },
449 "parameters": [{
450 "schema": {"type": "string"},
451 "in": "path",
452 "name": "policy_id",
453 "required": true
454 }],
455 "tags": ["A1 Policy Management"]
456 }
457 },
PatrikBuhr2b277642021-12-27 11:32:58 +0100458 "/actuator/metrics/{requiredMetricName}": {"get": {
459 "summary": "Actuator web endpoint 'metrics-requiredMetricName'",
PatrikBuhrde7a5732022-03-31 12:08:56 +0200460 "operationId": "metrics-requiredMetricName",
PatrikBuhr2b277642021-12-27 11:32:58 +0100461 "responses": {"200": {
462 "description": "OK",
463 "content": {"*/*": {"schema": {"type": "object"}}}
464 }},
465 "parameters": [{
466 "schema": {"type": "string"},
467 "in": "path",
468 "name": "requiredMetricName",
469 "required": true
470 }],
471 "tags": ["Actuator"]
472 }},
PatrikBuhrfee99552021-02-02 14:06:44 +0100473 "/a1-policy/v2/configuration": {
474 "get": {
PatrikBuhr0f8b2052021-12-20 13:40:14 +0100475 "summary": "Returns the contents of the application configuration file",
PatrikBuhrfee99552021-02-02 14:06:44 +0100476 "operationId": "getConfiguration",
477 "responses": {
478 "200": {
479 "description": "Configuration",
480 "content": {"application/json": {"schema": {"type": "object"}}}
481 },
482 "404": {
483 "description": "File is not found or readable",
484 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
485 }
486 },
487 "tags": ["Management of configuration"]
488 },
489 "put": {
490 "summary": "Replace the current configuration file with the given configuration",
491 "requestBody": {
492 "content": {"application/json": {"schema": {"type": "object"}}},
493 "required": true
494 },
PatrikBuhrfee99552021-02-02 14:06:44 +0100495 "operationId": "putConfiguration",
496 "responses": {
497 "200": {
498 "description": "Configuration updated",
499 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/void"}}}
500 },
501 "400": {
502 "description": "Invalid configuration provided",
503 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
504 },
505 "500": {
506 "description": "Something went wrong when replacing the configuration. Try again.",
507 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
508 }
509 },
510 "tags": ["Management of configuration"]
511 }
512 },
PatrikBuhr2b277642021-12-27 11:32:58 +0100513 "/actuator": {"get": {
514 "summary": "Actuator root web endpoint",
PatrikBuhrde7a5732022-03-31 12:08:56 +0200515 "operationId": "links",
PatrikBuhr2b277642021-12-27 11:32:58 +0100516 "responses": {"200": {
517 "description": "OK",
518 "content": {"*/*": {"schema": {
519 "additionalProperties": {
520 "additionalProperties": {"$ref": "#/components/schemas/Link"},
521 "type": "object"
522 },
523 "type": "object"
524 }}}
525 }},
526 "tags": ["Actuator"]
527 }},
PatrikBuhr2b277642021-12-27 11:32:58 +0100528 "/actuator/loggers/{name}": {
529 "post": {
530 "summary": "Actuator web endpoint 'loggers-name'",
PatrikBuhrde7a5732022-03-31 12:08:56 +0200531 "operationId": "loggers-name",
PatrikBuhr2b277642021-12-27 11:32:58 +0100532 "responses": {"200": {
533 "description": "OK",
534 "content": {"*/*": {"schema": {"type": "object"}}}
535 }},
536 "parameters": [{
537 "schema": {"type": "string"},
538 "in": "path",
539 "name": "name",
540 "required": true
541 }],
542 "tags": ["Actuator"]
543 },
544 "get": {
545 "summary": "Actuator web endpoint 'loggers-name'",
PatrikBuhrde7a5732022-03-31 12:08:56 +0200546 "operationId": "loggers-name_2",
PatrikBuhr2b277642021-12-27 11:32:58 +0100547 "responses": {"200": {
548 "description": "OK",
549 "content": {"*/*": {"schema": {"type": "object"}}}
550 }},
551 "parameters": [{
552 "schema": {"type": "string"},
553 "in": "path",
554 "name": "name",
555 "required": true
556 }],
557 "tags": ["Actuator"]
558 }
559 },
PatrikBuhrfee99552021-02-02 14:06:44 +0100560 "/a1-policy/v2/services/{service_id}/keepalive": {"put": {
561 "summary": "Heartbeat indicates that the service is running",
JohnKeeney08486cf2022-05-24 12:34:49 +0100562 "description": "A registered service should invoke this operation regularly to indicate that it is still alive. If a registered service fails to invoke this operation before the end of a timeout period the service will be deregistered and all its A1 policies wil be removed. (This timeout can be set or disabled when each service is initially registered)",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100563 "operationId": "keepAliveService",
PatrikBuhrfee99552021-02-02 14:06:44 +0100564 "responses": {
565 "200": {
566 "description": "Service supervision timer refreshed, OK",
567 "content": {"*/*": {"schema": {"type": "object"}}}
568 },
569 "404": {
570 "description": "The service is not found, needs re-registration",
571 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
572 }
573 },
574 "parameters": [{
575 "schema": {"type": "string"},
576 "in": "path",
577 "name": "service_id",
578 "required": true
579 }],
580 "tags": ["Service Registry and Supervision"]
581 }},
PatrikBuhr2b277642021-12-27 11:32:58 +0100582 "/actuator/metrics": {"get": {
583 "summary": "Actuator web endpoint 'metrics'",
PatrikBuhrde7a5732022-03-31 12:08:56 +0200584 "operationId": "metrics",
PatrikBuhr2b277642021-12-27 11:32:58 +0100585 "responses": {"200": {
586 "description": "OK",
587 "content": {"*/*": {"schema": {"type": "object"}}}
588 }},
589 "tags": ["Actuator"]
590 }},
PatrikBuhrfee99552021-02-02 14:06:44 +0100591 "/a1-policy/v2/rics": {"get": {
592 "summary": "Query Near-RT RIC information",
593 "description": "The call returns all Near-RT RICs that supports a given policy type identity",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100594 "operationId": "getRics",
PatrikBuhrfee99552021-02-02 14:06:44 +0100595 "responses": {
596 "200": {
597 "description": "OK",
598 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ric_info_list_v2"}}}
599 },
600 "404": {
601 "description": "Policy type is not found",
602 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
603 }
604 },
605 "parameters": [{
606 "schema": {"type": "string"},
607 "in": "query",
608 "name": "policytype_id",
PatrikBuhr0f8b2052021-12-20 13:40:14 +0100609 "description": "The identity of a policy type. If given, all Near-RT RICs supporting the policy type are returned",
PatrikBuhrfee99552021-02-02 14:06:44 +0100610 "required": false
611 }],
612 "tags": ["NearRT-RIC Repository"]
613 }},
PatrikBuhrfee99552021-02-02 14:06:44 +0100614 "/a1-policy/v2/services": {
615 "get": {
616 "summary": "Returns service information",
617 "description": "Either information about a registered service with given identity or all registered services are returned.",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100618 "operationId": "getServices",
PatrikBuhrfee99552021-02-02 14:06:44 +0100619 "responses": {
620 "200": {
621 "description": "OK",
622 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/service_list_v2"}}}
623 },
624 "404": {
625 "description": "Service is not found",
626 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
627 }
628 },
629 "parameters": [{
630 "schema": {"type": "string"},
631 "in": "query",
632 "name": "service_id",
633 "description": "The identity of the service",
634 "required": false
635 }],
636 "tags": ["Service Registry and Supervision"]
637 },
638 "put": {
639 "summary": "Register a service",
640 "requestBody": {
641 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/service_registration_info_v2"}}},
642 "required": true
643 },
644 "description": "Registering a service is needed to:<ul><li>Get callbacks.<\/li><li>Activate supervision of the service. If a service is inactive, its policies will be deleted.<\/li><\/ul>",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100645 "operationId": "putService",
PatrikBuhrfee99552021-02-02 14:06:44 +0100646 "responses": {
647 "200": {
648 "description": "Service updated",
649 "content": {"*/*": {"schema": {"type": "object"}}}
650 },
651 "201": {
652 "description": "Service created",
653 "content": {"*/*": {"schema": {"type": "object"}}}
654 },
655 "400": {
656 "description": "The ServiceRegistrationInfo is not accepted",
657 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
658 }
659 },
660 "tags": ["Service Registry and Supervision"]
661 }
662 },
PatrikBuhr2b277642021-12-27 11:32:58 +0100663 "/actuator/info": {"get": {
664 "summary": "Actuator web endpoint 'info'",
PatrikBuhrde7a5732022-03-31 12:08:56 +0200665 "operationId": "info",
PatrikBuhr2b277642021-12-27 11:32:58 +0100666 "responses": {"200": {
667 "description": "OK",
668 "content": {"*/*": {"schema": {"type": "object"}}}
669 }},
670 "tags": ["Actuator"]
671 }},
PatrikBuhrfee99552021-02-02 14:06:44 +0100672 "/status": {"get": {
673 "summary": "Returns status and statistics of this service",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100674 "operationId": "getStatusV1",
PatrikBuhrfee99552021-02-02 14:06:44 +0100675 "responses": {"200": {
676 "description": "Service is living",
677 "content": {"*/*": {"schema": {"type": "string"}}}
678 }},
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100679 "tags": ["Health Check"]
PatrikBuhrfee99552021-02-02 14:06:44 +0100680 }},
681 "/a1-policy/v2/policy-types/{policytype_id}": {"get": {
682 "summary": "Returns a policy type definition",
683 "operationId": "getPolicyType",
684 "responses": {
685 "200": {
686 "description": "Policy type",
687 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/policytype_v2"}}}
688 },
689 "404": {
690 "description": "Policy type is not found",
691 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
692 }
693 },
694 "parameters": [{
695 "schema": {"type": "string"},
696 "in": "path",
697 "name": "policytype_id",
698 "required": true
699 }],
700 "tags": ["A1 Policy Management"]
701 }},
PatrikBuhr2b277642021-12-27 11:32:58 +0100702 "/actuator/logfile": {"get": {
703 "summary": "Actuator web endpoint 'logfile'",
PatrikBuhrde7a5732022-03-31 12:08:56 +0200704 "operationId": "logfile",
PatrikBuhr2b277642021-12-27 11:32:58 +0100705 "responses": {"200": {
706 "description": "OK",
707 "content": {"*/*": {"schema": {"type": "object"}}}
708 }},
709 "tags": ["Actuator"]
710 }},
711 "/actuator/health": {"get": {
712 "summary": "Actuator web endpoint 'health'",
PatrikBuhrde7a5732022-03-31 12:08:56 +0200713 "operationId": "health",
PatrikBuhr2b277642021-12-27 11:32:58 +0100714 "responses": {"200": {
715 "description": "OK",
716 "content": {"*/*": {"schema": {"type": "object"}}}
717 }},
718 "tags": ["Actuator"]
719 }},
PatrikBuhrfee99552021-02-02 14:06:44 +0100720 "/a1-policy/v2/policies": {
721 "get": {
722 "summary": "Query policy identities",
723 "description": "Returns a list of A1 policies matching given search criteria. <br>If several query parameters are defined, the policies matching all conditions are returned.",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100724 "operationId": "getPolicyIds",
PatrikBuhrfee99552021-02-02 14:06:44 +0100725 "responses": {
726 "200": {
727 "description": "Policy identities",
728 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/policy_id_list_v2"}}}
729 },
730 "404": {
731 "description": "Near-RT RIC or type not found",
732 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
733 }
734 },
735 "parameters": [
736 {
737 "schema": {"type": "string"},
738 "in": "query",
739 "name": "policytype_id",
PatrikBuhr3b916e42021-10-07 18:03:53 +0200740 "description": "Select policies of a given policy type identity.",
PatrikBuhrfee99552021-02-02 14:06:44 +0100741 "required": false
742 },
743 {
744 "schema": {"type": "string"},
745 "in": "query",
746 "name": "ric_id",
PatrikBuhr3b916e42021-10-07 18:03:53 +0200747 "description": "Select policies of a given Near-RT RIC identity.",
PatrikBuhrfee99552021-02-02 14:06:44 +0100748 "required": false
749 },
750 {
751 "schema": {"type": "string"},
752 "in": "query",
753 "name": "service_id",
PatrikBuhr3b916e42021-10-07 18:03:53 +0200754 "description": "Select policies owned by a given service.",
755 "required": false
756 },
757 {
758 "schema": {"type": "string"},
759 "in": "query",
760 "name": "type_name",
761 "description": "Select policies of types with the given type name (type identity has the format <typename_version>)",
PatrikBuhrfee99552021-02-02 14:06:44 +0100762 "required": false
763 }
764 ],
765 "tags": ["A1 Policy Management"]
766 },
767 "put": {
768 "summary": "Create or update a policy",
769 "requestBody": {
770 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/policy_info_v2"}}},
771 "required": true
772 },
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100773 "operationId": "putPolicy",
PatrikBuhrfee99552021-02-02 14:06:44 +0100774 "responses": {
775 "200": {
776 "description": "Policy updated",
777 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/void"}}}
778 },
779 "201": {
780 "description": "Policy created",
781 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/void"}}}
782 },
783 "423": {
784 "description": "Near-RT RIC is not operational",
785 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
786 },
787 "404": {
788 "description": "Near-RT RIC or policy type is not found",
789 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
790 }
791 },
792 "tags": ["A1 Policy Management"]
793 }
794 },
795 "/r-app/near-rt-ric-status": {"post": {
796 "summary": "Callback for Near-RT RIC status",
797 "requestBody": {
798 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/service_callback_info_v2"}}},
799 "required": true
800 },
JohnKeeney069b4692022-05-12 22:15:14 +0100801 "description": "The URL to this call is registered at Service registration.",
PatrikBuhr25d78502021-04-28 08:42:13 +0200802 "operationId": "serviceCallback",
PatrikBuhrfee99552021-02-02 14:06:44 +0100803 "responses": {"200": {
804 "description": "OK",
805 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/void"}}}
806 }},
807 "tags": ["Callbacks"]
808 }},
PatrikBuhrfee99552021-02-02 14:06:44 +0100809 "/a1-policy/v2/services/{service_id}": {"delete": {
810 "summary": "Unregister a service",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100811 "operationId": "deleteService",
PatrikBuhrfee99552021-02-02 14:06:44 +0100812 "responses": {
813 "200": {
814 "description": "Not used",
815 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/void"}}}
816 },
817 "204": {
818 "description": "Service unregistered",
819 "content": {"*/*": {"schema": {"type": "object"}}}
820 },
821 "404": {
822 "description": "Service not found",
823 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
824 }
825 },
826 "parameters": [{
827 "schema": {"type": "string"},
828 "in": "path",
829 "name": "service_id",
830 "required": true
831 }],
832 "tags": ["Service Registry and Supervision"]
833 }},
PatrikBuhrde7a5732022-03-31 12:08:56 +0200834 "/actuator/heapdump": {"get": {
835 "summary": "Actuator web endpoint 'heapdump'",
836 "operationId": "heapdump",
837 "responses": {"200": {
838 "description": "OK",
839 "content": {"*/*": {"schema": {"type": "object"}}}
840 }},
841 "tags": ["Actuator"]
842 }},
PatrikBuhrfee99552021-02-02 14:06:44 +0100843 "/a1-policy/v2/policies/{policy_id}/status": {"get": {
844 "summary": "Returns a policy status",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100845 "operationId": "getPolicyStatus",
PatrikBuhrfee99552021-02-02 14:06:44 +0100846 "responses": {
847 "200": {
848 "description": "Policy status",
849 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/policy_status_info_v2"}}}
850 },
851 "404": {
852 "description": "Policy is not found",
853 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
854 }
855 },
856 "parameters": [{
857 "schema": {"type": "string"},
858 "in": "path",
859 "name": "policy_id",
860 "required": true
861 }],
862 "tags": ["A1 Policy Management"]
863 }}
864 },
865 "info": {
866 "license": {
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100867 "name": "Copyright (C) 2020-2022 Nordix Foundation. Licensed under the Apache License.",
PatrikBuhrfee99552021-02-02 14:06:44 +0100868 "url": "http://www.apache.org/licenses/LICENSE-2.0"
869 },
JohnKeeney069b4692022-05-12 22:15:14 +0100870 "description": "<h2>General<\/h2><p>The O-RAN Non-RT RIC Policy Management Service provides a REST API for management of A1 policies. <br/>The main tasks of the service are:<\/p><ul><li>A1 Policy creation, modification and deletion.<\/li><li>Monitoring and maintaining consistency of the SMO view of A1 policies and the Near-RT RICs<\/li><li>Maintaining a view of supported Near-RT RIC policy types<\/li><li>Supervision of using services (R-APPs). When a service is unavailable, its policies are removed.<\/li><\/ul><h2>APIs provided by the service<\/h2><h3>A1 Policy Management<\/h3><p>This is an API for management of A1 Policies.<\/p><ul><li>A1 Policy retrieval, creation, modification and deletion.<\/li><li>Retrieval of supported A1 Policy types for a Near-RT RIC<\/li><li>Retrieval of status for existing A1 policies<\/li><\/ul><h3>Management of configuration<\/h3><p>API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.<\/p><h3>Callbacks<\/h3><p>These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.<\/p><h3>NearRT-RIC Repository<\/h3><p>This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted for one Near-RT RIC.<\/p><h3>Health Check<\/h3><p>API used for supervision of the PMS component.<\/p><h3>Service Registry and Supervision<\/h3><p>API used for registering services that uses PMS. Each A1 policy is owned by a service. PMS can supervise each registered service and will automatically remove policies for unavailable services.<\/p>",
JohnKeeney08486cf2022-05-24 12:34:49 +0100871 "title": "A1 Policy Management Service",
PatrikBuhr1122b012021-01-20 12:21:52 +0100872 "version": "1.1.0"
873 },
874 "tags": [
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100875 {"name": "Service Registry and Supervision"},
PatrikBuhrfee99552021-02-02 14:06:44 +0100876 {"name": "A1 Policy Management"},
877 {"name": "NearRT-RIC Repository"},
PatrikBuhr2b277642021-12-27 11:32:58 +0100878 {"name": "Callbacks"},
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100879 {"name": "Health Check"},
PatrikBuhr2b277642021-12-27 11:32:58 +0100880 {
881 "name": "Actuator",
882 "description": "Monitor and interact",
883 "externalDocs": {
884 "description": "Spring Boot Actuator Web API Documentation",
885 "url": "https://docs.spring.io/spring-boot/docs/current/actuator-api/html/"
886 }
PatrikBuhrde7a5732022-03-31 12:08:56 +0200887 },
888 {"name": "Management of configuration"}
PatrikBuhr1122b012021-01-20 12:21:52 +0100889 ]
890}