3d390569af9f2eff648b8025917cf2d625dbf0c8
[nonrtric/plt/a1policymanagementservice.git] / api / pms-api-v3.yaml
1 #  ============LICENSE_START=======================================================
2 #  Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.
3 #  ================================================================================
4 #  Licensed under the Apache License, Version 2.0 (the "License");
5 #  you may not use this file except in compliance with the License.
6 #  You may obtain a copy of the License at
7 #
8 #        http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #  Unless required by applicable law or agreed to in writing, software
11 #  distributed under the License is distributed on an "AS IS" BASIS,
12 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #  See the License for the specific language governing permissions and
14 #  limitations under the License.
15 #
16 #  SPDX-License-Identifier: Apache-2.0
17 #  ============LICENSE_END=========================================================
18
19 openapi: 3.0.3
20 info:
21   title: 'A1 policy management API'
22   version: 1.0.0
23   x-api-id: a31c510b-20e6-4a08-af16-368c44d7fba8
24   x-audience: external-public
25   description: "<h2>General</h2><p>The O-RAN Non-RT RIC Policy Management Service\
26         \ provides a REST API for managemecnt of A1 policies. <br/>The main tasks of the\
27         \ service are:</p><ul><li>A1 Policy creation, modification and deletion.</li><li>Monitoring\
28         \ and maintaining consistency of the SMO view of A1 policies and the Near-RT RICs</li><li>Maintaining\
29         \ a view of supported Near-RT RIC policy types</li><li>Supervision of using services\
30         \ (R-APPs). When a service is unavailable, its policies are removed.</li></ul><h2>APIs\
31         \ provided or defined by the service</h2><h3>A1 Policy Management</h3><p>This\
32         \ is an API for management of A1 Policies.</p><ul><li>A1 Policy retrieval, creation,\
33         \ modification and deletion.</li><li>Retrieval of supported A1 Policy types for\
34         \ a Near-RT RIC</li><li>Retrieval of status for existing A1 policies</li></ul><h3>Management\
35         \ of configuration</h3><p>API for updating and retrieval of the component configuration.\
36         \ Note that there other ways to maintain the configuration.</p><h3>Service callbacks</h3><p>These\
37         \ are endpoints that are invoked by this service. The callbacks are registered\
38         \ in this service at service registration.</p><h3>NearRT-RIC Repository</h3><p>This\
39         \ is an API that provides support for looking up a NearRT-RIC. Each A1 policy\
40         \ is targeted for one Near-RT RIC.</p><h3>Health Check</h3><p>API used for supervision\
41         \ of the PMS component.</p><h3>Service Registry and Supervision</h3><p>API used\
42         \ for registering services that uses PMS. Each A1 policy is optionally owned by\
43         \ a service. PMS can supervise each registered service by a heart-beat supervision\
44         \ and will automatically remove policies for unavailable services. Note that a\
45         \ service does not need to be registered in order to create A1 Policies. This\
46         \ is a feature that is optional to use.</p><h3>Authorization API</h3><p>API used\
47         \ for access control of A1 Policy access. If configured, an external authorization\
48         \ provider is requested to grant access to the A1 Policy type.</p>"
49   license:
50     name: Copyright (C) 2024 OpenInfra Foundation Europe. Licensed under the Apache License.
51     url: http://www.apache.org/licenses/LICENSE-2.0
52   contact:
53     url: https://www.onap.org/
54     email: discuss-list@onap.com
55 servers:
56   - url: '{apiRoot}/a1policymanagement/v1'
57     variables:
58       apiRoot:
59         description: 'apiRoot is the Host:port/Domain name of the service  where the A1Pms running'
60         default: 'https://a1-pms.com'
61 tags:
62   - name: A1 Policy Management
63     description: "API used to create polices, Policy Instances and get \ them as individual using an ID or get all policies/Instances."
64   - name: NearRT-RIC Repository
65     description: "API used to get the NearRT-RIC for the managed element."
66   - name: Service Registry and Supervision
67     description: "API used to keep the service Alive with in the timeout period"
68   - name: Health Check
69     description: "API used to get the health status and statistics of this service"
70   - name: Service callbacks
71   - name: Configuration
72     description: "API used to create or fetch the application configuration."
73 paths:
74   /status:
75     get:
76       operationId: getStatus
77       responses:
78         "200":
79           content:
80             application/json:
81               schema:
82                 $ref: '#/components/schemas/StatusInfo'
83               examples:
84                 status_info:
85                   $ref: '#/components/examples/StatusInfo'
86           description: OK- Service is living Ok
87       description: Returns status and statistics of this service
88       tags:
89         - Health Check
90   /rics/ric:
91     get:
92       description: Either a Near-RT RIC identity or a Managed Element identity can
93         be specified.<br>The intention with Managed Element identity is the ID used
94         in O1 for accessing the traffical element (such as the ID of CU).
95       operationId: getRic
96       parameters:
97         - description: "The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned."
98           explode: true
99           in: query
100           name: managedElementId
101           required: false
102           schema:
103             type: string
104           style: form
105         - description: The identity of a Near-RT RIC to get information for.
106           explode: true
107           in: query
108           name: ricId
109           required: false
110           schema:
111             type: string
112           style: form
113         - description: Specifies the content type that the client expects to receive in response to the request.
114             Only application/json is allowed.
115           in: header
116           name: Accept
117           schema:
118             type: string
119             example: application/json
120       responses:
121         "200":
122           content:
123             application/json:
124               schema:
125                 $ref: '#/components/schemas/RicInfo'
126               examples:
127                 ric_info:
128                   $ref: '#/components/examples/RicInfo'
129           description: OK - Near-RT RIC is found OK
130         "404":
131           $ref: '#/components/responses/404'
132       summary: Returns info for one Near-RT RIC
133       tags:
134         - NearRT-RIC Repository
135   /rics:
136     get:
137       description: The call returns all Near-RT RICs that supports a given policy
138         type identity
139       operationId: getRics
140       parameters:
141         - description: "The identity of a policy type. If given, all Near-RT RICs supporting the policy type are returned"
142           explode: true
143           in: query
144           name: policyTypeId
145           required: false
146           schema:
147             type: string
148           style: form
149         - description: Specifies the content type that the client expects to receive in response to the request.
150             Only application/json is allowed.
151           in: header
152           name: Accept
153           schema:
154             type: string
155             example: application/json
156       responses:
157         "200":
158           content:
159             application/json:
160               schema:
161                 $ref: '#/components/schemas/RicInfoList'
162               examples:
163                 ric_info_list:
164                   $ref: '#/components/examples/RicInfoList'
165           description: OK
166         "404":
167           $ref: '#/components/responses/404'
168       summary: Query Near-RT RIC information
169       tags:
170         - NearRT-RIC Repository
171   /policytypes:
172     get:
173       operationId: getPolicyTypes
174       parameters:
175         - description: Select types for the given Near-RT RIC identity.
176           explode: true
177           in: query
178           name: nearRtRicId
179           required: false
180           schema:
181             type: string
182           style: form
183         - description: Select types with the given type name (type identity has the
184             format <typename_version>)
185           explode: true
186           in: query
187           name: typeName
188           required: false
189           schema:
190             type: string
191           style: form
192         - description: Select types that are compatible with the given version. This
193             parameter is only applicable in conjunction with type_name. As an example
194             version 1.9.1 is compatible with 1.0.0 but not the other way around. Matching
195             types will be returned sorted in ascending order.
196           explode: true
197           in: query
198           name: compatibleWithVersion
199           required: false
200           schema:
201             type: string
202           style: form
203         - description: Specifies the content type that the client expects to receive in response to the request.
204             Only application/json is allowed.
205           in: header
206           name: Accept
207           schema:
208             type: string
209             example: application/json
210       responses:
211         '200':
212           content:
213             application/json:
214               schema:
215                 items:
216                   $ref: '#/components/schemas/PolicyTypeInformation'
217                 type: array
218
219           description: OK - Policy Type IDs found Ok
220         '400':
221           $ref: '#/components/responses/400'
222         '401':
223           $ref: '#/components/responses/401'
224         '403':
225           $ref: '#/components/responses/403'
226         '404':
227           $ref: '#/components/responses/404'
228         '406':
229           $ref: '#/components/responses/406'
230         '429':
231           $ref: '#/components/responses/429'
232         '500':
233           $ref: '#/components/responses/500'
234         '502':
235           $ref: '#/components/responses/502'
236         '503':
237           $ref: '#/components/responses/503'
238       description: Query policy type identities
239       tags:
240         - A1 Policy Management
241   /policytypes/{policyTypeId}:
242     get:
243       operationId: getPolicyTypeDefinition
244       parameters:
245         - explode: false
246           in: path
247           name: policyTypeId
248           required: true
249           schema:
250             type: string
251           style: simple
252         - description: Specifies the content type that the client expects to receive in response to the request.
253             Only application/json is allowed.
254           in: header
255           name: Accept
256           schema:
257             type: string
258             example: application/json
259       responses:
260         '200':
261           content:
262             application/json:
263               schema:
264                 $ref: '#/components/schemas/PolicyObject'
265               examples:
266                 policyObject:
267                   $ref: '#/components/examples/PolicyObject'
268           description: OK - schema of the given policy type
269         '400':
270           $ref: '#/components/responses/400'
271         '401':
272           $ref: '#/components/responses/401'
273         '403':
274           $ref: '#/components/responses/403'
275         '404':
276           $ref: '#/components/responses/404'
277         '406':
278           $ref: '#/components/responses/406'
279         '429':
280           $ref: '#/components/responses/429'
281         '500':
282           $ref: '#/components/responses/500'
283         '502':
284           $ref: '#/components/responses/502'
285         '503':
286           $ref: '#/components/responses/503'
287       description: Returns a policy type definition
288       tags:
289         - A1 Policy Management
290   /policies/{policyId}:
291     put:
292       operationId: putPolicy
293       parameters:
294         - name: policyId
295           in: path
296           required: true
297           schema:
298             type: string
299       requestBody:
300         required: true
301         content:
302           application/json:
303             schema:
304               $ref: '#/components/schemas/PolicyObject'
305             examples:
306               policyObject:
307                 $ref: '#/components/examples/PolicyObject'
308       responses:
309         '200':
310           content:
311             application/json:
312               schema:
313                 $ref: '#/components/schemas/PolicyObject'
314           description: OK - Policy updated
315         '400':
316           $ref: '#/components/responses/400'
317         '401':
318           $ref: '#/components/responses/401'
319         '403':
320           $ref: '#/components/responses/403'
321         '404':
322           $ref: '#/components/responses/404'
323         '406':
324           $ref: '#/components/responses/406'
325         '411':
326           $ref: '#/components/responses/411'
327         '413':
328           $ref: '#/components/responses/413'
329         '415':
330           $ref: '#/components/responses/415'
331         '423':
332           $ref: '#/components/responses/Locked'
333         '429':
334           $ref: '#/components/responses/429'
335         '500':
336           $ref: '#/components/responses/500'
337         '502':
338           $ref: '#/components/responses/502'
339         '503':
340           $ref: '#/components/responses/503'
341       description: update a policy
342       tags:
343         - A1 Policy Management
344     delete:
345       description: Deleting the policy using policyId.
346       operationId: deletePolicy
347       parameters:
348         - explode: false
349           in: path
350           name: policyId
351           required: true
352           schema:
353             type: string
354           style: simple
355         - description: Specifies the content type that the client expects to receive in response to the request.
356             Only application/json is allowed.
357           in: header
358           name: Accept
359           schema:
360             type: string
361             example: application/json
362       responses:
363         '204':
364           description: 'The created A1 policy was deleted'
365         '400':
366           $ref: '#/components/responses/400'
367         '401':
368           $ref: '#/components/responses/401'
369         '403':
370           $ref: '#/components/responses/403'
371         '404':
372           $ref: '#/components/responses/404'
373         '423':
374           $ref: '#/components/responses/Locked'
375         '429':
376           $ref: '#/components/responses/429'
377         '500':
378           $ref: '#/components/responses/500'
379         '502':
380           $ref: '#/components/responses/502'
381         '503':
382           $ref: '#/components/responses/503'
383       summary: Delete a policy
384       tags:
385         - A1 Policy Management
386     get:
387       operationId: getPolicy
388       parameters:
389         - explode: false
390           in: path
391           name: policyId
392           required: true
393           schema:
394             type: string
395           style: simple
396         - description: Specifies the content type that the client expects to receive in response to the request.
397             Only application/json is allowed.
398           in: header
399           name: Accept
400           schema:
401             type: string
402             example: application/json
403       responses:
404         '200':
405           content:
406             application/json:
407               schema:
408                 $ref: '#/components/schemas/PolicyObject'
409               examples:
410                 policyObject:
411                   $ref: '#/components/examples/PolicyObject'
412           description: OK - Policy found
413         '400':
414           $ref: '#/components/responses/400'
415         '401':
416           $ref: '#/components/responses/401'
417         '403':
418           $ref: '#/components/responses/403'
419         '404':
420           $ref: '#/components/responses/404'
421         '406':
422           $ref: '#/components/responses/406'
423         '429':
424           $ref: '#/components/responses/429'
425         '500':
426           $ref: '#/components/responses/500'
427         '502':
428           $ref: '#/components/responses/502'
429         '503':
430           $ref: '#/components/responses/503'
431       description: Returns a policy
432       tags:
433         - A1 Policy Management
434   /policies:
435     get:
436       description: "Returns a list of A1 policies matching given search criteria.\
437             \ <br>If several query parameters are defined, the policies matching all conditions\
438             \ are returned."
439       operationId: getPolicyIds
440       parameters:
441         - description: Select policies of a given policy type identity.
442           explode: true
443           in: query
444           name: policyTypeId
445           required: false
446           schema:
447             type: string
448           style: form
449         - description: Select policies of a given Near-RT RIC identity.
450           explode: true
451           in: query
452           name: nearRtRicId
453           required: false
454           schema:
455             type: string
456           style: form
457         - description: Select policies owned by a given service.
458           explode: true
459           in: query
460           name: serviceId
461           required: false
462           schema:
463             type: string
464           style: form
465         - description: Select policies of types with the given type name (type identity
466             has the format <typename_version>)
467           explode: true
468           in: query
469           name: typeName
470           required: false
471           schema:
472             type: string
473           style: form
474         - description: Specifies the content type that the client expects to receive in response to the request.
475             Only application/json is allowed.
476           in: header
477           name: Accept
478           schema:
479             type: string
480             example: application/json
481       responses:
482         '200':
483           content:
484             application/json:
485               schema:
486                 items:
487                   $ref: '#/components/schemas/PolicyInformation'
488                 type: array
489           description: OK - Policy identities
490         '400':
491           $ref: '#/components/responses/400'
492         '401':
493           $ref: '#/components/responses/401'
494         '403':
495           $ref: '#/components/responses/403'
496         '404':
497           $ref: '#/components/responses/404'
498         '406':
499           $ref: '#/components/responses/406'
500         '429':
501           $ref: '#/components/responses/429'
502         '500':
503           $ref: '#/components/responses/500'
504         '502':
505           $ref: '#/components/responses/502'
506         '503':
507           $ref: '#/components/responses/503'
508       summary: Query policy identities
509       tags:
510         - A1 Policy Management
511     post:
512       operationId: createPolicy
513       requestBody:
514         required: true
515         content:
516           application/json:
517             schema:
518               $ref: '#/components/schemas/PolicyObjectInformation'
519       responses:
520         '201':
521           description: 'Success case 201 created'
522           content:
523             application/json:
524               schema:
525                 $ref: '#/components/schemas/PolicyObjectInformation'
526           headers:
527             Location:
528               description: 'Contains the URI of the newly created resource'
529               required: true
530               schema:
531                 type: string
532         '400':
533           $ref: '#/components/responses/400'
534         '401':
535           $ref: '#/components/responses/401'
536         '403':
537           $ref: '#/components/responses/403'
538         '404':
539           $ref: '#/components/responses/404'
540         '406':
541           $ref: '#/components/responses/406'
542         '423':
543           $ref: '#/components/responses/Locked'
544         '429':
545           $ref: '#/components/responses/429'
546         '500':
547           $ref: '#/components/responses/500'
548         '502':
549           $ref: '#/components/responses/502'
550         '503':
551           $ref: '#/components/responses/503'
552       description: 'To create A1 policies'
553       tags:
554         - A1 Policy Management
555   /configuration:
556     get:
557       operationId: getConfiguration
558       responses:
559         "200":
560           content:
561             application/json:
562               schema:
563                 type: string
564           description: OK - Application configuration received
565         "404":
566           $ref: '#/components/responses/404'
567
568       description: Returns the contents of the application configuration
569       tags:
570         - Configuration
571     put:
572       operationId: putConfiguration
573       requestBody:
574         content:
575           application/json:
576             schema:
577               type: object
578         required: true
579       responses:
580         "200":
581           content:
582             '*/*':
583               schema:
584                 $ref: '#/components/schemas/void'
585           description: OK - Configuration updated
586         "400":
587           $ref: '#/components/responses/400'
588       description: Replace the current configuration file with the given configuration
589       tags:
590         - Configuration
591   /services/{serviceId}/keepalive:
592     put:
593       description: A registered service should invoke this operation regularly to
594         indicate that it is still alive. If a registered service fails to invoke this
595         operation before the end of a timeout period the service will be deregistered
596         and all its A1 policies wil be removed. (This timeout can be set or disabled
597         when each service is initially registered)
598       operationId: keepAliveService
599       parameters:
600         - explode: false
601           in: path
602           name: serviceId
603           required: true
604           schema:
605             type: string
606           style: simple
607         - description: Specifies the content type that the client expects to receive in response to the request.
608             Only application/json is allowed.
609           in: header
610           name: Accept
611           schema:
612             type: string
613             example: application/json
614       requestBody:
615         required: false
616         content:
617           application/json:
618             schema:
619               type: string
620       responses:
621         "200":
622           content:
623             '*/*':
624               schema:
625                 type: object
626           description: "OK - Service supervision timer refreshed, OK"
627         "404":
628           $ref: '#/components/responses/404'
629       summary: Heartbeat indicates that the service is running
630       tags:
631         - Service Registry and Supervision
632   /services:
633     get:
634       description: Either information about a registered service with given identity
635         or all registered services are returned.
636       operationId: getServices
637       parameters:
638         - description: The identity of the service
639           explode: true
640           in: query
641           name: serviceId
642           required: false
643           schema:
644             type: string
645           style: form
646         - description: Specifies the content type that the client expects to receive in response to the request.
647             Only application/json is allowed.
648           in: header
649           name: Accept
650           schema:
651             type: string
652             example: application/json
653       responses:
654         "200":
655           content:
656             application/json:
657               schema:
658                 $ref: '#/components/schemas/ServiceStatusList'
659               examples:
660                 service_status_list:
661                   $ref: '#/components/examples/ServiceStatusList'
662           description: OK
663         "404":
664           $ref: '#/components/responses/404'
665       summary: Returns service information
666       tags:
667         - Service Registry and Supervision
668     put:
669       description: "Registering a service is needed to:<ul><li>Get callbacks about\
670             \ available NearRT RICs.</li><li>Activate supervision of the service. If a\
671             \ service is inactive, its policies will automatically be deleted.</li></ul>Policies\
672             \ can be created even if the service is not registerred. This is a feature\
673             \ which it is optional to use."
674       operationId: putService
675       requestBody:
676         content:
677           application/json:
678             schema:
679               $ref: '#/components/schemas/ServiceRegistrationInfo'
680         required: true
681       responses:
682         "200":
683           content:
684             '*/*':
685               schema:
686                 type: object
687           description: OK - Service updated
688         "201":
689           content:
690             '*/*':
691               schema:
692                 type: object
693           description: Created - Service created
694         "400":
695           $ref: '#/components/responses/400'
696       summary: Register a service
697       tags:
698         - Service Registry and Supervision
699       callbacks:
700         RICStatus:
701           "{$request.body#/callback_url}":
702             post:
703               description: The URL to this call is registered at Service registration.
704               operationId: serviceCallback
705               requestBody:
706                 content:
707                   application/json:
708                     schema:
709                       $ref: '#/components/schemas/ServiceCallbackInfo'
710                 required: true
711               responses:
712                 "200":
713                   content:
714                     application/json:
715                       schema:
716                         $ref: '#/components/schemas/void'
717                   description: OK
718                 "404":
719                   $ref: '#/components/responses/404'
720               summary: Callback for Near-RT RIC status
721               tags:
722                 - Service callbacks
723   /services/{serviceId}:
724     delete:
725       operationId: deleteService
726       parameters:
727         - explode: false
728           in: path
729           name: serviceId
730           required: true
731           schema:
732             type: string
733           style: simple
734         - description: Specifies the content type that the client expects to receive in response to the request.
735             Only application/json is allowed.
736           in: header
737           name: Accept
738           schema:
739             type: string
740             example: application/json
741       responses:
742         "204":
743           content:
744             '*/*':
745               schema:
746                 type: object
747           description: No Content - Service unregistered
748         "404":
749           $ref: '#/components/responses/404'
750       description: Unregister a service
751       tags:
752         - Service Registry and Supervision
753 components:
754   examples:
755     ServiceStatusList:
756       description: List of service information
757       value:
758         serviceList:
759           - callbackUrl: callbackUrl
760             serviceId: serviceId
761             keepAliveIntervalSeconds: 0
762             timeSinceLastActivitySeconds: 6
763           - callbackUrl: callbackUrl
764             serviceId: serviceId
765             keepAliveIntervalSeconds: 0
766             timeSinceLastActivitySeconds: 6
767     PolicyStatusInfo:
768       description: Status for one A1-P Policy
769       value:
770         lastModified: last_modified
771         status:
772           value:
773             status: status
774     StatusInfo:
775       value:
776         status: status
777     RicInfo:
778       value:
779         ricId: ricId
780         managedElementIds:
781           - managedElementId
782           - managedElementId
783         state: UNAVAILABLE
784         policyTypeIds:
785           - policyTypeId
786           - policyTypeId
787     RicInfoList:
788       value:
789         rics:
790           - ricId: ricId
791             managedElementIds:
792               - managedElementId
793               - managedElementId
794             state: UNAVAILABLE
795             policyTypeIds:
796               - policyTypeId
797               - policyTypeId
798           - ricId: ricId
799             managedElementIds:
800               - managedElementId
801               - managedElementId
802             state: UNAVAILABLE
803             policyTypeIds:
804               - policyTypeId
805               - policyTypeId
806     PolicyObject:
807       value:
808         scope:
809           ueId:
810             guRanUeId:
811               globalGnbId:
812                 plmnId:
813                   mcc: "123"
814                   mnc: "45"
815                 gnbId:
816                   gnbIdLength: 24
817                   gnbIdValue: 12345678
818               RanUeId: 'a31c510b20e64a74'
819           groupId:
820             spId: 123
821           qosId:
822             5qI: 1
823           cellId:
824             plmnId:
825               mcc: "123"
826               mnc: "45"
827             cId:
828               ncI: 123
829         qosObjectives:
830           gfbr: 100
831           mfbr: 200
832           priorityLevel: 3
833           pdb: 50
834   schemas:
835     PolicyTypeInformation:
836       description: >-
837         Available policy types and for each policy type identifier the Near-RT
838         RIC identifiers of those Near-RT RICs that support the related A1 policy
839         type
840       type: object
841       properties:
842         policyTypeId:
843           description: Identity of the policy type
844           type: string
845         nearRtRicId:
846           $ref: '#/components/schemas/NearRtRicId'
847       required:
848         - policyTypeId
849         - nearRtRicId
850     PolicyObjectInformation:
851       description: Information related to the creation of the policy
852       type: object
853       properties:
854         nearRtRicId:
855           description: identity of the target Near-RT RIC
856           type: string
857           example:
858             'Near-RT-Ric-ID'
859         transient:
860           default: false
861           description: "if true, the policy is deleted at RIC restart. If false, its\
862                 \ value is maintained by this service until explicitly deleted. Default\
863                 \ false."
864           nullable: false
865           type: boolean
866         policyId:
867           description: identity of the Policy
868           type: string
869           example:
870             'POLICY-ID'
871         serviceId:
872           description: the identity of the service owning the policy. This can be
873             used to group the policies (it is possible to get all policies associated
874             to a service). Note that the service does not need to be registered.
875           type: string
876           example:
877             'rApp ID'
878         policyObject:
879           $ref: '#/components/schemas/PolicyObject'
880         statusNotificationUri:
881           description: Callback URI for policy status updates
882           type: string
883         policyTypeId:
884           description: identity of the policy type
885           type: string
886           example: 'ORAN_QOS_1.0.0(typeName_SemVersion)'
887       required:
888         - nearRtRicId
889         - policyObject
890         - policyTypeId
891     ErrorInformation:
892       description: Problem as defined in https://tools.ietf.org/html/rfc7807
893       properties:
894         detail:
895           description: ' A human-readable explanation specific to this occurrence
896                 of the problem.'
897           example: Policy type not found
898           type: string
899         title:
900           description: 'A specific error name'
901           type: string
902           example: Not Found
903         status:
904           description: 'The HTTP status code generated by the origin server for this
905                 occurrence of the problem. '
906           example: 404
907           format: int32
908           type: integer
909       type: object
910     PolicyObject:
911       description: 'Policy Object is a JSON representation of an A1 policy'
912       type: object
913     void:
914       description: Void/empty
915       type: object
916     StatusInfo:
917       properties:
918         status:
919           description: status text
920           type: string
921       type: object
922     AuthorizationResult:
923       description: Result of authorization
924       example:
925         result: true
926       properties:
927         result:
928           description: "If true, the access is granted"
929           type: boolean
930       required:
931         - result
932       type: object
933     RicInfo:
934       description: Information for a Near-RT RIC
935       properties:
936         ricId:
937           description: identity of the Near-RT RIC
938           type: string
939         managedElementIds:
940           description: O1 identities for managed entities
941           items:
942             description: O1 identities for managed entities
943             type: string
944           type: array
945         state:
946           description: Represents the states for a Near-RT RIC
947           enum:
948             - UNAVAILABLE
949             - AVAILABLE
950             - SYNCHRONIZING
951             - CONSISTENCY_CHECK
952           type: string
953         policyTypeIds:
954           description: supported policy types
955           items:
956             description: supported policy types
957             type: string
958           type: array
959       type: object
960     ServiceRegistrationInfo:
961       description: Information for one service
962       properties:
963         callbackUrl:
964           description: callback for notifying of Near-RT RIC state changes
965           type: string
966         serviceId:
967           description: identity of the service
968           type: string
969         keepAliveIntervalSeconds:
970           description: "keep alive interval for the service. This is used to enable\
971                 \ optional heartbeat supervision of the service. If set (> 0) the registered\
972                 \ service should regularly invoke a 'keepalive' REST call. When a service\
973                 \ fails to invoke this 'keepalive' call within the configured time, the\
974                 \ service is considered unavailable. An unavailable service will be automatically\
975                 \ deregistered and its policies will be deleted. Value 0 means timeout\
976                 \ supervision is disabled."
977           format: int64
978           type: integer
979       required:
980         - serviceId
981       type: object
982     PolicyStatusInfo:
983       description: Status for one A1-P Policy
984       properties:
985         lastModified:
986           description: "timestamp, last modification time"
987           type: string
988         status:
989           description: the Policy status
990           type: object
991       type: object
992     ServiceStatus:
993       properties:
994         callbackUrl:
995           description: callback for notifying of RIC synchronization
996           type: string
997         serviceId:
998           description: identity of the service
999           type: string
1000         keepAliveIntervalSeconds:
1001           description: policy keep alive timeout
1002           format: int64
1003           type: integer
1004         timeSinceLastActivitySeconds:
1005           description: time since last invocation by the service
1006           format: int64
1007           type: integer
1008       type: object
1009     RicInfoList:
1010       description: List of Near-RT RIC information
1011       properties:
1012         rics:
1013           description: List of Near-RT RIC information
1014           items:
1015             $ref: '#/components/schemas/RicInfo'
1016           type: array
1017       type: object
1018     input:
1019       description: input
1020       properties:
1021         accessType:
1022           description: Access type
1023           enum:
1024             - READ
1025             - WRITE
1026             - DELETE
1027           type: string
1028         authToken:
1029           description: Authorization token
1030           type: string
1031         policyTypeId:
1032           description: Policy type identifier
1033           type: string
1034       required:
1035         - accessType
1036         - authToken
1037         - policyTypeId
1038       type: object
1039     PolicyAuthorization:
1040       description: Authorization request for A1 policy requests
1041       properties:
1042         input:
1043           $ref: '#/components/schemas/input'
1044       required:
1045         - input
1046       type: object
1047     NearRtRicId:
1048       description: Identity of the policy
1049       type: string
1050     PolicyInformation:
1051       description: >-
1052         Near-RT RIC identifiers where A1 policies exist and for each Near-RT RIC
1053         identifier the policy identifiers of those policies that exist in that
1054         Near-RT RIC
1055       type: object
1056       properties:
1057         policyId:
1058           description: Identity of the policy
1059           type: string
1060         nearRtRicId:
1061           $ref: '#/components/schemas/NearRtRicId'
1062       required:
1063         - policyId
1064         - nearRtRicId
1065     ServiceStatusList:
1066       properties:
1067         serviceList:
1068           description: List of service information
1069           items:
1070             $ref: '#/components/schemas/ServiceStatus'
1071           type: array
1072       type: object
1073     ServiceCallbackInfo:
1074       description: Information transferred as in Service callbacks (callback_url)
1075       properties:
1076         ricId:
1077           description: identity of a Near-RT RIC
1078           type: string
1079         eventType:
1080           description: "values:\nAVAILABLE: the  Near-RT RIC has become available\
1081                 \ for A1 Policy management"
1082           enum:
1083             - AVAILABLE
1084           type: string
1085       required:
1086         - eventType
1087         - ricId
1088       type: object
1089     Link:
1090       properties:
1091         templated:
1092           type: boolean
1093         href:
1094           type: string
1095       type: object
1096     ProblemDetails:
1097       description: >-
1098         A problem detail to carry details in an HTTP response according to RFC
1099         7807
1100       type: object
1101       properties:
1102         type:
1103           description: >-
1104             a URI reference according to IETF RFC 3986 that identifies the
1105             problem type
1106           type: string
1107         title:
1108           description: human-readable summary of the problem type
1109           type: string
1110         status:
1111           description: the HTTP status code
1112           type: number
1113         detail:
1114           description: 'human-readable explanation '
1115           type: string
1116         instance:
1117           description: URI reference that identifies the specific occurrence of the problem
1118           type: string
1119   responses:
1120     '400':
1121       description: Bad Request
1122       content:
1123         application/problem+json:
1124           schema:
1125             $ref: '#/components/schemas/ProblemDetails'
1126     '401':
1127       description: Unauthorized
1128       content:
1129         application/problem+json:
1130           schema:
1131             $ref: '#/components/schemas/ProblemDetails'
1132     '403':
1133       description: Forbidden
1134       content:
1135         application/problem+json:
1136           schema:
1137             $ref: '#/components/schemas/ProblemDetails'
1138     '404':
1139       description: Not Found
1140       content:
1141         application/problem+json:
1142           schema:
1143             $ref: '#/components/schemas/ProblemDetails'
1144     '405':
1145       description: Method Not Allowed
1146       content:
1147         application/problem+json:
1148           schema:
1149             $ref: '#/components/schemas/ProblemDetails'
1150     '406':
1151       description: Not Acceptable
1152       content:
1153         application/problem+json:
1154           schema:
1155             $ref: '#/components/schemas/ProblemDetails'
1156     '409':
1157       description: Conflict
1158       content:
1159         application/problem+json:
1160           schema:
1161             $ref: '#/components/schemas/ProblemDetails'
1162     '411':
1163       description: Length Required
1164       content:
1165         application/problem+json:
1166           schema:
1167             $ref: '#/components/schemas/ProblemDetails'
1168     '413':
1169       description: Payload Too Large
1170       content:
1171         application/problem+json:
1172           schema:
1173             $ref: '#/components/schemas/ProblemDetails'
1174     '415':
1175       description: Unsupported Media Type
1176       content:
1177         application/problem+json:
1178           schema:
1179             $ref: '#/components/schemas/ProblemDetails'
1180     '429':
1181       description: Too Many Request
1182       content:
1183         application/problem+json:
1184           schema:
1185             $ref: '#/components/schemas/ProblemDetails'
1186     '500':
1187       description: Internal Server Error
1188       content:
1189         application/problem+json:
1190           schema:
1191             $ref: '#/components/schemas/ProblemDetails'
1192     '502':
1193       description: Bad Gateway
1194       content:
1195         application/problem+json:
1196           schema:
1197             $ref: '#/components/schemas/ProblemDetails'
1198     '503':
1199       description: Service Unavailable
1200       content:
1201         application/problem+json:
1202           schema:
1203             $ref: '#/components/schemas/ProblemDetails'
1204     Locked:
1205       description: "Locked - HTTP Status code which can be used when the state is Locked"
1206       content:
1207         application/problem+json:
1208           schema:
1209             $ref: '#/components/schemas/ErrorInformation'
1210           example:
1211             status: 423
1212             title: Locked
1213             detail: State is Locked in the  provided request.