Robot Web Services
3HAC050973-001 Revision:L, Application Manual - Robot Web Services
Subscribe on Diagnostics States (Get System Diagnostics)

Subscribe on "/progress/{id}" to get events with current status of System Diagnostics.

/progress/{id} : "location header" which is getting when "Save system diagnostics " operation is successfully done

URL

/subscription

Method

POST

Data Params

  • resources = An identifier Required
  • <identifier> = The subscription resource URI (The URI here is: '/progress/{id} ') Required
  • <identifier>-p = The priority associated with the subscription resource. Required

Success Response

CREATED(201), see HTTP Status codes

Example Response

<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Event</title>
<base href="http://localhost/"/>
</head>
<body>
<div class="state">
<a href="subscription/4" rel="group"/>
<a href="ws://localhost/poll/4" rel="self"/>
<a href="subscription/4?action=show" rel="action"/>
</div>
</body>
</html>
An event will look like
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Event</title>
<base href="http://localhost/"/>
</head>
<body>
<div class="state">
<a href="subscription/4" rel="group"/>
<ul>
<li class="progress-ev" title="save diagnostics"><a href="/progress/1" rel="self"/>
<a href="http://localhost/fileservice/$TEMP/diagnostics.log" rel="resource"/>
<span class="state">pending</span>
<span class="code">294913</span>
</li>
</ul>
</div>
</body>
</html>

Error Response

BAD_REQUEST(400) See Robot controller return codes

Sample Call

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=/progress/1;state&1-p=0" -X POST "http://localhost/subscription"

Notes

  • if the subscription is created when save System Diagnostics(diagnostics.log is in progress),the state will be in "pending".
  • Not supported in bootserver mode.
  • Not supported on virtual controller.