33fa5e186ec598bb9941854b73dfa3e627f778e5
[nonrtric/plt/a1policymanagementservice.git] / api / pms-api.json
1 {
2     "components": {"schemas": {
3         "error_information": {
4             "description": "Problem as defined in https://tools.ietf.org/html/rfc7807",
5             "type": "object",
6             "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",
16                     "example": 404
17                 }
18             }
19         },
20         "void": {
21             "description": "Void/empty",
22             "type": "object"
23         },
24         "status_info_v2": {
25             "type": "object",
26             "properties": {"status": {
27                 "description": "status text",
28                 "type": "string"
29             }}
30         },
31         "authorization_result": {
32             "description": "Result of authorization",
33             "type": "object",
34             "required": ["result"],
35             "properties": {"result": {
36                 "description": "If true, the access is granted",
37                 "type": "boolean"
38             }}
39         },
40         "ric_info_v2": {
41             "description": "Information for a Near-RT RIC",
42             "type": "object",
43             "properties": {
44                 "ric_id": {
45                     "description": "identity of the Near-RT RIC",
46                     "type": "string"
47                 },
48                 "managed_element_ids": {
49                     "description": "O1 identities for managed entities",
50                     "type": "array",
51                     "items": {
52                         "description": "O1 identities for managed entities",
53                         "type": "string"
54                     }
55                 },
56                 "state": {
57                     "description": "Represents the states for a Near-RT RIC",
58                     "type": "string",
59                     "enum": [
60                         "UNAVAILABLE",
61                         "AVAILABLE",
62                         "SYNCHRONIZING",
63                         "CONSISTENCY_CHECK"
64                     ]
65                 },
66                 "policytype_ids": {
67                     "description": "supported policy types",
68                     "type": "array",
69                     "items": {
70                         "description": "supported policy types",
71                         "type": "string"
72                     }
73                 }
74             }
75         },
76         "service_registration_info_v2": {
77             "description": "Information for one service",
78             "type": "object",
79             "required": ["service_id"],
80             "properties": {
81                 "callback_url": {
82                     "description": "callback for notifying of Near-RT RIC state changes",
83                     "type": "string"
84                 },
85                 "service_id": {
86                     "description": "identity of the service",
87                     "type": "string"
88                 },
89                 "keep_alive_interval_seconds": {
90                     "format": "int64",
91                     "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.",
92                     "type": "integer"
93                 }
94             }
95         },
96         "policy_info_list_v2": {
97             "description": "List of policy information",
98             "type": "object",
99             "properties": {"policies": {
100                 "description": "List of policy information",
101                 "type": "array",
102                 "items": {"$ref": "#/components/schemas/policy_info_v2"}
103             }}
104         },
105         "policy_status_info_v2": {
106             "description": "Status for one A1-P Policy",
107             "type": "object",
108             "properties": {
109                 "last_modified": {
110                     "description": "timestamp, last modification time",
111                     "type": "string"
112                 },
113                 "status": {
114                     "description": "the Policy status",
115                     "type": "object"
116                 }
117             }
118         },
119         "service_status_v2": {
120             "description": "List of service information",
121             "type": "object",
122             "properties": {
123                 "callback_url": {
124                     "description": "callback for notifying of RIC synchronization",
125                     "type": "string"
126                 },
127                 "service_id": {
128                     "description": "identity of the service",
129                     "type": "string"
130                 },
131                 "keep_alive_interval_seconds": {
132                     "format": "int64",
133                     "description": "policy keep alive timeout",
134                     "type": "integer"
135                 },
136                 "time_since_last_activity_seconds": {
137                     "format": "int64",
138                     "description": "time since last invocation by the service",
139                     "type": "integer"
140                 }
141             }
142         },
143         "ric_info_list_v2": {
144             "description": "List of Near-RT RIC information",
145             "type": "object",
146             "properties": {"rics": {
147                 "description": "List of Near-RT RIC information",
148                 "type": "array",
149                 "items": {"$ref": "#/components/schemas/ric_info_v2"}
150             }}
151         },
152         "policytype_v2": {
153             "description": "Policy type",
154             "type": "object",
155             "properties": {"policy_schema": {
156                 "description": "Policy type json schema. The schema is a json object following http://json-schema.org/draft-07/schema",
157                 "type": "object"
158             }}
159         },
160         "input": {
161             "description": "input",
162             "type": "object",
163             "required": [
164                 "access_type",
165                 "auth_token",
166                 "policy_type_id"
167             ],
168             "properties": {
169                 "access_type": {
170                     "description": "Access type",
171                     "type": "string",
172                     "enum": [
173                         "READ",
174                         "WRITE",
175                         "DELETE"
176                     ]
177                 },
178                 "auth_token": {
179                     "description": "Authorization token",
180                     "type": "string"
181                 },
182                 "policy_type_id": {
183                     "description": "Policy type identifier",
184                     "type": "string"
185                 }
186             }
187         },
188         "policy_authorization": {
189             "description": "Authorization request for A1 policy requests",
190             "type": "object",
191             "required": ["input"],
192             "properties": {"input": {"$ref": "#/components/schemas/input"}}
193         },
194         "policytype_id_list_v2": {
195             "description": "Information about policy types",
196             "type": "object",
197             "properties": {"policytype_ids": {
198                 "description": "Policy type identities",
199                 "type": "array",
200                 "items": {
201                     "description": "Policy type identities",
202                     "type": "string"
203                 }
204             }}
205         },
206         "policy_info_v2": {
207             "description": "Information for one A1-P Policy",
208             "type": "object",
209             "required": [
210                 "policy_data",
211                 "policy_id",
212                 "policytype_id",
213                 "ric_id"
214             ],
215             "properties": {
216                 "ric_id": {
217                     "description": "identity of the target Near-RT RIC",
218                     "type": "string"
219                 },
220                 "policy_id": {
221                     "description": "identity of the policy",
222                     "type": "string"
223                 },
224                 "transient": {
225                     "default": false,
226                     "description": "if true, the policy is deleted at RIC restart. If false, its value is maintained by this service until explicitly deleted. Default false.",
227                     "type": "boolean",
228                     "example": false
229                 },
230                 "service_id": {
231                     "description": "the identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated to a service). Note that the service does not need to be registered.",
232                     "type": "string"
233                 },
234                 "policy_data": {
235                     "description": "the configuration of the policy",
236                     "type": "object"
237                 },
238                 "status_notification_uri": {
239                     "description": "Callback URI for policy status updates",
240                     "type": "string"
241                 },
242                 "policytype_id": {
243                     "description": "identity of the policy type",
244                     "type": "string"
245                 }
246             }
247         },
248         "policy_id_list_v2": {
249             "description": "A list of policy identities",
250             "type": "object",
251             "properties": {"policy_ids": {
252                 "description": "Policy identities",
253                 "type": "array",
254                 "items": {
255                     "description": "Policy identities",
256                     "type": "string"
257                 }
258             }}
259         },
260         "service_list_v2": {
261             "description": "List of service information",
262             "type": "object",
263             "properties": {"service_list": {
264                 "description": "List of service information",
265                 "type": "array",
266                 "items": {"$ref": "#/components/schemas/service_status_v2"}
267             }}
268         },
269         "service_callback_info_v2": {
270             "description": "Information transferred as in Service callbacks (callback_url)",
271             "type": "object",
272             "required": [
273                 "event_type",
274                 "ric_id"
275             ],
276             "properties": {
277                 "ric_id": {
278                     "description": "identity of a Near-RT RIC",
279                     "type": "string"
280                 },
281                 "event_type": {
282                     "description": "values:\nAVAILABLE: the  Near-RT RIC has become available for A1 Policy management",
283                     "type": "string",
284                     "enum": ["AVAILABLE"]
285                 }
286             }
287         },
288         "Link": {
289             "type": "object",
290             "properties": {
291                 "templated": {"type": "boolean"},
292                 "href": {"type": "string"}
293             }
294         }
295     }},
296     "openapi": "3.0.1",
297     "paths": {
298         "/a1-policy/v2/policy-instances": {"get": {
299             "summary": "Query for A1 policy instances",
300             "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.",
301             "operationId": "getPolicyInstances",
302             "responses": {
303                 "200": {
304                     "description": "Policies",
305                     "content": {"application/json": {"schema": {"$ref": "#/components/schemas/policy_info_list_v2"}}}
306                 },
307                 "404": {
308                     "description": "Near-RT RIC, policy type or service not found",
309                     "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
310                 }
311             },
312             "parameters": [
313                 {
314                     "schema": {"type": "string"},
315                     "in": "query",
316                     "name": "policytype_id",
317                     "description": "Select policies with a given type identity.",
318                     "required": false
319                 },
320                 {
321                     "schema": {"type": "string"},
322                     "in": "query",
323                     "name": "ric_id",
324                     "description": "Select policies for a given Near-RT RIC identity.",
325                     "required": false
326                 },
327                 {
328                     "schema": {"type": "string"},
329                     "in": "query",
330                     "name": "service_id",
331                     "description": "Select policies owned by a given service.",
332                     "required": false
333                 },
334                 {
335                     "schema": {"type": "string"},
336                     "in": "query",
337                     "name": "type_name",
338                     "description": "Select policies of a given type name (type identity has the format <typename_version>)",
339                     "required": false
340                 }
341             ],
342             "tags": ["A1 Policy Management"]
343         }},
344         "/example-authz-check": {"post": {
345             "summary": "Request for access authorization.",
346             "requestBody": {
347                 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/policy_authorization"}}},
348                 "required": true
349             },
350             "description": "The authorization function decides if access is granted.",
351             "operationId": "performAccessControl",
352             "responses": {"200": {
353                 "description": "OK",
354                 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/authorization_result"}}}
355             }},
356             "tags": ["Authorization API"]
357         }},
358         "/actuator/threaddump": {"get": {
359             "summary": "Actuator web endpoint 'threaddump'",
360             "operationId": "threaddump",
361             "responses": {"200": {
362                 "description": "OK",
363                 "content": {
364                     "text/plain;charset=UTF-8": {"schema": {"type": "object"}},
365                     "application/vnd.spring-boot.actuator.v3+json": {"schema": {"type": "object"}},
366                     "application/json": {"schema": {"type": "object"}},
367                     "application/vnd.spring-boot.actuator.v2+json": {"schema": {"type": "object"}}
368                 }
369             }},
370             "tags": ["Actuator"]
371         }},
372         "/a1-policy/v2/status": {"get": {
373             "summary": "Returns status and statistics of this service",
374             "operationId": "getStatus",
375             "responses": {"200": {
376                 "description": "Service is living",
377                 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/status_info_v2"}}}
378             }},
379             "tags": ["Health Check"]
380         }},
381         "/actuator/loggers": {"get": {
382             "summary": "Actuator web endpoint 'loggers'",
383             "operationId": "loggers",
384             "responses": {"200": {
385                 "description": "OK",
386                 "content": {
387                     "application/vnd.spring-boot.actuator.v3+json": {"schema": {"type": "object"}},
388                     "application/json": {"schema": {"type": "object"}},
389                     "application/vnd.spring-boot.actuator.v2+json": {"schema": {"type": "object"}}
390                 }
391             }},
392             "tags": ["Actuator"]
393         }},
394         "/actuator/health/**": {"get": {
395             "summary": "Actuator web endpoint 'health-path'",
396             "operationId": "health-path",
397             "responses": {"200": {
398                 "description": "OK",
399                 "content": {
400                     "application/vnd.spring-boot.actuator.v3+json": {"schema": {"type": "object"}},
401                     "application/json": {"schema": {"type": "object"}},
402                     "application/vnd.spring-boot.actuator.v2+json": {"schema": {"type": "object"}}
403                 }
404             }},
405             "tags": ["Actuator"]
406         }},
407         "/a1-policy/v2/rics/ric": {"get": {
408             "summary": "Returns info for one Near-RT RIC",
409             "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).",
410             "operationId": "getRic",
411             "responses": {
412                 "200": {
413                     "description": "Near-RT RIC is found",
414                     "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ric_info_v2"}}}
415                 },
416                 "404": {
417                     "description": "Near-RT RIC is not found",
418                     "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
419                 }
420             },
421             "parameters": [
422                 {
423                     "schema": {"type": "string"},
424                     "in": "query",
425                     "name": "managed_element_id",
426                     "description": "The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned.",
427                     "required": false
428                 },
429                 {
430                     "schema": {"type": "string"},
431                     "in": "query",
432                     "name": "ric_id",
433                     "description": "The identity of a Near-RT RIC to get information for.",
434                     "required": false
435                 }
436             ],
437             "tags": ["NearRT-RIC Repository"]
438         }},
439         "/actuator/shutdown": {"post": {
440             "summary": "Actuator web endpoint 'shutdown'",
441             "operationId": "shutdown",
442             "responses": {"200": {
443                 "description": "OK",
444                 "content": {
445                     "application/vnd.spring-boot.actuator.v3+json": {"schema": {"type": "object"}},
446                     "application/json": {"schema": {"type": "object"}},
447                     "application/vnd.spring-boot.actuator.v2+json": {"schema": {"type": "object"}}
448                 }
449             }},
450             "tags": ["Actuator"]
451         }},
452         "/a1-policy/v2/policy-types": {"get": {
453             "summary": "Query policy type identities",
454             "operationId": "getPolicyTypes",
455             "responses": {
456                 "200": {
457                     "description": "Policy type IDs",
458                     "content": {"application/json": {"schema": {"$ref": "#/components/schemas/policytype_id_list_v2"}}}
459                 },
460                 "404": {
461                     "description": "Near-RT RIC is not found",
462                     "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
463                 }
464             },
465             "parameters": [
466                 {
467                     "schema": {"type": "string"},
468                     "in": "query",
469                     "name": "ric_id",
470                     "description": "Select types for the given Near-RT RIC identity.",
471                     "required": false
472                 },
473                 {
474                     "schema": {"type": "string"},
475                     "in": "query",
476                     "name": "type_name",
477                     "description": "Select types with the given type name (type identity has the format <typename_version>)",
478                     "required": false
479                 },
480                 {
481                     "schema": {"type": "string"},
482                     "in": "query",
483                     "name": "compatible_with_version",
484                     "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.",
485                     "required": false
486                 }
487             ],
488             "tags": ["A1 Policy Management"]
489         }},
490         "/a1-policy/v2/policies/{policy_id}": {
491             "get": {
492                 "summary": "Returns a policy",
493                 "operationId": "getPolicy",
494                 "responses": {
495                     "200": {
496                         "description": "Policy found",
497                         "content": {"application/json": {"schema": {"$ref": "#/components/schemas/policy_info_v2"}}}
498                     },
499                     "404": {
500                         "description": "Policy is not found",
501                         "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
502                     }
503                 },
504                 "parameters": [{
505                     "schema": {"type": "string"},
506                     "in": "path",
507                     "name": "policy_id",
508                     "required": true
509                 }],
510                 "tags": ["A1 Policy Management"]
511             },
512             "delete": {
513                 "summary": "Delete a policy",
514                 "operationId": "deletePolicy",
515                 "responses": {
516                     "200": {
517                         "description": "Not used",
518                         "content": {"*/*": {"schema": {"$ref": "#/components/schemas/void"}}}
519                     },
520                     "423": {
521                         "description": "Near-RT RIC is not operational",
522                         "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
523                     },
524                     "204": {
525                         "description": "Policy deleted",
526                         "content": {"*/*": {"schema": {"$ref": "#/components/schemas/void"}}}
527                     },
528                     "404": {
529                         "description": "Policy is not found",
530                         "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
531                     }
532                 },
533                 "parameters": [{
534                     "schema": {"type": "string"},
535                     "in": "path",
536                     "name": "policy_id",
537                     "required": true
538                 }],
539                 "tags": ["A1 Policy Management"]
540             }
541         },
542         "/actuator/metrics/{requiredMetricName}": {"get": {
543             "summary": "Actuator web endpoint 'metrics-requiredMetricName'",
544             "operationId": "metrics-requiredMetricName",
545             "responses": {"200": {
546                 "description": "OK",
547                 "content": {
548                     "application/vnd.spring-boot.actuator.v3+json": {"schema": {"type": "object"}},
549                     "application/json": {"schema": {"type": "object"}},
550                     "application/vnd.spring-boot.actuator.v2+json": {"schema": {"type": "object"}}
551                 }
552             }},
553             "parameters": [{
554                 "schema": {"type": "string"},
555                 "in": "path",
556                 "name": "requiredMetricName",
557                 "required": true
558             }],
559             "tags": ["Actuator"]
560         }},
561         "/a1-policy/v2/configuration": {
562             "get": {
563                 "summary": "Returns the contents of the application configuration file",
564                 "operationId": "getConfiguration",
565                 "responses": {
566                     "200": {
567                         "description": "Configuration",
568                         "content": {"application/json": {"schema": {"type": "object"}}}
569                     },
570                     "404": {
571                         "description": "File is not found or readable",
572                         "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
573                     }
574                 },
575                 "tags": ["Management of configuration"]
576             },
577             "put": {
578                 "summary": "Replace the current configuration file with the given configuration",
579                 "requestBody": {
580                     "content": {"application/json": {"schema": {"type": "object"}}},
581                     "required": true
582                 },
583                 "operationId": "putConfiguration",
584                 "responses": {
585                     "200": {
586                         "description": "Configuration updated",
587                         "content": {"*/*": {"schema": {"$ref": "#/components/schemas/void"}}}
588                     },
589                     "400": {
590                         "description": "Invalid configuration provided",
591                         "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
592                     },
593                     "500": {
594                         "description": "Something went wrong when replacing the configuration. Try again.",
595                         "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
596                     }
597                 },
598                 "tags": ["Management of configuration"]
599             }
600         },
601         "/actuator": {"get": {
602             "summary": "Actuator root web endpoint",
603             "operationId": "links",
604             "responses": {"200": {
605                 "description": "OK",
606                 "content": {
607                     "application/vnd.spring-boot.actuator.v3+json": {"schema": {
608                         "additionalProperties": {
609                             "additionalProperties": {"$ref": "#/components/schemas/Link"},
610                             "type": "object"
611                         },
612                         "type": "object"
613                     }},
614                     "application/json": {"schema": {
615                         "additionalProperties": {
616                             "additionalProperties": {"$ref": "#/components/schemas/Link"},
617                             "type": "object"
618                         },
619                         "type": "object"
620                     }},
621                     "application/vnd.spring-boot.actuator.v2+json": {"schema": {
622                         "additionalProperties": {
623                             "additionalProperties": {"$ref": "#/components/schemas/Link"},
624                             "type": "object"
625                         },
626                         "type": "object"
627                     }}
628                 }
629             }},
630             "tags": ["Actuator"]
631         }},
632         "/actuator/loggers/{name}": {
633             "post": {
634                 "summary": "Actuator web endpoint 'loggers-name'",
635                 "requestBody": {"content": {"application/json": {"schema": {
636                     "type": "string",
637                     "enum": [
638                         "TRACE",
639                         "DEBUG",
640                         "INFO",
641                         "WARN",
642                         "ERROR",
643                         "FATAL",
644                         "OFF"
645                     ]
646                 }}}},
647                 "operationId": "loggers-name_2",
648                 "responses": {"200": {
649                     "description": "OK",
650                     "content": {"*/*": {"schema": {"type": "object"}}}
651                 }},
652                 "parameters": [{
653                     "schema": {"type": "string"},
654                     "in": "path",
655                     "name": "name",
656                     "required": true
657                 }],
658                 "tags": ["Actuator"]
659             },
660             "get": {
661                 "summary": "Actuator web endpoint 'loggers-name'",
662                 "operationId": "loggers-name",
663                 "responses": {"200": {
664                     "description": "OK",
665                     "content": {
666                         "application/vnd.spring-boot.actuator.v3+json": {"schema": {"type": "object"}},
667                         "application/json": {"schema": {"type": "object"}},
668                         "application/vnd.spring-boot.actuator.v2+json": {"schema": {"type": "object"}}
669                     }
670                 }},
671                 "parameters": [{
672                     "schema": {"type": "string"},
673                     "in": "path",
674                     "name": "name",
675                     "required": true
676                 }],
677                 "tags": ["Actuator"]
678             }
679         },
680         "/a1-policy/v2/services/{service_id}/keepalive": {"put": {
681             "summary": "Heartbeat indicates that the service is running",
682             "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)",
683             "operationId": "keepAliveService",
684             "responses": {
685                 "200": {
686                     "description": "Service supervision timer refreshed, OK",
687                     "content": {"*/*": {"schema": {"type": "object"}}}
688                 },
689                 "404": {
690                     "description": "The service is not found, needs re-registration",
691                     "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
692                 }
693             },
694             "parameters": [{
695                 "schema": {"type": "string"},
696                 "in": "path",
697                 "name": "service_id",
698                 "required": true
699             }],
700             "tags": ["Service Registry and Supervision"]
701         }},
702         "/actuator/metrics": {"get": {
703             "summary": "Actuator web endpoint 'metrics'",
704             "operationId": "metrics",
705             "responses": {"200": {
706                 "description": "OK",
707                 "content": {
708                     "application/vnd.spring-boot.actuator.v3+json": {"schema": {"type": "object"}},
709                     "application/json": {"schema": {"type": "object"}},
710                     "application/vnd.spring-boot.actuator.v2+json": {"schema": {"type": "object"}}
711                 }
712             }},
713             "tags": ["Actuator"]
714         }},
715         "/a1-policy/v2/rics": {"get": {
716             "summary": "Query Near-RT RIC information",
717             "description": "The call returns all Near-RT RICs that supports a given policy type identity",
718             "operationId": "getRics",
719             "responses": {
720                 "200": {
721                     "description": "OK",
722                     "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ric_info_list_v2"}}}
723                 },
724                 "404": {
725                     "description": "Policy type is not found",
726                     "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
727                 }
728             },
729             "parameters": [{
730                 "schema": {"type": "string"},
731                 "in": "query",
732                 "name": "policytype_id",
733                 "description": "The identity of a policy type. If given, all Near-RT RICs supporting the policy type are returned",
734                 "required": false
735             }],
736             "tags": ["NearRT-RIC Repository"]
737         }},
738         "/a1-policy/v2/services": {
739             "get": {
740                 "summary": "Returns service information",
741                 "description": "Either information about a registered service with given identity or all registered services are returned.",
742                 "operationId": "getServices",
743                 "responses": {
744                     "200": {
745                         "description": "OK",
746                         "content": {"application/json": {"schema": {"$ref": "#/components/schemas/service_list_v2"}}}
747                     },
748                     "404": {
749                         "description": "Service is not found",
750                         "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
751                     }
752                 },
753                 "parameters": [{
754                     "schema": {"type": "string"},
755                     "in": "query",
756                     "name": "service_id",
757                     "description": "The identity of the service",
758                     "required": false
759                 }],
760                 "tags": ["Service Registry and Supervision"]
761             },
762             "put": {
763                 "summary": "Register a service",
764                 "requestBody": {
765                     "content": {"application/json": {"schema": {"$ref": "#/components/schemas/service_registration_info_v2"}}},
766                     "required": true
767                 },
768                 "description": "Registering a service is needed to:<ul><li>Get callbacks about available NearRT RICs.<\/li><li>Activate supervision of the service. If a service is inactive, its policies will automatically be deleted.<\/li><\/ul>Policies can be created even if the service is not registerred. This is a feature which it is optional to use.",
769                 "operationId": "putService",
770                 "responses": {
771                     "200": {
772                         "description": "Service updated",
773                         "content": {"*/*": {"schema": {"type": "object"}}}
774                     },
775                     "201": {
776                         "description": "Service created",
777                         "content": {"*/*": {"schema": {"type": "object"}}}
778                     },
779                     "400": {
780                         "description": "The ServiceRegistrationInfo is not accepted",
781                         "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
782                     }
783                 },
784                 "tags": ["Service Registry and Supervision"]
785             }
786         },
787         "/actuator/info": {"get": {
788             "summary": "Actuator web endpoint 'info'",
789             "operationId": "info",
790             "responses": {"200": {
791                 "description": "OK",
792                 "content": {
793                     "application/vnd.spring-boot.actuator.v3+json": {"schema": {"type": "object"}},
794                     "application/json": {"schema": {"type": "object"}},
795                     "application/vnd.spring-boot.actuator.v2+json": {"schema": {"type": "object"}}
796                 }
797             }},
798             "tags": ["Actuator"]
799         }},
800         "/status": {"get": {
801             "summary": "Returns status and statistics of this service",
802             "operationId": "getStatusV1",
803             "responses": {"200": {
804                 "description": "Service is living",
805                 "content": {"*/*": {"schema": {"type": "string"}}}
806             }},
807             "tags": ["Health Check"]
808         }},
809         "/a1-policy/v2/policy-types/{policytype_id}": {"get": {
810             "summary": "Returns a policy type definition",
811             "operationId": "getPolicyType",
812             "responses": {
813                 "200": {
814                     "description": "Policy type",
815                     "content": {"*/*": {"schema": {"$ref": "#/components/schemas/policytype_v2"}}}
816                 },
817                 "404": {
818                     "description": "Policy type is not found",
819                     "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
820                 }
821             },
822             "parameters": [{
823                 "schema": {"type": "string"},
824                 "in": "path",
825                 "name": "policytype_id",
826                 "required": true
827             }],
828             "tags": ["A1 Policy Management"]
829         }},
830         "/actuator/logfile": {"get": {
831             "summary": "Actuator web endpoint 'logfile'",
832             "operationId": "logfile",
833             "responses": {"200": {
834                 "description": "OK",
835                 "content": {"text/plain;charset=UTF-8": {"schema": {"type": "object"}}}
836             }},
837             "tags": ["Actuator"]
838         }},
839         "/actuator/health": {"get": {
840             "summary": "Actuator web endpoint 'health'",
841             "operationId": "health",
842             "responses": {"200": {
843                 "description": "OK",
844                 "content": {
845                     "application/vnd.spring-boot.actuator.v3+json": {"schema": {"type": "object"}},
846                     "application/json": {"schema": {"type": "object"}},
847                     "application/vnd.spring-boot.actuator.v2+json": {"schema": {"type": "object"}}
848                 }
849             }},
850             "tags": ["Actuator"]
851         }},
852         "/a1-policy/v2/policies": {
853             "get": {
854                 "summary": "Query policy identities",
855                 "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.",
856                 "operationId": "getPolicyIds",
857                 "responses": {
858                     "200": {
859                         "description": "Policy identities",
860                         "content": {"application/json": {"schema": {"$ref": "#/components/schemas/policy_id_list_v2"}}}
861                     },
862                     "404": {
863                         "description": "Near-RT RIC or type not found",
864                         "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
865                     }
866                 },
867                 "parameters": [
868                     {
869                         "schema": {"type": "string"},
870                         "in": "query",
871                         "name": "policytype_id",
872                         "description": "Select policies of a given policy type identity.",
873                         "required": false
874                     },
875                     {
876                         "schema": {"type": "string"},
877                         "in": "query",
878                         "name": "ric_id",
879                         "description": "Select policies of a given Near-RT RIC identity.",
880                         "required": false
881                     },
882                     {
883                         "schema": {"type": "string"},
884                         "in": "query",
885                         "name": "service_id",
886                         "description": "Select policies owned by a given service.",
887                         "required": false
888                     },
889                     {
890                         "schema": {"type": "string"},
891                         "in": "query",
892                         "name": "type_name",
893                         "description": "Select policies of types with the given type name (type identity has the format <typename_version>)",
894                         "required": false
895                     }
896                 ],
897                 "tags": ["A1 Policy Management"]
898             },
899             "put": {
900                 "summary": "Create or update a policy",
901                 "requestBody": {
902                     "content": {"application/json": {"schema": {"$ref": "#/components/schemas/policy_info_v2"}}},
903                     "required": true
904                 },
905                 "operationId": "putPolicy",
906                 "responses": {
907                     "200": {
908                         "description": "Policy updated",
909                         "content": {"application/json": {"schema": {"$ref": "#/components/schemas/void"}}}
910                     },
911                     "201": {
912                         "description": "Policy created",
913                         "content": {"application/json": {"schema": {"$ref": "#/components/schemas/void"}}}
914                     },
915                     "423": {
916                         "description": "Near-RT RIC is not operational",
917                         "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
918                     },
919                     "404": {
920                         "description": "Near-RT RIC or policy type is not found",
921                         "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
922                     }
923                 },
924                 "tags": ["A1 Policy Management"]
925             }
926         },
927         "/r-app/near-rt-ric-status": {"post": {
928             "summary": "Callback for Near-RT RIC status",
929             "requestBody": {
930                 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/service_callback_info_v2"}}},
931                 "required": true
932             },
933             "description": "The URL to this call is registered at Service registration.",
934             "operationId": "serviceCallback",
935             "responses": {"200": {
936                 "description": "OK",
937                 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/void"}}}
938             }},
939             "tags": ["Service callbacks"]
940         }},
941         "/a1-policy/v2/services/{service_id}": {"delete": {
942             "summary": "Unregister a service",
943             "operationId": "deleteService",
944             "responses": {
945                 "200": {
946                     "description": "Not used",
947                     "content": {"*/*": {"schema": {"$ref": "#/components/schemas/void"}}}
948                 },
949                 "204": {
950                     "description": "Service unregistered",
951                     "content": {"*/*": {"schema": {"type": "object"}}}
952                 },
953                 "404": {
954                     "description": "Service not found",
955                     "content": {"*/*": {"schema": {"$ref": "#/components/schemas/error_information"}}}
956                 }
957             },
958             "parameters": [{
959                 "schema": {"type": "string"},
960                 "in": "path",
961                 "name": "service_id",
962                 "required": true
963             }],
964             "tags": ["Service Registry and Supervision"]
965         }},
966         "/actuator/heapdump": {"get": {
967             "summary": "Actuator web endpoint 'heapdump'",
968             "operationId": "heapdump",
969             "responses": {"200": {
970                 "description": "OK",
971                 "content": {"application/octet-stream": {"schema": {"type": "object"}}}
972             }},
973             "tags": ["Actuator"]
974         }},
975         "/a1-policy/v2/policies/{policy_id}/status": {"get": {
976             "summary": "Returns a policy status",
977             "operationId": "getPolicyStatus",
978             "responses": {
979                 "200": {
980                     "description": "Policy status",
981                     "content": {"application/json": {"schema": {"$ref": "#/components/schemas/policy_status_info_v2"}}}
982                 },
983                 "404": {
984                     "description": "Policy is not found",
985                     "content": {"application/json": {"schema": {"$ref": "#/components/schemas/error_information"}}}
986                 }
987             },
988             "parameters": [{
989                 "schema": {"type": "string"},
990                 "in": "path",
991                 "name": "policy_id",
992                 "required": true
993             }],
994             "tags": ["A1 Policy Management"]
995         }}
996     },
997     "info": {
998         "license": {
999             "name": "Copyright (C) 2020-2023 Nordix Foundation. Licensed under the Apache License.",
1000             "url": "http://www.apache.org/licenses/LICENSE-2.0"
1001         },
1002         "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 or defined 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>Service 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 optionally owned by a service. PMS can supervise each registered service by a heart-beat supervision and will automatically remove policies for unavailable services. Note that a service does not need to be registered in order to create A1 Policies. This is a feature that is optional to use.<\/p><h3>Authorization API<\/h3><p>API used for access control of A1 Policy access. If configured, an external authorization provider is requested to grant access to the A1 Policy type.<\/p><h3>Spring Boot Actuator<\/h3><p>Provides generic functions  used to monitor and manage the Spring web application.<\/p>",
1003         "title": "A1 Policy Management Service",
1004         "version": "1.2.0"
1005     },
1006     "tags": [
1007         {
1008             "name": "Authorization API",
1009             "description": "API used for authorization of information A1 policy access (this is provided by an authorization producer such as OPA).\nNote that this API is called by PMS, it is not provided.\n"
1010         },
1011         {
1012             "name": "Actuator",
1013             "description": "Monitor and interact",
1014             "externalDocs": {
1015                 "description": "Spring Boot Actuator Web API Documentation",
1016                 "url": "https://docs.spring.io/spring-boot/docs/current/actuator-api/html/"
1017             }
1018         }
1019     ]
1020 }