Add generation of API yaml file
[ccsdk/oran.git] / a1-policy-management / api / pms-api.json
1 {
2     "basePath": "/",
3     "paths": {
4         "/policy_types": {"get": {
5             "summary": "Query policy type names",
6             "deprecated": false,
7             "produces": ["*/*"],
8             "operationId": "getPolicyTypesUsingGET_1",
9             "responses": {
10                 "200": {
11                     "schema": {
12                         "type": "array",
13                         "items": {"type": "string"}
14                     },
15                     "description": "Policy type names"
16                 },
17                 "401": {"description": "Unauthorized"},
18                 "403": {"description": "Forbidden"},
19                 "404": {
20                     "schema": {"type": "string"},
21                     "description": "Near-RT RIC is not found"
22                 }
23             },
24             "parameters": [{
25                 "in": "query",
26                 "allowEmptyValue": false,
27                 "name": "ric",
28                 "description": "The name of the Near-RT RIC to get types for.",
29                 "type": "string",
30                 "required": false
31             }],
32             "tags": ["A1 Policy Management Version 1.0"]
33         }},
34         "/v2/status": {"get": {
35             "summary": "Returns status and statistics of this service",
36             "deprecated": false,
37             "produces": ["application/json"],
38             "operationId": "getStatusUsingGET_1",
39             "responses": {
40                 "200": {
41                     "schema": {"$ref": "#/definitions/status_info_v2"},
42                     "description": "Service is living"
43                 },
44                 "401": {"description": "Unauthorized"},
45                 "403": {"description": "Forbidden"},
46                 "404": {"description": "Not Found"}
47             },
48             "tags": ["A1 Policy Management Version 2.0 (in progress)"]
49         }},
50         "/v2/policy-types": {"get": {
51             "summary": "Query policy type identities",
52             "deprecated": false,
53             "produces": ["application/json"],
54             "operationId": "getPolicyTypesUsingGET",
55             "responses": {
56                 "200": {
57                     "schema": {"$ref": "#/definitions/policytype_id_list_v2"},
58                     "description": "Policy type IDs"
59                 },
60                 "401": {"description": "Unauthorized"},
61                 "403": {"description": "Forbidden"},
62                 "404": {
63                     "schema": {"$ref": "#/definitions/error_information"},
64                     "description": "Near-RT RIC is not found"
65                 }
66             },
67             "parameters": [{
68                 "in": "query",
69                 "allowEmptyValue": false,
70                 "name": "ric_id",
71                 "description": "The identity of the Near-RT RIC to get types for.",
72                 "type": "string",
73                 "required": false
74             }],
75             "tags": ["A1 Policy Management Version 2.0 (in progress)"]
76         }},
77         "/services": {
78             "get": {
79                 "summary": "Returns service information",
80                 "deprecated": false,
81                 "produces": ["*/*"],
82                 "operationId": "getServicesUsingGET",
83                 "responses": {
84                     "200": {
85                         "schema": {
86                             "type": "array",
87                             "items": {"$ref": "#/definitions/service_status_v1"}
88                         },
89                         "description": "OK"
90                     },
91                     "401": {"description": "Unauthorized"},
92                     "403": {"description": "Forbidden"},
93                     "404": {
94                         "schema": {"type": "string"},
95                         "description": "Service is not found"
96                     }
97                 },
98                 "parameters": [{
99                     "in": "query",
100                     "allowEmptyValue": false,
101                     "name": "name",
102                     "description": "The name of the service",
103                     "type": "string",
104                     "required": false
105                 }],
106                 "tags": ["A1 Policy Management Version 1.0"]
107             },
108             "delete": {
109                 "summary": "Delete a service",
110                 "deprecated": false,
111                 "produces": ["*/*"],
112                 "operationId": "deleteServiceUsingDELETE",
113                 "responses": {
114                     "200": {
115                         "schema": {"type": "string"},
116                         "description": "OK"
117                     },
118                     "401": {"description": "Unauthorized"},
119                     "204": {
120                         "schema": {"type": "string"},
121                         "description": "Service deleted"
122                     },
123                     "403": {"description": "Forbidden"},
124                     "404": {
125                         "schema": {"type": "string"},
126                         "description": "Service not found"
127                     }
128                 },
129                 "parameters": [{
130                     "in": "query",
131                     "allowEmptyValue": false,
132                     "name": "name",
133                     "description": "The name of the service",
134                     "type": "string",
135                     "required": true
136                 }],
137                 "tags": ["A1 Policy Management Version 1.0"]
138             }
139         },
140         "/v2/services/{service_id}": {"delete": {
141             "summary": "Unregister a service",
142             "deprecated": false,
143             "produces": ["*/*"],
144             "operationId": "deleteServiceUsingDELETE_1",
145             "responses": {
146                 "200": {"description": "Not used"},
147                 "401": {"description": "Unauthorized"},
148                 "204": {
149                     "schema": {"type": "object"},
150                     "description": "Service unregistered"
151                 },
152                 "403": {"description": "Forbidden"},
153                 "404": {
154                     "schema": {"$ref": "#/definitions/error_information"},
155                     "description": "Service not found"
156                 }
157             },
158             "parameters": [{
159                 "in": "path",
160                 "name": "service_id",
161                 "description": "service_id",
162                 "type": "string",
163                 "required": true
164             }],
165             "tags": ["A1 Policy Management Version 2.0 (in progress)"]
166         }},
167         "/policy": {
168             "get": {
169                 "summary": "Returns a policy configuration",
170                 "deprecated": false,
171                 "produces": ["*/*"],
172                 "operationId": "getPolicyUsingGET_1",
173                 "responses": {
174                     "200": {
175                         "schema": {"type": "object"},
176                         "description": "Policy found"
177                     },
178                     "401": {"description": "Unauthorized"},
179                     "403": {"description": "Forbidden"},
180                     "404": {"description": "Policy is not found"}
181                 },
182                 "parameters": [{
183                     "in": "query",
184                     "allowEmptyValue": false,
185                     "name": "id",
186                     "description": "The identity of the policy instance.",
187                     "type": "string",
188                     "required": true
189                 }],
190                 "tags": ["A1 Policy Management Version 1.0"]
191             },
192             "delete": {
193                 "summary": "Delete a policy",
194                 "deprecated": false,
195                 "produces": ["*/*"],
196                 "operationId": "deletePolicyUsingDELETE_1",
197                 "responses": {
198                     "200": {"description": "Not used"},
199                     "401": {"description": "Unauthorized"},
200                     "423": {
201                         "schema": {"type": "string"},
202                         "description": "Near-RT RIC is not operational"
203                     },
204                     "204": {"description": "Policy deleted"},
205                     "403": {"description": "Forbidden"},
206                     "404": {
207                         "schema": {"type": "string"},
208                         "description": "Policy is not found"
209                     }
210                 },
211                 "parameters": [{
212                     "in": "query",
213                     "allowEmptyValue": false,
214                     "name": "id",
215                     "description": "The identity of the policy instance.",
216                     "type": "string",
217                     "required": true
218                 }],
219                 "tags": ["A1 Policy Management Version 1.0"]
220             },
221             "put": {
222                 "summary": "Put a policy",
223                 "deprecated": false,
224                 "produces": ["*/*"],
225                 "operationId": "putPolicyUsingPUT_1",
226                 "responses": {
227                     "200": {"description": "Policy updated"},
228                     "201": {"description": "Policy created"},
229                     "401": {"description": "Unauthorized"},
230                     "423": {
231                         "schema": {"type": "string"},
232                         "description": "Near-RT RIC is not operational"
233                     },
234                     "403": {"description": "Forbidden"},
235                     "404": {
236                         "schema": {"type": "string"},
237                         "description": "Near-RT RIC or policy type is not found"
238                     }
239                 },
240                 "parameters": [
241                     {
242                         "in": "query",
243                         "allowEmptyValue": false,
244                         "name": "id",
245                         "description": "The identity of the policy instance.",
246                         "type": "string",
247                         "required": true
248                     },
249                     {
250                         "schema": {"type": "object"},
251                         "in": "body",
252                         "name": "jsonBody",
253                         "description": "jsonBody",
254                         "required": true
255                     },
256                     {
257                         "in": "query",
258                         "allowEmptyValue": false,
259                         "name": "ric",
260                         "description": "The name of the Near-RT RIC where the policy will be created.",
261                         "type": "string",
262                         "required": true
263                     },
264                     {
265                         "in": "query",
266                         "allowEmptyValue": false,
267                         "name": "service",
268                         "description": "The name of the service creating the policy.",
269                         "type": "string",
270                         "required": true
271                     },
272                     {
273                         "default": false,
274                         "in": "query",
275                         "allowEmptyValue": false,
276                         "name": "transient",
277                         "x-example": false,
278                         "description": "If the policy is transient or not (boolean defaulted to false). A policy is transient if it will be forgotten when the service needs to reconnect to the Near-RT RIC.",
279                         "type": "boolean",
280                         "required": false
281                     },
282                     {
283                         "in": "query",
284                         "allowEmptyValue": false,
285                         "name": "type",
286                         "description": "The name of the policy type.",
287                         "type": "string",
288                         "required": false
289                     }
290                 ],
291                 "tags": ["A1 Policy Management Version 1.0"],
292                 "consumes": ["application/json"]
293             }
294         },
295         "/policies": {"get": {
296             "summary": "Query policies",
297             "deprecated": false,
298             "produces": ["*/*"],
299             "operationId": "getPoliciesUsingGET",
300             "responses": {
301                 "200": {
302                     "schema": {
303                         "type": "array",
304                         "items": {"$ref": "#/definitions/policy_info_v1"}
305                     },
306                     "description": "Policies"
307                 },
308                 "401": {"description": "Unauthorized"},
309                 "403": {"description": "Forbidden"},
310                 "404": {
311                     "schema": {"type": "string"},
312                     "description": "Near-RT RIC or type not found"
313                 }
314             },
315             "parameters": [
316                 {
317                     "in": "query",
318                     "allowEmptyValue": false,
319                     "name": "ric",
320                     "description": "The name of the Near-RT RIC to get policies for.",
321                     "type": "string",
322                     "required": false
323                 },
324                 {
325                     "in": "query",
326                     "allowEmptyValue": false,
327                     "name": "service",
328                     "description": "The name of the service to get policies for.",
329                     "type": "string",
330                     "required": false
331                 },
332                 {
333                     "in": "query",
334                     "allowEmptyValue": false,
335                     "name": "type",
336                     "description": "The name of the policy type to get policies for.",
337                     "type": "string",
338                     "required": false
339                 }
340             ],
341             "tags": ["A1 Policy Management Version 1.0"]
342         }},
343         "/v2/policies/{policy_id}": {
344             "get": {
345                 "summary": "Returns a policy",
346                 "deprecated": false,
347                 "produces": ["application/json"],
348                 "operationId": "getPolicyUsingGET",
349                 "responses": {
350                     "200": {
351                         "schema": {"$ref": "#/definitions/policy_info_v2"},
352                         "description": "Policy found"
353                     },
354                     "401": {"description": "Unauthorized"},
355                     "403": {"description": "Forbidden"},
356                     "404": {
357                         "schema": {"$ref": "#/definitions/error_information"},
358                         "description": "Policy is not found"
359                     }
360                 },
361                 "parameters": [{
362                     "in": "path",
363                     "name": "policy_id",
364                     "description": "policy_id",
365                     "type": "string",
366                     "required": true
367                 }],
368                 "tags": ["A1 Policy Management Version 2.0 (in progress)"]
369             },
370             "delete": {
371                 "summary": "Delete a policy",
372                 "deprecated": false,
373                 "produces": ["*/*"],
374                 "operationId": "deletePolicyUsingDELETE",
375                 "responses": {
376                     "200": {"description": "Not used"},
377                     "401": {"description": "Unauthorized"},
378                     "423": {
379                         "schema": {"$ref": "#/definitions/error_information"},
380                         "description": "Near-RT RIC is not operational"
381                     },
382                     "204": {"description": "Policy deleted"},
383                     "403": {"description": "Forbidden"},
384                     "404": {
385                         "schema": {"$ref": "#/definitions/error_information"},
386                         "description": "Policy is not found"
387                     }
388                 },
389                 "parameters": [{
390                     "in": "path",
391                     "name": "policy_id",
392                     "description": "policy_id",
393                     "type": "string",
394                     "required": true
395                 }],
396                 "tags": ["A1 Policy Management Version 2.0 (in progress)"]
397             }
398         },
399         "/policy_schema": {"get": {
400             "summary": "Returns one policy type schema definition",
401             "deprecated": false,
402             "produces": ["*/*"],
403             "operationId": "getPolicySchemaUsingGET",
404             "responses": {
405                 "200": {
406                     "schema": {"type": "object"},
407                     "description": "Policy schema"
408                 },
409                 "401": {"description": "Unauthorized"},
410                 "403": {"description": "Forbidden"},
411                 "404": {
412                     "schema": {"type": "string"},
413                     "description": "The policy type is not found"
414                 }
415             },
416             "parameters": [{
417                 "in": "query",
418                 "allowEmptyValue": false,
419                 "name": "id",
420                 "description": "The identity of the policy type to get the definition for.",
421                 "type": "string",
422                 "required": true
423             }],
424             "tags": ["A1 Policy Management Version 1.0"]
425         }},
426         "/rics": {"get": {
427             "summary": "Query Near-RT RIC information",
428             "deprecated": false,
429             "produces": ["*/*"],
430             "operationId": "getRicsUsingGET_1",
431             "responses": {
432                 "200": {
433                     "schema": {
434                         "type": "array",
435                         "items": {"$ref": "#/definitions/ric_info_v1"}
436                     },
437                     "description": "OK"
438                 },
439                 "401": {"description": "Unauthorized"},
440                 "403": {"description": "Forbidden"},
441                 "404": {
442                     "schema": {"type": "string"},
443                     "description": "Policy type is not found"
444                 }
445             },
446             "parameters": [{
447                 "in": "query",
448                 "allowEmptyValue": false,
449                 "name": "policyType",
450                 "description": "The name of the policy type",
451                 "type": "string",
452                 "required": false
453             }],
454             "tags": ["A1 Policy Management Version 1.0"]
455         }},
456         "/policy_status": {"get": {
457             "summary": "Returns a policy status",
458             "deprecated": false,
459             "produces": ["*/*"],
460             "operationId": "getPolicyStatusUsingGET_1",
461             "responses": {
462                 "200": {
463                     "schema": {"type": "object"},
464                     "description": "Policy status"
465                 },
466                 "401": {"description": "Unauthorized"},
467                 "403": {"description": "Forbidden"},
468                 "404": {
469                     "schema": {"type": "string"},
470                     "description": "Policy is not found"
471                 }
472             },
473             "parameters": [{
474                 "in": "query",
475                 "allowEmptyValue": false,
476                 "name": "id",
477                 "description": "The identity of the policy.",
478                 "type": "string",
479                 "required": true
480             }],
481             "tags": ["A1 Policy Management Version 1.0"]
482         }},
483         "/v2/policies/{policy_id}/status": {"get": {
484             "summary": "Returns a policy status",
485             "deprecated": false,
486             "produces": ["application/json"],
487             "operationId": "getPolicyStatusUsingGET",
488             "responses": {
489                 "200": {
490                     "schema": {"$ref": "#/definitions/policy_status_info_v2"},
491                     "description": "Policy status"
492                 },
493                 "401": {"description": "Unauthorized"},
494                 "403": {"description": "Forbidden"},
495                 "404": {
496                     "schema": {"$ref": "#/definitions/error_information"},
497                     "description": "Policy is not found"
498                 }
499             },
500             "parameters": [{
501                 "in": "path",
502                 "name": "policy_id",
503                 "description": "policy_id",
504                 "type": "string",
505                 "required": true
506             }],
507             "tags": ["A1 Policy Management Version 2.0 (in progress)"]
508         }},
509         "/v2/rics": {"get": {
510             "summary": "Query Near-RT RIC information",
511             "deprecated": false,
512             "produces": ["application/json"],
513             "description": "The call returns all Near-RT RICs that supports a given policy type identity",
514             "operationId": "getRicsUsingGET",
515             "responses": {
516                 "200": {
517                     "schema": {"$ref": "#/definitions/ric_info_list_v2"},
518                     "description": "OK"
519                 },
520                 "401": {"description": "Unauthorized"},
521                 "403": {"description": "Forbidden"},
522                 "404": {
523                     "schema": {"$ref": "#/definitions/error_information"},
524                     "description": "Policy type is not found"
525                 }
526             },
527             "parameters": [{
528                 "in": "query",
529                 "allowEmptyValue": false,
530                 "name": "policytype_id",
531                 "description": "The identity of a policy type. If given, all Near-RT RICs supporteing the policy type are returned",
532                 "type": "string",
533                 "required": false
534             }],
535             "tags": ["A1 Policy Management Version 2.0 (in progress)"]
536         }},
537         "/v2/configuration": {
538             "get": {
539                 "summary": "Returns the contents of the configuration file",
540                 "deprecated": false,
541                 "produces": ["application/json"],
542                 "description": "Note that the file contents is not relevant if the Consul is used.",
543                 "operationId": "getConfigurationUsingGET",
544                 "responses": {
545                     "200": {
546                         "schema": {"type": "object"},
547                         "description": "Configuration"
548                     },
549                     "401": {"description": "Unauthorized"},
550                     "403": {"description": "Forbidden"},
551                     "404": {
552                         "schema": {"$ref": "#/definitions/error_information"},
553                         "description": "File is not found or readable"
554                     }
555                 },
556                 "tags": ["Component Configuration"]
557             },
558             "put": {
559                 "summary": "Replace the current configuration file with the given configuration",
560                 "deprecated": false,
561                 "produces": ["*/*"],
562                 "description": "Note that the file is ignored if the Consul is used.",
563                 "operationId": "putConfigurationUsingPUT",
564                 "responses": {
565                     "200": {"description": "Configuration updated"},
566                     "201": {"description": "Created"},
567                     "400": {
568                         "schema": {"$ref": "#/definitions/error_information"},
569                         "description": "Invalid configuration provided"
570                     },
571                     "401": {"description": "Unauthorized"},
572                     "500": {
573                         "schema": {"$ref": "#/definitions/error_information"},
574                         "description": "Something went wrong when replacing the configuration. Try again."
575                     },
576                     "403": {"description": "Forbidden"},
577                     "404": {"description": "Not Found"}
578                 },
579                 "parameters": [{
580                     "schema": {"type": "object"},
581                     "in": "body",
582                     "name": "configuration",
583                     "description": "configuration",
584                     "required": true
585                 }],
586                 "tags": ["Component Configuration"],
587                 "consumes": ["application/json"]
588             }
589         },
590         "/policy_ids": {"get": {
591             "summary": "Query policies, only policy identities returned",
592             "deprecated": false,
593             "produces": ["*/*"],
594             "operationId": "getPolicyIdsUsingGET_1",
595             "responses": {
596                 "200": {
597                     "schema": {
598                         "type": "array",
599                         "items": {"type": "string"}
600                     },
601                     "description": "Policy identitiess"
602                 },
603                 "401": {"description": "Unauthorized"},
604                 "403": {"description": "Forbidden"},
605                 "404": {
606                     "schema": {"type": "string"},
607                     "description": "Near-RT RIC or type not found"
608                 }
609             },
610             "parameters": [
611                 {
612                     "in": "query",
613                     "allowEmptyValue": false,
614                     "name": "ric",
615                     "description": "The name of the Near-RT RIC to get policies for.",
616                     "type": "string",
617                     "required": false
618                 },
619                 {
620                     "in": "query",
621                     "allowEmptyValue": false,
622                     "name": "service",
623                     "description": "The name of the service to get policies for.",
624                     "type": "string",
625                     "required": false
626                 },
627                 {
628                     "in": "query",
629                     "allowEmptyValue": false,
630                     "name": "type",
631                     "description": "The name of the policy type to get policies for.",
632                     "type": "string",
633                     "required": false
634                 }
635             ],
636             "tags": ["A1 Policy Management Version 1.0"]
637         }},
638         "/policy_schemas": {"get": {
639             "summary": "Returns policy type schema definitions",
640             "deprecated": false,
641             "produces": ["*/*"],
642             "operationId": "getPolicySchemasUsingGET",
643             "responses": {
644                 "200": {
645                     "schema": {
646                         "type": "array",
647                         "items": {"type": "object"}
648                     },
649                     "description": "Policy schemas"
650                 },
651                 "401": {"description": "Unauthorized"},
652                 "403": {"description": "Forbidden"},
653                 "404": {
654                     "schema": {"type": "string"},
655                     "description": "Near-RT RIC is not found"
656                 }
657             },
658             "parameters": [{
659                 "in": "query",
660                 "allowEmptyValue": false,
661                 "name": "ric",
662                 "description": "The name of the Near-RT RIC to get the definitions for.",
663                 "type": "string",
664                 "required": false
665             }],
666             "tags": ["A1 Policy Management Version 1.0"]
667         }},
668         "/v2/policy-instances": {"get": {
669             "summary": "Query for A1 policy instances",
670             "deprecated": false,
671             "produces": ["application/json"],
672             "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.",
673             "operationId": "getPolicyInstancesUsingGET",
674             "responses": {
675                 "200": {
676                     "schema": {"$ref": "#/definitions/policy_info_list_v2"},
677                     "description": "Policies"
678                 },
679                 "401": {"description": "Unauthorized"},
680                 "403": {"description": "Forbidden"},
681                 "404": {
682                     "schema": {"$ref": "#/definitions/error_information"},
683                     "description": "Near-RT RIC, policy type or service not found"
684                 }
685             },
686             "parameters": [
687                 {
688                     "in": "query",
689                     "allowEmptyValue": false,
690                     "name": "policytype_id",
691                     "description": "The identity of the policy type to get policies for.",
692                     "type": "string",
693                     "required": false
694                 },
695                 {
696                     "in": "query",
697                     "allowEmptyValue": false,
698                     "name": "ric_id",
699                     "description": "The identity of the Near-RT RIC to get policies for.",
700                     "type": "string",
701                     "required": false
702                 },
703                 {
704                     "in": "query",
705                     "allowEmptyValue": false,
706                     "name": "service_id",
707                     "description": "The identity of the service to get policies for.",
708                     "type": "string",
709                     "required": false
710                 }
711             ],
712             "tags": ["A1 Policy Management Version 2.0 (in progress)"]
713         }},
714         "/v2/services": {
715             "get": {
716                 "summary": "Returns service information",
717                 "deprecated": false,
718                 "produces": ["application/json"],
719                 "description": "Either information about a registered service with given identity or all registered services are returned.",
720                 "operationId": "getServicesUsingGET_1",
721                 "responses": {
722                     "200": {
723                         "schema": {"$ref": "#/definitions/service_list_v2"},
724                         "description": "OK"
725                     },
726                     "401": {"description": "Unauthorized"},
727                     "403": {"description": "Forbidden"},
728                     "404": {
729                         "schema": {"$ref": "#/definitions/error_information"},
730                         "description": "Service is not found"
731                     }
732                 },
733                 "parameters": [{
734                     "in": "query",
735                     "allowEmptyValue": false,
736                     "name": "service_id",
737                     "description": "The identity of the service",
738                     "type": "string",
739                     "required": false
740                 }],
741                 "tags": ["A1 Policy Management Version 2.0 (in progress)"]
742             },
743             "put": {
744                 "summary": "Register a service",
745                 "deprecated": false,
746                 "produces": ["*/*"],
747                 "description": "Registering a service is needed to:<ul><li>Get callbacks.<\/li><li>Activate supervision of the service. If a service is inactive, its policies will be deleted.<\/li><\/ul>",
748                 "operationId": "putServiceUsingPUT_1",
749                 "responses": {
750                     "200": {
751                         "schema": {"type": "object"},
752                         "description": "Service updated"
753                     },
754                     "201": {
755                         "schema": {"type": "object"},
756                         "description": "Service created"
757                     },
758                     "400": {
759                         "schema": {"$ref": "#/definitions/error_information"},
760                         "description": "The ServiceRegistrationInfo is not accepted"
761                     },
762                     "401": {"description": "Unauthorized"},
763                     "403": {"description": "Forbidden"},
764                     "404": {"description": "Not Found"}
765                 },
766                 "parameters": [{
767                     "schema": {"$ref": "#/definitions/service_registration_info_v2"},
768                     "in": "body",
769                     "name": "registrationInfo",
770                     "description": "registrationInfo",
771                     "required": true
772                 }],
773                 "tags": ["A1 Policy Management Version 2.0 (in progress)"],
774                 "consumes": ["application/json"]
775             }
776         },
777         "/ric": {"get": {
778             "summary": "Returns the name of a RIC managing one Mananged Element",
779             "deprecated": false,
780             "produces": ["*/*"],
781             "operationId": "getRicUsingGET_1",
782             "responses": {
783                 "200": {
784                     "schema": {"type": "string"},
785                     "description": "Near-RT RIC is found"
786                 },
787                 "401": {"description": "Unauthorized"},
788                 "403": {"description": "Forbidden"},
789                 "404": {
790                     "schema": {"type": "string"},
791                     "description": "Near-RT RIC is not found"
792                 }
793             },
794             "parameters": [{
795                 "in": "query",
796                 "allowEmptyValue": false,
797                 "name": "managedElementId",
798                 "description": "The identity of the Managed Element",
799                 "type": "string",
800                 "required": true
801             }],
802             "tags": ["A1 Policy Management Version 1.0"]
803         }},
804         "/services/keepalive": {"put": {
805             "summary": "Heartbeat from a service",
806             "deprecated": false,
807             "produces": ["*/*"],
808             "operationId": "keepAliveServiceUsingPUT",
809             "responses": {
810                 "200": {
811                     "schema": {"type": "string"},
812                     "description": "Service supervision timer refreshed, OK"
813                 },
814                 "201": {"description": "Created"},
815                 "401": {"description": "Unauthorized"},
816                 "403": {"description": "Forbidden"},
817                 "404": {"description": "The service is not found, needs re-registration"}
818             },
819             "parameters": [{
820                 "in": "query",
821                 "allowEmptyValue": false,
822                 "name": "name",
823                 "description": "The name of the service",
824                 "type": "string",
825                 "required": true
826             }],
827             "tags": ["A1 Policy Management Version 1.0"],
828             "consumes": ["application/json"]
829         }},
830         "/v2/services/{service_id}/keepalive": {"put": {
831             "summary": "Heartbeat indicates that the service is running",
832             "deprecated": false,
833             "produces": ["*/*"],
834             "operationId": "keepAliveServiceUsingPUT_1",
835             "responses": {
836                 "200": {
837                     "schema": {"type": "object"},
838                     "description": "Service supervision timer refreshed, OK"
839                 },
840                 "201": {"description": "Created"},
841                 "401": {"description": "Unauthorized"},
842                 "403": {"description": "Forbidden"},
843                 "404": {
844                     "schema": {"$ref": "#/definitions/error_information"},
845                     "description": "The service is not found, needs re-registration"
846                 }
847             },
848             "parameters": [{
849                 "in": "path",
850                 "name": "service_id",
851                 "description": "service_id",
852                 "type": "string",
853                 "required": true
854             }],
855             "tags": ["A1 Policy Management Version 2.0 (in progress)"],
856             "consumes": ["application/json"]
857         }},
858         "/status": {"get": {
859             "summary": "Returns status and statistics of this service",
860             "deprecated": false,
861             "produces": ["*/*"],
862             "operationId": "getStatusUsingGET",
863             "responses": {
864                 "200": {
865                     "schema": {"type": "string"},
866                     "description": "Service is living"
867                 },
868                 "401": {"description": "Unauthorized"},
869                 "403": {"description": "Forbidden"},
870                 "404": {"description": "Not Found"}
871             },
872             "tags": ["A1 Policy Management Version 1.0"]
873         }},
874         "/v2/rics/ric": {"get": {
875             "summary": "Returns info for one Near-RT RIC",
876             "deprecated": false,
877             "produces": ["application/json"],
878             "description": "Either a Near-RT RIC identity or a Mananged Element identity can be specified.<br>The intention with Mananged Element identity is the ID used in O1 for accessing the traffical element (such as the ID of CU).",
879             "operationId": "getRicUsingGET",
880             "responses": {
881                 "200": {
882                     "schema": {"$ref": "#/definitions/ric_info_v2"},
883                     "description": "Near-RT RIC is found"
884                 },
885                 "401": {"description": "Unauthorized"},
886                 "403": {"description": "Forbidden"},
887                 "404": {
888                     "schema": {"$ref": "#/definitions/error_information"},
889                     "description": "Near-RT RIC is not found"
890                 }
891             },
892             "parameters": [
893                 {
894                     "in": "query",
895                     "allowEmptyValue": false,
896                     "name": "managed_element_id",
897                     "description": "The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned.",
898                     "type": "string",
899                     "required": false
900                 },
901                 {
902                     "in": "query",
903                     "allowEmptyValue": false,
904                     "name": "ric_id",
905                     "description": "The identity of a Near-RT RIC to get information for.",
906                     "type": "string",
907                     "required": false
908                 }
909             ],
910             "tags": ["A1 Policy Management Version 2.0 (in progress)"]
911         }},
912         "/r-app/pms-callback": {"post": {
913             "summary": "Callback for Near-RT RIC status",
914             "deprecated": false,
915             "produces": ["application/json"],
916             "description": "The URL to this call is registerred at Service registration.",
917             "operationId": "jobStatusCallbackUsingPOST",
918             "responses": {
919                 "200": {"description": "OK"},
920                 "201": {"description": "Created"},
921                 "401": {"description": "Unauthorized"},
922                 "403": {"description": "Forbidden"},
923                 "404": {"description": "Not Found"}
924             },
925             "parameters": [{
926                 "schema": {"$ref": "#/definitions/service_callback_info_v2"},
927                 "in": "body",
928                 "name": "body",
929                 "description": "body",
930                 "required": true
931             }],
932             "tags": ["R-App Callbacks"],
933             "consumes": ["application/json"]
934         }},
935         "/v2/policy-types/{policytype_id}": {"get": {
936             "summary": "Returns a policy type definition",
937             "deprecated": false,
938             "produces": ["application/json"],
939             "operationId": "getPolicyTypeUsingGET",
940             "responses": {
941                 "200": {
942                     "schema": {"$ref": "#/definitions/policytype_v2"},
943                     "description": "Policy type"
944                 },
945                 "401": {"description": "Unauthorized"},
946                 "403": {"description": "Forbidden"},
947                 "404": {
948                     "schema": {"$ref": "#/definitions/error_information"},
949                     "description": "Policy type is not found"
950                 }
951             },
952             "parameters": [{
953                 "in": "path",
954                 "name": "policytype_id",
955                 "description": "policytype_id",
956                 "type": "string",
957                 "required": true
958             }],
959             "tags": ["A1 Policy Management Version 2.0 (in progress)"]
960         }},
961         "/service": {"put": {
962             "summary": "Register a service",
963             "deprecated": false,
964             "produces": ["*/*"],
965             "operationId": "putServiceUsingPUT",
966             "responses": {
967                 "200": {
968                     "schema": {"type": "string"},
969                     "description": "Service updated"
970                 },
971                 "201": {
972                     "schema": {"type": "string"},
973                     "description": "Service created"
974                 },
975                 "400": {
976                     "schema": {"type": "string"},
977                     "description": "The ServiceRegistrationInfo is not accepted"
978                 },
979                 "401": {"description": "Unauthorized"},
980                 "403": {"description": "Forbidden"},
981                 "404": {"description": "Not Found"}
982             },
983             "parameters": [{
984                 "schema": {"$ref": "#/definitions/service_registration_info_v1"},
985                 "in": "body",
986                 "name": "registrationInfo",
987                 "description": "registrationInfo",
988                 "required": true
989             }],
990             "tags": ["A1 Policy Management Version 1.0"],
991             "consumes": ["application/json"]
992         }},
993         "/v2/policies": {
994             "get": {
995                 "summary": "Query policy identities",
996                 "deprecated": false,
997                 "produces": ["application/json"],
998                 "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.",
999                 "operationId": "getPolicyIdsUsingGET",
1000                 "responses": {
1001                     "200": {
1002                         "schema": {"$ref": "#/definitions/policy_id_list_v2"},
1003                         "description": "Policy identities"
1004                     },
1005                     "401": {"description": "Unauthorized"},
1006                     "403": {"description": "Forbidden"},
1007                     "404": {
1008                         "schema": {"$ref": "#/definitions/error_information"},
1009                         "description": "Near-RT RIC or type not found"
1010                     }
1011                 },
1012                 "parameters": [
1013                     {
1014                         "in": "query",
1015                         "allowEmptyValue": false,
1016                         "name": "policytype_id",
1017                         "description": "The identity of the policy type to get policies for.",
1018                         "type": "string",
1019                         "required": false
1020                     },
1021                     {
1022                         "in": "query",
1023                         "allowEmptyValue": false,
1024                         "name": "ric_id",
1025                         "description": "The identity of the Near-RT RIC to get policies for.",
1026                         "type": "string",
1027                         "required": false
1028                     },
1029                     {
1030                         "in": "query",
1031                         "allowEmptyValue": false,
1032                         "name": "service_id",
1033                         "description": "The identity of the service to get policies for.",
1034                         "type": "string",
1035                         "required": false
1036                     }
1037                 ],
1038                 "tags": ["A1 Policy Management Version 2.0 (in progress)"]
1039             },
1040             "put": {
1041                 "summary": "Create or update a policy",
1042                 "deprecated": false,
1043                 "produces": ["application/json"],
1044                 "operationId": "putPolicyUsingPUT",
1045                 "responses": {
1046                     "200": {"description": "Policy updated"},
1047                     "201": {"description": "Policy created"},
1048                     "401": {"description": "Unauthorized"},
1049                     "423": {
1050                         "schema": {"$ref": "#/definitions/error_information"},
1051                         "description": "Near-RT RIC is not operational"
1052                     },
1053                     "403": {"description": "Forbidden"},
1054                     "404": {
1055                         "schema": {"$ref": "#/definitions/error_information"},
1056                         "description": "Near-RT RIC or policy type is not found"
1057                     }
1058                 },
1059                 "parameters": [{
1060                     "schema": {"$ref": "#/definitions/policy_info_v2"},
1061                     "in": "body",
1062                     "name": "policyInfo",
1063                     "description": "policyInfo",
1064                     "required": true
1065                 }],
1066                 "tags": ["A1 Policy Management Version 2.0 (in progress)"],
1067                 "consumes": ["application/json"]
1068             }
1069         }
1070     },
1071     "host": "localhost:46233",
1072     "definitions": {
1073         "error_information": {
1074             "description": "Problem as defined in https://tools.ietf.org/html/rfc7807",
1075             "type": "object",
1076             "title": "error_information",
1077             "properties": {
1078                 "detail": {
1079                     "description": " A human-readable explanation specific to this occurrence of the problem.",
1080                     "type": "string",
1081                     "example": "Policy type not found"
1082                 },
1083                 "status": {
1084                     "format": "int32",
1085                     "description": "The HTTP status code generated by the origin server for this occurrence of the problem. ",
1086                     "type": "integer",
1087                     "example": 503
1088                 }
1089             }
1090         },
1091         "void": {
1092             "description": "Void/empty",
1093             "type": "object",
1094             "title": "void"
1095         },
1096         "status_info_v2": {
1097             "type": "object",
1098             "title": "status_info_v2",
1099             "properties": {"status": {
1100                 "description": "status text",
1101                 "type": "string"
1102             }}
1103         },
1104         "policy_info_v1": {
1105             "type": "object",
1106             "title": "policy_info_v1",
1107             "properties": {
1108                 "service": {
1109                     "description": "the name of the service owning the policy",
1110                     "type": "string"
1111                 },
1112                 "json": {
1113                     "description": "the configuration of the policy",
1114                     "type": "object"
1115                 },
1116                 "id": {
1117                     "description": "identity of the policy",
1118                     "type": "string"
1119                 },
1120                 "lastModified": {
1121                     "description": "timestamp, last modification time",
1122                     "type": "string"
1123                 },
1124                 "type": {
1125                     "description": "name of the policy type",
1126                     "type": "string"
1127                 },
1128                 "ric": {
1129                     "description": "identity of the target Near-RT RIC",
1130                     "type": "string"
1131                 }
1132             }
1133         },
1134         "Mono«ResponseEntity«object»»": {
1135             "type": "object",
1136             "title": "Mono«ResponseEntity«object»»"
1137         },
1138         "ric_info_v2": {
1139             "description": "Information for a Near-RT RIC",
1140             "type": "object",
1141             "title": "ric_info_v2",
1142             "properties": {
1143                 "ric_id": {
1144                     "description": "identity of the Near-RT RIC",
1145                     "type": "string"
1146                 },
1147                 "managed_element_ids": {
1148                     "description": "O1 identities for managed entities",
1149                     "type": "array",
1150                     "items": {"type": "string"}
1151                 },
1152                 "state": {
1153                     "description": "State for the Near-RT RIC, values: \nUNAVAILABLE: The Near-RT RIC is not avialable, information may be inconsistent \nAVAILABLE: The normal state. Policies can be configured. +\nSYNCHRONIZING: The Policy Management Service is synchronizing the view of the Near-RT RIC. Policies cannot be configured. \nCONSISTENCY_CHECK: A consistency check between the Policy Management Service and the Near-RT RIC. Policies cannot be configured.",
1154                     "type": "string",
1155                     "enum": [
1156                         "UNAVAILABLE",
1157                         "AVAILABLE",
1158                         "SYNCHRONIZING",
1159                         "CONSISTENCY_CHECK"
1160                     ]
1161                 },
1162                 "policytype_ids": {
1163                     "description": "supported policy types",
1164                     "type": "array",
1165                     "items": {"type": "string"}
1166                 }
1167             }
1168         },
1169         "service_registration_info_v1": {
1170             "type": "object",
1171             "title": "service_registration_info_v1",
1172             "properties": {
1173                 "keepAliveIntervalSeconds": {
1174                     "format": "int64",
1175                     "description": "keep alive interval for the service. This is a heartbeat supervision of the service, which in regular intevals must invoke a 'keepAlive' REST call. When a service does not invoke this call within the given time, it is considered unavailble. An unavailable service will be automatically deregistered and its policies will be deleted. Value 0 means no timeout supervision.",
1176                     "type": "integer"
1177                 },
1178                 "callbackUrl": {
1179                     "description": "callback for notifying of RIC synchronization",
1180                     "type": "string"
1181                 },
1182                 "serviceName": {"type": "string"}
1183             }
1184         },
1185         "policy_info_list_v2": {
1186             "description": "List of policy information",
1187             "type": "object",
1188             "title": "policy_info_list_v2",
1189             "properties": {"policies": {
1190                 "description": "List of policy information",
1191                 "type": "array",
1192                 "items": {"$ref": "#/definitions/policy_info_v2"}
1193             }}
1194         },
1195         "service_registration_info_v2": {
1196             "description": "Information for one service",
1197             "type": "object",
1198             "title": "service_registration_info_v2",
1199             "required": ["service_id"],
1200             "properties": {
1201                 "callback_url": {
1202                     "description": "callback for notifying of Near-RT RIC state changes",
1203                     "type": "string"
1204                 },
1205                 "service_id": {
1206                     "description": "identity of the service",
1207                     "type": "string"
1208                 },
1209                 "keep_alive_interval_seconds": {
1210                     "format": "int64",
1211                     "description": "keep alive interval for the service. This is a heartbeat supervision of the service, which in regular intevals must invoke a 'keepAlive' REST call. When a service does not invoke this call within the given time, it is considered unavailble. An unavailable service will be automatically deregistered and its policies will be deleted. Value 0 means no timeout supervision.",
1212                     "type": "integer"
1213                 }
1214             }
1215         },
1216         "ric_info_v1": {
1217             "type": "object",
1218             "title": "ric_info_v1",
1219             "properties": {
1220                 "managedElementIds": {
1221                     "description": "O1 identities for managed entities",
1222                     "type": "array",
1223                     "items": {"type": "string"}
1224                 },
1225                 "policyTypes": {
1226                     "description": "supported policy types",
1227                     "type": "array",
1228                     "items": {"type": "string"}
1229                 },
1230                 "state": {
1231                     "description": "state info",
1232                     "type": "string"
1233                 },
1234                 "ricName": {
1235                     "description": "identity of the Near-RT RIC",
1236                     "type": "string"
1237                 }
1238             }
1239         },
1240         "policy_status_info_v2": {
1241             "description": "Status for one A1-P Policy",
1242             "type": "object",
1243             "title": "policy_status_info_v2",
1244             "properties": {
1245                 "last_modified": {
1246                     "description": "timestamp, last modification time",
1247                     "type": "string"
1248                 },
1249                 "status": {
1250                     "description": "the Policy status",
1251                     "type": "object"
1252                 }
1253             }
1254         },
1255         "service_status_v1": {
1256             "type": "object",
1257             "title": "service_status_v1",
1258             "properties": {
1259                 "keepAliveIntervalSeconds": {
1260                     "format": "int64",
1261                     "description": "policy keep alive timeout",
1262                     "type": "integer"
1263                 },
1264                 "callbackUrl": {
1265                     "description": "callback for notifying of RIC synchronization",
1266                     "type": "string"
1267                 },
1268                 "timeSinceLastActivitySeconds": {
1269                     "format": "int64",
1270                     "description": "time since last invocation by the service",
1271                     "type": "integer"
1272                 },
1273                 "serviceName": {
1274                     "description": "identity of the service",
1275                     "type": "string"
1276                 }
1277             }
1278         },
1279         "service_status_v2": {
1280             "type": "object",
1281             "title": "service_status_v2",
1282             "properties": {
1283                 "callback_url": {
1284                     "description": "callback for notifying of RIC synchronization",
1285                     "type": "string"
1286                 },
1287                 "service_id": {
1288                     "description": "identity of the service",
1289                     "type": "string"
1290                 },
1291                 "keep_alive_interval_seconds": {
1292                     "format": "int64",
1293                     "description": "policy keep alive timeout",
1294                     "type": "integer"
1295                 },
1296                 "time_since_last_activity_seconds": {
1297                     "format": "int64",
1298                     "description": "time since last invocation by the service",
1299                     "type": "integer"
1300                 }
1301             }
1302         },
1303         "policytype_v2": {
1304             "description": "Policy type",
1305             "type": "object",
1306             "title": "policytype_v2",
1307             "properties": {"policy_schema": {
1308                 "description": "Policy type json scema. The schema is a json object following http://json-schema.org/draft-07/schema",
1309                 "type": "object"
1310             }}
1311         },
1312         "ric_info_list_v2": {
1313             "description": "List of Near-RT RIC information",
1314             "type": "object",
1315             "title": "ric_info_list_v2",
1316             "properties": {"rics": {
1317                 "description": "List of Near-RT RIC information",
1318                 "type": "array",
1319                 "items": {"$ref": "#/definitions/ric_info_v2"}
1320             }}
1321         },
1322         "policytype_id_list_v2": {
1323             "description": "Information about policy types",
1324             "type": "object",
1325             "title": "policytype_id_list_v2",
1326             "properties": {"policytype_ids": {
1327                 "description": "Policy type identities",
1328                 "type": "array",
1329                 "items": {"type": "string"}
1330             }}
1331         },
1332         "policy_id_list_v2": {
1333             "description": "A list of policy identities",
1334             "type": "object",
1335             "title": "policy_id_list_v2",
1336             "properties": {"policy_ids": {
1337                 "description": "Policy identities",
1338                 "type": "array",
1339                 "items": {"type": "string"}
1340             }}
1341         },
1342         "policy_info_v2": {
1343             "description": "Information for one A1-P Policy",
1344             "type": "object",
1345             "title": "policy_info_v2",
1346             "required": [
1347                 "policy_data",
1348                 "policy_id",
1349                 "policytype_id",
1350                 "ric_id",
1351                 "service_id"
1352             ],
1353             "properties": {
1354                 "ric_id": {
1355                     "description": "identity of the target Near-RT RIC",
1356                     "type": "string"
1357                 },
1358                 "policy_id": {
1359                     "description": "identity of the policy",
1360                     "type": "string"
1361                 },
1362                 "transient": {
1363                     "description": "if true, the policy is deleted at RIC restart. If false, its value is maintained by this service until explicitly deleted. Default false.",
1364                     "type": "boolean"
1365                 },
1366                 "service_id": {
1367                     "description": "the name of the service owning the policy",
1368                     "type": "string"
1369                 },
1370                 "policy_data": {
1371                     "description": "the configuration of the policy",
1372                     "type": "object"
1373                 },
1374                 "status_notification_uri": {
1375                     "description": "Callback URI for policy status updates",
1376                     "type": "string"
1377                 },
1378                 "policytype_id": {
1379                     "description": "identity of the policy type",
1380                     "type": "string"
1381                 }
1382             }
1383         },
1384         "service_list_v2": {
1385             "description": "List of service information",
1386             "type": "object",
1387             "title": "service_list_v2",
1388             "properties": {"service_list": {
1389                 "description": "List of service information",
1390                 "type": "array",
1391                 "items": {"$ref": "#/definitions/service_status_v2"}
1392             }}
1393         },
1394         "service_callback_info_v2": {
1395             "description": "Information transferred as in Service callbacks (callback_url)",
1396             "type": "object",
1397             "title": "service_callback_info_v2",
1398             "required": [
1399                 "event_type",
1400                 "ric_id"
1401             ],
1402             "properties": {
1403                 "ric_id": {
1404                     "description": "identity of a Near-RT RIC",
1405                     "type": "string"
1406                 },
1407                 "event_type": {
1408                     "description": "values:\nAVAILABLE: the  Near-RT RIC has become available for A1 Policy management",
1409                     "type": "string",
1410                     "enum": ["AVAILABLE"]
1411                 }
1412             }
1413         },
1414         "Mono«ResponseEntity«string»»": {
1415             "type": "object",
1416             "title": "Mono«ResponseEntity«string»»"
1417         }
1418     },
1419     "swagger": "2.0",
1420     "info": {
1421         "x-audience": "external-partner",
1422         "x-api-id": "60f9a0e7-343f-43bf-9194-d8d65688d465",
1423         "contact": {
1424             "name": "Ericsson Software Technology",
1425             "email": "nonrtric@est.tech"
1426         },
1427         "description": "The O-RAN Non-RT RIC Policy Management Service provides a REST API for management of A1 policices. \nIt provides support for:<ul><li>A1 Policy creation and modification.<\/li><li>Maintaining a view of supported Near-RT RIC policy types <\/li><li>Supervision of using services (R-APPs). When a service is unavailble, its policies are removed. <\/li> <li>Monitoring and maintaining consistency of the SMO view of A1 policies and the Near-RT RICs <\/li><\/ul>",
1428         "title": "A1 Policy management service",
1429         "version": "1.1.0"
1430     },
1431     "tags": [
1432         {
1433             "name": "A1 Policy Management Version 1.0",
1434             "description": "Policy Controller"
1435         },
1436         {
1437             "name": "A1 Policy Management Version 2.0 (in progress)",
1438             "description": "Policy Controller"
1439         },
1440         {
1441             "name": "Component Configuration",
1442             "description": "Configuration Controller"
1443         },
1444         {
1445             "name": "R-App Callbacks",
1446             "description": "Rapp Simulator Controller"
1447         }
1448     ]
1449 }