Managing scenario launch
Runs a user scenario using the scenario ID passed.
Request format
POST https://api.iot.yandex.net/v1.0/scenarios/{scenario_id}/actions
|
scenario_id |
The ID of the user scenario. |
Request headers
|
Header |
Description |
Required |
|
Authorization |
The authorization token of the OAuth application. |
Yes |
Response format
HTTP/1.1 200 OK
{
"request_id": String,
"status": "ok"
}
|
Parameter |
Type |
Description |
Required |
|
request_id |
String |
Request ID. Must be logged for the purpose of incident investigation. |
Yes |
|
status |
String |
Status of processing the request. Acceptable values:
|
Yes |
HTTP/1.1 404 Not Found
{
"request_id": String,
"status": "error",
"message": String
}
|
Parameter |
Type |
Description |
Required |
|
request_id |
String |
Request ID. Must be logged for the purpose of incident investigation. |
Yes |
|
status |
String |
Status of processing the request. Acceptable values:
|
Yes |
|
message |
String |
Error message. |
No |
Example
RequestResponse successfulResponse with errorcurl -i -X POST 'https://api.iot.yandex.net/v1.0/scenarios/scenario-id-1/actions' \ -H 'Authorization: Bearer 123qwe456a...'HTTP/1.1 200 OK { "request_id": "667b3e0f-47a8-4136-9211-b4ff59062315", "status": "ok" }HTTP/1.1 404 Not Found { "request_id": "667b3e0f-47a8-4136-9211-b4ff59062315", "status": "error", "message": "Сценарий не найден" }
String enclosed in quotation marks, for example: "Hello, world".
Идентификатор сценария пользователя.
Type
Description
Request ID. Must be logged for the purpose of incident investigation.
Required
Yes
Type
String
Description
Status of processing the request. Acceptable values:
ok.
Required
Yes
Type
String
Description
Status of processing the request. Acceptable values:
error.
Required
Yes
Type
String
Description
Error message.
Required
No