blob: b5936e5cdeb357493fa693d33fa28eae39a47132 [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",
PatrikBuhrfee99552021-02-02 14:06:44 +010082 "description": "keep alive interval for the service. This is a heartbeat supervision of the service, which in regular intevals must invoke a 'keepalive' REST call. When a service does not invoke this call within the given time, it is considered unavailble. An unavailable service will be automatically deregistered and its policies will be deleted. Value 0 means no timeout supervision.",
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": {
147 "description": "Policy type json scema. The schema is a json object following http://json-schema.org/draft-07/schema",
148 "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 }},
300 "/a1-policy/v2/status": {"get": {
301 "summary": "Returns status and statistics of this service",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100302 "operationId": "getStatus",
PatrikBuhrfee99552021-02-02 14:06:44 +0100303 "responses": {"200": {
304 "description": "Service is living",
305 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/status_info_v2"}}}
306 }},
307 "tags": ["Health Check"]
308 }},
PatrikBuhr2b277642021-12-27 11:32:58 +0100309 "/actuator/threaddump": {"get": {
310 "summary": "Actuator web endpoint 'threaddump'",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100311 "operationId": "threaddump_4",
PatrikBuhr2b277642021-12-27 11:32:58 +0100312 "responses": {"200": {
313 "description": "OK",
314 "content": {"*/*": {"schema": {"type": "object"}}}
315 }},
316 "tags": ["Actuator"]
317 }},
PatrikBuhrfee99552021-02-02 14:06:44 +0100318 "/a1-policy/v2/rics/ric": {"get": {
319 "summary": "Returns info for one Near-RT RIC",
320 "description": "Either a Near-RT RIC identity or a Mananged Element identity can be specified.<br>The intention with Mananged 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 +0100321 "operationId": "getRic",
PatrikBuhrfee99552021-02-02 14:06:44 +0100322 "responses": {
323 "200": {
324 "description": "Near-RT RIC is found",
325 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ric_info_v2"}}}
326 },
327 "404": {
328 "description": "Near-RT RIC is not found",
329 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
330 }
331 },
332 "parameters": [
333 {
334 "schema": {"type": "string"},
335 "in": "query",
336 "name": "managed_element_id",
337 "description": "The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned.",
338 "required": false
339 },
340 {
341 "schema": {"type": "string"},
342 "in": "query",
343 "name": "ric_id",
344 "description": "The identity of a Near-RT RIC to get information for.",
345 "required": false
346 }
347 ],
348 "tags": ["NearRT-RIC Repository"]
349 }},
PatrikBuhr2b277642021-12-27 11:32:58 +0100350 "/actuator/loggers": {"get": {
351 "summary": "Actuator web endpoint 'loggers'",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100352 "operationId": "loggers_2",
PatrikBuhr2b277642021-12-27 11:32:58 +0100353 "responses": {"200": {
354 "description": "OK",
355 "content": {"*/*": {"schema": {"type": "object"}}}
356 }},
357 "tags": ["Actuator"]
358 }},
359 "/actuator/health/**": {"get": {
360 "summary": "Actuator web endpoint 'health-path'",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100361 "operationId": "health-path_2",
PatrikBuhr2b277642021-12-27 11:32:58 +0100362 "responses": {"200": {
363 "description": "OK",
364 "content": {"*/*": {"schema": {"type": "object"}}}
365 }},
366 "tags": ["Actuator"]
367 }},
PatrikBuhrfee99552021-02-02 14:06:44 +0100368 "/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'",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100460 "operationId": "metrics-requiredMetricName_2",
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": {
475 "summary": "Returns the contents of the configuration file",
476 "description": "Note that the file contents is not relevant if the Consul is used.",
477 "operationId": "getConfiguration",
478 "responses": {
479 "200": {
480 "description": "Configuration",
481 "content": {"application/json": {"schema": {"type": "object"}}}
482 },
483 "404": {
484 "description": "File is not found or readable",
485 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
486 }
487 },
488 "tags": ["Management of configuration"]
489 },
490 "put": {
491 "summary": "Replace the current configuration file with the given configuration",
492 "requestBody": {
493 "content": {"application/json": {"schema": {"type": "object"}}},
494 "required": true
495 },
496 "description": "Note that the file is ignored if the Consul is used.",
497 "operationId": "putConfiguration",
498 "responses": {
499 "200": {
500 "description": "Configuration updated",
501 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/void"}}}
502 },
503 "400": {
504 "description": "Invalid configuration provided",
505 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
506 },
507 "500": {
508 "description": "Something went wrong when replacing the configuration. Try again.",
509 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
510 }
511 },
512 "tags": ["Management of configuration"]
513 }
514 },
PatrikBuhr2b277642021-12-27 11:32:58 +0100515 "/actuator": {"get": {
516 "summary": "Actuator root web endpoint",
517 "operationId": "links_1",
518 "responses": {"200": {
519 "description": "OK",
520 "content": {"*/*": {"schema": {
521 "additionalProperties": {
522 "additionalProperties": {"$ref": "#/components/schemas/Link"},
523 "type": "object"
524 },
525 "type": "object"
526 }}}
527 }},
528 "tags": ["Actuator"]
529 }},
PatrikBuhr2b277642021-12-27 11:32:58 +0100530 "/actuator/loggers/{name}": {
531 "post": {
532 "summary": "Actuator web endpoint 'loggers-name'",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100533 "operationId": "loggers-name_3",
PatrikBuhr2b277642021-12-27 11:32:58 +0100534 "responses": {"200": {
535 "description": "OK",
536 "content": {"*/*": {"schema": {"type": "object"}}}
537 }},
538 "parameters": [{
539 "schema": {"type": "string"},
540 "in": "path",
541 "name": "name",
542 "required": true
543 }],
544 "tags": ["Actuator"]
545 },
546 "get": {
547 "summary": "Actuator web endpoint 'loggers-name'",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100548 "operationId": "loggers-name_4",
PatrikBuhr2b277642021-12-27 11:32:58 +0100549 "responses": {"200": {
550 "description": "OK",
551 "content": {"*/*": {"schema": {"type": "object"}}}
552 }},
553 "parameters": [{
554 "schema": {"type": "string"},
555 "in": "path",
556 "name": "name",
557 "required": true
558 }],
559 "tags": ["Actuator"]
560 }
561 },
PatrikBuhrfee99552021-02-02 14:06:44 +0100562 "/a1-policy/v2/services/{service_id}/keepalive": {"put": {
563 "summary": "Heartbeat indicates that the service is running",
564 "description": "A registerred service must call this in regular intervals to indicate that it is in operation. Absence of this call will lead to that teh service will be deregisterred and all its policies are removed.",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100565 "operationId": "keepAliveService",
PatrikBuhrfee99552021-02-02 14:06:44 +0100566 "responses": {
567 "200": {
568 "description": "Service supervision timer refreshed, OK",
569 "content": {"*/*": {"schema": {"type": "object"}}}
570 },
571 "404": {
572 "description": "The service is not found, needs re-registration",
573 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
574 }
575 },
576 "parameters": [{
577 "schema": {"type": "string"},
578 "in": "path",
579 "name": "service_id",
580 "required": true
581 }],
582 "tags": ["Service Registry and Supervision"]
583 }},
PatrikBuhr2b277642021-12-27 11:32:58 +0100584 "/actuator/metrics": {"get": {
585 "summary": "Actuator web endpoint 'metrics'",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100586 "operationId": "metrics_2",
PatrikBuhr2b277642021-12-27 11:32:58 +0100587 "responses": {"200": {
588 "description": "OK",
589 "content": {"*/*": {"schema": {"type": "object"}}}
590 }},
591 "tags": ["Actuator"]
592 }},
PatrikBuhrfee99552021-02-02 14:06:44 +0100593 "/a1-policy/v2/rics": {"get": {
594 "summary": "Query Near-RT RIC information",
595 "description": "The call returns all Near-RT RICs that supports a given policy type identity",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100596 "operationId": "getRics",
PatrikBuhrfee99552021-02-02 14:06:44 +0100597 "responses": {
598 "200": {
599 "description": "OK",
600 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ric_info_list_v2"}}}
601 },
602 "404": {
603 "description": "Policy type is not found",
604 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
605 }
606 },
607 "parameters": [{
608 "schema": {"type": "string"},
609 "in": "query",
610 "name": "policytype_id",
611 "description": "The identity of a policy type. If given, all Near-RT RICs supporteing the policy type are returned",
612 "required": false
613 }],
614 "tags": ["NearRT-RIC Repository"]
615 }},
PatrikBuhrfee99552021-02-02 14:06:44 +0100616 "/a1-policy/v2/services": {
617 "get": {
618 "summary": "Returns service information",
619 "description": "Either information about a registered service with given identity or all registered services are returned.",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100620 "operationId": "getServices",
PatrikBuhrfee99552021-02-02 14:06:44 +0100621 "responses": {
622 "200": {
623 "description": "OK",
624 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/service_list_v2"}}}
625 },
626 "404": {
627 "description": "Service is not found",
628 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
629 }
630 },
631 "parameters": [{
632 "schema": {"type": "string"},
633 "in": "query",
634 "name": "service_id",
635 "description": "The identity of the service",
636 "required": false
637 }],
638 "tags": ["Service Registry and Supervision"]
639 },
640 "put": {
641 "summary": "Register a service",
642 "requestBody": {
643 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/service_registration_info_v2"}}},
644 "required": true
645 },
646 "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 +0100647 "operationId": "putService",
PatrikBuhrfee99552021-02-02 14:06:44 +0100648 "responses": {
649 "200": {
650 "description": "Service updated",
651 "content": {"*/*": {"schema": {"type": "object"}}}
652 },
653 "201": {
654 "description": "Service created",
655 "content": {"*/*": {"schema": {"type": "object"}}}
656 },
657 "400": {
658 "description": "The ServiceRegistrationInfo is not accepted",
659 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
660 }
661 },
662 "tags": ["Service Registry and Supervision"]
663 }
664 },
PatrikBuhr2b277642021-12-27 11:32:58 +0100665 "/actuator/info": {"get": {
666 "summary": "Actuator web endpoint 'info'",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100667 "operationId": "info_2",
PatrikBuhr2b277642021-12-27 11:32:58 +0100668 "responses": {"200": {
669 "description": "OK",
670 "content": {"*/*": {"schema": {"type": "object"}}}
671 }},
672 "tags": ["Actuator"]
673 }},
PatrikBuhrfee99552021-02-02 14:06:44 +0100674 "/status": {"get": {
675 "summary": "Returns status and statistics of this service",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100676 "operationId": "getStatusV1",
PatrikBuhrfee99552021-02-02 14:06:44 +0100677 "responses": {"200": {
678 "description": "Service is living",
679 "content": {"*/*": {"schema": {"type": "string"}}}
680 }},
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100681 "tags": ["Health Check"]
PatrikBuhrfee99552021-02-02 14:06:44 +0100682 }},
683 "/a1-policy/v2/policy-types/{policytype_id}": {"get": {
684 "summary": "Returns a policy type definition",
685 "operationId": "getPolicyType",
686 "responses": {
687 "200": {
688 "description": "Policy type",
689 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/policytype_v2"}}}
690 },
691 "404": {
692 "description": "Policy type is not found",
693 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
694 }
695 },
696 "parameters": [{
697 "schema": {"type": "string"},
698 "in": "path",
699 "name": "policytype_id",
700 "required": true
701 }],
702 "tags": ["A1 Policy Management"]
703 }},
PatrikBuhr2b277642021-12-27 11:32:58 +0100704 "/actuator/logfile": {"get": {
705 "summary": "Actuator web endpoint 'logfile'",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100706 "operationId": "logfile_2",
PatrikBuhr2b277642021-12-27 11:32:58 +0100707 "responses": {"200": {
708 "description": "OK",
709 "content": {"*/*": {"schema": {"type": "object"}}}
710 }},
711 "tags": ["Actuator"]
712 }},
713 "/actuator/health": {"get": {
714 "summary": "Actuator web endpoint 'health'",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100715 "operationId": "health_2",
PatrikBuhr2b277642021-12-27 11:32:58 +0100716 "responses": {"200": {
717 "description": "OK",
718 "content": {"*/*": {"schema": {"type": "object"}}}
719 }},
720 "tags": ["Actuator"]
721 }},
PatrikBuhrfee99552021-02-02 14:06:44 +0100722 "/a1-policy/v2/policies": {
723 "get": {
724 "summary": "Query policy identities",
725 "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 +0100726 "operationId": "getPolicyIds",
PatrikBuhrfee99552021-02-02 14:06:44 +0100727 "responses": {
728 "200": {
729 "description": "Policy identities",
730 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/policy_id_list_v2"}}}
731 },
732 "404": {
733 "description": "Near-RT RIC or type not found",
734 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
735 }
736 },
737 "parameters": [
738 {
739 "schema": {"type": "string"},
740 "in": "query",
741 "name": "policytype_id",
PatrikBuhr3b916e42021-10-07 18:03:53 +0200742 "description": "Select policies of a given policy type identity.",
PatrikBuhrfee99552021-02-02 14:06:44 +0100743 "required": false
744 },
745 {
746 "schema": {"type": "string"},
747 "in": "query",
748 "name": "ric_id",
PatrikBuhr3b916e42021-10-07 18:03:53 +0200749 "description": "Select policies of a given Near-RT RIC identity.",
PatrikBuhrfee99552021-02-02 14:06:44 +0100750 "required": false
751 },
752 {
753 "schema": {"type": "string"},
754 "in": "query",
755 "name": "service_id",
PatrikBuhr3b916e42021-10-07 18:03:53 +0200756 "description": "Select policies owned by a given service.",
757 "required": false
758 },
759 {
760 "schema": {"type": "string"},
761 "in": "query",
762 "name": "type_name",
763 "description": "Select policies of types with the given type name (type identity has the format <typename_version>)",
PatrikBuhrfee99552021-02-02 14:06:44 +0100764 "required": false
765 }
766 ],
767 "tags": ["A1 Policy Management"]
768 },
769 "put": {
770 "summary": "Create or update a policy",
771 "requestBody": {
772 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/policy_info_v2"}}},
773 "required": true
774 },
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100775 "operationId": "putPolicy",
PatrikBuhrfee99552021-02-02 14:06:44 +0100776 "responses": {
777 "200": {
778 "description": "Policy updated",
779 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/void"}}}
780 },
781 "201": {
782 "description": "Policy created",
783 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/void"}}}
784 },
785 "423": {
786 "description": "Near-RT RIC is not operational",
787 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
788 },
789 "404": {
790 "description": "Near-RT RIC or policy type is not found",
791 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
792 }
793 },
794 "tags": ["A1 Policy Management"]
795 }
796 },
797 "/r-app/near-rt-ric-status": {"post": {
798 "summary": "Callback for Near-RT RIC status",
799 "requestBody": {
800 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/service_callback_info_v2"}}},
801 "required": true
802 },
803 "description": "The URL to this call is registerred at Service registration.",
PatrikBuhr25d78502021-04-28 08:42:13 +0200804 "operationId": "serviceCallback",
PatrikBuhrfee99552021-02-02 14:06:44 +0100805 "responses": {"200": {
806 "description": "OK",
807 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/void"}}}
808 }},
809 "tags": ["Callbacks"]
810 }},
PatrikBuhrfee99552021-02-02 14:06:44 +0100811 "/a1-policy/v2/services/{service_id}": {"delete": {
812 "summary": "Unregister a service",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100813 "operationId": "deleteService",
PatrikBuhrfee99552021-02-02 14:06:44 +0100814 "responses": {
815 "200": {
816 "description": "Not used",
817 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/void"}}}
818 },
819 "204": {
820 "description": "Service unregistered",
821 "content": {"*/*": {"schema": {"type": "object"}}}
822 },
823 "404": {
824 "description": "Service not found",
825 "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
826 }
827 },
828 "parameters": [{
829 "schema": {"type": "string"},
830 "in": "path",
831 "name": "service_id",
832 "required": true
833 }],
834 "tags": ["Service Registry and Supervision"]
835 }},
836 "/a1-policy/v2/policies/{policy_id}/status": {"get": {
837 "summary": "Returns a policy status",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100838 "operationId": "getPolicyStatus",
PatrikBuhrfee99552021-02-02 14:06:44 +0100839 "responses": {
840 "200": {
841 "description": "Policy status",
842 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/policy_status_info_v2"}}}
843 },
844 "404": {
845 "description": "Policy is not found",
846 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
847 }
848 },
849 "parameters": [{
850 "schema": {"type": "string"},
851 "in": "path",
852 "name": "policy_id",
853 "required": true
854 }],
855 "tags": ["A1 Policy Management"]
PatrikBuhr2b277642021-12-27 11:32:58 +0100856 }},
857 "/actuator/heapdump": {"get": {
858 "summary": "Actuator web endpoint 'heapdump'",
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100859 "operationId": "heapdump_2",
PatrikBuhr2b277642021-12-27 11:32:58 +0100860 "responses": {"200": {
861 "description": "OK",
862 "content": {"*/*": {"schema": {"type": "object"}}}
863 }},
864 "tags": ["Actuator"]
PatrikBuhrfee99552021-02-02 14:06:44 +0100865 }}
866 },
867 "info": {
868 "license": {
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100869 "name": "Copyright (C) 2020-2022 Nordix Foundation. Licensed under the Apache License.",
PatrikBuhrfee99552021-02-02 14:06:44 +0100870 "url": "http://www.apache.org/licenses/LICENSE-2.0"
871 },
872 "description": "<h2>General<\/h2><p>The O-RAN Non-RT RIC Policy Management Service provides a REST API for management of A1 policices. <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 unavailble, 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 registerred 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 registerring services that uses PMS. Each A1 policy is owned by a service. PMS can supervise each registerred service and will automatically remove policies for unavailable services.<\/p>",
PatrikBuhr1122b012021-01-20 12:21:52 +0100873 "title": "A1 Policy management service",
874 "version": "1.1.0"
875 },
876 "tags": [
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100877 {"name": "Service Registry and Supervision"},
PatrikBuhrfee99552021-02-02 14:06:44 +0100878 {"name": "A1 Policy Management"},
879 {"name": "NearRT-RIC Repository"},
PatrikBuhr2b277642021-12-27 11:32:58 +0100880 {"name": "Callbacks"},
PatrikBuhr2a56cf72021-12-28 13:14:46 +0100881 {"name": "Health Check"},
882 {"name": "Management of configuration"},
PatrikBuhr2b277642021-12-27 11:32:58 +0100883 {
884 "name": "Actuator",
885 "description": "Monitor and interact",
886 "externalDocs": {
887 "description": "Spring Boot Actuator Web API Documentation",
888 "url": "https://docs.spring.io/spring-boot/docs/current/actuator-api/html/"
889 }
890 }
PatrikBuhr1122b012021-01-20 12:21:52 +0100891 ]
892}