WebThingsIO / api

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

No websocket equivalent of DELETE /things/<thing>/actions/<action>/<id> #86

Open mrstegeman opened 6 years ago

mrstegeman commented 6 years ago

In the gateway, we're now using removeAction in add-ons when DELETE is called, so maybe we should create a similar websocket request.

benfrancis commented 6 years ago

A cancelAction message type perhaps?

We need a way to specify which action to cancel, which I'd suggest should be done using the action request URL, but I'm not sure of the exact syntax. Maybe something like...

{
  "messageType": "cancelAction",
  "data": {
    "grab": {
      "href": "/actions/grab/123e4567-e89b-12d3-a456-426655"
    }
  }
}
mrstegeman commented 6 years ago

An href attribute should be sufficient. Do you like cancelAction better than removeAction? It's actually doing both on the server, so I could go either way.