POST /switches
Use this method to return the properties for a large number of specific Flex and RackSwitch switches.
Note
If you choose formatType=csv, this request creates a file in CSV format and returns the filename in the request header. You can use to download the file using GET /switches/{file_name}.csv.
Authentication
Authentication with username and password is required.
Request URL
POST https://{management_server_IP}/switches
Query parameters
None
Request body
Attributes | Required / Optional | Type | Description | ||
---|---|---|---|---|---|
formatType | Optional | String | Returns information in the specified format. This can be one of the following values.
| ||
uuids | Required | String | List of device UUIDs, separated by a comma |
Request example
{
"formatType": "csv",
"uuids": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"]
}
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 header
If formatType=csv is specified, the response header includes the URI of the downloaded file. If data for a single switch is requested, the file name includes the switch UUID. If multiple switches are requested, the file name is allSwitches_{unique_ID}.csv. For example:
Status Code: 201 Created
Location: /chassis/EF6D424FAACA4E539771B812AAEE0F73.csv
Response body
If the formatType=csv request attribute is specified, no response body is returned.
If the formatType=json request attribute is specified, the following JSON object is returned.
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": ""
}]
}
Give documentation feedback