Dear all,
I am in the process of creating a new policy package, where I have to add ~140 rules and would like to do it via API.
I have managed to create the correct format of the API call that add a access rule, but cannot figure out, how to add multiple rules at once. I can only do, one by one. ( ignore the hosts/service names, those exist on the domain )
rule no 1:
{
"layer" : "Standard Network",
"position" : "top",
"source": ["Host1-A"],
"destination": ["Host1-B"],
"service" : ["ghttp", "ghttps", "gFileShare"],
"action" : "Accept",
"track" : {
"type": "log"
}
}
rule no 2:
{
"layer" : "Standard Network",
"position" : "bottom",
"source": ["Host2-A", "Host1-C"],
"destination": ["Host2-A", "Host2-C"],
"service" : ["gsmtp", "gssh", "ghttps", "ghttp"],
"action" : "Accept",
"track" : {
"type": "log"
}
}
rule no 3:
{
"layer" : "Standard Network",
"position" : "bottom",
"source": ["Host1-D"],
"destination": ["Host2-D"],
"service" : ["gicmp", "ghttps"],
"action" : "Accept",
"track" : {
"type": "log"
}
}
If i add them like this, i don't get them all after the publish, and I think it's because of the position argument which is required and i have bottom on 2 rules.
{
rule no1
},
{
rule no2
},
{
rule no3
}
Any ideas?
BR,
Paul