Closed benfrancis closed 6 years ago
Actually there are strategies implementers could use to avoid URL conflicts, like including the action name in the URL
GET all action requests or POST to request an action of any type:
/things/pi/actions/
GET all reboot action requests or POST to request a reboot action:
/things/pi/actions/reboot/
GET a or DELETE a specific reboot request:
/things/pi/actions/reboot/123e4567-e89b-12d3-a456-426655
Option 1
There is a single action queue for a Thing defined in the links member of the Thing Description:
Action requests are posted to the actions resource which is a queue of all action requests on the Thing:
/things/pi/actions/123e4567-e89b-12d3-a456-426655
Option 2
Each action has its own URL, defined in the actions member of the thing description:
Each action resource is a queue of action requests which you POST requests to:
/things/pi/actions/reboot/123e4567-e89b-12d3-a456-426655
We could try implementing both, but then the URL namespaces used above would conflict.