Querying the Version

Querying the Version
GET http://<IP_Address>/api/mo/sys/showversion.json
{
    "totalCount": "1",
    "imdata": [
        {
            "sysmgrShowVersion": {
                "attributes": {
                    "activePackage": "",
                    "biosCompileTime": "12/07/2015",
                    "biosVersion": "09.20",
                    "bootflashSize": "51496280",
                    "copyRight": "Cisco Nexus Operating System (NX-OS) Software\nTAC support: http://www.cisco.com/tac\nCopyright (C) 2002-2018, Cisco and/or its affiliates.\nAll rights reserved.\nThe copyrights to certain works contained in this software are\nowned by other third parties and used and distributed under their own\nlicenses, such as open source.  This software is provided \"as is,\" and unless\notherwise stated, there is no warranty, express or implied, including but not\nlimited to warranties of merchantability and fitness for a particular purpose.\nCertain components of this software are licensed under\nthe GNU General Public License (GPL) version 2.0 or \nGNU General Public License (GPL) version 3.0  or the GNU\nLesser General Public License (LGPL) Version 2.1 or \nLesser General Public License (LGPL) Version 2.0. \nA copy of each such license is available at\nhttp://www.opensource.org/licenses/gpl-2.0.php and\nhttp://opensource.org/licenses/gpl-3.0.html and\nhttp://www.opensource.org/licenses/lgpl-2.1.php and\nhttp://www.gnu.org/licenses/old-licenses/library.txt.\n",
                    "dn": "sys/showversion",
                    "kernelUptime": "15 minute(s) 2 second(s) ",
                    "lastResetReason": "Reset Requested by CLI command reload",
                    "lastResetService": "",
                    "lastResetSysVersion": "9.2(1)",
                    "lastResetTime": "996434 usecs after Fri Jul  6 21:29:32 2018",
                    "nxosCompileTime": " 7/5/2018 21:00:00",
                    "nxosImageFile": "bootflash:///h232.bin",
                    "nxosVersion": "9.2(1)",
                    "plugin": "Core Plugin, Ethernet Plugin"
                }
            }
        }
    ]
}
GET:  http://<IP_Address>/restconf/data/Cisco-NX-OS-device:System/showversion-items/
<showversion-items>
    <activePackage/>
    <biosCompileTime>12/07/2015</biosCompileTime>
    <biosVersion>09.20</biosVersion>
    <bootflashSize>51496280</bootflashSize>
    <copyRight>Cisco Nexus Operating System (NX-OS) Software
TAC support: http://www.cisco.com/tac
Copyright (C) 2002-2018, Cisco and/or its affiliates.
All rights reserved.
The copyrights to certain works contained in this software are
owned by other third parties and used and distributed under their own
licenses, such as open source.  This software is provided &quot;as is,&quot; and unless
otherwise stated, there is no warranty, express or implied, including but not
limited to warranties of merchantability and fitness for a particular purpose.
Certain components of this software are licensed under
the GNU General Public License (GPL) version 2.0 or 
GNU General Public License (GPL) version 3.0  or the GNU
Lesser General Public License (LGPL) Version 2.1 or 
Lesser General Public License (LGPL) Version 2.0. 
A copy of each such license is available at
http://www.opensource.org/licenses/gpl-2.0.php and
http://opensource.org/licenses/gpl-3.0.html and
http://www.opensource.org/licenses/lgpl-2.1.php and
http://www.gnu.org/licenses/old-licenses/library.txt.
</copyRight>
    <kernelUptime>16 minute(s) 2 second(s) </kernelUptime>
    <lastResetReason>Reset Requested by CLI command reload</lastResetReason>
    <lastResetService/>
    <lastResetSysVersion>9.2(1)</lastResetSysVersion>
    <lastResetTime>996434 usecs after Fri Jul  6 21:29:32 2018</lastResetTime>
    <nxosCompileTime> 7/5/2018 21:00:00</nxosCompileTime>
    <nxosImageFile>bootflash:///h232.bin</nxosImageFile>
    <nxosVersion>9.2(1)</nxosVersion>
    <plugin>Core Plugin, Ethernet Plugin</plugin>
</showversion-items>

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
switch# show version
Cisco Nexus Operating System (NX-OS) Software
TAC support: http://www.cisco.com/tac
Copyright (C) 2002-2018, Cisco and/or its affiliates.
All rights reserved.
The copyrights to certain works contained in this software are
owned by other third parties and used and distributed under their own
licenses, such as open source.  This software is provided "as is," and unless
otherwise stated, there is no warranty, express or implied, including but not
limited to warranties of merchantability and fitness for a particular purpose.
Certain components of this software are licensed under
the GNU General Public License (GPL) version 2.0 or
GNU General Public License (GPL) version 3.0  or the GNU
Lesser General Public License (LGPL) Version 2.1 or
Lesser General Public License (LGPL) Version 2.0.
A copy of each such license is available at
http://www.opensource.org/licenses/gpl-2.0.php and
http://opensource.org/licenses/gpl-3.0.html and
http://www.opensource.org/licenses/lgpl-2.1.php and
http://www.gnu.org/licenses/old-licenses/library.txt.

Software
  BIOS: version 09.20
  NXOS: version 9.2(1)
  BIOS compile time:  12/07/2015
  NXOS image file is: bootflash:///h232.bin
  NXOS compile time:  7/5/2018 21:00:00 [07/06/2018 21:18:03]


Hardware
  cisco Nexus9000 C9504 (4 Slot) Chassis ("Supervisor Module")
  Intel(R) Xeon(R) CPU E5-2403 0 @ 1.80GHz with 16400084 kB of memory.
  Processor Board ID SAL1841207P

  Device name: switch
  bootflash:   51496280 kB
Kernel uptime is 0 day(s), 0 hour(s), 17 minute(s), 57 second(s)

Last reset at 996434 usecs after Fri Jul  6 21:29:32 2018
  Reason: Reset Requested by CLI command reload
  System version: 9.2(1)
  Service:

plugin
  Core Plugin, Ethernet Plugin

Active Package(s):



Note: The property information for this example was added in Release 9.3(3).


sysmgrShowVersion Properties

The following table contains information about the sysmgrShowVersion properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
activePackagestring:Basic
Active PackageA sequence of characters
biosCompileTimestring:Basic
Bios Compile TimeA sequence of characters
biosVersionstring:Basic
Bios VersionA sequence of characters
bootflashSizescalar:Uint32
Bootflash SizeRANGE: [0, 4294967295]
copyRightstring:Basic
Copy RightA sequence of characters
dn
reference:BinRef
A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.
kernelUptimestring:Basic
Kernel UptimeA sequence of characters
lastResetReasonstring:Basic
Last Reset ReasonA sequence of characters
lastResetServicestring:Basic
Last Reset ServiceA sequence of characters
lastResetSysVersionstring:Basic
Last Reset System VersionA sequence of characters
lastResetTimestring:Basic
Last Reset TimeA sequence of characters
nxosCompileTimestring:Basic
Nxos Compile TimeA sequence of characters
nxosImageFilestring:Basic
Nxos Image FileA sequence of characters
nxosVersionstring:Basic
Nxos VersionA sequence of characters
pluginstring:Basic
PluginA sequence of characters


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html