Robot Web Services
3HAC050973-001 Revision:M, Application Manual - Robot Web Services
Mastership Subscribe

Subscribe on all Masterhip resources i.e. CFG, Motion and RAPID

URL

/subscription

Method

POST

URL Params

None

Data Params

  • resources = An identifier Required
  • <identifier> = The subscription resource URI (The URI here is: '/rw/mastership') Required
  • <identifier>-p = The priority associated with the subscription resource Required

Success Response

CREATED(201)

see HTTP Status codes

Sample Response

<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Subscription Event</title>
    </head>
    <body>
        <div class="state">
        <a href="http://localhost/subscription/1" name="poll"></a>
        <a href="http://localhost/subscription/1?action=show" rel="action"></a>
        <a href="http://localhost/subscription/1" rel="group"></a>
            <ul class="list">
                <li class="msh-resource-value" title="cfg">  
                    <span class="holdmastership">true</span>                    
                    <span class="uid">65</span> 
                    <span class="location">remote</span>    
                    <span class="alias"></span> 
                    <span class="application">RobotStudio</span>                        
                </li>                           
                <li class="msh-resource-value" title="rapid">  
                    <span class="holdmastership">true</span>                    
                    <span class="uid">65</span> 
                    <span class="location">remote</span>    
                    <span class="alias"></span> 
                    <span class="application">RobotStudio</span>                        
                </li>                           
            </ul>
        </div>
    </body>
</html>

Error Response

BAD_REQUEST(400)

HTTP Errors, see HTTP Status codes

Robot controller errors, see Robot controller return codes

Sample Call

Subscribe on mastership state changes

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

curl --digest -u "Default User":robotics -d "resources=1&1=/rw/mastership&1-p=1" -X POST "http://localhost/subscription"

Notes

Not supported in bootserver mode