Task Manager
API for communication with ZBOS by Zora Robotics.
Channels
zbos/taskmanager/entries/get/all/response/\{key}
SUB
Get all entries response
GetTaskManagerEntriesResponse
Payload
Name |
Type |
Description |
Accepted values |
|
array (object) |
Any |
|
|
string |
Entry ID |
Any |
|
object |
Task to run |
Any |
|
string |
Type of the task |
* |
|
object |
Data required for the chosen task type |
Any |
|
string |
Description of the entry |
Any |
|
object |
Trigger that starts the task |
Any |
|
string |
Type of the trigger |
* |
|
object |
Data required for the chosen trigger type |
Any |
|
string |
Source of the entry |
* |
|
string |
Running priority of the entry |
* |
|
integer |
Weight of the entry, to give more granular control besides priority |
Any |
|
boolean |
Determines if this entry can run concurrently with other entries |
Any |
|
string |
Determines what should happen if the entry is resumed |
* |
|
string |
Determines what should happen if a trigger is hit when a task is already running. - single_first: Allow single simultaneous execution. When a new execution is trying to start, it will not succeed and the previously running execution will continue. - single_last: Allow single simultaneous execution. When a new execution is trying to start, the previously running executions will stop. - multiple: Allow multiple simultaneous executions. |
* |
|
boolean |
Enabled state of the entry trigger |
Any |
|
array (object) |
All current executions of the task |
Any |
|
string |
Execution ID |
Any |
|
string |
Current state of the entry task execution |
* |
|
object |
Extra info/metadata about the task execution |
Any |
|
object |
Extra info/metadata about the task |
Any |
Examples of payload
{
"entries": [
{
"id": "entry_id_1",
"task": {
"type": "composition",
"data": {
"composition_id": {
"content": "composition_id_1",
"string": true
}
}
},
"description": "A description example",
"trigger": {
"type": "sensor",
"data": {
"sensors": [
"sensor_1",
"sensor_2"
]
}
},
"source": "user",
"priority": "normal",
"weight": 0,
"concurrent": true,
"enabled": true,
"executions": [
{
"id": "entry_id_1_execution_1",
"state": "running"
}
],
"on_resume": "restart_block",
"launch_mode": "single_first"
}
]
}
zbos/taskmanager/entries/get/response/\{key}
SUB
Get an entry response
GetTaskManagerEntryResponse
Payload
Name |
Type |
Description |
Accepted values |
|
boolean |
Any |
|
|
object |
Any |
|
|
string |
Entry ID |
Any |
|
object |
Task to run |
Any |
|
string |
Type of the task |
* |
|
object |
Data required for the chosen task type |
Any |
|
string |
Description of the entry |
Any |
|
object |
Trigger that starts the task |
Any |
|
string |
Type of the trigger |
* |
|
object |
Data required for the chosen trigger type |
Any |
|
string |
Source of the entry |
* |
|
string |
Running priority of the entry |
* |
|
integer |
Weight of the entry, to give more granular control besides priority |
Any |
|
boolean |
Determines if this entry can run concurrently with other entries |
Any |
|
string |
Determines what should happen if the entry is resumed |
* |
|
string |
Determines what should happen if a trigger is hit when a task is already running. - single_first: Allow single simultaneous execution. When a new execution is trying to start, it will not succeed and the previously running execution will continue. - single_last: Allow single simultaneous execution. When a new execution is trying to start, the previously running executions will stop. - multiple: Allow multiple simultaneous executions. |
* |
|
boolean |
Enabled state of the entry trigger |
Any |
|
array (object) |
All current executions of the task |
Any |
|
string |
Execution ID |
Any |
|
string |
Current state of the entry task execution |
* |
|
object |
Extra info/metadata about the task execution |
Any |
|
object |
Extra info/metadata about the task |
Any |
Examples of payload
{
"success": true,
"entry": {
"id": "entry_id_1",
"task": {
"type": "composition",
"data": {
"composition_id": {
"content": "composition_id_1",
"string": true
}
}
},
"description": "A description example",
"trigger": {
"type": "sensor",
"data": {
"sensors": [
"sensor_1",
"sensor_2"
]
}
},
"source": "user",
"priority": "normal",
"weight": 0,
"concurrent": true,
"enabled": true,
"executions": [
{
"id": "entry_id_1_execution_1",
"state": "running"
}
],
"on_resume": "restart_block",
"launch_mode": "single_first"
}
}
zbos/taskmanager/entries/add
PUB
Add an entry
AddTaskManagerEntryRequest
Payload
Name |
Type |
Description |
Accepted values |
|
string |
Required key |
Any |
|
object |
Task to run |
Any |
|
string |
Type of the task |
* |
|
object |
Data required for the chosen task type |
Any |
|
string |
Description of the entry |
Any |
|
object |
Trigger that starts the task |
Any |
|
string |
Type of the trigger |
* |
|
object |
Data required for the chosen trigger type |
Any |
|
string |
Running priority of the entry |
* |
|
integer |
Weight of the entry, to give more granular control besides priority |
Any |
|
boolean |
Determines if this entry can run concurrently with other entries |
Any |
|
string |
Determines what should happen if the entry is resumed |
* |
|
string |
Determines what should happen if a trigger is hit when a task is already running. - single_first: Allow single simultaneous execution. When a new execution is trying to start, it will not succeed and the previously running execution will continue. - single_last: Allow single simultaneous execution. When a new execution is trying to start, the previously running executions will stop. - multiple: Allow multiple simultaneous executions. |
* |
Examples of payload
{
"key": "abc",
"task": {
"type": "composition",
"data": {
"composition_id": {
"content": "composition_id_1",
"string": true
}
}
},
"description": "A description example",
"trigger": {
"type": "sensor",
"data": {
"sensors": [
"sensor_1",
"sensor_2"
]
}
},
"priority": "normal",
"weight": 0,
"concurrent": true,
"on_resume": "restart_block",
"launch_mode": "single_first"
}
zbos/taskmanager/entries/edit
PUB
Edit an entry
EditTaskManagerEntryRequest
Payload
Name |
Type |
Description |
Accepted values |
|
string |
Required key |
Any |
|
string |
ID of the task to edit |
Any |
|
object |
Task to run |
Any |
|
string |
Type of the task |
* |
|
object |
Data required for the chosen task type |
Any |
|
string |
Description of the entry |
Any |
|
object |
Trigger that starts the task |
Any |
|
string |
Type of the trigger |
* |
|
object |
Data required for the chosen trigger type |
Any |
|
string |
Running priority of the entry |
* |
|
integer |
Weight of the entry, to give more granular control besides priority |
Any |
|
boolean |
Determines if this entry can run concurrently with other entries |
Any |
|
string |
Determines what should happen if the entry is resumed |
* |
|
string |
Determines what should happen if a trigger is hit when a task is already running. - single_first: Allow single simultaneous execution. When a new execution is trying to start, it will not succeed and the previously running execution will continue. - single_last: Allow single simultaneous execution. When a new execution is trying to start, the previously running executions will stop. - multiple: Allow multiple simultaneous executions. |
* |
Examples of payload
{
"key": "abc",
"id": "entry_id_1",
"task": {
"type": "composition",
"data": {
"composition_id": {
"content": "composition_id_1",
"string": true
}
}
},
"description": "A description example",
"trigger": {
"type": "sensor",
"data": {
"sensors": [
"sensor_1",
"sensor_2"
]
}
},
"priority": "normal",
"weight": 0,
"concurrent": true,
"on_resume": "restart_block",
"launch_mode": "single_first"
}
zbos/taskmanager/entries/update/event
SUB
Entries have been updated
TaskManagerEntriesUpdatedEvent
Payload
Name |
Type |
Description |
Accepted values |
|
array (object) |
Any |
|
|
string |
Entry ID |
Any |
|
object |
Task to run |
Any |
|
string |
Type of the task |
* |
|
object |
Data required for the chosen task type |
Any |
|
string |
Description of the entry |
Any |
|
object |
Trigger that starts the task |
Any |
|
string |
Type of the trigger |
* |
|
object |
Data required for the chosen trigger type |
Any |
|
string |
Source of the entry |
* |
|
string |
Running priority of the entry |
* |
|
integer |
Weight of the entry, to give more granular control besides priority |
Any |
|
boolean |
Determines if this entry can run concurrently with other entries |
Any |
|
string |
Determines what should happen if the entry is resumed |
* |
|
string |
Determines what should happen if a trigger is hit when a task is already running. - single_first: Allow single simultaneous execution. When a new execution is trying to start, it will not succeed and the previously running execution will continue. - single_last: Allow single simultaneous execution. When a new execution is trying to start, the previously running executions will stop. - multiple: Allow multiple simultaneous executions. |
* |
|
boolean |
Enabled state of the entry trigger |
Any |
|
array (object) |
All current executions of the task |
Any |
|
string |
Execution ID |
Any |
|
string |
Current state of the entry task execution |
* |
|
object |
Extra info/metadata about the task execution |
Any |
|
object |
Extra info/metadata about the task |
Any |
Examples of payload
{
"entries": [
{
"id": "entry_id_1",
"task": {
"type": "composition",
"data": {
"composition_id": {
"content": "composition_id_1",
"string": true
}
}
},
"description": "A description example",
"trigger": {
"type": "sensor",
"data": {
"sensors": [
"sensor_1",
"sensor_2"
]
}
},
"source": "user",
"priority": "normal",
"weight": 0,
"concurrent": true,
"enabled": true,
"executions": [
{
"id": "entry_id_1_execution_1",
"state": "running"
}
],
"on_resume": "restart_block",
"launch_mode": "single_first"
}
]
}
zbos/taskmanager/triggers/get
zbos/taskmanager/triggers/get/response/\{key}
SUB
Gets all triggers response
GetTaskManagerTriggersResponse
Payload
Name |
Type |
Description |
Accepted values |
|
array (object) |
Any |
|
|
string |
Type of the trigger |
* |
|
string |
Human-readable label |
Any |
|
string |
Translation key for human-readable label |
Any |
|
object |
Components that should be shown when the user selects a trigger type |
Any |
Examples of payload
{
"triggers": [
{
"type": "sensor",
"label": "Sensor",
"components": {
"sensors": {
"type": "select_multi",
"options": [
{
"key": "sensor_1",
"value": "Sensor 1",
"label_key": "translations_category.trigger_sensor_option_1"
},
{
"key": "sensor_2",
"value": "Sensor 2",
"label_key": "translations_category.trigger_sensor_option_2"
}
],
"label_key": "translations_category.trigger_sensor_components_sensor"
}
},
"label_key": "translations_category.trigger_sensor"
}
]
}