Instance methods
base
The base route for the endpoint
Sourcecount(id : String, module_name : String) : Int32 | Nil
Gets the number of module_name instances available in system id.
Sourcecreate(name : String, zones : Array(String), description : String | Nil = nil, email : String | Nil = nil, capacity : Int | Nil = nil, bookable : Bool | Nil = nil, installed_ui_devices : Int | Nil = nil, modules : Array(String) | Nil = nil, support_url : String | Nil = nil, display_name : String | Nil = nil, timezone : String | Nil = nil, code : String | Nil = nil, type : String | Nil = nil, map_id : String | Nil = nil, images : Array(String) | Nil = nil, features : Array(String) | Nil = nil, public : Bool | Nil = nil)
Creates a new system.
Systems must be given a unique name within the PlaceOS instance they are
running from. Additionally, a system must be a member of at least one
zone. All other attributes are optional at the time of creation.
Sourceexecute(id : String, module_name : String, method : String, index : Int32 = 1, *args : Array(JSON::Any::Type))
Executes a behaviour exposed by a module within the passed system id.
Sourcefunctions(id : String, module_name : String, index : Int = 1)
Queries the behaviour exposed by a module within system id.
Sourcesearch(q : String | Nil = nil, limit : Int = 1000, offset : Int = 0, zone_id : String | Nil = nil, module_id : String | Nil = nil, features : String | Nil = nil, capacity : Int32 | Nil = nil, bookable : Bool | Nil = nil)
List or search for systems.
Results maybe filtered by specifying a query - q - to search across system
attributes. A small query language is supported within this:
| Operator | Action |
|---|
+ | Matches both terms |
| ` | ` |
- | Negates a single token |
" | Wraps tokens to form a phrase |
( ) | Provides precedence |
~N | Specifies edit distance (fuzziness) after a word |
~N | Specifies slop amount (deviation) after a phrase |
Up to limit systems will be returned, with a paging based on offset.
Sourcestart(id : String)
Start all modules within a system.
Sourcestate(id : String, module_name : String, index : Int = 1, lookup : String | Nil = nil)
Queries the state exposed by a module within the passed system id.
Sourcestop(id : String)
Stops all modules within a system.
Sourcetypes(id : String)
Queries the types of modules available in system id.
Sourceupdate(id : String, version : Int, name : String | Nil = nil, zones : Array(String) | Nil = nil, description : String | Nil = nil, email : String | Nil = nil, capacity : Int | Nil = nil, bookable : Bool | Nil = nil, installed_ui_devices : Int | Nil = nil, modules : Array(String) | Nil = nil, support_url : String | Nil = nil, display_name : String | Nil = nil, timezone : String | Nil = nil, code : String | Nil = nil, type : String | Nil = nil, map_id : String | Nil = nil, images : Array(String) | Nil = nil, features : Array(String) | Nil = nil, public : Bool | Nil = nil)
Requests a change to an existing system.
In addition to specifying the ID of the system to update, you must reference
the the current system metadata version for the update to be allowed. This
must match the current version attribute of the system and will be
incrememented following a successful update.
Sourcewith_emails(list : Array(String) | String)
Returns systems with a specified email address(es)
Source