Authenticate your API Re quests for PAN-OS firewalls.
Palo Alto Networks encourages you to authenticate
your API requests by including a basic authentication token in the
header of your requests. The basic authentication header can be
used to authenticate both XML and REST API requests.
Convert your user name and password to Base64
When making a request to the firewall, include the base64
converted token in the header preceded by
curl -X POST 'https://<firewall>/api?&type=config&action=get&xpath=/config/devices/entry[@name=%27localhost.localdomain%27]/network/interface/ethernet' -H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='
Include the header in each of the subsequent requests
to the firewall.