-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How does a Consumer conforming to the Core Profile get a list of ongoing actions? #99
Comments
I think we could solve this by adding a section under the actions protocol binding for the In particular, would you query the list of ongoing actions for a specific action name (e.g. /things/lamp/actions/fade) or for all actions at once (e.g. /things/lamp/actions), and what operation names correspond to those two different cases? Below is a potential example payload of a {
"fade": [
{
"status": "completed",
"href": "/things/lamp/actions/fade/123e4567-e89b-12d3-a456-426655"
},
{
"status": "failed",
"href": "/things/lamp/actions/fade/123e4567-e89b-12d3-a456-558329",
"error": { ... }
},
{
"status": "running",
"href": "/things/lamp/actions/fade/123e4567-e89b-12d3-a457-434656"
},
{
"status": "pending",
"href": "/things/lamp/actions/fade/123e4567-e89b-12d3-a457-434656"
}
],
"strobe": [
{
"status": "completed",
"href": "/things/lamp/actions/strobe/123f4567-e89b-12d3-a456-853950"
},
{
"status": "running",
"href": "/things/lamp/actions/strobe/123f4567-e89b-12d3-a457-589029"
},
{
"status": "pending",
"href": "/things/lamp/actions/strobe/123f4567-e89b-12d3-a457-589039"
}
],
"cool": [
{
"status": "completed",
"href": "/things/lamp/actions/cool/423f4567-e89b-12d3-a456-853951",
"output": 62
},
{
"status": "completed",
"href": "/things/lamp/actions/cool/423f4567-e89b-12d3-a457-589059",
"output": 79
},
{
"status": "running",
"href": "/things/lamp/actions/cool/423f4567-e89b-12d3-a457-589063"
}
]
} My question is whether this is sufficient, or whether there should also be a way to query only a single action name, e.g. |
Through discussions around action semantics in the Thing Description specification I've realised that the current actions protocol binding has no operation for a Consumer to get a list of ongoing actions. This means that in the case of an Asynchronous Action Response only the Consumer which invoked the action can know the URL of its
actionStatus
resource.There's a fairly obvious solution for how that might fit into the REST API used in the examples (a
GET
on/things/lamp/actions/fade
could return a list ofactionStatus
objects), but it's less obvious how that endpoint would be described in a Thing Description.The text was updated successfully, but these errors were encountered: