|
Robot Web Services
3HAC050973-001 Revision:M, Application Manual - Robot Web Services
|
Subscribe on elog messages from an elog domain.
/subscription
POST
None
CREATED(201)
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Subscription Event</title>
</head>
<body>
<a href="ws://localhost/poll/1" rel="events"></a>
<a href="http://localhost/subscription/1?action=show" rel="action"></a>
<div class="state">
<ul>
<li class="elog-message-ev">
<a href="/rw/elog/0/15" rel="self"/>
<span class="seqnum">15</span>
</li>
</ul>
</div>
</body>
</html>
UNSUPPORTED_MEDIA(415), BAD_REQUEST(400)
HTTP Errors, see HTTP Status codes
See Robot controller return codes
Subscribe on elog domain 0
only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource
curl --digest -u "Default User":robotics -d "resources=1&1=/rw/elog/0&1-p=0" -X POST "http://localhost/subscription"
curl --digest -u "Default User":robotics -d "resources=1&1=/rw/elog/0&1-p=1" -X POST "http://localhost/subscription"
The subscription request will return a message similar to the sample response above. To retrieve the elog text must the client do a GET on the link returned in the elog-message-ev.
curl --digest -u "Default User":robotics "http://localhost/rw/elog/0/15?lang=en"
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Elog</title>
<base href="http://localhost/rw/elog/"/>
</head>
<body>
<div class="state">
<a href="0/15?lang=en" rel="self"/>
<ul>
<li class="elog-message" title="/rw/elog/0/15">
<span class="msgtype">1</span>
<span class="code">10151</span>
<span class="tstamp">2014-06-23 T 10:00:51</span>
<span class="title">Program started</span>
<span class="desc">Execution of task T_ROB1 has been started from the first instruction of the task's entry routine. The originator is an external client.</span>
<span class="conseqs"/>
<span class="causes"/>
<span class="actions"/>
<span class="argc">2</span>
<span class="arg1" type="long">1</span>
<span class="arg2" type="string">T_ROB1</span>
</li>
</ul>
</div>
</body>
</html>
Not supported in bootserver mode