Learning paths › PAN-OS › Automating PAN-OS with the XML and REST APIs
Automating PAN-OS with the XML and REST APIs
PAN-OS management reached through four interfaces to the same functions — XML API requests addressed by XPath, REST requests carrying JSON, the Python SDK's firewall and object classes, and Ansible plays — covering the API key, reading system state, creating address objects and groups, and pushing a security rule into a Panorama device group. Explanation and understanding checks; four exercises are written for a lab of your own.
Lessons
- Know what firewall automation actually changes
- Assemble the tools the API lessons need
- Read PAN-OS configuration as XML elements
- Find an element's path in an exported config
- Choose the right XML API request type
- Create an API account and get its key
- Read system info with an operational request
- Create an address object with XPath and set
- Read API data as JSON objects and arrays
- Address firewall resources by versioned URL
- GET address objects and narrow them by name
- POST a new address object as JSON
- Pick XML or REST for a given job
- Run API work from Python instead of curl
- Loop over device records and build output text
- Represent firewalls and objects as SDK classes
- Collect software versions with the Firewall op method
- Push a security rule into a Panorama device group
- Trade raw requests for device and config objects
- Describe firewall work as plays and tasks
- Compare active sessions against the device maximum
- Configure branch interfaces from a loop over records
- Know what a shared format does not standardise
More in PAN-OS
- The PAN-OS Prompt
- Inside The Box
- Administering It
- Interfaces And Zones
- Routing And Services
- Security Policy
- NAT And Published Services
- Branch Services
- Application Control
- Advanced Routing
- Identity And VPN
- Resilience And Fleet
- Operator Assessment
- Threat Prevention
- User-ID
- Certificates And Decryption
- Logging And Upkeep
- VPN And GlobalProtect
- High Availability
- Panorama
- Automation Capstone