- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
06-27-2011 01:29 AM
Apparently the serial number of the device does not appear when retrieving device configuration thru rest api.
Is there a way to extract that data with the restful api?
08-13-2011 02:41 AM
Hi,
I don't that is possible, as the API is mainly for config manipulation and reporting purpose, and both our reports and config will not show the S/N. If you are looking for an easy way to map all the IP and device for asset management, you can use SNMP. The following MIBS will show you the S/N of a box, and you can find our MIBS in the support portal:
panSysSerialNumber OBJECT-TYPE
SYNTAX DisplayString (SIZE(0..128))
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The serial number of the unit. If not available,
an empty string is returned."
::= { panSys 3 }
02-21-2012 04:12 PM
The 4.1 XML API now has type=op; for example with PAN-perl you can use panxapi -o to do:
$ (panxapi -t pa-200 -Xpro 'show system info';
> echo 'print $VAR1->{system}->{serial},"\n"') | perl
op: success
001606000471
or:
$ panxapi -t pa-200 -Xxro 'show system info'|
> perl -ne 'print $1,"\n" if m@<serial>(.+)</serial>@'
op: success
001606000471
02-22-2012 01:09 PM
Thanks, think this will help me.
Can you send a reference to the new abilities added to the API in this version?
02-27-2012 08:29 PM
See the API Guide for 4.1 at https://live.paloaltonetworks.com/docs/DOC-1981
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!