RobotStudio event

Thoughts about the HTTP headers

Hi, I have been using the new RW6 REST API for a while now and I think it works really well.

I was thinking that adding "Access-Control-Allow-Origin: *" to the response headers would improve the API since it would allow for webpages to fetch data from the robot controller without needing to be served from it. Furthermore; although the character encoding is specified in the XML document, this information is not present in the JSON response and could be specified in the HTTP headers as well.

Cheers!

Comments

  • Facing the same issue.
    Yep, that would pave the way for modern React JS apps.
    Creating a backend server in python or .Net backend to interface with the robot controller's REST interface feels really redundant, since the front-end can just as well consume the REST API.

  • Found the config file of the REST server running on the robot ( located: /hd0a/05-102162/Products/RobotWare_6.05.0129/system/appweb.conf). The server software used is EmbedThis.

    The conf file suggest that authentication is configurable / could be turned off.
    That said, I ran into changing the file; seems additional permission is required and the usual ABB pwd's didnt pan out here.

    <Route ^/poll>
    	AuthRealm "validusers@robapi.abb"
    	AuthType digest
    	AuthDigestQop auth
        WebSocketsProtocol  robapi2_subscription
        AddFilter           webSocketFilter
        SetHandler 			wsSubscription	
        RequestTimeout      72hours
    #	InactivityTimeout   5hours
    	WebSocketsPing 		30seconds
    </Route>
    
    <Route ^\/fileservice(\/.*)*$>
    	AuthRealm "validusers@robapi.abb"
    	AuthType digest
    	AuthDigestQop auth
    	SetHandler rapi_filehandler
    	Methods set ALL
    </Route>
    
    <Route ^\/docs(\/.*)*$>
    	AuthRealm "validusers@robapi.abb"
    	AuthType digest
    	AuthDigestQop auth
    	AddHandler fileHandler 
    	Methods set GET
    </Route>
    
    <Route />
    	AuthRealm "validusers@robapi.abb"
    	AuthType digest
    	AuthDigestQop auth
    	SetHandler rapi_handler
    	Methods set ALL
    </Route>