A good start is here: https://www.paloaltonetworks.com/documentation/80/pan-os/xml-api
About the scripting part: here you can use what you want: Powershell, phyton, bashscripting, ... just something, you're comftable with.
There are also modules available which probably make the use of the API even easier (just modules I found, I did not test them):
- powershell: https://github.com/brianaddicks/poweralto2
But to begin I think the best way is simply to follow the steps as described here: https://www.paloaltonetworks.com/documentation/80/pan-os/xml-api/get-started-with-the-pan-os-xml-api
- enable API access
- get API key
- do your first query
- api browser
After that with a little knowledge of a scripting / programming language your prepared for writing your own scripts.
And for every problem you run into with your chosen language, remember: google is your friend, because most likely others already had the same or similar problems 😉
Powershell is just easy to use on windows. You get good results even with little knowledge.
Idid not search any links bot proably there are beginners guides for all languages.
I don't think I'm really good at it but before I started using powershell specially in combination with PA API my "programming skills" were HTML 😄
What also really helps when your a little familiar with a language, search for simple sample scripts and try to understand them
I wouldn't be to affraid of making any mistakes in the API, you still need to commit the changes so test really whatever you want and then see if it actually worked as intended.
* API is just like CLI, so if you make a change that wouldn't require a commit in cli then this still gets activated if ran through as an API request.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!