Aten PE6208 [2/2] Example

Aten PE8208 [2/2] Example
Get Relay Status
HTTP Method
GET
Resource URI
Device level relay status: PDU_IP/api/device/relay
Bank level relay status: PDU_IP/api/bank/relay
Outlet level relay status: PDU_IP/api/outlet/relay
Parameters for Set Relay Status
usr
Username which is the same with web page
pwd
Password which is the same with web page
index
1-based index of device, bank , or outlet according to request URI.
Can be omitted while requesting the whole device’s relay status.
HTTP Response Code
200
OK. Command accepted, user authenticated and processed successfully. Along
with XML formatted as follow:
<OutletRelay>
<01>ON</01>
<02>ON</02>
<03>PENDING</03>
<04>OFF</04>
<05>CAP</05>
<06>POP</06>
...
...
</OutletRelay>
How many outlets are included in <OutletRelay> is according to URI & index.
400
Bad Request. Malformed syntax or unsupported parameters.
401
Unauthorized. Account authentication failed.
404
Resource not found. Can either be one of the following:
URI mismatch
Index of device/bank/outlet is out of range
The device/bank/outlet assigned has no relay support
Example:
Get Relay Status of Outlet 1
GET https://192.168.0.60/api/outlet/relay?usr=username&pwd=password&index=1
Get Relay Status of Bank 2
GET https://192.168.0.60/api/bank/relay?usr=username&pwd=password&index=2
Get Relay Status of All Outlets
GET https://192.168.0.60/api/device/relay?usr=username&pwd=password
Скачать