GET /switches

Use this method to return the properties for all Flex and RackSwitch switches.

Authentication

Authentication with user name and password is required.

Request URL

GET https://{management_server_IP}/switches

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 all switches.
GET https://192.0.2.0/switches?formatType=csv

Request body

None

Response codes

Code Description Comments
200 OK The request completed successfully.
400 Bad Request A query parameter or request attribute is missing or not valid, or the operation is not supported. A descriptive error message is returned in the response body.
403 Forbidden The orchestrator server was prevented from fulfilling the request. A descriptive error message is returned in the response body. Ensure that you have privileges to perform the request.
409 Conflict There is a conflict with the current state of the resource. A descriptive error message is returned in the response body.
500 Internal Server Error An internal error occurred. A descriptive error message is returned in the response body.

Response body

Attributes Type Description
switchList Array List of switches
  See GET /switches/{uuid_list} Object Detailed information about each switch
The following example is returned if the request is successful when the formatType=json query parameter is specified.
{
"switchList": [{
   "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,
   "cmmDisplayName": "NE1072T",
   "cmmHealthState": "Critical",
   "contact": "John Smith",
   "cpuUtilization": "N/A",
   "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",
   "leds": [],
   "location": {
      "location": "Santa Clara",
      "lowestRackUnit": 5,
      "rack": "Core 1",
      "room": "Core lab"
   },
   "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": ""
}]
}