MeshCube v6.0.0 API


HTTP APIs allow to communicate with MeshCube using the HTTP request-response communication protocol.

In this type of communication the standard request is:

http(s)://<URL>[:port]/<request_type>.

Authentication

The system provides three options for authenticating calls from external clients:

  1. No Auth
    The system does not require any authorization. This mode is only suitable for system installed on-premises and thus running in a private network.

  2. Basic Auth
    The system requires the Basic Authentication for API invocation.
    When used combined with a Secure connection, this method provides a good protection against unauthorized accesses with the minimum overhead possible.

  3. JWT Token Auth
    The system requires a JWT Token for API invocation.
    The tokens generated by MeshCube allow to configure:

    • An optional expiry date
    • An optional list of IP Addresses who are allowed to invoke APIs.
    • What API path are accessible using the token.
    • The maximum number of invocation per hour.

For further details about API authentication, please refer to system documentation

Invoking API via MQTT interface

MeshCube allows to invoke the API using the MQTT interface, to be used in scenarios where the MeshCube is not directly connectable, but is connected to an external MQTT Broker.

The MQTT Interface allows to configure:

  • The request topic

  • The response topic

See the manual for MQTT Interface configuration

Sending an API request

publish to <request-topic> the following payload:

{
  "id": `(string) client generated unique identifier`,
  "method": `(string) the HTTP method`,
  "target": `(string) the API target url`,
  "parameters": `(object) the query string parameters [optional]`,
  "headers": `(object) the request headers [optional]`,
  "body": `(object) the request body [optional]`
}

id

The unique string identifier that must be generated by the client.

Usually an UUID is the best option.

method

The HTTP Method. Must be set according to the API definition

target

The API target url. Must be set according to the API definition

parameters

The API Query string parameters. Should be set when expected.

headers

The API headers. Should be set when expected.

body

The API body request. Should be set when expected, for example in POST APIs.

Receiving the response

MeshCube processes the request

{
    "id":`(string) client generated unique identifier`,
    "timestamp":`(number) the unix timestamp of the API execution`,
    "execution":`(number) the time spent for the API execution`,
    "method": `(string) the HTTP method`,
    "target": `(string) the API target url`,
    "status":`(number) the HTTP status code`,
    "type":`(string) the mime type of the response body [optional]`,
    "body":`(object | string) the response body [optional]`
id

The unique string identifier that must be generated by the client.

Usually an UUID is the best option.

timestamp

The unix timestamp (resolution: milliseconds) of the API execution.

execution

The time that system spent for the API execution

method

The HTTP Method. Must be set according to the API definition

target

The API target url. Must be set according to the API definition

status

The HTTP status of the API response.

type

Omitted when the API does not provides a response body

The content type of the API response body.

body

Omitted when the API does not provides a response body

The response body, encoded as base64, except for:

  • application/json: encoded as JSON element
  • text/plain: encoded as UTF8 string

Responses

In the following are described the responses that are common for all API calls. Other responses will be specified for each call in detail.

Status Code Status Message Body
200 Success Depends on API definition
403 ERR_LICENSE 
The request can not be performed because of a license error
The JSON license information
500 ERR_SERVER_FAILURE
The server was unable to fulfill the request due to an internal error
(Optional) Error details as JSON object

Each response status different than 2xx, provides a string identifier as http status message in the form ERR_* in order to identify the error.

For example, a response could provide the status code 400 (bad request) for several scenarios, and the status message will contain the error detail.

API List

GET /api/{network}/node-tree


API that retrieves the tree structure of the network. This API can be used to inspect the network organization: how the nodes are connected to the sink.

Parameters

Key Value Optional
address number - network address

Responses

Status Code Status Description Description
200 OK n/a
404 ERR_NETWORK_NOT_FOUND The network was not found

Response Example

{
    "network": 140114,
    "type": 0,
    "id": "Root",
    "items": [
        {
            "type": 1,
            "id": "S2-140114",
            "parent": 0,
            "quality": 100,
            "power": 0,
            "rssi": 0,
            "items": [
                {
                    "type": 2,
                    "id": "R12003411-140114",
                    "parent": 2,
                    "riq": 100,
                    "quality": 98,
                    "power": -12,
                    "rssi": -47,
                    "items": [
                        {
                            "type": 3,
                            "id": "N10003378-140114",
                            "parent": 12003411,
                            "quality": 100,
                            "power": 4,
                            "rssi": -65,
                            "items": []
                        },
                        {
                            "type": 3,
                            "id": "N20003376-140114",
                            "parent": 12003411,
                            "quality": 100,
                            "power": 4,
                            "rssi": -68,
                            "items": []
                        }
                    ]
                },
                {
                    "type": 2,
                    "id": "R9001641-140114",
                    "parent": 2,
                    "quality": 96,
                    "power": -12,
                    "rssi": -44,
                    "items": []
                }
            ]
        }
    ]
}

GET /api/beacon/anchors


Get information about all the beacon router nodes detected by the system.

This API can be called with FTR Queries. Go to the FTR Queries section for more information.

Responses

Status Code Status Description Description
200 OK n/a

Response Example

[
  {
    "from_cache": false,
    "wrapper_type": "MeshBeaconAnchor",
    "id": "<beacon_anchor_id>",
    "node_id": "<node_id>",
    "node_address": 9000001,
    "node_network_id": 8369957,
    "node_role": "router_node",
    "beaconing": "ibeacon",
    "ibeacon_uuid": "acfd065ec3c011e39bbe1a514932ac01",
    "ibeacon_major": 9,
    "ibeacon_minor": 1,
    "advertising_interval": 1000,
    "advertising_tx_power": 0,
    "map": {
      "id": 6,
      "description": "Sample Building 1st Floor"
    },
    "position": {
      "x": 0.445833333333333,
      "y": 3.04166666666667,
      "z": 0
    },
    "last_update": 1714653185,
    "last_update_time": 40,
    "battery": 3042,
    "status": "online"
  }
]

GET /api/beacon/tags


Get information about all the beacon non-router nodes detected by the system.

This API can be called with FTR Queries. Go to the FTR Queries section for more information.

Responses

Status Code Status Description Description
200 OK n/a

Response Example

[
  {
    "from_cache": false,
    "wrapper_type": "MeshBeaconTag",
    "id": "<beacon_tag_id>",
    "node_id": "<node_id>",
    "node_address": 10003413,
    "node_network_id": 8369957,
    "node_role": "non_router_node",
    "beaconing": "safety",
    "safety_uuid": "a565cc841e0e4b5ab2d317c98ff5410a",
    "safety_major": 3413,
    "default_advertising_interval": 1000,
    "motion_advertising_interval": 300,
    "alarm_advertising_interval": 100,
    "sleep_advertising_interval": 2500,
    "advertising_tx_power": 0,
    "last_update": 1714653102,
    "last_update_time": 28,
    "battery": 2922,
    "status": "online"
  }
]

GET /api/beacons


Get information about all the beacon nodes detected by the system.

This API can be called with FTR Queries. Go to the FTR Queries section for more information.

Responses

Status Code Status Description Description
200 OK n/a

Response Example

[
  {
    "from_cache": false,
    "wrapper_type": "MeshBeaconAnchor",
    "id": "<beacon_id>",
    "node_id": "<node_id>",
    "node_address": 9000001,
    "node_network_id": 8369957,
    "node_role": "router_node",
    "beaconing": "ibeacon",
    "ibeacon_uuid": "acfd065ec3c011e39bbe1a514932ac01",
    "ibeacon_major": 9,
    "ibeacon_minor": 1,
    "advertising_interval": 1000,
    "advertising_tx_power": 0,
    "map": {
      "id": 6,
      "description": "Sample Building 1st Floor"
    },
    "position": {
      "x": 0.445833333333333,
      "y": 3.04166666666667,
      "z": 0
    },
    "last_update": 1714655173,
    "last_update_time": 29,
    "battery": 3042,
    "status": "online"
  },
  {
    "from_cache": false,
    "wrapper_type": "MeshBeaconTag",
    "id": "<beacon_id>",
    "node_id": "<node_id>",
    "node_address": 20003421,
    "node_network_id": 8369957,
    "node_role": "non_router_node",
    "beaconing": "safety",
    "safety_uuid": "a565cc841e0e4b5ab2d317c98ff54114",
    "safety_major": 3421,
    "default_advertising_interval": 1000,
    "motion_advertising_interval": 300,
    "alarm_advertising_interval": 100,
    "sleep_advertising_interval": 2500,
    "advertising_tx_power": 0,
    "last_update": 1714655133,
    "last_update_time": 70,
    "battery": 2970,
    "status": "online"
  },
  {
    "from_cache": false,
    "wrapper_type": "MeshBeaconTag",
    "id": "<beacon_id>",
    "node_id": "<node_id>",
    "node_address": 10003413,
    "node_network_id": 8369957,
    "node_role": "non_router_node",
    "beaconing": "safety",
    "safety_uuid": "a565cc841e0e4b5ab2d317c98ff5410a",
    "safety_major": 3413,
    "default_advertising_interval": 1000,
    "motion_advertising_interval": 300,
    "alarm_advertising_interval": 100,
    "sleep_advertising_interval": 2500,
    "advertising_tx_power": 0,
    "last_update": 1714655198,
    "last_update_time": 5,
    "battery": 2934,
    "status": "online"
  }
]

GET /api/event-listener


This request is used to generate a Listener that retrieves the Events generated by the system.

The request generates a token that has to be used in the /api/events/{token} to be able to receive the events.

Parameters

If no parameters are added, the Listener retrieves all the events generated by the system and devices. Otherwise it is possible to specify one or more events to listen to.

In addition, it is possible to specify the timeout of the token, i.e., the validity of the token in seconds.

Key Value Optional
events Event(s) name
timeout Value in seconds
Request example

localhost/api/event-listener?events=meshNonRouterNodesDetectionUpdate,meshSensorDataUpdated&timeout=60

Responses

Status Code Status Description Description
200 OK n/a

Response Example

{
  "token": "<token>"
}

GET /api/events/{token}


This request is used to fetch the Events generated by the system.

The request needs the token generated by /api/getEvents request.

Parameters

Key Value Optional
token token

Body

Responses

Status Code Status description Description
200 OK The response will contain an array of events generated by the system
400 ERR_MISSING_TOKEN No token was specified in the request
404 ERR_LISTENER_NOT_FOUND The listener associated to the token does not exist or is expired

Response Example

[
    {
        "id": "<eventID>",
        "sequence_number": 6139,
        "timestamp": 1708613562059,
        "data": {<event_data>}
    },
    {
        "id": "<eventID>",
        "sequence_number": 6140,
        "timestamp": 1708613563015,
        "data": {<event_data>}
    }
]

POST /api/gateway/{id}


This API allows to invoke the internal API of a gateway connected to the system using the "Remote control" option.

Note 1 Use this API carefully, as some Remote API related to the configuration could bring to unexpected results. For example, disabling the remote Control on the Gateway will break this API.

Note 2 The documentation about BlueUp Gateway APIs are available on BlueUp Docs.

Request example

{
  "timeout": 10, // Optional (default: 10), unit: Seconds,
  "method": "GET | POST | DELETE", // The http method
  "target": "api/system", // The Gateway API target url,
  "body": {} // The request body (could be optional or mandatory, depending on the API)
}

Responses

Status Code Status Description Description
503 ERR_MQTT_BROKER_NOT_RUNNING The MQTT Mesh Broker is not connected/configured
503 ERR_MQTT_INTERFACE_DISCONNECTED The MQTT Mesh Client was not connected when attempting to invoke the API
503 ERR_MQTT_PUBLISH_ERROR The MQTT Mesh Client was not able to publish the request on the MQTT Broker
408 ERR_TIMEOUT The system did not receive a response within the timeout value set
404 ERR_GATEWAY_NOT_FOUND The target Gateway was not found
400 ERR_MISSING_REQUEST_BODY No body was passed to the request
400 ERR_MISSING_BODY_PARAMETER One or more required parameters was not included in the request body
xxx Specific Gateway response The Gateway response

GET /api/gateways


Get information about all the gateways connected to the system.

This API can be called with FTR Queries. Go to the FTR Queries section for more information.

Responses

Status Code Status Description Description
200 OK The response contains an array of gateways connected to the system with related information

Response Example

[
    {
        "id": "<gateway_id>",
        "model": "<gateway_model>",
        "blueup_device": true,
        "device_type": "tinygateway",
        "device_variant": "eth", #available variants for TinyGateway gateways are WiFi, Ethernet, LTE
        "ip_address": "<gateway_ip>",
        "sink_id": "sink0",
        "sink_on": true,
        "node_address": 1,
        "network_address": 31415,
        "network_channel": 6,
        "fw_version": "1.5.1.284",
        "www_version": "1.7.0.18",
        "os_version": "4.4.6",
        "api_version": 2,
        "diagnostics_interval": 60,
        "seq_app_config": 6,
        "has_app_config": true,
        "last_update_time": 17,
        "last_update": 1713796401,
        "is_running": true
    }
]

GET /api/maps


Get information about all the nodes detected by the system.

This API can be called with FTR Queries. Go to the FTR Queries section for more information.

Responses

Status Code Status Description Description
200 OK The response contains an array of maps setup in the system with related information

Response Example

[
    {
        "id": 2,
        "description": "BlueUp office",
        "pixel_per_mt": 47,
        "z": 0,
        "gps_coordinates": false,
        "image": {
            "id": "951df47f-6fa7-4dd9-95a5-0b441fbe405d",
            "type": "image/png",
            "url": "/map/951df47f-6fa7-4dd9-95a5-0b441fbe405d",
            "size": 270220,
            "width": 883,
            "height": 649
        },
        "offset": {<map_origin_coordinates>},
        "area": {
            "vertexes": [<map_vertexes>]
        },
        "zones": [
            {
                "id": "meeting-room",
                "description": "Meeting room",
                "color": "#4169E1",
                "z": 0,
                "vertexes": [<zone_vertexes>]
            },
            {
                "id": "management",
                "description": "Management",
                "color": "#a9e141",
                "z": 0,
                "vertexes": [<zone_vertexes>]
            }
        ],
        "guides": [<array_of_guides>],
        "placeholders": [
            {
                "id": "752851da-63a4-4305-820a-590daac6cc1a",
                "number": 47,
                "color": "#740af5",
                "position": {
                    "x": 15.17,
                    "y": 5.65,
                    "z": 0
                }
            }
        ]
    }
]

GET /api/network/{address}


API that retrieves the network configurations for the specific network address.

Parameters

Key Value Optional
address number - network address

Responses

Status Code Status Description Description
200 OK n/a
404 ERR_NETWORK_NOT_FOUND The network was not found

Response Example

[
    {
        "address": 12345678,
        "description": <network_description>,
        "active": <active_configuration_id>,
        "templates": [
            {
                "id": <configuration_id>,
                "description": <configuration_description>,
                "is_editable": true,
                "is_removable": true,
                "setup": {
                    "diagnostics_interval": 300,
                    "configuration": [
                        {
                            "node_class": "F9",
                            "packet_type": "A2",
                            "parameters": {
                                "sensing_interval": 300,
                                "alerts_enabled": true,
                                "off_by_position": false,
                                "beaconing": "disabled"
                            }
                        },
                        {
                            "node_class": "FA",
                            "packet_type": "B2",
                            "parameters": {
                                "default_positioning_interval": 60,
                                "default_timeout": 65,
                                "default_autoscan_enabled": false,
                                "motion_positioning_interval": 10,
                                "motion_timeout": 60,
                                "motion_autoscan_enabled": false,
                                "alarm_positioning_interval": 10,
                                "alarm_timeout": 60,
                                "alarm_autoscan_enabled": false,
                                "sleep_positioning_interval": 3600,
                                "sleep_autoscan_enabled": true,
                                "alerts_enabled": true,
                                "button_enabled": true,
                                "accelerometer_mode": "motion_detection",
                                "motion_threshold": 10,
                                "motion_duration": 1,
                                "beaconing": "disabled"
                            }
                        }
                    ]
                }
            },
            { ~ }

        ]
    }
]

GET /api/network/{address}/{configuration}


API that retrieves a specific configuration for the specific network address.

Parameters

Key Value Optional
address number - network address
configuration string - configuration identifier

Responses

Status Code Status Description Description
200 OK n/a
404 ERR_NETWORK_NOT_FOUND The network was not found
404 ERR_NETWORK_CONFIGURATION_NOT_FOUND The network configuration was not found

Response Example

[
    {
        "address": 12345678,
        "description": <network_description>,
        "active": <active_configuration_id>,
        "templates": [
            {
                "id": <configuration_id>,
                "description": <configuration_description>,
                "is_editable": true,
                "is_removable": true,
                "setup": {
                    "diagnostics_interval": 300,
                    "configuration": [
                        {
                            "node_class": "F9",
                            "packet_type": "A2",
                            "parameters": {
                                "sensing_interval": 300,
                                "alerts_enabled": true,
                                "off_by_position": false,
                                "beaconing": "disabled"
                            }
                        },
                        {
                            "node_class": "FA",
                            "packet_type": "B2",
                            "parameters": {
                                "default_positioning_interval": 60,
                                "default_timeout": 65,
                                "default_autoscan_enabled": false,
                                "motion_positioning_interval": 10,
                                "motion_timeout": 60,
                                "motion_autoscan_enabled": false,
                                "alarm_positioning_interval": 10,
                                "alarm_timeout": 60,
                                "alarm_autoscan_enabled": false,
                                "sleep_positioning_interval": 3600,
                                "sleep_autoscan_enabled": true,
                                "alerts_enabled": true,
                                "button_enabled": true,
                                "accelerometer_mode": "motion_detection",
                                "motion_threshold": 10,
                                "motion_duration": 1,
                                "beaconing": "disabled"
                            }
                        }
                    ]
                }
            },
            { ~ }

        ]
    }
]

DELETE /api/network/{address}/{configuration}


API that deletes a specific configuration for the specific network address.

Parameters

Key Value Optional
address number - network address
configuration string - configuration identifier

Responses

Status Code Status Description Description
200 OK n/a
404 ERR_NETWORK_NOT_FOUND The network was not found
404 ERR_NETWORK_CONFIGURATION_NOT_FOUND The network configuration was not found
400 ERR_NETWORK_CONFIGURATION_ACTIVE The configuration cannot be delete when it is the active one
400 ERR_NETWORK_CONFIGURATION_DEFAULT The default configuration of a network cannot be deleted

POST /api/network/{address}/{configuration}


API that sets a specific configuration for the specific network address.
The configuration has to be specified in the Body of the API call.

Parameters

Key Value Optional
address number - network address
configuration string - configuration identifier

Body

Acceptable diagnostics intervals
Value Description
0 Disabled
30 30 sec
60 1 min
120 2 min
300 5 min
600 10 min
1800 30 min

Whether the diagnostic interval is disabled, the nodes will not send their diagnostics information, including routing.

{
  "diagnostics_interval": 300,
  "configuration": [
    {
      "node_class": "F9",
      "packet_type": "A2",
      "parameters": {
        "sensing_interval": 300,
        "alerts_enabled": true,
        "off_by_position": false,
        "beaconing": "disabled"
      }
    },
    {
      "node_class": "FA",
      "packet_type": "B2",
      "parameters": {
        "default_positioning_interval": 120,
        "default_timeout": 65,
        "default_autoscan_enabled": false,
        "motion_positioning_interval": 10,
        "motion_timeout": 60,
        "motion_autoscan_enabled": false,
        "alarm_positioning_interval": 10,
        "alarm_timeout": 60,
        "alarm_autoscan_enabled": false,
        "sleep_positioning_interval": 3600,
        "sleep_autoscan_enabled": true,
        "alerts_enabled": true,
        "button_enabled": true,
        "accelerometer_mode": "motion_detection",
        "motion_threshold": 10,
        "motion_duration": 1,
        "beaconing": "disabled"
      }
    }
  ]
}

Responses

Status Code Status Description Description
200 OK n/a
400 ERR_MISSING_CONFIG_ID The request body does not contain the required data
400 ERR_MISSING_CONFIG_DATA The configuration data is missing
400 ERR_NETWORK_CONFIGURATION_INVALID The passed configuration is not valid
404 ERR_NETWORK_NOT_FOUND The network was not found
400 ERR_NETWORK_CONFIGURATION_READONLY The configuration cannot be changed (readonly)

Response Example

{
  "changed": true
}

GET /api/network/{address}/{configuration}/app-config


API that retrieves the AppConfig of a specific configuration for the specific network address.

Parameters

Key Value Optional
address number - network address
configuration string - configuration identifier

Responses

Status Code Status Description Description
200 OK n/a
404 ERR_NETWORK_NOT_FOUND The network was not found
404 ERR_NETWORK_CONFIGURATION_NOT_FOUND The network configuration was not found

Response Example

Content-Type is text/plain

f9a204012c0100fab2140078000a000a0e100041003c003c0023010a01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

GET /api/network/{address}/{configuration}/apply


API that applies a specific configuration to the specific network.

Parameters

Key Value Optional
address number - network address
configuration string - configuration identifier

Responses

Status Code Status Description Description
200 OK n/a
404 ERR_NETWORK_NOT_FOUND The network was not found
404 ERR_NETWORK_CONFIGURATION_NOT_FOUND The network configuration was not found
503 ERR_SERVICE_UNAVAILABLE The Mesh Handler is not active

Response Example

{
  "applied": true
}

POST /api/network/{address}/{configuration}/create


Create a new configuration for a specific network address.

The new configuration has to be specified in the Body of the API call.

Parameters

Key Value Optional
address number - network address
configuration string - configuration identifier

Body

Acceptable diagnostics intervals
Value Description
0 Disabled
30 30 sec
60 1 min
120 2 min
300 5 min
600 10 min
1800 30 min

Whether the diagnostic interval is disabled, the nodes will not send their diagnostics information, including routing.

{
  "description": "<Configuration_description>",
  "diagnostics_interval": 300,
  "configuration": [
    {
      "node_class": "F9",
      "packet_type": "A2",
      "parameters": {
        "sensing_interval": 300,
        "alerts_enabled": true,
        "off_by_position": false,
        "beaconing": "disabled"
      }
    },
    {
      "node_class": "FA",
      "packet_type": "B2",
      "parameters": {
        "default_positioning_interval": 120,
        "default_timeout": 65,
        "default_autoscan_enabled": false,
        "motion_positioning_interval": 10,
        "motion_timeout": 60,
        "motion_autoscan_enabled": false,
        "alarm_positioning_interval": 10,
        "alarm_timeout": 60,
        "alarm_autoscan_enabled": false,
        "sleep_positioning_interval": 3600,
        "sleep_autoscan_enabled": true,
        "alerts_enabled": true,
        "button_enabled": true,
        "accelerometer_mode": "motion_detection",
        "motion_threshold": 10,
        "motion_duration": 1,
        "beaconing": "disabled"
      }
    }
  ]
}

Responses

Status Code Status Description Description
200 OK n/a
400 ERR_MISSING_CONFIG_DATA The configuration data is missing
404 ERR_NETWORK_NOT_FOUND The network was not found
400 ERR_NETWORK_CONFIGURATION_ALREADY_EXISTS The configuration already exists

Response Example

The API response will return the above created configuration.

GET /api/networks


This API retrieves the list of all the networks in the MeshCube instance and for each network reports the network configurations.

This API can be called with FTR Queries. Go to the FTR Queries section for more information.

Responses

Status Code Status Description Description
200 OK The response contains an array of networks with related configurations

Response Example

[
    {
        "address": 12345678,
        "description": <network_description>,
        "active": <active_configuration_id>,
        "templates": [
            {
                "id": <configuration_id>,
                "description": <configuration_description>,
                "is_editable": true,
                "is_removable": true,
                "setup": {
                    "diagnostics_interval": 300,
                    "configuration": [
                        {
                            "node_class": "F9",
                            "packet_type": "A2",
                            "parameters": {
                                "sensing_interval": 300,
                                "alerts_enabled": true,
                                "off_by_position": false,
                                "beaconing": "disabled"
                            }
                        },
                        {
                            "node_class": "FA",
                            "packet_type": "B2",
                            "parameters": {
                                "default_positioning_interval": 60,
                                "default_timeout": 65,
                                "default_autoscan_enabled": false,
                                "motion_positioning_interval": 10,
                                "motion_timeout": 60,
                                "motion_autoscan_enabled": false,
                                "alarm_positioning_interval": 10,
                                "alarm_timeout": 60,
                                "alarm_autoscan_enabled": false,
                                "sleep_positioning_interval": 3600,
                                "sleep_autoscan_enabled": true,
                                "alerts_enabled": true,
                                "button_enabled": true,
                                "accelerometer_mode": "motion_detection",
                                "motion_threshold": 10,
                                "motion_duration": 1,
                                "beaconing": "disabled"
                            }
                        }
                    ]
                }
            },
            { ~ }

        ]
    }
]

GET /api/node/{id}


Get information about the node having a given ID.

Specify the Node ID

Parameters

Key Value Optional
ID Node unique identifier, composed by:
- Node type prefix: S Sink, R Router node, N Non Router node.
- Node address
- Network address

Responses

Status Code Status Description Description
200 OK

Response Example

{
    "from_cache": false,
    "id": "<Node_ID>",
    "address": 5003408,
    "network_id": 15074110,
    "device": {<device_id>},
    "version": "3.12",
    "node_class": "FB",
    "operation_mode": "autoscan_tag",
    "alarm": "none",
    "state": "sleep",
    "state_time": 183563,
    "role": "non_router_node",
    "low_latency": false,
    "autorole": false,
    "max_buffer_usage": 2,
    "avg_buffer_usage": 0,
    "routers_in_neighborhood": 1,
    "scans": 237,
    "battery": 2970,
    "nodes": {
        "timestamp": 1708505215,
        "travel_time": 0,
        "count": 1,
        "items": [<nodes_array> ]
    },
    "routing": {<routing_info>},
    "has_configuration": true,
    "configuration_status": "missing",
    "last_update": 1708505246,
    "last_update_time": 97661,
    "last_update_elapsed": {},
    "status": "offline"
}

GET /api/node/{id}/alias


Retrieve the alias set on the node.

Specify the Node ID

Parameters

Key Value Optional
ID Node unique identifier, composed by:
_ Node type prefix: S Sink, R Router node, N Non Router node.
_ Node address
* Network address

Responses

Status Code Status Description Description
200 OK

Response Example

{
    "id": "<nodeID>",
    "alias": <alias>
}

DELETE /api/node/{id}/alias


Delete the alias set on the node.

Parameters

Key Value Optional
ID Node unique identifier, composed by:
_ Node type prefix: S Sink, R Router node, N Non Router node.
_ Node address
* Network address

Responses

Status Code Status Description Description
200 OK n/a
400 ERR_NOT_FOUND The node id was not found

Response Example

{
  "id": "<nodeID>",
  "alias": null
}

POST /api/node/{id}/alias


Set the alias to the node.

Parameters

Key Value Optional
ID Node unique identifier, composed by:
_ Node type prefix: S Sink, R Router node, N Non Router node.
_ Node address
* Network address

Body

{
  "alias": "new"
}

Responses

Status Code Status Description Description
200 OK n/a
400 ERR_NOT_FOUND The node id was not found

Response Example

{
  "id": "<nodeID>",
  "alias": "<alias>"
}

GET /api/nodes


Get information about all the nodes detected by the system.

This API can be called with FTR Queries. Go to the FTR Queries section for more information.

Responses

Status Code Status Description Description
200 OK The response contains an array of nodes detected by the system

Response Example

[
    {
        "from_cache": true,
        "id": "<sink_id>",
        "address": 1,
        "network_id": 14480430,
        "role": "sink_node",
        "low_latency": true,
        "autorole": false,
        "max_buffer_usage": 0,
        "avg_buffer_usage": 0,
        "routers_in_neighborhood": 9,
        "scans": 8,
        "boot_count": 5,
        "stack_version": "5.3.0.89",
        "app_version": "1.4.0.0",
        "scratchpad_stored_sequence": 0,
        "scratchpad_processed_sequence": 255,
        "is_otap_enabled": true,
        "has_configuration": false,
        "configuration_status": "none",
        "last_update": 1707474364,
        "last_update_time": 1128398,
        "last_update_elapsed": {},
        "status": "none"
    },
    {
        "from_cache": false,
        "id": "<router_id>",
        "address": 9000001,
        "network_id": 8369957,
        "device": {<device_info>},
        "version": "3.12",
        "node_class": "F9",
        "operation_mode": "opportunistic_anchor",
        "alarm": "none",
        "state": "default",
        "state_time": 183411,
        "role": "router_node",
        "low_latency": false,
        "autorole": false,
        "max_buffer_usage": 0,
        "avg_buffer_usage": 0,
        "routers_in_neighborhood": 2,
        "scans": 128,
        "battery": 3066,
        "routing": {<routing_info>},
        "has_configuration": true,
        "configuration_status": "matches",
        "last_update": 1708602755,
        "last_update_time": 7,
        "last_update_elapsed": {},
        "status": "online"
    },
    {
        "from_cache": false,
        "id": "<non_router_id>",
        "address": 10003412,
        "network_id": 8369957,
        "device": {<device_info>},
        "version": "3.12",
        "node_class": "FA",
        "operation_mode": "nrls_tag",
        "alarm": "none",
        "state": "default",
        "state_time": 617,
        "role": "non_router_node",
        "low_latency": false,
        "autorole": false,
        "max_buffer_usage": 4,
        "avg_buffer_usage": 2,
        "routers_in_neighborhood": 0,
        "scans": 1,
        "battery": 2958,
        "nodes": {
            "timestamp": 1708602712,
            "travel_time": 54,
            "count": 2,
            "items": [<array_of_nodes>]
        },
        "routing": {<routing_info>},
        "has_configuration": true,
        "configuration_status": "matches",
        "last_update": 1708602712,
        "last_update_time": 50,
        "last_update_elapsed": {},
        "status": "online"
    }
]

POST /api/nodes/{network}/{address}/command


Send commands in broadcast to all the Nodes in the network.

Note: if more than one network is configured in MeshCube, make sure to specify the right network to send the command to.

POST method

In Body of the request has to be defined the command to send to the nodes. The supported commands are:

  • Reboot to reboot the device
  • Button switch to enable or disable the button
  • Alert to configure the alarm on the device
  • Alert Off to disable buzzer/vibration/led if they were configured as permanent on in the Alert command
  • Gpio to configure GPIO pins

Parameters

Key Value Optional
network Network ID

Body

Each command requires different data inside the Body.

Reboot body
{
  "type": "reboot"
}

No additional data is required

Change node class
{
  "type": "node_class_change",
  "data": {
    "class": `string`
  }
}
# Valid node classes are:
  • F9 (Default Anchor class)
  • FA (Default Asset Tag class)
  • FB (Default Personal Tag class)
  • FC
  • FD
  • FE
  • FF
Button switch body
{
  "type": "button_switch",
  "data": {
    "enabled": `boolean`
  }
}
Alert body

Here is an example of the complete Alarm command to be sent.

{
  "type": "alert",
  "data": {
    "buzzer_period": 2,
    "buzzer_repeats": 20,
    "buzzer_duty_cycle": 50,
    "vibration_period": 2,
    "vibration_repeats": 20,
    "vibration_duty_cycle": 50,
    "led_period": 2,
    "led_repeats": 20,
    "led_duty_cycle": 50,
    "led_sequential": false,
    "led_red": true,
    "led_green": true,
    "led_blue": true,
    "led_0": true,
    "led_1": true,
    "led_2": true,
    "led_3": true
  }
}

The unnecessary parameters in "data" object can be omitted.

Alert Off body
{
  "type": "alert_off"
}
GPIO body
{
    "type": "gpio",
    "data":{
        "pin": <pin_number>,
        "mode": "reset" | "output" | "input",
        "pullcfg": "pulldown" | "pullup", #only in Input mode
        "send_interval": <number> #range [0; 255]
    }
}

Responses

Status Code Status Description Description
200 OK
400 ERR_MISSING_BODY No body present in the request
400 ERR_INVALID_COMMAND The system is not able to parse the command
400 ERR_MISSING_NETWORK_ADDRESS No network address is specified
500 ERR_SEND_FAILED Failed to send the command to the Sink(s)
503 ERR_SERVICE_UNAVAILABLE The MQTT Broker is not instantiated
503 ERR_NO_GATEWAY_AVAILABLE No gateway is online to receive the request

POST /api/nodes/{network}/command


Send commands in broadcast to all the Nodes in the network.

Note: if more than one network is configured in MeshCube, make sure to specify the right network to send the command to.

POST method

In Body of the request has to be defined the command to send to the nodes. The supported commands are:

  • Reboot to reboot the device
  • Button switch to enable or disable the button
  • Alert to configure the alarm on the device
  • Alert Off to disable buzzer/vibration/led if they were configured as permanent on in the Alert command
  • Gpio to configure GPIO pins

Parameters

Key Value Optional
network Network ID

Body

Each command requires different data inside the Body.

Reboot body
{
  "type": "reboot"
}

No additional data is required

Change node class
{
  "type": "node_class_change",
  "data": {
    "class": `string`
  }
}
# Valid node classes are:
  • F9 (Default Anchor class)
  • FA (Default Asset Tag class)
  • FB (Default Personal Tag class)
  • FC
  • FD
  • FE
  • FF
Button switch body
{
  "type": "button_switch",
  "data": {
    "enabled": `boolean`
  }
}
Alert body

Here is an example of the complete Alarm command to be sent.

{
  "type": "alert",
  "data": {
    "buzzer_period": 2,
    "buzzer_repeats": 20,
    "buzzer_duty_cycle": 50,
    "vibration_period": 2,
    "vibration_repeats": 20,
    "vibration_duty_cycle": 50,
    "led_period": 2,
    "led_repeats": 20,
    "led_duty_cycle": 50,
    "led_sequential": false,
    "led_red": true,
    "led_green": true,
    "led_blue": true,
    "led_0": true,
    "led_1": true,
    "led_2": true,
    "led_3": true
  }
}

The unnecessary parameters in "data" object can be omitted.

Alert Off body
{
  "type": "alert_off"
}
GPIO body
{
    "type": "gpio",
    "data":{
        "pin": <pin_number>,
        "mode": "reset" | "output" | "input",
        "pullcfg": "pulldown" | "pullup", #only in Input mode
        "send_interval": <number> #range [0; 255]
    }
}

Responses

Status Code Status Description Description
200 OK
400 ERR_MISSING_BODY No body preent in the request
400 ERR_INVALID_COMMAND The system is not able to parse the command
400 ERR_MISSING_NETWORK_ADDRESS No network address is specified
500 ERR_SEND_FAILED Failed to send the command to the Sink(s)
503 ERR_SERVICE_UNAVAILABLE The MQTT Broker is not instantiated
503 ERR_NO_GATEWAY_AVAILABLE No gateway is online to receive the request

POST /api/nodes/command


Send commands in broadcast to all the Nodes in the system.

Note: if in MeshCube only one network is configured, the command is sent in broadcast to all the nodes of the network. If more than one network is configured in MeshCube, then the command is sent in broadcast to all the nodes of all networks.

POST method

In Body of the request has to be defined the command to send to the nodes. The supported commands are:

  • Reboot to reboot the device
  • Change node node-class property
  • Button switch to enable or disable the button
  • Alert to configure the alarm on the device
  • Alert Off to disable buzzer/vibration/led if they were configured as permanent on in the Alert command
  • Gpio to configure GPIO pins

Body

Each command requires different data inside the Body.

Reboot body
{
  "type": "reboot"
}

No additional data is required

Change node class
{
  "type": "node_class_change",
  "data": {
    "class": `string`
  }
}
# Valid node classes are:
  • F9 (Default Anchor class)
  • FA (Default Asset Tag class)
  • FB (Default Personal Tag class)
  • FC
  • FD
  • FE
  • FF
Button switch body
{
  "type": "button_switch",
  "data": {
    "enabled": `boolean`
  }
}
Alert body

Here is an example of the complete Alarm command to be sent.

{
  "type": "alert",
  "data": {
    "buzzer_period": 2,
    "buzzer_repeats": 20,
    "buzzer_duty_cycle": 50,
    "vibration_period": 2,
    "vibration_repeats": 20,
    "vibration_duty_cycle": 50,
    "led_period": 2,
    "led_repeats": 20,
    "led_duty_cycle": 50,
    "led_sequential": false,
    "led_red": true,
    "led_green": true,
    "led_blue": true,
    "led_0": true,
    "led_1": true,
    "led_2": true,
    "led_3": true
  }
}

The unnecessary parameters in "data" object can be omitted.

Alert Off body
{
  "type": "alert_off"
}
GPIO body
{
    "type": "gpio",
    "data":{
        "pin": <pin_number>,
        "mode": "reset" | "output" | "input",
        "pullcfg": "pulldown" | "pullup", #only in Input mode
        "send_interval": <number> #range [0; 255]
    }
}

Responses

Status Code Status Description Description
200 OK
400 ERR_MISSING_BODY No body present in the request
400 ERR_INVALID_COMMAND The system is not able to parse the command
500 ERR_SEND_FAILED Failed to send the command to the Sink(s)
503 ERR_SERVICE_UNAVAILABLE The MQTT Broker is not instantiated
503 ERR_NO_GATEWAY_AVAILABLE No gateway is online to receive the request

Response Example

POST /api/plugin/{id}/configuration


This request allows to change the configuration of one of the plugins setup in the system.

POST Method

Specify the ID of the plugin in the request

Parameters

Key Value Optional
ID ID of the plugin

Body

In the body the user has to write the desired configuration of the plugin.

Body example to the request of configuration of SystemNotifications plugin

{
    "recipients": [<list of emails> ],
    "notify_system_start_stop": false,
    "notify_gateway_status": true,
    "notify_node_battery_low": true
}

Responses

Status Code Status Description Description
200 OK The response returns the new configuration parameters set to the plugin
400 ERR_MISSING_ID
400 ERR_MISSING_CONFIG
400 ERR_INVALID_CONFIG
400 ERR_PLUGIN_NOT_CONFIGURABLE Error generated in case the plugin does not support configuration
400 ERR_PLUGIN_CONF_DENIED Error generated when the configuration of the plugin has been denied
404 ERR_NOT_FOUND
500 ERR_UPDATE_CONFIG An error occurred when trying to update the configuration

Response Example

{
    "recipients": [<list of emails> ],
    "notify_system_start_stop": false,
    "notify_gateway_status": true,
    "notify_node_battery_low": true
}

GET /api/plugin/{id}/configuration


This request allows to retrieve the configuration of one of the plugins setup in the system.

Specify the ID of the plugin in the request

Parameters

Key Value Optional
ID ID of the plugin

Responses

Status Code Status Description Description
200 OK
400 ERR_MISSING_ID
400 ERR_PLUGIN_NOT_CONFIGURABLE Error generated in case the plugin does not support configuration
400 ERR_PLUGIN_CONF_DENIED Error generated when the configuration of the plugin has been denied
404 ERR_NOT_FOUND

Response Example

Response example to the request of configuration of SystemNotifications plugin

{
    "recipients": [<list of emails> ],
    "notify_system_start_stop": false,
    "notify_gateway_status": true,
    "notify_node_battery_low": true
}

GET /api/plugins


Get information about all the Plugins present the system.

The response is composed by an array of plugins and for each plugin is specified its ID, description, version and if the plugin is enabled.

Responses

Status Code Status Description Description
200 OK The response contains as array of plugins configured in the system

Response Example

[
  {
    "id": "<PluginID>",
    "description": "<Plugin description>",
    "version": {
      "major": 1,
      "minor": 0,
      "revision": 0,
      "stage": "release"
    },
    "icon": "<icon>",
    "enabled": true
  }
]

GET /api/sensor/{id}/samples


This API allows to retrieve all the samples of a selected sensor, that are stored in the database.

Specify the Sensor ID

Parameters

If no parameters are added, the API call retrieves all the samples stored in the database. Otherwise it is possible to specify some filtering parameters:

Key Value Optional Description
from number UNIX timestamp of the starting date and time to retrieve data
to number UNIX timestamp of the stopping date and time to retrieve data
type string Type of measurement to retrieve:
- temperature (or temp)
- co2
- pressure
- humidity

Responses

Status Code Status Description Description
200 OK The response contains an array of nodes detected by the system

Response Example

Example of the call that retrieves data of temperature and co2 from a sensor. Request:

/api/sensor/SENSOR_R9000008-12345678/samples?type=temp,co2&from=1714428000000

[
    {
        "timestamp": 1714428182169,
        "co2": 665,
        "temperature": 23.4
    },
    {
        "timestamp": 1714428482197,
        "co2": 612,
        "temperature": 23.3
    },
    {
        "timestamp": 1714428782266,
        "co2": 618,
        "temperature": 23.3
    },
    { ~ }
]

GET /api/sensors


Get information about all the sensors present in the system.

This API can be called with FTR Queries. Go to the FTR Queries section for more information.

Responses

Status Code Status Description Description
200 OK n/a

Response Example

[
  {
    "from_cache": false,
    "wrapper_type": "MeshSensor",
    "id": "<sensor_id>",
    "alias": "<sensor_alias>",
    "node_id": "<node_id>",
    "node_address": 9000008,
    "node_network_id": 12345678,
    "node_role": "router_node",
    "temperature": {
      "unit": "celsius",
      "value": 26.9
    },
    "humidity": 52,
    "pressure": 98559,
    "co2": {
      "ppm": 448,
      "classification": "excellent"
    },
    "last_update": 1714488630,
    "last_update_time": 6,
    "battery": 2820,
    "status": "online"
  }
]

POST /api/sensors/configuration


This API allows to set the configuration of the Sensors.

POST method

Body

{
  "temperature_unit": "celsius",
  "data_retention_days": 730
}

Responses

Status Code Status Description Description
200 OK The response contains an array of nodes detected by the system

Response Example

{
  "updated": true
}

GET /api/sensors/configuration


This API allows to retrieve the configuration of the Sensors.

Responses

Status Code Status Description Description
200 OK The response contains an array of nodes detected by the system

Response Example

{
  "temperature_unit": "celsius",
  "data_retention_days": 730
}

GET /api/status


Get all the information about system status.

Responses

Status Code Status Description Description
200 OK n/a

Response Example

{
  "os": {<os_info>},
  "hostname": "blueupbeacons.com",
  "title": "BlueUp Processing Engine v.6.0.0.39",
  "version": "6.0.0.39",
  "system": {
    "code": "meshcube",
    "description": "MeshCube"
  },
  "license": { <license_info>},
  "timestamp": 1709712155206,
  "activated": true,
  "started_on": 1709670440,
  "uptime": { },
  "network": {<network_info>},
  "processors": 2,
  "pressure": {
    "ram": 141,
    "pram": 3.5,
    "pcpu": 0.7
  }
}

GET /api/system


Get the basic information about the BPE system.

Responses

Status Code Status Description
200 OK

Response Example

{
  "id": `string`,
  "uid": `string`,
  "description": `string`,
  "version": `string`
}

GET /api/system/diagnostics


Get all the information about system diagnostics

Responses

Status Code Status Description
200 OK

Response Example

{
  "eventManager": {
    "description": "EventManager",
    "data": {<data>}
  },
  "localStorage": {
    "description": "Local Storage",
    "data": {<data>}
  },
  "httpServer": {
    "description": "Http Server",
    "data": {<data>}
  }
}

GET /api/tag/settings


Get information about tag positioning settings saved in the system.

Responses

Status Code Status Description Description
200 OK n/a

Response Example

{
  "positioning_mode": 0,
  "anchor_rssi_threshold": -80,
  "state_default_update_position": 2,
  "state_default_update_mode": 2,
  "state_motion_update_position": 2,
  "state_motion_update_mode": 1,
  "state_alarm_update_position": 2,
  "state_alarm_update_mode": 1,
  "state_sleep_update_position": 0,
  "state_sleep_update_mode": 2,
  "map_selection_delta_rssi": 5,
  "map_selection_anchor_avg_number": 3,
  "map_selection_delta_avg": 0.5,
  "anchor_group_selection_delta_rssi": 6,
  "anchor_group_selection_anchor_avg_number": 3,
  "anchor_group_selection_delta_avg": 0.5,
  "mesh_anchor_localization_amount_min": 1,
  "mesh_anchor_localization_amount_max": 4
}

Positioning modes

Code Description
0 map-positioning
1 zone-positioning

POST /api/tag/settings


Change tag positioning settings in the system.

POST Method In the body of the request has to be specified the full configuration of tag positioning settings, changing the parameters the user is interested in.

Body

{
  "configuration_level": "basic",
  "remove_timeout": 0,
  "positioning_mode": 0,
  "anchor_rssi_threshold": -100,
  "state_default_update_position": 2,
  "state_default_update_mode": 1,
  "state_motion_update_position": 2,
  "state_motion_update_mode": 1,
  "state_alarm_update_position": 2,
  "state_alarm_update_mode": 1,
  "state_sleep_update_position": 0,
  "state_sleep_update_mode": 1,
  "map_selection_delta_rssi": 5,
  "map_selection_anchor_avg_number": 5,
  "map_selection_delta_avg": 0.5,
  "anchor_group_selection_delta_rssi": 5,
  "anchor_group_selection_anchor_avg_number": 5,
  "anchor_group_selection_delta_avg": 0.5,
  "mesh_anchor_localization_amount_min": 1,
  "mesh_anchor_localization_amount_max": 0
}

Responses

Status Code Status Description Description
200 OK
400 ERR_MISSING_SETTINGS

Response Example

{
  "changed": true
}

GET /api/tags


Get information about all tags present in the system.

The response is an array of the tags present in the system with related information.

This API can be called with FTR Queries. Go to the FTR Queries section for more information.

Responses

Status Code Status Description Description
200 OK The response contains an array of the tags in the system

Response Example

[
  {
    "from_cache": false,
    "wrapper_type": "MeshTag",
    "id": "<Tag_id>",
    "alias": "Wearable Tag",
    "node_id": "<node_id>",
    "node_address": 10003378,
    "node_network_id": 140114,
    "node_role": "non_router_node",
    "version": "3.12",
    "node_class": "FA",
    "operation_mode": "nrls_tag",
    "alarm": "none",
    "state": "sleep",
    "state_time": 39543,
    "anchors": 4,
    "anchor": [<anchors_array>],
    "positioning_log_enabled": false,
    "positioning_mode": "trilateration",
    "location": {<location_info>},
    "last_update": 1709708841,
    "last_update_time": 3441,
    "battery": 3090,
    "status": "online"
  }
]

GET /api/tags/{network}


Get information about all tags handled by the system belonging to the specified network.

Specify the network ID.

The response contains an array of all the tags in the specified network and the related information.

Parameters

Key Value Optional
network Network ID

Responses

Status Code Status Description Description
200 OK The response contains an array of tags detected in the specified network

Response Example

[
    {
        "from_cache": false,
        "wrapper_type": "MeshTag",
        "id": "<tag_id>",
        "node_id": "<node_id>",
        "node_address": 10003412,
        "node_network_id": 8369957,
        "node_role": "non_router_node",
        "version": "3.12",
        "node_class": "FA",
        "operation_mode": "nrls_tag",
        "alarm": "none",
        "state": "default",
        "state_time": 359,
        "anchors": 0,
        "positioning_log_enabled": false,
        "positioning_mode": "trilateration",
        "last_update": 1708602456,
        "last_update_time": 48,
        "battery": 2958,
        "status": "online"
    },
    {
        "from_cache": false,
        "wrapper_type": "MeshTag",
        "id": "<tag_id>",
        "node_id": <node_id>,
        "node_address": 10003413,
        "node_network_id": 8369957,
        "node_role": "non_router_node",
        "version": "3.12",
        "node_class": "FA",
        "operation_mode": "nrls_tag",
        "alarm": "none",
        "state": "default",
        "state_time": 393,
        "anchors": 0,
        "positioning_log_enabled": false,
        "positioning_mode": "trilateration",
        "last_update": 1708602485,
        "last_update_time": 19,
        "battery": 2952,
        "status": "online"
    }
]

GET /api/event-stream


This Event Stream API allows to receive the events generated by the system as push notifications using Server Sent Events (SSE) technology.

The response body will be a stream with the events generated by the system, sent automatically when the event is generated. For more information about events, please check the API » Events panel or the documentation on BlueUp Docs.

Parameters

listen (Optional)

A list of valid event identifiers that the system shall notify. When omitting the parameter listen the system will notify all events.

Example

Url: GET /api/event-stream?listen=gatewayStatusChanged,meshNodeStateChanged

The system will only notify events: gatewayStatusChanged and meshNodeStateChanged

Response Events

  • event contains data of the generated event.
{
    "id": `string`,
    "sequence_number": `number`,
    "timestamp": `number`
    "data": `object`
}

GET /api/log-stream


This Event Stream API allows to receive the logs generated by the system as push notifications using Server Sent Events (SSE) technology.

The response body will contain the list of logs generated by the system, sent automatically when the event is generated. The same logs are also displayed in the MeshCube interface in section Logs -> System

Parameters

None

Example

Url: GET /api/log-stream

The system will notify log messages

Response Events

syslog object contains data of the generated log.

{
  "uid": `string`, // Unique identifier generated from system boot
  "ticks": `number`, // Number of ticks (1 tick = 100 nanosecond) elapsed from 0000-01-01
  "timestamp": `number`, // Unix timestamp (milliseconds)
  "source": `string`, // Application component which generated the message
  "type": `number`, // Message Type. See the table below
  "message": `string` // The Log Message
}

Log types

Type Description
1 Information
2 Warning
4 Error
8 Debug
16 Verbose

GET /api/information-stream


This Event Stream API allows to receive the system status data via Server Sent Events (SSE) technology.
The content of the received data is equal to the result of the API /api/status.

Parameters

interval (optional)

The interval (seconds) used by the system to send data.

Example

Url: GET /api/information-stream?interval=60

The system will send its status every 60 seconds.

Response Events

  • info contains the current system information.
{
  "uuid": "21b00caa-00a1-4cb2-b972-f03891d79899",
  "os": {
    "id": "linuxmint",
    "type": "Linux Mint",
    "version": "20.3 (Una)"
  },
  "hostname": "massimo-PCX0DX",
  "title": "MeshCube v6.0.0.62",
  "version": "6.0.0.62",
  "system": {
    "code": "meshcube",
    "description": "MeshCube"
  },
  "license": {
    "type": "server",
    "serial": "bf06f871-f95e-482d-938d-dbd00b17658e",
    "description": "Server",
    "last_check": 1714394595,
    "is_expired": false,
    "expiry_date": 1715817600,
    "status": "valid",
    "created_on": 1713951573,
    "activated_on": 1713954907,
    "last_update": 1713951573,
    "update_number": 1,
    "valid_from": 1714393393,
    "maintenance_expiry": 1715817600,
    "match": 2,
    "properties": {
      "maps": 0,
      "anchors": 50,
      "tags": 0,
      "mesh_ips": true,
      "mesh_sense": true,
      "mesh_beacon": true,
      "automation": true
    },
    "error_code": 0
  },
  "timestamp": 1714394598573,
  "activated": true,
  "started_on": 1714394595,
  "uptime": {
    "days": 0,
    "hours": 0,
    "minutes": 0,
    "seconds": 2
  },
  "network": {
    "enp66s0": {
      "name": "enp66s0",
      "description": "enp66s0",
      "type": "Ethernet",
      "mac_address": "80:fa:5b:85:dc:c6",
      "status": "Up",
      "speed": 1000000,
      "address": {
        "ip": "192.168.1.210",
        "netmask": "255.255.255.0"
      },
      "gateway": "192.168.1.1",
      "dns": ["127.0.0.53"]
    },
    "wlp68s0": {
      "name": "wlp68s0",
      "description": "wlp68s0",
      "type": "Wireless80211",
      "mac_address": "a4:b1:c1:82:7c:92",
      "status": "Up",
      "speed": 1000000,
      "address": {
        "ip": "192.168.1.151",
        "netmask": "255.255.255.0"
      },
      "gateway": "192.168.1.1",
      "dns": ["127.0.0.53"]
    }
  },
  "processors": 16,
  "pressure": {
    "ram": 118,
    "pram": 0.1,
    "pcpu": 46.3
  }
}