185 ADAM-6200 User Manual
Appendix C REST for ADAM-6200
C.2.3 Digital Input
C.2.3.1 GET /digitalinput/(all|{id})/value
Request
Thecontent‐typewillbe‘application/x‐www‐form‐urlencoded’.
{id}:istheDIchannelIDstartingfrom0
Examples:
UsethefollowingURItogettheDI‐0value.
http://10.0.0.1/digitalinput/0/value
UsethefollowingURItogettheallDIvalues.
http://10.0.0.1/digitalinput/all/value
Response
The content-type will be ‘text/xml’
IfresultisOK,thecontentwilllooklikebelow
<?xml version="1.0" ?>
<ADAM-6250 status=”OK”>
<DI>
<ID>0</ID>
<VALUE>0</VALUE>
</DI>
</ADAM-6250>
Ifresultisfailed,thecontentwilllooklikebelow
<?xml version="1.0" ?>
<ADAM‐6250status=”{error}”>
</ADAM-6250>
{error}:Theerrormessage.
Remarks
Ifthe{id}isoutofrange,theresponsewill returnHTTPstatuscode501
(Notimplemented)