Update snapshot and/or references of policy/pap to latest snapshots
[policy/pap.git] / postman / pap-api-collection.json
1 {
2     "info": {
3         "_postman_id": "cf7db76a-e5a7-4c92-a3b7-7b97ffd006bf",
4         "name": "Policy Framework Administration API",
5         "description": "This collection lists all the Administration API's supported by ONAP Policy Framework. These API's are used to perform administrative operations for managing policies, groups & health information for all registered PDP engines.",
6         "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
7     },
8     "item": [
9         {
10             "name": "PAP healthcheck",
11             "protocolProfileBehavior": {
12                 "disableBodyPruning": true
13             },
14             "request": {
15                 "method": "GET",
16                 "header": [
17                     {
18                         "key": "Content-Type",
19                         "type": "text",
20                         "value": "application/json"
21                     },
22                     {
23                         "key": "Accept",
24                         "type": "text",
25                         "value": "application/json"
26                     }
27                 ],
28                 "body": {
29                     "mode": "raw",
30                     "raw": ""
31                 },
32                 "url": {
33                     "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/healthcheck",
34                     "host": [
35                         "{{POLICY-PAP-URL}}"
36                     ],
37                     "path": [
38                         "policy",
39                         "pap",
40                         "v1",
41                         "healthcheck"
42                     ]
43                 },
44                 "description": "This is an API to fetch current healthcheck information for the policy-pap component."
45             },
46             "response": []
47         },
48         {
49             "name": "Policy Consolidated healthcheck",
50             "protocolProfileBehavior": {
51                 "disableBodyPruning": true
52             },
53             "request": {
54                 "method": "GET",
55                 "header": [
56                     {
57                         "key": "Content-Type",
58                         "value": "application/json",
59                         "type": "text"
60                     },
61                     {
62                         "key": "Accept",
63                         "value": "application/json",
64                         "type": "text"
65                     }
66                 ],
67                 "body": {
68                     "mode": "raw",
69                     "raw": ""
70                 },
71                 "url": {
72                     "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/components/healthcheck",
73                     "host": [
74                         "{{POLICY-PAP-URL}}"
75                     ],
76                     "path": [
77                         "policy",
78                         "pap",
79                         "v1",
80                         "components",
81                         "healthcheck"
82                     ]
83                 },
84                 "description": "This is an API to fetch current healthcheck information for all the policy framework components."
85             },
86             "response": []
87         },
88         {
89             "name": "PdpGroup Query",
90             "protocolProfileBehavior": {
91                 "disableBodyPruning": true
92             },
93             "request": {
94                 "method": "GET",
95                 "header": [
96                     {
97                         "key": "Content-Type",
98                         "type": "text",
99                         "value": "application/json"
100                     },
101                     {
102                         "key": "Accept",
103                         "type": "text",
104                         "value": "application/json"
105                     }
106                 ],
107                 "body": {
108                     "mode": "raw",
109                     "raw": ""
110                 },
111                 "url": {
112                     "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/pdps",
113                     "host": [
114                         "{{POLICY-PAP-URL}}"
115                     ],
116                     "path": [
117                         "policy",
118                         "pap",
119                         "v1",
120                         "pdps"
121                     ]
122                 },
123                 "description": "This is an API to fetch details of all PdpGroups currently available in Policy DB."
124             },
125             "response": []
126         },
127         {
128             "name": "PdpGroup State Change",
129             "request": {
130                 "method": "PUT",
131                 "header": [
132                     {
133                         "key": "Content-Type",
134                         "value": "application/json",
135                         "type": "text"
136                     },
137                     {
138                         "key": "Accept",
139                         "value": "application/json",
140                         "type": "text"
141                     }
142                 ],
143                 "url": {
144                     "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/pdps/groups/defaultGroup?state=ACTIVE",
145                     "host": [
146                         "{{POLICY-PAP-URL}}"
147                     ],
148                     "path": [
149                         "policy",
150                         "pap",
151                         "v1",
152                         "pdps",
153                         "groups",
154                         "defaultGroup"
155                     ],
156                     "query": [
157                         {
158                             "key": "state",
159                             "value": "ACTIVE"
160                         }
161                     ]
162                 },
163                 "description": "This is an API to change the current state of a PdpGroup (example - \"defaultGroup\") resulting in changing state of all the PDP instances registered with the PdpGroup. As of now, the allowed states are ACTIVE and PASSIVE."
164             },
165             "response": []
166         },
167         {
168             "name": "Simple Deploy Policy",
169             "request": {
170                 "method": "POST",
171                 "header": [
172                     {
173                         "key": "Content-Type",
174                         "type": "text",
175                         "value": "application/json"
176                     },
177                     {
178                         "key": "Accept",
179                         "type": "text",
180                         "value": "application/json"
181                     }
182                 ],
183                 "body": {
184                     "mode": "raw",
185                     "raw": "{\r\n  \"policies\" : [\r\n    {\r\n      \"policy-id\": \"operational.modifyconfig\",\r\n      \"policy-version\": \"1.0.0\"\r\n    }\r\n    ]\r\n}"
186                 },
187                 "url": {
188                     "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/pdps/policies",
189                     "host": [
190                         "{{POLICY-PAP-URL}}"
191                     ],
192                     "path": [
193                         "policy",
194                         "pap",
195                         "v1",
196                         "pdps",
197                         "policies"
198                     ]
199                 },
200                 "description": "This is an API to deploy one or more policies in all available & matching PdpGroups in Policy DB. The match is done based on supported policy types in the PdpSunGroup and the policy type referred by the given policy."
201             },
202             "response": []
203         },
204         {
205             "name": "Simple Undeploy Policy",
206             "request": {
207                 "method": "DELETE",
208                 "header": [
209                     {
210                         "key": "Accept",
211                         "value": "application/json",
212                         "type": "text"
213                     },
214                     {
215                         "key": "Content-Type",
216                         "value": "application/json",
217                         "type": "text"
218                     }
219                 ],
220                 "url": {
221                     "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/pdps/policies/operational.modifyconfig",
222                     "host": [
223                         "{{POLICY-PAP-URL}}"
224                     ],
225                     "path": [
226                         "policy",
227                         "pap",
228                         "v1",
229                         "pdps",
230                         "policies",
231                         "operational.modifyconfig"
232                     ]
233                 },
234                 "description": "This is an API to undeploy one or more policies from all PdpGroups in Policy DB."
235             },
236             "response": []
237         },
238         {
239             "name": "Create/Update PdpGroup",
240             "request": {
241                 "method": "POST",
242                 "header": [
243                     {
244                         "key": "Content-Type",
245                         "type": "text",
246                         "value": "application/json"
247                     },
248                     {
249                         "key": "Accept",
250                         "type": "text",
251                         "value": "application/json"
252                     }
253                 ],
254                 "body": {
255                     "mode": "raw",
256                     "raw": "{\n    \"groups\": [\n        {\n            \"name\": \"SampleGroup\",\n            \"pdpGroupState\": \"ACTIVE\",\n            \"properties\": {},\n            \"pdpSubgroups\": [\n                {\n                    \"pdpType\": \"apex\",\n                    \"desiredInstanceCount\": 2,\n                    \"properties\": {},\n                    \"supportedPolicyTypes\": [\n                        {\n                            \"name\": \"onap.policies.controlloop.operational.common.Apex\",\n                            \"version\": \"1.0.0\"\n                        }\n                    ],\n                    \"policies\": []\n                },\n                {\n                    \"pdpType\": \"xacml\",\n                    \"desiredInstanceCount\": 1,\n                    \"properties\": {},\n                    \"supportedPolicyTypes\": [\n                        {\n                            \"name\": \"onap.policies.monitoring.*\",\n                            \"version\": \"1.0.0\"\n                        }\n                    ],\n                    \"policies\": []\n                }\n            ]\n        }\n    ]\n}"
257                 },
258                 "url": {
259                     "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/pdps/groups/batch",
260                     "host": [
261                         "{{POLICY-PAP-URL}}"
262                     ],
263                     "path": [
264                         "policy",
265                         "pap",
266                         "v1",
267                         "pdps",
268                         "groups",
269                         "batch"
270                     ]
271                 },
272                 "description": "This is a generic API to create/update PdpGroups in Policy DB. However, the supportedPolicyTypes field of PdpSubGroup cannot be changed once created."
273             },
274             "response": []
275         },
276         {
277             "name": "PDPGroup Deploy Policy",
278             "request": {
279                 "method": "POST",
280                 "header": [
281                     {
282                         "key": "Content-Type",
283                         "type": "text",
284                         "value": "application/json"
285                     },
286                     {
287                         "key": "Accept",
288                         "type": "text",
289                         "value": "application/json"
290                     }
291                 ],
292                 "body": {
293                     "mode": "raw",
294                     "raw": "{\n    \"groups\": [\n        {\n            \"name\": \"defaultGroup\",\n            \"deploymentSubgroups\": [\n                {\n                    \"pdpType\": \"drools\",\n                    \"action\": \"POST\",\n                    \"policies\": [\n                        {\n                            \"name\": \"operational.modifyconfig\",\n                            \"version\": \"1.0.0\"\n                        }\n                    ]\n                }\n            ]\n        }\n    ]\n}"
295                 },
296                 "url": {
297                     "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/pdps/deployments/batch",
298                     "host": [
299                         "{{POLICY-PAP-URL}}"
300                     ],
301                     "path": [
302                         "policy",
303                         "pap",
304                         "v1",
305                         "pdps",
306                         "deployments",
307                         "batch"
308                     ]
309                 },
310                 "description": "This is an API to deploy one or more policies to the specified PdpGroup, resulting in deployment of policies to all registered PDP instances of that specified PdpGroup."
311             },
312             "response": []
313         },
314         {
315             "name": "PDPGroup Undeploy Policy",
316             "request": {
317                 "method": "POST",
318                 "header": [
319                     {
320                         "key": "Content-Type",
321                         "type": "text",
322                         "value": "application/json"
323                     },
324                     {
325                         "key": "Accept",
326                         "type": "text",
327                         "value": "application/json"
328                     }
329                 ],
330                 "body": {
331                     "mode": "raw",
332                     "raw": "{\n    \"groups\": [\n        {\n            \"name\": \"defaultGroup\",\n            \"deploymentSubgroups\": [\n                {\n                    \"pdpType\": \"drools\",\n                    \"action\": \"DELETE\",\n                    \"policies\": [\n                        {\n                            \"name\": \"operational.modifyconfig\",\n                            \"version\": \"1.0.0\"\n                        }\n                    ]\n                }\n            ]\n        }\n    ]\n}"
333                 },
334                 "url": {
335                     "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/pdps/deployments/batch",
336                     "host": [
337                         "{{POLICY-PAP-URL}}"
338                     ],
339                     "path": [
340                         "policy",
341                         "pap",
342                         "v1",
343                         "pdps",
344                         "deployments",
345                         "batch"
346                     ]
347                 },
348                 "description": "This is an API to undeploy one or more policies from the specified PdpGroup, resulting in removal of policies from all registered PDP instances of that specified PdpGroup."
349             },
350             "response": []
351         },
352         {
353             "name": "Fetch All Policy Status",
354             "protocolProfileBehavior": {
355                 "disableBodyPruning": true
356             },
357             "request": {
358                 "method": "GET",
359                 "header": [
360                     {
361                         "key": "Content-Type",
362                         "type": "text",
363                         "value": "application/json"
364                     },
365                     {
366                         "key": "Accept",
367                         "type": "text",
368                         "value": "application/json"
369                     }
370                 ],
371                 "body": {
372                     "mode": "raw",
373                     "raw": ""
374                 },
375                 "url": {
376                     "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/policies/status",
377                     "host": [
378                         "{{POLICY-PAP-URL}}"
379                     ],
380                     "path": [
381                         "policy",
382                         "pap",
383                         "v1",
384                         "policies",
385                         "status"
386                     ]
387                 },
388                 "description": "This is a generic API to fetch status of all policies in the registered PDP instances."
389             },
390             "response": []
391         },
392         {
393             "name": "Fetch All Policy Status in a Group",
394             "protocolProfileBehavior": {
395                 "disableBodyPruning": true
396             },
397             "request": {
398                 "method": "GET",
399                 "header": [
400                     {
401                         "key": "Content-Type",
402                         "type": "text",
403                         "value": "application/json"
404                     },
405                     {
406                         "key": "Accept",
407                         "type": "text",
408                         "value": "application/json"
409                     }
410                 ],
411                 "body": {
412                     "mode": "raw",
413                     "raw": ""
414                 },
415                 "url": {
416                     "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/policies/status/defaultGroup",
417                     "host": [
418                         "{{POLICY-PAP-URL}}"
419                     ],
420                     "path": [
421                         "policy",
422                         "pap",
423                         "v1",
424                         "policies",
425                         "status",
426                         "defaultGroup"
427                     ]
428                 },
429                 "description": "This is a generic API to fetch status of all policies in the registered PDP instances in a PDP Group."
430             },
431             "response": []
432         },
433         {
434             "name": "Fetch Policy Status in a Group",
435             "protocolProfileBehavior": {
436                 "disableBodyPruning": true
437             },
438             "request": {
439                 "method": "GET",
440                 "header": [
441                     {
442                         "key": "Content-Type",
443                         "type": "text",
444                         "value": "application/json"
445                     },
446                     {
447                         "key": "Accept",
448                         "type": "text",
449                         "value": "application/json"
450                     }
451                 ],
452                 "body": {
453                     "mode": "raw",
454                     "raw": ""
455                 },
456                 "url": {
457                     "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/policies/status/defaultGroup/operational.modifyconfig",
458                     "host": [
459                         "{{POLICY-PAP-URL}}"
460                     ],
461                     "path": [
462                         "policy",
463                         "pap",
464                         "v1",
465                         "policies",
466                         "status",
467                         "defaultGroup",
468                         "operational.modifyconfig"
469                     ]
470                 },
471                 "description": "This is a generic API to fetch status of all versions of a policy in the registered PDP instances in a PDP Group."
472             },
473             "response": []
474         },
475         {
476             "name": "Fetch All Policy deployment Status",
477             "protocolProfileBehavior": {
478                 "disableBodyPruning": true
479             },
480             "request": {
481                 "method": "GET",
482                 "header": [
483                     {
484                         "key": "Content-Type",
485                         "type": "text",
486                         "value": "application/json"
487                     },
488                     {
489                         "key": "Accept",
490                         "type": "text",
491                         "value": "application/json"
492                     }
493                 ],
494                 "body": {
495                     "mode": "raw",
496                     "raw": ""
497                 },
498                 "url": {
499                     "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/policies/deployed",
500                     "host": [
501                         "{{POLICY-PAP-URL}}"
502                     ],
503                     "path": [
504                         "policy",
505                         "pap",
506                         "v1",
507                         "policies",
508                         "deployed"
509                     ]
510                 },
511                 "description": "This is a generic API to fetch status of all deployed policies in the registered PDP instances."
512             },
513             "response": []
514         },
515         {
516             "name": "Fetch Policy deployment Status",
517             "protocolProfileBehavior": {
518                 "disableBodyPruning": true
519             },
520             "request": {
521                 "method": "GET",
522                 "header": [
523                     {
524                         "key": "Content-Type",
525                         "type": "text",
526                         "value": "application/json"
527                     },
528                     {
529                         "key": "Accept",
530                         "type": "text",
531                         "value": "application/json"
532                     }
533                 ],
534                 "body": {
535                     "mode": "raw",
536                     "raw": ""
537                 },
538                 "url": {
539                     "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/policies/deployed/operational.modifyconfig",
540                     "host": [
541                         "{{POLICY-PAP-URL}}"
542                     ],
543                     "path": [
544                         "policy",
545                         "pap",
546                         "v1",
547                         "policies",
548                         "deployed",
549                         "operational.modifyconfig"
550                     ]
551                 },
552                 "description": "This is an API to fetch status of a specific deployed policy in the registered PDP instances."
553             },
554             "response": []
555         },
556         {
557             "name": "Fetch All Policy Audit Records",
558             "event": [
559                 {
560                     "listen": "prerequest",
561                     "script": {
562                         "exec": [
563                             ""
564                         ],
565                         "type": "text/javascript"
566                     }
567                 }
568             ],
569             "protocolProfileBehavior": {
570                 "disableBodyPruning": true
571             },
572             "request": {
573                 "method": "GET",
574                 "header": [
575                     {
576                         "key": "Content-Type",
577                         "type": "text",
578                         "value": "application/json"
579                     },
580                     {
581                         "key": "Accept",
582                         "type": "text",
583                         "value": "application/json"
584                     }
585                 ],
586                 "body": {
587                     "mode": "raw",
588                     "raw": ""
589                 },
590                 "url": {
591                     "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/policies/audit?recordCount=5",
592                     "host": [
593                         "{{POLICY-PAP-URL}}"
594                     ],
595                     "path": [
596                         "policy",
597                         "pap",
598                         "v1",
599                         "policies",
600                         "audit"
601                     ],
602                     "query": [
603                         {
604                             "key": "recordCount",
605                             "value": "5"
606                         },
607                         {
608                             "key": "startTime",
609                             "value": "1627219515",
610                             "disabled": true
611                         },
612                         {
613                             "key": "endTime",
614                             "value": "1627478715",
615                             "disabled": true
616                         }
617                     ]
618                 },
619                 "description": "This is a generic API to fetch audit records of all policies in the database."
620             },
621             "response": []
622         },
623         {
624             "name": "Fetch All Policy Audit Records of a Group",
625             "protocolProfileBehavior": {
626                 "disableBodyPruning": true
627             },
628             "request": {
629                 "method": "GET",
630                 "header": [
631                     {
632                         "key": "Content-Type",
633                         "type": "text",
634                         "value": "application/json"
635                     },
636                     {
637                         "key": "Accept",
638                         "type": "text",
639                         "value": "application/json"
640                     }
641                 ],
642                 "body": {
643                     "mode": "raw",
644                     "raw": ""
645                 },
646                 "url": {
647                     "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/policies/audit/defaultGroup?recordCount=5",
648                     "host": [
649                         "{{POLICY-PAP-URL}}"
650                     ],
651                     "path": [
652                         "policy",
653                         "pap",
654                         "v1",
655                         "policies",
656                         "audit",
657                         "defaultGroup"
658                     ],
659                     "query": [
660                         {
661                             "key": "recordCount",
662                             "value": "5"
663                         },
664                         {
665                             "key": "startTime",
666                             "value": "1627219515",
667                             "disabled": true
668                         },
669                         {
670                             "key": "endTime",
671                             "value": "1627478715",
672                             "disabled": true
673                         }
674                     ]
675                 },
676                 "description": "This is a generic API to fetch audit records of all policies in the database belonging to a PDP Group."
677             },
678             "response": []
679         },
680         {
681             "name": "Fetch Policy Audit Records of a Group",
682             "protocolProfileBehavior": {
683                 "disableBodyPruning": true
684             },
685             "request": {
686                 "method": "GET",
687                 "header": [
688                     {
689                         "key": "Content-Type",
690                         "type": "text",
691                         "value": "application/json"
692                     },
693                     {
694                         "key": "Accept",
695                         "type": "text",
696                         "value": "application/json"
697                     }
698                 ],
699                 "body": {
700                     "mode": "raw",
701                     "raw": ""
702                 },
703                 "url": {
704                     "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/policies/audit/defaultGroup/operational.modifyconfig/1.0.0?recordCount=5",
705                     "host": [
706                         "{{POLICY-PAP-URL}}"
707                     ],
708                     "path": [
709                         "policy",
710                         "pap",
711                         "v1",
712                         "policies",
713                         "audit",
714                         "defaultGroup",
715                         "operational.modifyconfig",
716                         "1.0.0"
717                     ],
718                     "query": [
719                         {
720                             "key": "recordCount",
721                             "value": "5"
722                         },
723                         {
724                             "key": "startTime",
725                             "value": "1627219515",
726                             "disabled": true
727                         },
728                         {
729                             "key": "endTime",
730                             "value": "1627478715",
731                             "disabled": true
732                         }
733                     ]
734                 },
735                 "description": "This is an API to fetch audit records of a policy in the database belonging to a PDP Group."
736             },
737             "response": []
738         },
739         {
740             "name": "Fetch Policy Audit Records",
741             "protocolProfileBehavior": {
742                 "disableBodyPruning": true
743             },
744             "request": {
745                 "method": "GET",
746                 "header": [
747                     {
748                         "key": "Content-Type",
749                         "type": "text",
750                         "value": "application/json"
751                     },
752                     {
753                         "key": "Accept",
754                         "type": "text",
755                         "value": "application/json"
756                     }
757                 ],
758                 "body": {
759                     "mode": "raw",
760                     "raw": ""
761                 },
762                 "url": {
763                     "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/policies/audit/operational.modifyconfig/1.0.0?recordCount=5",
764                     "host": [
765                         "{{POLICY-PAP-URL}}"
766                     ],
767                     "path": [
768                         "policy",
769                         "pap",
770                         "v1",
771                         "policies",
772                         "audit",
773                         "operational.modifyconfig",
774                         "1.0.0"
775                     ],
776                     "query": [
777                         {
778                             "key": "recordCount",
779                             "value": "5"
780                         },
781                         {
782                             "key": "startTime",
783                             "value": "1627219515",
784                             "disabled": true
785                         },
786                         {
787                             "key": "endTime",
788                             "value": "1627478715",
789                             "disabled": true
790                         }
791                     ]
792                 },
793                 "description": "This is an API to fetch audit records of a policy in the database."
794             },
795             "response": []
796         },
797         {
798             "name": "Delete PdpGroup",
799             "request": {
800                 "method": "DELETE",
801                 "header": [
802                     {
803                         "key": "Accept",
804                         "type": "text",
805                         "value": "application/json"
806                     },
807                     {
808                         "key": "Content-Type",
809                         "type": "text",
810                         "value": "application/json"
811                     }
812                 ],
813                 "url": {
814                     "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/pdps/groups/SampleGroup",
815                     "host": [
816                         "{{POLICY-PAP-URL}}"
817                     ],
818                     "path": [
819                         "policy",
820                         "pap",
821                         "v1",
822                         "pdps",
823                         "groups",
824                         "SampleGroup"
825                     ]
826                 },
827                 "description": "This is an API to delete a specific PdpGroup (example - \"SampleGroup\") currently available in Policy DB, resulting in removing all the PDP instances registered with the group."
828             },
829             "response": []
830         }
831     ],
832     "auth": {
833         "type": "basic",
834         "basic": [
835             {
836                 "key": "password",
837                 "value": "{{PASSWORD}}",
838                 "type": "string"
839             },
840             {
841                 "key": "username",
842                 "value": "{{USER}}",
843                 "type": "string"
844             }
845         ]
846     },
847     "event": [
848         {
849             "listen": "prerequest",
850             "script": {
851                 "type": "text/javascript",
852                 "exec": [
853                     ""
854                 ]
855             }
856         },
857         {
858             "listen": "test",
859             "script": {
860                 "type": "text/javascript",
861                 "exec": [
862                     ""
863                 ]
864             }
865         }
866     ],
867     "variable": [
868         {
869             "key": "USER",
870             "value": "policyadmin",
871             "type": "string"
872         },
873         {
874             "key": "PASSWORD",
875             "value": "zb!XztG34",
876             "type": "string"
877         }
878     ]
879 }