Palo Alto Networks Firewall Api
To use the rest api you must enable api access for your administrators and get your api key.
Palo alto networks firewall api. When connecting to the pan os api the connection must include an api key that the firewall uses to authenticate the connection as coming from a specific administrator. Start by typing debug cli on on the command line. Our automation and orchestration tools and technologies provide a collection of open extensible projects that help you take the next step. Just like the gui and the cli accessing the api requires authentication.
Run this command in a terminal to generate an api key for the admin user. For more details on administrative roles see configure an admin role profile. You can do a lot of cool things with the api. One of the more common tasks an administrator can perform is accessing updating and changing the firewall s configuration through some creative scripting while leveraging the ease of use of the api.
Connections to the api are treated as general web admin access. Then when you use this api key in your request you can either provide the url encoded api key in the request url or use the custom. The cli uses the api internally so this technique simply prints the internal api calls that are made when you run a command. Because these keys grant access to the firewall and panorama that are critical elements of your security posture as a best practice specify an api key lifetime to enforce regular key rotation.
For those who are familiar with the firewall and panorama command line you can get the xpath and element for any cli command to reproduce that cli command on the api. These resources allows you to manage policies on the firewall. See api authentication and security for details on authenticating your api requests. In this example we will generate the api key for the default admin user.
The api keys on the firewall and panorama enable you to authenticate api calls to the xml api and rest api. Protect even the smallest parts of your business with the pa 220 next generation firewall appliance. When configuring and managing the palo alto networks next generation firewall for scale and agility it s nice to have a collection of tools to automate activities and events. This small appliance secures your network by preventing a broad range of cyberthreats while safely enabling sd wan.
The following table lists the pan os 9 0 rest api resource uris that are available for use. Admin role profiles enable or disable features on the management interfaces of the firewall or panorama xml api web interface and cli. Access the api on the management interface using https just as you would connect to the gui.