Robot Web Services
3HAC050973-001 Revision:M, Application Manual - Robot Web Services
Get Subscription Actions

Get a list of actions that can be invoked on the subscription resource

Returns the form that can be used to create a subscription.

URL

/subscription

Method

GET

URL Params

action=show Required

Returns action Forms for this resource

See Common URL parameters

Data Params

None

Success Response

HTTP_OK(200), see HTTP Status codes

Example Response

<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> Create Subscription </title>
<base href="http://localhost/subscription/"/>
</head>
<body>
<div class="state">
<form method="post" action="" id="subscribe">
<fieldset class="sub-resource">
<input type="checkbox" name="resources" value="1"/>
<input class="res" type="text" name="1" maxlength="500"/>
<select class="sub-priority" name="1-p">
<option value="0" selected="selected">
</option>
<option value="1">
</option>
<option value="2">
</option>
</select>
</fieldset>
</form>
</div>
</body>
</html>

Actions

subscribe

  • resources=[numeric] Required, the subscription resource identifier
  • *<identifier>=[alphanumeric] Required , the resource URI
  • *<identifier>-p=[numeric] Required , the priority associated with the susbcription resource
  • sub-resource the subscription resource

Error Response

BAD_REQUEST(400), see HTTP Status codes

See Robot controller return codes

Sample Call

curl --digest -u "Default User":robotics "http://localhost/subscription?action=show"

Notes

The form body is in standard form data format and consists of three name-value pairs per resource.

  • 1st pair - resources=<identifier> e.g. resources=1
  • 2nd pair - <identifier>=<subscription-resource> e.g. 1=/rw/iosystem/signals/Virtual1/Board1/do1;state
  • 3rd pair - <identifier>-p=<0|1|2> 1-p=1

In the above, <identifier> can be any value but it is recommended to use integer values such as 1, 2,3 etc. An example payload to subscribe on a single resource "/rw/iosystem/signals/Virtual1/Board1/do1;state" and associate priority "1" to the resource is shown below:

resources=1&1=/rw/iosystem/signals/Virtual1/Board1/do1;state&1-p=1

Similarly, the payload for subscribing on two resources

"/rw/iosystem/signals/Virtual1/Board1/do1;state" and "/rw/iosystem/signals/Virtual1/Board1/do2;state"

resources=1&1=/rw/iosystem/signals/Virtual1/Board1/do1;state&1-p=1& resources=2&2=/rw/iosystem/signals/Virtual1/Board1/do2;state&2-p=0

maximum 1000 resources can be subscribed per group

Not supported in bootserver mode