I have created a Rule by using the Perl CLI using the following code:
The Rule is correctly created and I can see it in the AdminUI. If I click on the "View" button to see the Rule, I see still the Rule with the expected configuration. But if I click on "Modify" button for this Rule, in the method selection box, no action gets selected. In order to make the Rule applicable, I need to select the methods manually and save the changes in the AdminUI. So each time I create a Rule with the Perl CLI, I need to select the methods in the AdminUI after. If not, the Rule won't be applied. Every Rule I create with the CLI have the same behavior.
The Rule Actions to be applied need to have the same syntax as per the Agent Type of the Agent. In your case, the Agent has "Agent Type" "Web Agent". In AdminUI, if you go to Agent / Agent Types and select "Web Agent", then you'll see Actions as "Get", "Post", "Put".
In your Perl CLI script, if you pass the actions as "Get,Post" instead of "GET,POST", then the Rule will be applied, and you'll see in the Rule definition these actions selected in method selection box.
The code will look like this :