IoT Stadium

API Documentation

Automation

Automation - Get Automation List

Obtaining the list all of the automations

Get
https://api.iotstadium.com/ext/automations
    {
      "key": "Content-Type",
      "value": "application/json"
    },
    {
      "key": "Authorization",
      "value": "Bearer {{token}}"
    }
{
    "message": "success",
    "code": 200,
    "data": {
        "automations": [
            {
                "id": 981,
                "automation_name": "telemetry automation test",
                "tenant_id": 37,
                "is_active": 0,
                "created_at": "2024-05-30 03:42:49",
                "description": "test",
                "automation_interval": 1440,
                "automation_delay": 10,
                "automation_deadband": "0.00",
                "last_triggered": null,
                "automation_type": "trigger",
                "is_automation_from_widget": 0,
                "json": {
                    "triggers": [
                        {
                            "device": 588,
                            "source": "telemetry",
                            "value": [
                                {
                                    "telemetry_key": "test tele",
                                    "key_wording": "test tele (test tele)",
                                    "comparator_from_profile": 3,
                                    "latest_telemetry_value": ""
                                }
                            ],
                            "condition": "=",
                            "comparator": "10"
                        },
                        {
                            "relation": "AND"
                        },
                        {
                            "device": 586,
                            "source": "telemetry",
                            "value": [
                                {
                                    "telemetry_key": "temp-1",
                                    "key_wording": "temp-1",
                                    "comparator_from_profile": "10",
                                    "latest_telemetry_value": 100
                                }
                            ],
                            "condition": "=",
                            "comparator": "10"
                        }
                    ],
                    "actions": [
                        {
                            "type": "alarm",
                            "detail": {
                                "alarm": {
                                    "is_send_email": 1,
                                    "alarm_email": [],
                                    "device": 588,
                                    "detail": "ini testing",
                                    "alarm_email_group_id": [
                                        37
                                    ]
                                }
                            }
                        },
                        {
                            "type": "controller",
                            "detail": {
                                "controller": {
                                    "device": 588,
                                    "device_action_key": "2139129123",
                                    "device_action_value": "off",
                                    "device_actuator_id": 140,
                                    "device_actuator_action_id": 734
                                }
                            }
                        },
                        {
                            "type": "email",
                            "detail": {
                                "email": {
                                    "to": [],
                                    "subject": "test custom obj",
                                    "content": "ini adalah testing gaes",
                                    "email_group_id": [
                                        35,
                                        34
                                    ]
                                }
                            }
                        },
                        {
                            "type": "api",
                            "detail": {
                                "api": {
                                    "url": "test.com",
                                    "method": "GET",
                                    "headers": [
                                        {
                                            "key": "Content-Type",
                                            "value": "application\\json"
                                        }
                                    ],
                                    "params": [
                                        {
                                            "key": "serach",
                                            "value": "10"
                                        }
                                    ],
                                    "body": "testing"
                                }
                            }
                        }
                    ],
                    "schedule": null
                }
            },
            {
                "id": 980,
                "automation_name": "coba-coba telemetry",
                "tenant_id": 37,
                "is_active": 0,
                "created_at": "2024-05-29 09:28:51",
                "description": null,
                "automation_interval": 1440,
                "automation_delay": 10,
                "automation_deadband": "0.00",
                "last_triggered": null,
                "automation_type": "trigger",
                "is_automation_from_widget": 0,
                "json": {
                    "triggers": [
                        {
                            "device": 584,
                            "source": "telemetry",
                            "value": [
                                {
                                    "telemetry_key": "Exti_status",
                                    "key_wording": "Exti_status",
                                    "comparator_from_profile": "10"
                                }
                            ],
                            "condition": "=",
                            "comparator": "10"
                        },
                        {
                            "relation": "AND"
                        },
                        {
                            "device": 584,
                            "source": "telemetry",
                            "value": [
                                {
                                    "telemetry_key": "Probe_mod",
                                    "key_wording": "Probe_mod",
                                    "comparator_from_profile": "5"
                                }
                            ],
                            "condition": "=",
                            "comparator": "5"
                        }
                    ],
                    "schedule": null,
                    "actions": [
                        {
                            "type": "alarm",
                            "detail": {
                                "alarm": {
                                    "is_send_email": 0,
                                    "alarm_email": [],
                                    "device": 584,
                                    "detail": "testing telemetry",
                                    "alarm_email_group_id": []
                                }
                            }
                        }
                    ]
                }
            },
            {
                "id": 979,
                "automation_name": "email group scheduler",
                "tenant_id": 37,
                "is_active": 0,
                "created_at": "2024-05-28 02:42:38",
                "description": "scheduler",
                "automation_interval": 0,
                "automation_delay": 0,
                "automation_deadband": "0.00",
                "last_triggered": null,
                "automation_type": "schedule",
                "is_automation_from_widget": 0,
                "json": {
                    "triggers": null,
                    "actions": [
                        {
                            "type": "controller",
                            "detail": {
                                "controller": {
                                    "device": 586,
                                    "device_action_key": "5673RGB4TGF74R648R",
                                    "device_action_value": "true",
                                    "device_actuator_id": 139,
                                    "device_actuator_action_id": 731
                                }
                            }
                        }
                    ],
                    "schedule": {
                        "type": "minutely",
                        "start_time": "2024-05-28 06:55:00",
                        "end_time": "2024-05-30 02:55:00",
                        "every_x_minute": 5
                    }
                }
            }
        ]
    }
}
{
    "message": "success",
    "code": 200,
    "data": {
        "automations": [
            {
                "id": 981,
                "automation_name": "telemetry automation test",
                "tenant_id": 37,
                "is_active": 0,
                "created_at": "2024-05-30 03:42:49",
                "description": "test",
                "automation_interval": 1440,
                "automation_delay": 10,
                "automation_deadband": "0.00",
                "last_triggered": null,
                "automation_type": "trigger",
                "is_automation_from_widget": 0,
                "json": {
                    "triggers": [
                        {
                            "device": 588,
                            "source": "telemetry",
                            "value": [
                                {
                                    "telemetry_key": "test tele",
                                    "key_wording": "test tele (test tele)",
                                    "comparator_from_profile": 3,
                                    "latest_telemetry_value": ""
                                }
                            ],
                            "condition": "=",
                            "comparator": "10"
                        },
                        {
                            "relation": "AND"
                        },
                        {
                            "device": 586,
                            "source": "telemetry",
                            "value": [
                                {
                                    "telemetry_key": "temp-1",
                                    "key_wording": "temp-1",
                                    "comparator_from_profile": "10",
                                    "latest_telemetry_value": 100
                                }
                            ],
                            "condition": "=",
                            "comparator": "10"
                        }
                    ],
                    "actions": [
                        {
                            "type": "alarm",
                            "detail": {
                                "alarm": {
                                    "is_send_email": 1,
                                    "alarm_email": [],
                                    "device": 588,
                                    "detail": "ini testing",
                                    "alarm_email_group_id": [
                                        37
                                    ]
                                }
                            }
                        },
                        {
                            "type": "controller",
                            "detail": {
                                "controller": {
                                    "device": 588,
                                    "device_action_key": "2139129123",
                                    "device_action_value": "off",
                                    "device_actuator_id": 140,
                                    "device_actuator_action_id": 734
                                }
                            }
                        },
                        {
                            "type": "email",
                            "detail": {
                                "email": {
                                    "to": [],
                                    "subject": "test custom obj",
                                    "content": "ini adalah testing gaes",
                                    "email_group_id": [
                                        35,
                                        34
                                    ]
                                }
                            }
                        },
                        {
                            "type": "api",
                            "detail": {
                                "api": {
                                    "url": "test.com",
                                    "method": "GET",
                                    "headers": [
                                        {
                                            "key": "Content-Type",
                                            "value": "application\\json"
                                        }
                                    ],
                                    "params": [
                                        {
                                            "key": "serach",
                                            "value": "10"
                                        }
                                    ],
                                    "body": "testing"
                                }
                            }
                        }
                    ],
                    "schedule": null
                }
            },
            {
                "id": 980,
                "automation_name": "coba-coba telemetry",
                "tenant_id": 37,
                "is_active": 0,
                "created_at": "2024-05-29 09:28:51",
                "description": null,
                "automation_interval": 1440,
                "automation_delay": 10,
                "automation_deadband": "0.00",
                "last_triggered": null,
                "automation_type": "trigger",
                "is_automation_from_widget": 0,
                "json": {
                    "triggers": [
                        {
                            "device": 584,
                            "source": "telemetry",
                            "value": [
                                {
                                    "telemetry_key": "Exti_status",
                                    "key_wording": "Exti_status",
                                    "comparator_from_profile": "10"
                                }
                            ],
                            "condition": "=",
                            "comparator": "10"
                        },
                        {
                            "relation": "AND"
                        },
                        {
                            "device": 584,
                            "source": "telemetry",
                            "value": [
                                {
                                    "telemetry_key": "Probe_mod",
                                    "key_wording": "Probe_mod",
                                    "comparator_from_profile": "5"
                                }
                            ],
                            "condition": "=",
                            "comparator": "5"
                        }
                    ],
                    "schedule": null,
                    "actions": [
                        {
                            "type": "alarm",
                            "detail": {
                                "alarm": {
                                    "is_send_email": 0,
                                    "alarm_email": [],
                                    "device": 584,
                                    "detail": "testing telemetry",
                                    "alarm_email_group_id": []
                                }
                            }
                        }
                    ]
                }
            },
            {
                "id": 979,
                "automation_name": "email group scheduler",
                "tenant_id": 37,
                "is_active": 0,
                "created_at": "2024-05-28 02:42:38",
                "description": "scheduler",
                "automation_interval": 0,
                "automation_delay": 0,
                "automation_deadband": "0.00",
                "last_triggered": null,
                "automation_type": "schedule",
                "is_automation_from_widget": 0,
                "json": {
                    "triggers": null,
                    "actions": [
                        {
                            "type": "controller",
                            "detail": {
                                "controller": {
                                    "device": 586,
                                    "device_action_key": "5673RGB4TGF74R648R",
                                    "device_action_value": "true",
                                    "device_actuator_id": 139,
                                    "device_actuator_action_id": 731
                                }
                            }
                        }
                    ],
                    "schedule": {
                        "type": "minutely",
                        "start_time": "2024-05-28 06:55:00",
                        "end_time": "2024-05-30 02:55:00",
                        "every_x_minute": 5
                    }
                }
            }
        ]
    }
}