How to save the API Key and make proper use of the REST API calls

cancel
Showing results for 
Search instead for 
Did you mean: 

How to save the API Key and make proper use of the REST API calls

L1 Bithead

Not sure if this makes sense -- plan to use Palo Alto's REST APIs for automated script tasks and health checks.

 

Is there a way to save the key into a variable string -- therefore you can make multiple API calls and reference to the output key?

 

Want to automate some of the daily health checks (HA status, available free space logs, critical event errors, etc.)

 

If you have any best practice or have developed scripts already for automating the FW/Panorama tasks, that's greatly appreciated.  Thanks!

2 REPLIES 2

Cyber Elite
Cyber Elite

@c.huang,

It would help if you included what program/language you plan on using for the scripts. Anything you use is going to have an option as saving a variable for the api key. 

Disregard -- found the answer here:  http://api-lab.paloaltonetworks.com/pan-python.html

 

It's nice to pull the stats directly from the firewalls and use API reference calls. 

 

If you have any best practice or tips using Python scripts -- please let me know.  Thanks. 

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

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!