Actions
1. actions()
Get all the actions as a list
Parameters: None
Return value: actions list
Return value example:
istack/iot/v1/action Action
name: inesa action
body:
{
"PUT_DEVICE":{
"BCAST":
[
{
"POWER":{
"ON":{}
}
}
]
}
}
url: http://10.200.46.120:10002/mgmt/action/c8:a0:30:ac:7a:82
admin:admin
state_timestamp:19501654061612
2. create_action(action)
Create a new action.
Parameters: action(Action)
| Name | Type | Description |
|---|---|---|
| action | object | A action object |
| name | str | name of the action, required to be unique |
| body | list | describe what to do |
| url | str | action of REST API url |
| admin | str | owner of the action |
| state_timestamp | datetime | last updated time |
Parameters Example:
action = Action()
action.name = "3"
action.admin = "admin"
action.body = {"PUT_DEVICE":{"POWER":{"ON":None}}}
action.url = "http://10.200.46.120:10002/ktkt/action/00:23:23:23:23"
cloud.iot.create_action(action)
Return value: action(Action) Return value example:
istack/iot/v1/action Action
name: inesa action
body:
{
"PUT_DEVICE":{
"BCAST":
[
{
"POWER":{
"ON":{}
}
}
]
}
}
url: http://10.200.46.120:10002/mgmt/action/c8:a0:30:ac:7a:82
admin:admin
state_timestamp:19501654061612
3. delete_action(action)
Delete an action. Parameters: action(Action)
| Name | Type | Description |
|---|---|---|
| action | object | A action object |
| name | str | name of the action, required to be unique |
| body | list | describe what to do |
| url | str | action of REST API url |
| admin | str | owner of the action |
| state_timestamp | datetime | last updated time |
Parameters Example:
action = Action()
action.name = "3"
action.admin = "admin"
action.body = {"PUT_DEVICE":{"POWER":{"ON":None}}}
action.url = "http://10.200.46.120:10002/ktkt/action/00:23:23:23:23"
cloud.iot.delete_action(action)
Return value: deletion_message(string)