11-15-2018 01:36 AM - edited 06-04-2019 02:43 AM
Hi
I am able to use API-Explorer to add a new access rule to an access policy via this JSON:
{
"action": "ALLOW",
"enabled": true,
"type": "AccessRule",
"name": "Rule1",
"sourceNetworks": {
"objects": [
{
"type": "Network",
"overridable": false,
"id": "XX-XX-XX-XX-XX",
"name": "server1"
}
]
},
"sendEventsToFMC": false,
"logFiles": false,
"logBegin": false,
"logEnd": false
}
The above puts the rule in the "Default" category, however I'd like to put it into the "Mandatory" category, does anyone know how would acheive that?
Regards,
Mark
11-15-2018 03:00 AM
Answering my own question to some extent: if there is an existing category in Mandatory, you can define the category on the query string of the POST which creates the access rule. The access rule is then placed in to the category inside Mandatory.
Now how do you automate the creation of categories through the API?
11-15-2018 03:25 AM
Looks like creating categories via the API isn't possible at the moment:
https://community.cisco.com/t5/firepower/how-to-get-post-accessrule-categories/m-p/3380605#M9641
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide