Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Divothy
Participant

View all rules using web_api

I've been looking how to get all policies currently on my firewall through the web API, and found the API: web_api/show-access-rule.

Problem is, seems like it requires an identifier of a specific policy (uid or rule-number or name).
Is there a way to simply request all policies, when you don't have information about the policies currently installed?

0 Kudos
3 Replies
Andreas_Aust
Collaborator

How about: show-packages

0 Kudos
Divothy
Participant

Tried it, I don't get information about the different rules.
All I am getting is:

{
"packages": [
{
"uid": "<UID>",
"name": "Standard",
"type": "package",
"domain": {
"uid": "<UID>",
"name": "SMC User",
"domain-type": "domain"
}
}
],
"from": 1,
"to": 1,
"total": 1
}

0 Kudos
Andreas_Aust
Collaborator

#shows acces layers

mgmt_cli -r true show access-layers limit 500 --format json | jq --raw-output '."access-layers"[] | (.name)'

# shows rulebase

mgmt_cli -r true show-access-rulebase name "Standard Network"

adapt these commands to web api

 

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events