
20
3.13.4. How to connect with platform Web API?
PD has a local web server to provide Web API for customer getting PD
information in JSON format.
1. APIs specifications
-
Protocol: HTTP
-
Method: GET
-
Domain: localhost
-
Port: 9988
-
URI: /platform/getinfo
2. API Request URL
-
http://localhost:9988/platform/getinfo
3. API Response
-
Status
Status
Code
Description
Success
0
Request success
Error
1
Request failure
-
Result in JSON format
• interfaces: list all of network interface’s MAC address
• family: the address-family within an IPv4 or IPv6
• mac: network interface’s MAC address
• ip: network interface’s IP address
• currentip: current IP address of device
• sn: serial number of device
• model: model name of device
• version: version of Web API
-
JSON sample
{
status: "success",
code: 0,
decsription: "success",
result:
{
"version": "1.0",
"currentip": "172.17.3.4",
"sn": "123456",
"model": "PDModelName",
"interfaces": [
{
"family": "IPv6",
"ip": "fe80::84ea:d74b:1167:aa69",
"mac": "a4:4e:31:9c:79:e0"
},
{
"family": "IPv4",
"ip": "172.17.3.4",
"mac": "a4:4e:31:9c:79:e0"
}
]
}
}