How can I get the device serial number thru the rest API?

Not applicable

How can I get the device serial number thru the rest API?

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?

L4 Transporter

Re: How can I get the device serial number thru the rest API?

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 }

L3 Networker

Re: How can I get the device serial number thru the rest API?

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

Not applicable

Re: How can I get the device serial number thru the rest API?

Thanks, think this will help me.

Can you send a reference to the new abilities added to the API in this version?

SRA
L4 Transporter

Re: How can I get the device serial number thru the rest API?

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 Live Community as a whole!

The Live Community thanks you for your participation!