ADAM-6200 User Manual 180
C.1 Introduction
REpresentational State Transfer (REST) is a design style of software architecture for
Web application behaves and services including image indication, resource request
and response and message delivery. It can be developed compatible with popular
protocols or standards like HTTP, URI, XML, HTML. With the advantage of scalability,
simplicity and performance, it's already adopted in Web service by Amazon, Yahoo.
The Web service of ADAM-6200 is developed based on HTML5 language, if user
need to integrate this into other Web services, the following information/command list
should be referred for implementation.
C.2 REST Resources for ADAM
C.2.1 Analog Input
C.2.1.1 GET /analoginput/(all|{id})/value
Request
Thecontent‐typewillbe‘application/x‐www‐form‐urlencoded’.
{id}:istheAIchannelIDstartingfrom0
Examples:
UsethefollowingURItogettheAI‐0value.
http://10.0.0.1/analoginput/0/value
UsethefollowingURItogettheallAIvalues.
http://10.0.0.1/analoginput/all/value
Response
The content-type will be ‘text/xml’
IfresultisOK,thecontentwilllooklikebelow
<?xml version="1.0" ?>
<ADAM-6217 status=”OK”>
<AI>
<ID>0</ID>
<
VALUE>FFFF</VALUE>
</AI>
</ADAM-6217>
Ifresultisfailed,thecontentwilllooklikebelow
<?xml version="1.0" ?>
<ADAM‐6217status=”{error}”>
</ADAM-6217>
{error}:Theerrormessage.
Remarks
Ifthe{id}isoutofrange,theresponsewillreturnHTTPstatuscode501
(Notimplemented)