- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
05-12-2013 10:44 PM
Hi,
i am having an issue with importing the rules base into excel using the XML API.
the query i am using is: https://hostname/esp/restapi.esp?type=config&key=keyvalue&action=show&xpath=devices/entry/vsys/entry[@name='vsys1']/rulebase/security/rules
I used the following to generate the keyvalue: https://hostname/api/?type=keygen&user=username&password=password
i have used the default admin use to create this keyvalue.
i keep getting the error error code 403. User not authorised to perform this operation.
help would be greatly appreciated as to why this user does not have access or if the query i'm using is incorrect.
05-13-2013 07:41 AM
What version of PaloAlto are you on? Older versions use esp, newer ones use api, so try this:
https://hostname/api?type=config&key=keyvalue&action=show&xpath=devices/entry/vsys/entry[@name='vsys1']/rulebase/security/rules
05-13-2013 03:58 PM
we are using PANOS 4.1.7
when i try the string with api instead of esp i get the login prompt and then the dashboard same as i would is i logged in via the browser.
05-14-2013 03:40 AM
If you got 403 error, it means something wrong with your key. There is a known bug in 4.1.x that alter your key during the generation. Please try the below operational command and see if it works.
https://hostname/api/?key=keyvalue&type=op&cmd=<show><system><info></info></system></show>
If you still receive 403 error, please regenerate your key and try again. Once you've got the show system info, then try exporting your rule base again.
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!