IoT Stadium

API Documentation

Controller

Controller - POST Add Controller

Adds new controller to the selected device

Post
https://api.iotstadium.com/ext/devices/:deviceId/actuator
    {
      "key": "Content-Type",
      "value": "application/json"
    },
    {
      "key": "Authorization",
      "value": "Bearer {{token}}"
    }

Parameter

Field Type Description
actuator_name String

Name of your controller

action_key Integer

Unique key for your controller

actuator_action Array

The list of state of your controller

{
    "actuator_name": "test controller test",  // required|max:128 char|unique char
    "action_key": "129381293810293", // unique
    "actuator_action": [ // required when actuator action greather than 0
        {
            "value": "on"
        },
        {
            "value": "off"
        }
    ]
}                                            
{
    "message": "device_actuator created",
    "data": {
        "id": 152
    },
    "code": 200
}
{
    "message": "Invalid Message",
    "code": 400,
    "errors": [
        {
            "field": "actuator_name",
            "message": "actuator name already Exists."
        }
    ]
}                                                
{
    "message": "Not Allowed",
    "error": {
        "message": "Not Allowed",
        "field": "user"
    },
    "code": 403
}