Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
API Discover calls
The discover calls are used to learn about the present state of a given MobiusFlow instance
API Calls for Service Profiles, Object Profiles and Command Profiles
Description of MobiusFlow Engine RESTful API V1
The MobiusFlow Engine API is used interface with MobiusFlow via http and https. The API allows clients to perform all functions within MobiusFlow, from managing user accounts, to getting and setting data, as well as manipulating the MobiusFlow configuration by adding, removing and editing MobiusFlow objects, services and flows.
Additionally, the API allows clients to subscribe to specific real-time events within happening within a given MobiusFlow instance (see subscription controller). In this use case, the API will upgrade the client to use the Websocket protocol (ws / wss).
All API endpoints are described in the following subsections. The subsections are divided into the functional groups (controllers); Authorization, Discover, Node, Service, Object, Profiles, Command, Flows and Subscription.
If connecting to a local instance of MobiusFlow, the http protocol can be used. If connecting to an instance of MobiusFlow via the internet, https should be used. The API is always exposed on port 8443.
All endpoints lead with:
{{protocol}}://{{hostname}}:8443/api/v1
Where the protocol and hostname parameters are replaced with the true protocol and hostname. For example, in the case of connecting to a local instance of MobiusFlow, the leading path would look like:
http://localhost:8443/api/v1
Swagger documentation describing the API in full, can be found here. This documentation includes example bodies and responses for every endpoint. Finally, a postman collection containing parameterised examples of all client calls can be downloaded below.
API Authorization calls
The authorization controller is used to login to the API, in addition user management.
When a login call is completed, the API will return a bearer token which should be used in the auth header of all future calls. This token is set to expire 10 minutes after its generation.
A refresh token is also included in the login response, and this is used in the body of the refresh call to get new tokens with refreshed expiry times. Ensure a refresh call is made prior to any given bearer token's expiry to avoid having to login again.
API Node Calls
The node calls are for reading a MobiusFlow hub as well as resetting the pre-shared keys on a given hub
API Service Calls
The service calls are used to read, add, remove and manipulate MobiusFlow services.
API Subscription Websocket
Full functionality of Subscription Websocket is described in the connect call below.
API Object & Resource Calls
The object calls are used to read, add, remove and manipulate MobiusFlow objects and resources.
API Send Command Calls
Ok response
Username
Refresh token
Ok response
API token
API refresh token
Username
Password
Ok response
API token
API refresh token
Default Response
Result
Username
Ok response
User ID
User ID
New password
Ok response
Result
User ID
Role profile
Has admin permission
Has flows editing permission
Has configuration editing permission
Has subscription permission
Has write permission
Has read permission
Username
Password
Role profile
Has admin permission
Has flows editing permission
Has configuration editing permission
Has subscription permission
Has write permission
Has read permission
Ok response
User ID
Upon making this request, the server will upgrade to websocket connection. The websocket can then be used to manage subscriptions to MobiusFlow object COVs (change of values), resource COVs, service status changes and broadcast commands. Once the connection is initally established, the websocket server sends back a connected message, featuring the topic 'connected' as shown below. Once the upgrade is complete, all subsequent subcription communications are performed via websocket messages.
Following the inital http connect call, the now upgraded websocket connection expects a follow up authorization websocket message within 10 seconds. The authorization websocket message must feature the topic 'authorize' and a payload containing the API bearer token. An example message is shown below:
On successful authorization, the websocket server will send back a confirmation message, containing the topic 'authorized' as shown below.
If no authorization message is received by the websockeet server within 10 seconds, the connection is dropped by the server.
Each subscription or unsubscription message must contain topic 'subscribe' or 'unsubscibe' respectively. Additonally, each message must feature a payload containing both the subscription type and subscription URI. Valid subscription types are denoted in the following table:
Note, the URI field may contain MQTT style wildcards where appropriate.
An example subscibe message is shown below:
Following a successful subscription or unsubscripton message, the websocket server will echo the message back to the client, confirming the action has been made.
Each event response will feature a timestamp, topic and payload. The topic will be one of the valid event types as denoted in the above table. The payload will contain uri and value fields, the form of the latter varrying based on the type and nature of the event. An example response is shown below:
The values for each event type are as follows:
Switching Protocols
Topic name, will always be "connected"
MobiusFlow Hub ID
MobiusFlow Service ID
Ok response
Timestamp of the response
URI of the response
Response data
MobiusFlow object profile ID
MobiusFlow Hub ID
MobiusFlow Service ID
MobiusFlow Object Profile ID
Ok response
Timestamp of the response
URI of the response
Response data
MobiusFlow object instance ID
MobiusFlow Hub ID
Ok response
Timestamp of the response
URI of the response
Response data
Result
MobiusFlow Hub ID
MobiusFlow Service ID
Ok response
Timestamp of the response
URI of the response
Start service result information
Result
MobiusFlow Hub ID
MobiusFlow Service ID
Ok response
Timestamp of the response
URI of the response
Stop service result information
Result
MobiusFlow Hub ID
MobiusFlow Service ID
Ok response
Timestamp of the response
URI of the response
Reload service result information
Result
MobiusFlow Hub ID
Ok response
Timestamp of the response
URI of the response
Array of object profile families
MobiusFlow Hub ID
MobiusFlow Service ID
MobiusFlow Object Profile ID
MobiusFlow Object Instance ID
Ok response
Timestamp of the response
URI of the response
MobiusFlow Hub ID
MobiusFlow Command ID
Ok response
Timestamp of the response
URI of the response
Mobius command profile
Command profile description
Command profile schema
MobiusFlow Hub ID
Ok response
Timestamp of the response
URI of the response
Mobius Node Configuration (array of services information)
Service ID
Service name
Service enabled flag
Run at start flag
MobiusFlow Hub ID
Ok response
Timestamp of the response
URI of the response
Response data
Service ID
Service profile ID
Service registered
Service status
Service last connected time
MobiusFlow Hub ID
MobiusFlow Service ID
MobiusFlow Object Profile ID
MobiusFlow Object Instance ID
MobiusFlow Resource ID
Ok response
Timestamp of the response
URI of the response
Response data
Resource ID
Resource type
Resource name
Resource value
Resource priority array
Resource value for given priority
Resource settings
User ID
Role profile
Has admin permission
Has flows editing permission
Has configuration editing permission
Has subscription permission
Has write permission
Has read permission
Ok response
Role profile
Has admin permission
Has flows editing permission
Has configuration editing permission
Has subscription permission
Has write permission
Has read permission
MobiusFlow Hub ID
MobiusFlow Service Profile ID
Ok response
Timestamp of the response
URI of the response
Mobius service profile
Service profile ID
Default service ID
Service profile name
Service profile description
Service type configurable flag
Array of allowed object families
Object family name
MobiusFlow Hub ID
MobiusFlow Service ID
New service ID
Ok response
Timestamp of the response
URI of the response
Mobius Node Configuration (array of services information)
Service ID
Service name
Service enabled flag
Run at start flag
MobiusFlow Hub ID
MobiusFlow Service ID
MobiusFlow Object Profile ID
MobiusFlow Object Instance ID
MobiusFlow Resource ID
Ok response
Timestamp of the response
URI of the response
Mobius live resource information
Resource ID
Resource type
Resource name
Resource value
Resource priority array
Resource value for given priority
Resource settings
MobiusFlow Hub ID
MobiusFlow Service ID
Ok response
Timestamp of the response
URI of the response
Mobius Node Configuration (array of services information)
Service ID
Service name
Service enabled flag
Run at start flag
MobiusFlow Hub ID
MobiusFlow Service ID
Number of copies
Starting service ID for 1st copy, subsequent copies will be incremented
Ok response
Timestamp of the response
URI of the response
Mobius Node Configuration (array of services information)
Service ID
Service name
Service enabled flag
Run at start flag
MobiusFlow Hub ID
Ok response
Timestamp of the response
URI of the response
Array of Mobius service profiles
Service profile ID
Default service ID
Service profile name
Service profile description
Service type configurable flag
Array of allowed object families
Object family name
MobiusFlow Hub ID
MobiusFlow Service ID
MobiusFlow Object Profile ID
MobiusFlow Object Instance ID
MobiusFlow Resource ID
Priority of the resource value
Ok response
Timestamp of the response
URI of the response
Mobius live resource information
Resource ID
Resource type
Resource name
Resource value
Resource priority array
Resource value for given priority
Resource settings
MobiusFlow Hub ID
MobiusFlow Service ID
MobiusFlow Object Profile ID
MobiusFlow Object Instance ID
Replacement object instance ID
Array of resource IDs and settings
Resource ID
Resource settings
Ok response
Timestamp of the response
URI of the response
MobiusFlow Hub ID
Service ID
Service profile ID
Service name
Service enabled flag
Service run at start flag
Ok response
Timestamp of the response
URI of the response
Mobius Node Configuration (array of services information)
Service ID
Service name
Service enabled flag
Run at start flag
MobiusFlow Hub ID
MobiusFlow Service ID
MobiusFlow Object Profile ID
MobiusFlow Object Instance ID
MobiusFlow Resource ID
Priority of the resource value
Value of the resource
Ok response
Timestamp of the response
URI of the response
Mobius live resource information
Resource ID
Resource type
Resource name
Resource value
Resource priority array
Resource value for given priority
Resource settings
MobiusFlow Hub ID
MobiusFlow Object Profile ID
Ok response
Timestamp of the response
URI of the response
Mobius object profile
Object profile header
Object profile ID
Object profile name
Object type configurable flag
Object profile instances
Object profile UI name
Object profile description
Array of object profile families
Object family name
Object profile resources
MobiusFlow Hub ID
MobiusFlow Object Profile Name
Ok response
Timestamp of the response
URI of the response
Mobius object profile
Object profile header
Object profile ID
Object profile name
Object type configurable flag
Object profile instances
Object profile UI name
Object profile description
Array of object profile families
Object family name
Object profile resources
MobiusFlow Hub ID
MobiusFlow Service ID
MobiusFlow Object Profile ID
MobiusFlow Object Instance ID
Ok response
Timestamp of the response
URI of the response
Mobius live object information
Profile ID associated to the object
Instance ID of the object
Profile name associated to the object
Object description
Array of resources
Resource ID
Resource type
Resource name
Resource value
Resource priority array
Resource value for given priority
Resource settings
Array of families
Family name
Object is from config, 0 for created but not configured, 1 for created from config
MobiusFlow Hub ID
MobiusFlow Service ID
MobiusFlow Object Profile ID
MobiusFlow Object Instance ID
Ok response
Timestamp of the response
URI of the response
Response data
Profile ID associated to the object
Instance ID of the object
Profile name associated to the object
Object description
Array of resources
Resource ID
Resource type
Resource name
Resource value
Resource priority array
Resource value for given priority
Resource settings
Array of families
Family name
Object is from config, 0 for created but not configured, 1 for created from config
MobiusFlow Hub ID
Ok response
Timestamp of the response
URI of the response
Mobius command profiles
MobiusFlow Hub ID
MobiusFlow Service ID
Ok response
Timestamp of the response
URI of the response
Mobius service configuration
Service ID
Service profile ID associated to the service
Service name
Service enabled flag
Service run at start flag
Mobius base service settings
MQTT settings
Hub MQTT broker host location
Hub MQTT broker port
Timeouts
Local timeout in ms
Remote timeout in ms
Custom settings
Array of configured objects on service
Object PID
Array of objects
MobiusFlow Hub ID
MobiusFlow Service ID
MobiusFlow Object Profile ID
MobiusFlow Object Instance ID
Ok response
Timestamp of the response
URI of the response
Mobius service configuration
Service ID
Service profile ID associated to the service
Service name
Service enabled flag
Service run at start flag
Mobius base service settings
MQTT settings
Hub MQTT broker host location
Hub MQTT broker port
Timeouts
Local timeout in ms
Remote timeout in ms
Custom settings
Array of configured objects on service
Object PID
Array of objects
MobiusFlow Hub ID
MobiusFlow Service ID
MobiusFlow Object Profile ID
MobiusFlow Object Instance ID
Resource ID
Priority of the resource value
Value of the resource
Ok response
Timestamp of the response
URI of the response
Mobius live object information
Profile ID associated to the object
Instance ID of the object
Profile name associated to the object
Object description
Array of resources
Resource ID
Resource type
Resource name
Resource value
Resource priority array
Resource value for given priority
Resource settings
Array of families
Family name
Object is from config, 0 for created but not configured, 1 for created from config
MobiusFlow Hub ID
Ok response
Timestamp of the response
URI of the response
Response data
Service ID
Service profile ID associated to the service
Service name
Service enabled flag
Service run at start flag
Mobius base service settings
MQTT settings
Hub MQTT broker host location
Hub MQTT broker port
Timeouts
Local timeout in ms
Remote timeout in ms
Custom settings
Array of configured objects on service
Object PID
Array of objects
MobiusFlow Hub ID
MobiusFlow Service ID
Service name
Service enabled flag
Service run at start flag
Custom service settings configuration
Ok response
Timestamp of the response
URI of the response
Mobius service configuration
Service ID
Service profile ID associated to the service
Service name
Service enabled flag
Service run at start flag
Mobius base service settings
MQTT settings
Hub MQTT broker host location
Hub MQTT broker port
Timeouts
Local timeout in ms
Remote timeout in ms
Custom settings
Array of configured objects on service
Object PID
Array of objects
MobiusFlow Hub ID
MobiusFlow Service ID
MobiusFlow Object Profile ID
MobiusFlow Object Instance ID
Ok response
Timestamp of the response
URI of the response
Mobius service configuration
Service ID
Service profile ID associated to the service
Service name
Service enabled flag
Service run at start flag
Mobius base service settings
MQTT settings
Hub MQTT broker host location
Hub MQTT broker port
Timeouts
Local timeout in ms
Remote timeout in ms
Custom settings
Array of configured objects on service
Object PID
Array of objects
MobiusFlow Hub ID
MobiusFlow Service ID
MobiusFlow Object Profile ID
Ok response
Timestamp of the response
URI of the response
Mobius service configuration
Service ID
Service profile ID associated to the service
Service name
Service enabled flag
Service run at start flag
Mobius base service settings
MQTT settings
Hub MQTT broker host location
Hub MQTT broker port
Timeouts
Local timeout in ms
Remote timeout in ms
Custom settings
Array of configured objects on service
Object PID
Array of objects
MobiusFlow Hub ID
MobiusFlow Service ID
MobiusFlow Object Profile ID
MobiusFlow Object Instance ID
Number of copies to be created
Starting instance ID of the 1st copy, subsequent copies will be incremented
Ok response
Timestamp of the response
URI of the response
Mobius service configuration
Service ID
Service profile ID associated to the service
Service name
Service enabled flag
Service run at start flag
Mobius base service settings
MQTT settings
Hub MQTT broker host location
Hub MQTT broker port
Timeouts
Local timeout in ms
Remote timeout in ms
Custom settings
Array of configured objects on service
Object PID
Array of objects
MobiusFlow Hub ID
MobiusFlow Service ID
Object PID
Array of objects
Ok response
Timestamp of the response
URI of the response
Mobius service configuration
Service ID
Service profile ID associated to the service
Service name
Service enabled flag
Service run at start flag
Mobius base service settings
MQTT settings
Hub MQTT broker host location
Hub MQTT broker port
Timeouts
Local timeout in ms
Remote timeout in ms
Custom settings
Array of configured objects on service
Object PID
Array of objects
MobiusFlow Hub ID
Ok response
Timestamp of the response
URI of the response
Mobius object profiles
API Calls for Node-RED Flows
Used get and set the full configuration the flows.
MobiusFlow Command ID
Payload of command
Ok response
Timestamp of the response
URI of the response
Acknowledgement data
Result
MobiusFlow Hub ID
Ok response
Timestamp of the response
URI of the response
Array of flow configurations
MobiusFlow Hub ID
Ok response
Timestamp of the response
URI of the response
Set achknowledgement