IoT Stadium

API Documentation

Automation

Automation - Add Automation Schedule: Month

Add the automation schedule on which month your schedule will be repeated

Post
https://api.iotstadium.com/ext/automations

Parameter

Field Type Description
schedule Array

Contain the detail about your new schedule automation

schedule.*.type Text

Contain the detail about 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_month Text

On which month your schedule will be repeated

schedule.*.exec_at_day_month Number

On which exact day 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": 1002
    },
    "code": 200
}
{
    "message": "Invalid Message",
    "code": 400,
    "errors": [
        {
            "field": "schedule.every_x_month",
            "message": "The schedule.every x month field is required when schedule.type is monthly."
        },
        {
            "field": "schedule.exec_at_day_month",
            "message": "The schedule.exec at day month field is required when schedule.type is monthly."
        }
    ]
}