WebThingsIO / api

Web Thing API Specification
http://iot.mozilla.org/wot/
Other
164 stars 24 forks source link

Include ID in action requests #106

Open mrstegeman opened 6 years ago

mrstegeman commented 6 years ago

For action requests through both the REST API and the WebSocket API, the client should include an ID which can be used to map responses.

benfrancis commented 6 years ago

Can you explain how you think this should work?

Currently in the REST API the ID of an action request is its URL, which is returned in the response to the POST request that created it. That URL can then be used to query the status of the action.

Where I think this probably falls down is in the WebSocket API where an actionStatus message includes the URL of the action request, but there's no way for a client to know which actionStatus messages correspond to their original requestAction message.