Device Networking Query¶
Request¶
| Field | Description |
|---|---|
| URL | http://localhost:8083/api/osinstall/v1/device/getNetworkBySn |
| encode | UTF-8 |
| method | HTTP GET |
| payload | text/html |
Payload¶
| Field | Type | Required | Description |
|---|---|---|---|
| sn | string | yes | device serial number |
| type | string | yes | specify result format, could be json or raw, default is raw |
Request Sample¶
http://localhost:8083/api/osinstall/v1/device/getNetworkBySn?sn=test&type=raw
Code Sample (PHP)¶
<?php
$url = "http://localhost:8083/api/osinstall/v1/device/getNetworkBySn?sn=test&type=raw";
$content = file_get_contents($url);
echo $content;
?>
Sample Response Message¶
HOSTNAME="idcos-test"
IPADDR="192.168.0.3"
NETMASK="255.255.255.0"
GATEWAY="192.168.0.1"
VLAN="0"
Trunk="no"
Bonding="no"
HWADDR="53:54:00:99:2D:7C"