Get Device Information
/rest/{versionId}/inventory/deviceMgmt/devices/{deviceId}
Request
Response
- application/xml
- application/json
200 Response
object
-
bootstrapState(optional):
string
-
connectivityStatus(optional):
boolean
-
description(optional):
string
-
groupParameters(optional):
array groupParameters
-
id(optional):
string
-
ip(optional):
string
-
key(optional):
string
-
manageable(optional):
boolean
-
name(optional):
string
-
nfId(optional):
string
-
nfName(optional):
string
-
parameters(optional):
array parameters
parameters
-
parentGroupId(optional):
string
-
platformInfo(optional):
object platformInfo
-
softwareInfo(optional):
object softwareInfo
object
-
description(optional):
string
-
label(optional):
string
-
maxValue(optional):
integer(int64)
-
minValue(optional):
integer(int64)
-
name(optional):
string
-
readOnly(optional):
boolean
-
validValues(optional):
array validValues
-
value(optional):
string
-
valueList(optional):
array validLists
-
valueType(optional):
string
400 Response
401 Response
404 Response
Examples
Example of Accessing the API with cURL
The following example shows how to get device information by submitting a GET request on the REST resource using cURL. For more information about cURL, see Use cURL.
curl -X GET -b sessionid.txt \
--header "Accept: application/xml" \
"https://example.com:8443/rest/v1.3/inventory/deviceMgmt/devices/ID2"
Example of Accessing the API with Python
The following example shows how to get device information by submitting a GET request on the REST resource using Python. This example assumes the cookie
variable contains a valid authentication cookie. For an example of authenticating with Python, see Authenticate.
import requests
url = "https://example.com:8443/rest/v1.3/inventory/deviceMgmt/devices/ID2"
headers = { "Accept":"application/xml", "Cookie":cookie }
resp = requests.get(url, headers=headers)
Example of the Response Headers
The following shows an example of the response headers.
HTTP/1.1 200 OK
Date: Fri, 24 Feb 2017 19:39:17 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
Content-Length: 1366
Vary: Accept-Encoding
Content-Type: application/xml
Example of the Response Body
The following example shows the contents of the response body in XML format.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<device>
<connectivityStatus>true</connectivityStatus>
<groupParameters>
<groupParameter>
<description>SNMP Community to use for device communication</description>
<name>snmp.community.name</name>
<readOnly>false</readOnly>
<value>techpubs</value>
<valueType>String</valueType>
</groupParameter>
<groupParameter>
<description>SNMP Port to use for device communication</description>
<maxValue>9223372036854775807</maxValue>
<minValue>0</minValue>
<name>snmp.port</name>
<readOnly>false</readOnly>
<value>161</value>
<valueType>NumberString</valueType>
</groupParameter>
<groupParameter>
<description>User name to use for device communication</description>
<name>username</name>
<readOnly>false</readOnly>
<value>admin</value>
<valueType>String</valueType>
</groupParameter>
<groupParameter>
<description>Password of the user</description>
<name>password</name>
<readOnly>false</readOnly>
<value>xxxx</value>
<valueType>String</valueType>
</groupParameter>
</groupParameters>
<id>ID2</id>
<ip>10.0.0.24</ip>
<key>ARISTOTLE_10.0.0.24</key>
<manageable>true</manageable>
<name>ARISTOTLE</name>
<nfId>ID6</nfId>
<nfName>sd1</nfName>
<parentGroupId>ID6</parentGroupId>
<platformInfo>
<platform>NNOSVM</platform>
<serialNumber>--</serialNumber>
</platformInfo>
<softwareInfo>
<configVersion>5</configVersion>
<version>SCZ740m1</version>
</softwareInfo>
</device>