- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Content translations are temporarily unavailable due to site maintenance. We apologize for any inconvenience.
04-23-2020 10:20 AM
show command, copy the result and export to my computer in ssh
04-27-2020 10:32 PM - edited 04-27-2020 10:37 PM
Hi@axelfa ,
As you're looking for exporting arp list, just put IP address of your firewall and a associated API key in below path, the file will get exported through curl. In the post, may be you're not able to see full path, just copy below path and paste it in notepad. So you'll get more clarity.
Just make sure IP address and API key is correct.
curl -kG "https://192.168.1.1/api/?type=op&cmd=%3Cshow%3E%3Carp%3E%3Centry+name+%3D+%27all%27%2F%3E%3C%2Farp%3E%3C%2Fshow%3E&key=<api-key>" > arp-list.xml
Hope it works!
Mayur
04-23-2020 02:12 PM
Hello,
If using SSH, then just highlight the stuff you want to copy and then paste it into notepad or something else.
Regards,
04-23-2020 09:12 PM
Thank you for you help but i don't want to do manualy
it's possible for the exemple ( scp export configuration from MyBackup.xml to user@<scphost>:/path) so whay not for show arp ..
04-24-2020 01:38 AM
perhaps it's possible to do show arp and >into a file and export the file ?
04-24-2020 04:15 AM
You can try to export it using API.
API URL would be,
/api/?type=op&cmd=<show><arp><entry name = 'all'/></arp></show>
Mayur
04-24-2020 07:01 AM
thank you
i 'm beginner
can you help me for a sample example:
i m testing: https://myfirewall/api/?type=op&command=<show><arp><entry name='all'/></arp></show>
message:
<response status="error" code="403">
<result>
<msg>Invalid Credential</msg>
</result>
</response>
04-24-2020 08:14 AM - edited 04-24-2020 08:20 AM
First you need to generate API key for your firewall and then you can use it under following path to execute required tasks. For generating api-key, try below path from system's browser from where your firewall is reachable. Here put login credentials which has proper access related to XML/REST API on firewall.
https://<firewall-ip>/api/?type=keygen&user=<username>&password=<password>
Once you have API-KEY for your firewall, use it under below path and shoot it. You should get ARP list in xml format.
Now if you want to export it in xml file on your system then try below through command prompt. For this, you need to install CURL. Once curl is install, try below from command prompt.
curl -kG "https://192.168.1.1/api/?type=op&cmd=%3Cshow%3E%3Carp%3E%3Centry+name+%3D+%27all%27%2F%3E%3C%2Farp%3...>" > arp-list.xml
I tried above in my lab and i am getting xml file created with name arp-list.xml.
If you need any reference guide for generating API key, installing CURL etc, please refer below KB article.
https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA10g000000Cm7yCAC
Hope it helps!
Mayur
04-25-2020 12:28 AM
Looks good, I will also try this in my environment. Just confirm if it creates any extra resource utilization due to these API calls.
04-25-2020 01:39 AM
@Vikashh, It shouldn't create any negative impact on the firewall.
Mayur
04-25-2020 04:03 AM
Hello
I'm access a web acces Firewall
login password
and /api:
XML API
Commit
Configuration Commands
Export
Import
Logs
Operational Commands
Reports
User ID
it's similar to access : https://<firewall-ip>/api/?type=keygen&user=<username>&password=<password>
OR NOT ?
04-25-2020 04:31 AM
https://<firewall-ip>/api/?type=keygen&user=<username>&password=<password>
Above path is for generating API-Key which will be used for further paths under <api-key> fileld.
Mayur
04-25-2020 07:50 AM
thank you
and logout Api ?
04-26-2020 09:30 AM
Hello
it's ok for api authentification
<response status="success">
but i did not understand
i execute this two lignes ?
"key" my key ??? " UTFGRIKesytu ....."
curl -kG "https://192.168.1.1/api/?type=op&cmd=%3Cshow%3E%3Carp%3E%3Centry+name+%3D+%27all%27%2F%3E%3C%2Farp%3...>" > arp-list.xml
and the writing characters as wrong (copy past)
thank you
04-26-2020 11:37 AM
excuse me it's ok
thank you very mutch
04-26-2020 10:38 PM
Apologies, i was not able to respond.
Were you able to execute path and export file?
Mayur
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!