GET /switches/<UUID_list>

Use this GET method to retrieve properties for one or more specific Flex and RackSwitch switches. This REST API is available only for Lenovo XClarity Administrator v1.0.1 and later.

Authentication

Authentication with user name and password is required.

Request URL

GET https://<management_server_IP>/switches/<UUID_list>

where <UUID_list> is a list of one or more UUIDs, separated by a comma, of the switches to be retrieved. To obtain the switch UUIDs, use the GET /switches method.

Query parameters

Parameters Required / Optional Description
excludeAttributes=<attributes> Optional Returns a response that excludes the specified attributes for each resource. You can specify one or more attributes that are listed in the response body, separated by a comma.
Note:
  • When the includeAttributes query parameter is specified, the excludeAttributes query parameter is ignored.

  • The response is filtered based on attribute name, not the attribute value.

  • Base attributes cannot be excluded.

formatType=<type> Optional Returns information in the specified format. This can be one of the following values.
  • json (default)
  • csv

If the format type is not specified, JSON format is returned.

Note: To retrieve properties for a large number of devices, use POST /switches.
includeAttributes=<attributes> Optional Returns a response that includes the base attributes and the specified attributes for each resource. You can specify one or more attributes that are listed in the response body, separated by a comma.
Note:
  • The response is filtered based on attribute name, not the attribute value.

  • If this attribute is not specified, all attributes are returned by default.

The following example returns a CSV file that contains information about two specific switches.
GET https://192.0.2.0/switches/{0E7D8E1CDF7D11D4ABB0D5D5D5313131,
409583E0BD27B7019F3758946B036818}?formatType=csv

Request body

None

Response codes

Code Description
200 OK.
400 Bad request.
403 Forbidden.
409 Conflict.
413 Request Entity Too Large. Clients might impose limitations on the length of the request URL, and the request URL is too long to be handled.
500 Internal server error.

Response body

Attributes Type Description
accessState String State of the switch. This can be one of the following values.
  • Online
  • Offline
  • Partial
  • Pending
  • Unknown
accessStateRecords Array of objects Information about the access-state record for each network interface and protocol that is available for the device
Note: This attribute is present only for devices that are offline due to connectivity issues.
  health String Connection health state of the device. This can be one of the following values.
  • OFFLINE

  • PARTIAL

  • FAIL

  ipAddress String IP address that was used to check the network connectivity
  isTrusted Boolean Indicates whether the connection to the device is trusted. This can be one of the following values.
  • true. The connection is trusted.

  • false. The connection is not trusted.

  messageBundle String Location where messages.properties can be found if it is not located in the default task management bundle
  messageDisplay String Translated label that corresponds to the message ID or to the pre-translated backup string if no message ID is specified
  messageID String Message ID for the translatable connection error states
  messageParameters Array of strings Attributes for the message if the translated message requires input. A JSON object that points to translated messages.
  protocol String Type of the protocol to check connectivity. This can be one of the following values.
  • CIM

  • CLI

  • DCS

  • REDFISH

  timestamp Long Timestamp when connectivity was last checked and when this record was created
  username String User name that was used to check connectivity
       
applyPending Integer Indicates whether an apply action is needed and that the configuration has been changed by the user actions.
attachedNodes Array List of nodes with one or more ports attached to the switch.
badCredentials Boolean Indicates whether stored credentials are valid to login. This can be one of the following values.
  • true. Stored credentials are not valid for login.

  • false. Stored credentials are valid for login.

cmmDisplayName String Switch name provided by the CMM
cmmHealthState String Health summary that corresponds to the highest event severity of all the devices. This can be one of the following values.
  • Normal
  • Non-Critical
  • Warning
  • Minor-Failure
  • Major-Failure
  • Non-Recoverable
  • Critical
  • Unknown
contact String Contact name for the switch
cpuUtilization Long Processor usage for the switch.
dataHandle Long Time stamp of the last status update
description String Description provided by the CMM
dnsHostnames Array of strings List of DNS hostnames
domainName String User defined domain name
elapsedTimeMillisecs String Elapsed time, in milliseconds
entitleSerialNumber String Wwitch serial number
errorFields Array of objects that contain {String, ErrorCode} Error codes. This can be one of the following values.
  • FETCH_SUCCESS
  • FETCH_FAILED
  • NO_CONNECTOR
  • FATAL_EXCEPTION
  • NETWORK_FAIL
excludedHealthState String Highest severity alert with exclusions. This can be one of the following values.
  • Normal
  • Non-Critical
  • Warning
  • Minor-Failure
  • Major-Failure
  • Non-Recoverable
  • Critical
  • Unknown
expiredCredentials Boolean Indicates whether stored credentials are accepted by the switch but not authorized for login. This can be one of the following values.
  • true. Stored credentials are accepted by the switch but not authorized for login.

  • false. Stored credentials are accepted by the switch and authorized for login.

fans Array Information about each fan in the switch
  fanName String Fan name
  fanSpeed String Fan speed
  fanState String Fan status
firmware Array Firmware details
  build String Firmware build
  date String Firmware date
  name String Firmware name
  status String Firmware status
  role String  
  type String Firmware type
  version String Firmware version
FRU String FRU part number
fruSerialNumber String FRU serial number
globalVlagState String Configured state of VLAG. This can be one of the following values.
  • Enabled

  • Disabled

  • N/A

hostname String User defined hostname
httpsEnabled Boolean (Rack switches running ENOS only) Indicates whether to enable HTTPS on the switch. This can be one of the following values.
  • true. HTTPS is enabled.

  • false. HTTPS is not enabled.

ipInterfaces Array Information about the switch IP addresses
  IPv4assignments Array Information about IPv4 assignments
    address String IPv4 address
    gateway String IPv4 gateway
    id Integer IPv4 assignment ID
    subnet String Subnet mask
    type String Type of IPv4 assignment. This can be one of the following values.
  • INUSE
  • CONFIGURED
  • ALIAS
  • UNKNOWN
  IPv4DHCPmode String IP address assignment method. This can be one of the following values.
  • STATIC_ONLY
  • DHCP_ONLY
  • DHCP_THEN_STATIC
  • UNKNOWN
  IPv4enabled Boolean Identifies whether IPv4 is enabled. This can be one of the following values.
  • true. IPv4 is enabled.
  • false. IPv4 is disabled.
  IPv6assignments Array Information about IPv6 assignments
    address String IPv6 address
    gateway String IPv6 gateway
    id Integer IPv6 assignment ID
    prefix Integer IPv6 prefix
    scope String Scope of the IPv6 assignment. This can be one of the following values.
  • Global
  • LinkLocal
  • Unknown
    source String Source of the IPv6 assignment. This can be one of the following values.
  • DHCP
  • Statelesss
  • Static
  • Other
  • Unknown
    type String Type of IPv6 assignment. This can be one of the following values.
  • INUSE
  • CONFIGURED
  • ALIAS
  • UNKNOWN
  IPv6DHCPenabled Boolean Identifies whether IPv6 DHCP is enabled. This can be one of the following values.
  • true. IPv6 DHCP is enabled.
  • false. IPv6 DHCP is disabled.
  IPv6enabled Boolean Identifies whether IPv6 is enabled. This can be one of the following values.
  • true. IPv6 is enabled
  • false. IPv6 is disabled
  IPv6statelessEnabled Boolean Identifies whether IPv6 stateless is enabled. This can be one of the following values.
  • true. IPv6 stateless is enabled.
  • false. IPv6 stateless is disabled.
  IPv6staticEnabled Boolean Identifies whether IPv6 static is enabled. This can be one of the following values.
  • true. IPv6 static is enabled.
  • false. IPv6 static is disabled.
  label String Label
  name String Name
ipv4Addresses Array of strings List of IPv4 addresses
ipv6Addresses Array of strings List of IPv6 addresses
leds Array Information about switch LEDs.
  color String LED color. This can be one of the following values.
  • Red
  • Amber
  • Yellow
  • Green
  • Blue
  • Unknown
  location String LED location. This can be one of the following values.
  • Front panel
  • Lightpath Card
  • Planar
  • FRU
  • Rear Panel
  • Unknown
  name String LED name.
  state String LED state. This can be one of the following values.
  • Off
  • On
  • Blinking
  • Unknown
location Array of objects Information about the switch location
  location String Location description
  lowestRackUnit Integer Lowest unit that is occupied by the device in the rack
  rack String Rack
  room String Room
macAddresses Array of strings List of MAC addresses
machineType String Machine type
manufacturer String Manufacturer
manufacturerID String Manufacturer ID
manufacturingDate String Manufacturing date
memoryUtilization String Amount of used and free memory
mgmtProcIPaddress String IP address that is used by XClarity Administrator to manage this resource
model String Switch model
name String Name that is displayed in the user interface for this device

The value of this attribute is determined by preferredDisplayName attribute in the GET /aicc method. For example, if the preferredDisplayName attribute is set to "hostname," then the value for this name attribute is the same as the hostname attribute in the GET /aicc method.

NTPPushEnabled Boolean Indicates whether pushing NTP settings to the CMM is enabled. This can be one of the following values.
  • true. Push is enabled.

  • false. Push is disabled.

NTPPushFrequency Integer Frequency for pushing NTP settings to the CMM. This can be a number from 044640.
operationalVlagState String Operational state of VLAG. This can be one of the following values.
  • Enabled

  • Disabled

  • N/A

OS String (Rack switches only) Firmware type. This can be one of the following values.
  • CNOS

  • ENOS

overallHealthState String Highest severity of all alerts. This can be one of the following values.
  • Normal
  • Non-Critical
  • Warning
  • Minor-Failure
  • Major-Failure
  • Non-Recoverable
  • Critical
  • Unknown
parent Object (Flex switches only) Information about the chassis in which the switch resides
  uri String URI of the chassis (for example, chassis/3A8B7173-0D66-4FA1-93B4-9213A74DE9F5)
  uuid String UUID of the chassis (for example, 3A8B7173-0D66-4FA1-93B4-9213A74DE9F5)
partNumber String Part number for the switch
portDataSetTimestamp String  
panicDump String Presence of a panic dump in the flash memory. This can be one of the following values.
  • Yes. A panic dump is in the flash memory.

  • No. A panic dump is not in the flash memory.

ports Array of objects Information about fan ports
  configuredStatus String Configuration of the port. This can be one of the following values.
  • enabled. The port is enabled.

  • disabled. The port is disabled.

  interfaceIndex String  
  mtu Integer Maximum transmission unit for the port
  operationalStatus String Rreal-time status of the port. This can be one of the following values.
  • up

  • down

  • notPresent. The cable is unplugged

  peerMacAddress String Port MAC address
  port String Port index
  portName String Port name
  portSpeed String Port speed
  portState String Current operational link status of the port. This can be one of the following values.
  • up

  • down

  PVID Integer Default VLAN ID for the port
  tagPVID String PVID tag state of the port. This can be one of the following values.
  • tagged

  • untagged

  vLAN String VLAN tag state of the port. This can be one of the following values.
  • tagged. VLAN tagging is enabled.

  • untagged. VLAN tagging is diaabled.

posID String Position ID
powerState String Current power state of the switch. This can be one of the following values.
  • Off
  • On
  • ShuttingDown
  • Standby
  • Hibernate
  • Unknown
powerSupply String Information about the state of each power supply, separated by a colon and ending with a period (for example, Power Supply 1: Off;Power Supply 2: on.)
productID String Product ID
productName String Model of the switch
protectedMode Boolean Identifies whether the switch is in protected mode. This can be one of the following values.
  • true. The switch is in protected mode
  • false. The switch is not in protected mode
resetReason String Reason for the switch reset.
savePending String Indicates whether an save action is needed and that the configuration has been applied but not saved to the flash.
  • yes. The save action is needed.

  • no. The save action is not needed.

securityDescriptor Object Information about the authentication enablement and support the associated stored credentials for a managed device.
  managedAuthEnabled Boolean Indicates whether the device uses managed authentication. This can be one of the following values.
  • true. The device uses managed authentication.

  • false. The device uses local authentication.

  managedAuthSupported Boolean Indicates whether the device supports the ability to choose whether managed authentication is to be used. This can be one of the following values.
  • true. This device supports the ability to choose managed authentication.

  • false. This device does not support the ability to choose managed authentication.

  publicAccess Boolean Indicates whether the resource can be accessed by all role groups. This can be one of the following values.
  • true. The resource is can be access by all role group.

  • false. The resource is restricted to specific role groups.

  roleGroups Array of strings List of role groups that are permitted to view and manage this device
  storedCredentials Array of objects Information about the stored credential that is associated with this device, if applicable
    description String Description of the stored credential
    id String ID of the stored credential
    userName String Name of the stored credential
  uri String URI of the device
serialNumber String Serial number
slots Integer Primary slot
stackedMode Boolean Identifies whether the switch is in stacked mode. This can be one of the following values.
  • true. The switch is in stacked mode
  • false. The switch is not in stacked mode
stackRole String Role of the switch in the stack
sysObjectID String System-object identifier of the switch.
temperatureSensors Array of objects Information about temperature sensors
  sensorName String Temperature sensor name
  sensorState String Temperature sensor state
type String Resource type. This value is always "Switch."
upTime String Time (in hundredths of a second) since the network management portion of the system was last re-initialized
uri String URI
userDefinedName String User-defined name for the device
userDescription String User description
uuid String UUID
vpdID String VPD ID

Response example

The following example JSON response is returned when the formatType=json query parameter is specified.

{
   "switchList": [{
   "accessState": "Online",
   "accessStateRecords": [{
      "health": "SUCESS",
      "ipAddress": "10.243.6.68",
      "messageBundle": "com.lenovo.lxca.discovery.bundle.tasks.messages",
      "messageDisplay": "Connection is successful",
      "messageID": "1180_SHORT",
      "messageParameters": [],
      "protocol": "CIM",
      "timestamp": 1565785907453,
      "username": "USERID"
   },
   {
      "health": "SUCESS",
      "ipAddress": "fd55:faaf:e1ab:2021:42f2:e9ff:feb8:163d",
      "messageBundle": "com.lenovo.lxca.discovery.bundle.tasks.messages",
      "messageDisplay": "Connection is successful",
      "messageID": "1180_SHORT",
      "messageParameters": [],
      "protocol": "CIM",
      "timestamp": 1565785907465,
      "username": "USERID"
   }],
   "applyPending": "No",
   "backedBy": "real",
   "badCredentials": false,
   "contact": "John Smith",
   "cpuUtilization": "N/A",
   "cmmDisplayName": "NE1072T",
   "cmmHealthState": "Critical",
   "dataHandle": 1559245736963,
   "description": "48*10 GbE(RJ-45), 6*40 GbE QSFP+",
   "dnsHostnames": [],
   "domainName": "",
   "elapsedTimeMillisecs": "291128",
   "entitleSerialNumber": "MM28753",
   "errorFields": [],
   "excludedHealthState": "Critical",
   "expiredCredentials": false,
   "fans": [{
      "fanName": "Fan 1",
      "fanSpeed": "1782 RPM (23 PWM)",
      "fanState": "Front-to-Back"
   },
   ...],
   "firmware": [{
      "build": "",
      "classifications": [],
      "date": "",
      "name": "Uboot",
      "role": "",
      "status": "N/A",
      "type": "Boot ROM",
      "version": "10.9.3.0"
   },
   ...],
   "FRU": "00YK768     ",
   "fruSerialNumber": "",
   "globalVlagState": "Disabled",
   "height": 1,
   "hostname": "NE1072T",
   "httpsEnabled": true,
   "ipInterfaces": [{
      "IPv4assignments": [{
         "id": 0,
         "subnet": "255.255.252.0",
         "gateway": "0.0.0.0",
         "address": "10.240.196.83",
         "type": "UNKNOWN"
      }],
      "IPv4DHCPmode": "UNKNOWN",
      "IPv4enabled": true,
      "IPv6assignments": [{
         "id": 0,
         "scope": "Global",
         "gateway": "0:0:0:0:0:0:0:0",
         "source": "Static",
         "address": "fe80:0:0:0:a68c:dbff:fe96:dd00",
         "prefix": 10,
         "type": "UNKNOWN"
      }],
      "IPv6DHCPenabled": false,
      "IPv6enabled": true,
      "IPv6statelessEnabled": false,
      "IPv6staticEnabled": false,
      "label": "unknown",
      "name": "mgmt0"
   }...
   ],
   "ipv4Addresses": ["10.240.196.83"],
   "ipv6Addresses": ["fe80::200:ff:fe00:0","fe80::a68c:dbff:fe96:dd00"],
   "isConnectionTrusted": "true",
   "location": {
      "location": "Santa Clara",
      "lowestRackUnit": 5,
      "rack": "Core 1",
      "room": "Core lab"
   },
   "leds": [],
   "macAddresses": ["A4:8C:DB:96:DD:00"],
   "machineType": "7159",
   "manufacturer": "LNVO",
   "manufacturerId": "",
   "manufacturingDate": "3117 (WWYY)",
   "memoryUtilization": "",
   "mgmtProcIPaddress": "10.240.196.83",
   "model": "HD6",
   "name": "NE1072T",
   "ntpPushEnabled": false,
   "ntpPushFrequency": 0,
   "operationalVlagState": "Disabled",
   "OS": "CNOS"
   "overallHealthState": "Critical",
   "panicDump": "No",
   "parent": {
      "uri": null,
      "uuid": null
   },
   "partNumber": "00YL919     ",
   "portDataSetTimestamp": "03:48:56",
   "ports": [{
      "configuredStatus": "up",
      "interfaceIndex": "410001",
      "operationalStatus": "down",
      "mtu": 1500,
      "peerMacAddress": "",
      "portName": "",
      "portSpeed": "auto",
      "portState": "down",
      "tagPVID": "",
      "vLAN": "untagged",
      "port": "Ethernet1/1",
      "PVID": "1"
   },
   ...],
   "posID": "",
   "powerState": "On",
   "powerSupply": "Power Supply 1: Off;Power Supply 2: On.",
   "productId": "",
   "productName": "Lenovo ThinkSystem NE1072T RackSwitch",
   "protectedMode": "Unknown",
   "resetReason": "1",
   "savePending": "No",
   "securityDescriptor": {
      "managedAuthEnabled": false,
      "managedAuthSupported": false,
      "publicAccess": false,
      "roleGroups": ["WIRELESS"],
      "storedCredentials": [{
         "description": "",
         "id": "2417",
         "userName": "admin"
      }],
      "uri": "switches/00000000000010008000a48cdb96dd00"
   },
   "serialNumber": "Y055DH77R016",
   "stackMode": "none",
   "stackRole": "none",
   "sysObjectID": "1.3.6.1.4.1.19046.1.7.34",
   "temperatureSensors": [{
      "sensorName": "Inlet Temp",
      "sensorState": "38 °C"
   },
   ...],
   "type": "Rackswitch",
   "upTime": "46 days, 06:37:12",
   "userDescription": "",
   "userDefinedName": "NE1072T",
   "uri": "switches/00000000000010008000A48CDB96DD00",
   "uuid": "00000000000010008000A48CDB96DD00",
   "vpdID": "",
}