Long-poll for the next sensor command
GET
/api/v1/sensor/outbox
const url = 'http://localhost:11044/api/v1/sensor/outbox';const options = {method: 'GET', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:11044/api/v1/sensor/outbox \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'Held up to ~25 seconds. 200 with a command, or 204 when the window closes empty.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”OK
Media typeapplication/json
A command the appliance asks the user’s machine to run, delivered by the GET /sensor/outbox long-poll
object
id
required
Command id (a UUID). The sensor posts the result to /sensor/outbox/{id}/result
string
kind
required
The verb to run: a name the sensor itself published in its capabilities catalog
string
payload
required
The verb’s arguments, keyed by the argument names the sensor published for it
object
key
additional properties
Example generated
{ "id": "example", "kind": "example", "payload": { "additionalProperty": "example" }}
