Automation - Add Automation Schedule: Minute
Add the automation schedule minutely
Posthttps://api.iotstadium.com/ext/automations
Parameter
Field | Type | Description |
---|---|---|
schedule | Array |
Contain the detail about your new schedule automation |
schedule.*.type | Text |
The type of your new schedule automation |
schedule.*.start_time | Number |
The starting time for your schedule automation |
schedule.*.end_time | Number |
The end time for your schedule automation |
schedule.*.every_x_minute | Number |
On which minute your schedule will be repeated |
actions | Array |
Contains the detail about the action of your new automation |
actions.*.type | Text |
The action type of your alarm (you can only choose controller) |
actions.*.detail | Array |
The detail about your selected action type |
actions.*.detail.*.controller | Array |
Contain further detail about the controller action |
actions.*.detail.*.controller.*.device | Number |
The ID of the selected device to execute the action |
actions.*.detail.*.controller.*.device_action_key | Text |
The key for the action of the selected device |
actions.*.detail.*.controller.*.device_action_value | Text |
The value for the action of the selected device |
name | Text |
The name for your new controller trigger automation |
is_active | Number |
The condition of your automation |
automation_type | Text |
The automation type that you select |
description | Text |
Description of the new automation |
{
"message": "automation created",
"data": {
"id": 989
},
"code": 200
}
{
"message": "Invalid Message",
"code": 400,
"errors": [
{
"field": "schedule.every_x_minute",
"message": "The schedule.every x minute field is required when schedule.type is minutely."
}
]
}
{
"message": "Invalid Message",
"code": 400,
"errors": [
{
"field": "name",
"message": "The name field is required.."
},
{
"field": "is_active",
"message": "The is active field is required.."
},
{
"field": "automation_type",
"message": "The automation type field is required.."
},
{
"field": "schedule.every_x_minute",
"message": "The schedule.every x minute field is required when schedule.type is minutely."
}
]
}