-
Notifications
You must be signed in to change notification settings - Fork 10
API
Wojciech Frącz edited this page Oct 26, 2017
·
10 revisions
This endpoint executes all scenes that have at least one configured voice trigger that matches the given command. The trigger is consired matched if it is a substring of the given comomand.
| Attribute | Value |
|---|---|
| URL | https://supla.fracz.com/api/voice-commands |
| Method | PATCH |
| Body | {"command": "THE VOICE COMMAND"} |
Requires Authorization header |
yes |
| Response |
{"matchedActions": X, "feedback": "A FEEDBACK"}, where X is the number of executed scenes |
| cURL request example | curl https://supla.fracz.com/api/voice-commands -X PATCH -m 10000 -H "Authorization: Bearer JWT_TOKEN" --data '{"command": "switch the bulb on"}' |
| example response | {"matchedActions": 1, "feedback": "the bulb has been switched on"} |