cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1521
Views
0
Helpful
2
Replies

Firepower FMC API: new access rule

cyodesigns
Level 1
Level 1

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

2 Replies 2

cyodesigns
Level 1
Level 1

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?

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