Modules
The /modules
endpoint provides creation, management and direct interaction with modules outside of a system context. For more information on the role that modules play, see:
Model
Attribute | Type | Description |
id |
| A universally unique ID for this module. |
dependency_id |
| ID of the driver that defines this module. |
control_system_id |
| ID of the system this module is bound to (logic modules only). |
edge_id |
| ID of the preferred engine node to run on. |
ip |
| IP address or resolvable hostname of the device this module connects to. |
tls |
| True if the device communicates securely. |
udp |
| Protocol uses UDP rather that TCP. |
port |
| The TCP or UDP port that the associated device communicates on. |
makebreak |
| If enabled, provides an ephemeral connection that disconnects during idle periods. |
uri |
| The based URI of the remote service (service modules only). |
custom_name |
| The modules class name ( |
settings |
| A JSON object containing module configuration. |
updated_at |
| Timestamp of last update. |
created_at |
| Timestamp of creation. |
role |
| The module type. One of:
|
notes |
| Markdown formatted text that describes this module. |
connected |
| Flag for connectivity state. |
running |
| Module start/stop state. |
ignore_connected |
| If enabled, system metrics ignore connectivity state. |
ignore_startstop |
| If enabled, system level start and stop actions are ignored. This is recommended for modules shared by many systems (e.g. a lighting gateway). |
Search
GET
https://example.com/api/control/modules
List or search for existing modules.
Query Parameters
Name | Type | Description |
---|---|---|
q | string | A search filter to apply. |
limit | integer | (default 20) Max results to return. |
offset | integer | The offset within the result set. |
system_id | string | Return modules associated with the specified system. |
dependency_id | string | Return modules that are an instance of the specified dependency. |
Queries default to searching for any of the entered terms (words). A small query language provides the ability to structure complex queries.
Operator | Action | |
| Matches both terms. | |
` | ` | Matches either terms. |
| Negates a single token. | |
| Wraps tokens to form a phrase. | |
| Provide precedence. | |
| Specifies edit distance (fuzziness) after a word. | |
| Specifies slop amount (deviation) after a phrase. |
Management
Create
POST
https://example.com/api/control/modules
Creates a new module.
Request Body
Name | Type | Description |
---|---|---|
dependency_id | string | |
edge_id | string | |
control_system_id | string | required for logic modules |
ip | string | required for ssh and device modules |
udp | boolean | |
port | integer | |
makebreak | boolean | |
uri | string | required for service modules |
custom_name | string | |
settings | object | |
notes | string | |
ignore_connected | boolean | |
ignore_startstop | boolean |
Retrieve
GET
https://example.com/api/control/modules/{id}
Retrieve all metadata associated with a module.
Path Parameters
Name | Type | Description |
---|---|---|
id | string | ID of the modules to retrieve. |
Update
PUT
https://example.com/api/control/modules/{id}
Updates module attributes or configuration.
Path Parameters
Name | Type | Description |
---|---|---|
id | string | ID of the module to update. |
Request Body
Name | Type | Description |
---|---|---|
control_system_id | string | |
edge_id | string | |
ip | string | |
udp | boolean | |
port | integer | |
makebreak | boolean | |
uri | string | |
custom_name | string | |
settings | object | |
notes | string | |
ignore_connected | boolean | |
ignore_startstop | boolean |
Delete
DELETE
https://example.com/api/control/modules/{id}
Removes a module. Modules that are associated with multiple systems be removed from all.
Path Parameters
Name | Type | Description |
---|---|---|
id | string | ID of the module to delete. |
Interaction
Start
POST
https://example.com/api/control/modules/{id}/start
Starts a module on it's associated control node.
Path Parameters
Name | Type | Description |
---|---|---|
id | string | ID of the module to start. |
Stop
POST
https://example.com/api/control/modules/{id}/stop
Stops the module. Exposed state will still be available but will not update.
Path Parameters
Name | Type | Description |
---|---|---|
id | string | ID of the module to stop. |
Ping
POST
https://example.com/api/control/modules/{id}/ping
Performs a connectivity check with the associated device or service.
Path Parameters
Name | Type | Description |
---|---|---|
id | string | ID of the module to check. |
State
GET
https://example.com/api/control/modules/{id}/state
Gets the state information exposed by a module.
Path Parameters
Name | Type | Description |
---|---|---|
id | string | ID of the module to query. |
Query Parameters
Name | Type | Description |
---|---|---|
lookup | string | Status key of interest. If included, the response filters to this value. |
Last updated