User Manual

181 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
Thecontenttypewillbe‘application/xwwwformurlencoded’.
{id}:istheDIchannelIDstartingfrom0
Examples:
UsethefollowingURItogettheDI0value.
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,thecontentwi lllooklikebelow
<?xml version="1.0" ?>
<ADAM-6250 status=”OK”>
<DI>
<ID>0</ID>
<VALUE>0</VALUE>
</DI>
</ADAM-6250>
Ifresultisfailed,thecontentwi lllooklikebelow
<?xml version="1.0" ?>
<ADAM6250status={error}”>
</ADAM-6250>
{error}:Theerrormessage.
Remarks
Ifthe{id}isoutofrange,theresponsewillreturnHTTPstatuscode501
(Notimplemented)