I used a get from one of our orgs cleaned it up so we did not have any overlapping ids or names and then tried to post it. Only the first policy object in the list is created in the org. I know for other endpoints such as l3 firewalls you have to add "rules" : in front of the rest of the .json or only the first rule is added. For example.
{
"rules": [
{
"comment": "Deny DNS",
"policy": "deny",
"protocol": "any",
"srcPort": "Any",
"srcCidr": "Any",
"destPort": "Any",
"destCidr": "GRP(85)",
"syslogEnabled": true
},
{
"comment": "NTP",
"policy": "allow",
"protocol": "udp",
"srcPort": "Any",
"srcCidr": "Any",
"destPort": "123",
"destCidr": "Any",
"syslogEnabled": true
},
This will add all rules in my .json file.
[
{
"comment": "Deny DNS",
"policy": "deny",
"protocol": "any",
"srcPort": "Any",
"srcCidr": "Any",
"destPort": "Any",
"destCidr": "GRP(85)",
"syslogEnabled": true
},
{
"comment": "NTP",
"policy": "allow",
"protocol": "udp",
"srcPort": "Any",
"srcCidr": "Any",
"destPort": "123",
"destCidr": "Any",
"syslogEnabled": true
},
This will only add the rule at the top of the list.
Is there a qualifier such as "rules" for the post policyObjects endpoint? I am able to obtain the correct syntax for most calls through meraki postman but since policy objects is in beta as well as the endpoints for it this documentation is not readily available.