Monitoring

API for communication with ZBOS by Zora Robotics.

Channels

zbos/monitoring/event/\{source}/\{type}

SUB Monitoring event

Channel tags
  • Monitoring

MonitoringEvent
Payload

Name

Type

Description

Accepted values

id

string

Mandatory for delete. A unique ID for the event

Any

sourceId

string

Optional. Monitoring source on cloud to associate this event to

Any

appId

string

Optional. The application id to which the event belongs to

Any

type

string

Mandatory. The type of event this is, no dots allowed

Any

source

string

Mandatory. What device produced this event, no dots allowed

Any

sourceLabel

string

Optional. Human-readable label for events of this type, used if no monitoring service exists for this event

Any

timestamp

number

Optional. The time at which the event occurred in unix seconds

Any

value

string

Optional. A value relating to the event such as a temperature

Any

data

object

Optional. Extra data related to the event

Any

unit

string

Optional. The type of unit the value is expressed in such as °C

Any

alarms

array (object)

Optional. Alarms attached to this event

Any

alarms. type

string

Mandatory. The type of alarm

* ItemOmission * ItemCommission * ServiceOmission * ServiceCommission * TransientServiceOmission * TransientServiceCommission * EarlyServiceOmission * LateServiceCommission * EarlyServiceStart * LateServiceStart * BoundedOmissionInterval * UndetectableValueError * BelowRange * AboveRange * BoundedValueChange * StuckValue * OutOfBounds * OutOfOrder * OutOfCalibration * EarlyDelivery * LateDelivery * HighRate * LowRate * RateJitter * EarlyService * DelayedService * SymmetricReplicationError * AsymmetricApproximateValue * AsymmetricExactValue * AsymmetricItemOmission * AsymmetricServiceOmission * AsymmetricTiming * ReadWriteRace * WriteWriteRace * Deadlock * Starvation * AuthorizationError * AuthenticationError

alarms. severity

integer

Mandatory. How critical the alarm is

Any

alarms. persist

boolean

Mandatory. If this is an ongoing alarm

Any

alarms. timestamp

number

Mandatory. When the alarm initially started

Any

alarms. message

string

Optional. A message associated with this alarm such as an error message

Any

files

array (string)

Optional. List of cloud file IDs attached to this event

Any

Example of payload (generated)
{
  "id": "string",
  "sourceId": "string",
  "appId": "string",
  "type": "string",
  "source": "string",
  "sourceLabel": "string",
  "timestamp": 0,
  "value": "string",
  "data": {},
  "unit": "string",
  "alarms": [
    {
      "type": "ItemOmission",
      "severity": 0,
      "persist": true,
      "timestamp": 0,
      "message": "string"
    }
  ],
  "files": [
    "string"
  ]
}

zbos/monitoring/list/get

PUB Get monitoring events

Channel tags
  • Monitoring

FilteringRequest
Payload

Name

Type

Description

Accepted values

key

string

Any

limit

integer

Any

offset

integer

Any

filters

array (object)

Any

filters. field

string

Field to check on. Note that the field should be camelCase, not snake_case

Any

filters. value

string

Value to check on. For numbers you should use 'min' and 'max'.

Any

filters. min

number

Minimum value, only usable for number fields

Any

filters. max

number

Maximum value, only usable for number fields

Any

filters. direction

string

Direction to sort on. Can be 'asc' or 'desc'. The default direction is 'asc'

* asc * desc

filters. operator

string

Operator for either the child filters, or this filter object itself. Can be 'and', 'or' or 'not'. Default is 'and'. The root operator is always 'and'

* and * or * not

filters. match_type

string

Match type for string values. Can be 'exact', 'contains', 'starts_with', 'ends_with'. The default match_type is 'contains'

* exact * contains * starts_with * ends_with

filters. filters

array (object)

Filters on which the operator will be applied. If there are no child filters, the operator will be applied to the filter object itself.

Any

filters. field_filters

array (object)

Filters to apply on the child fields of the field. Will only work if the field is an object, array/list or map.

Any

sort

array (object)

Any

sort. field

string

Field to check on. Note that the field should be camelCase, not snake_case

Any

sort. value

string

Value to check on. For numbers you should use 'min' and 'max'.

Any

sort. min

number

Minimum value, only usable for number fields

Any

sort. max

number

Maximum value, only usable for number fields

Any

sort. direction

string

Direction to sort on. Can be 'asc' or 'desc'. The default direction is 'asc'

* asc * desc

sort. operator

string

Operator for either the child filters, or this filter object itself. Can be 'and', 'or' or 'not'. Default is 'and'. The root operator is always 'and'

* and * or * not

sort. match_type

string

Match type for string values. Can be 'exact', 'contains', 'starts_with', 'ends_with'. The default match_type is 'contains'

* exact * contains * starts_with * ends_with

sort. filters

array (object)

Filters on which the operator will be applied. If there are no child filters, the operator will be applied to the filter object itself.

Any

sort. field_filters

array (object)

Filters to apply on the child fields of the field. Will only work if the field is an object, array/list or map.

Any

language

string

Optional. Set the language to have all translations filled in. The language format is ISO 639-1 language code, Eg: 'en' or 'en-US'

Any

Examples of payload
{
  "key": "Test123",
  "limit": 50,
  "offset": 10,
  "filters": [
    {
      "operator": "or",
      "match_type": "contains"
    },
    {
      "field": "type",
      "value": "image",
      "operator": "and",
      "match_type": "contains"
    },
    {
      "field": "date",
      "operator": "and",
      "match_type": "contains"
    }
  ],
  "sort": [
    {
      "field": "extension",
      "operator": "and",
      "match_type": "contains"
    },
    {
      "field": "name",
      "operator": "and",
      "match_type": "contains"
    }
  ]
}

zbos/monitoring/list/get/response/\{key}

SUB response: Get monitoring events

Channel tags
  • Monitoring

Array<MonitoringEvent>
Payload

Name

Type

Description

Accepted values

Message Payload

array (object)

Any

Message Payload. id

string

Mandatory for delete. A unique ID for the event

Any

Message Payload. sourceId

string

Optional. Monitoring source on cloud to associate this event to

Any

Message Payload. appId

string

Optional. The application id to which the event belongs to

Any

Message Payload. type

string

Mandatory. The type of event this is, no dots allowed

Any

Message Payload. source

string

Mandatory. What device produced this event, no dots allowed

Any

Message Payload. sourceLabel

string

Optional. Human-readable label for events of this type, used if no monitoring service exists for this event

Any

Message Payload. timestamp

number

Optional. The time at which the event occurred in unix seconds

Any

Message Payload. value

string

Optional. A value relating to the event such as a temperature

Any

Message Payload. data

object

Optional. Extra data related to the event

Any

Message Payload. unit

string

Optional. The type of unit the value is expressed in such as °C

Any

Message Payload. alarms

array (object)

Optional. Alarms attached to this event

Any

Message Payload.alarms. type

string

Mandatory. The type of alarm

* ItemOmission * ItemCommission * ServiceOmission * ServiceCommission * TransientServiceOmission * TransientServiceCommission * EarlyServiceOmission * LateServiceCommission * EarlyServiceStart * LateServiceStart * BoundedOmissionInterval * UndetectableValueError * BelowRange * AboveRange * BoundedValueChange * StuckValue * OutOfBounds * OutOfOrder * OutOfCalibration * EarlyDelivery * LateDelivery * HighRate * LowRate * RateJitter * EarlyService * DelayedService * SymmetricReplicationError * AsymmetricApproximateValue * AsymmetricExactValue * AsymmetricItemOmission * AsymmetricServiceOmission * AsymmetricTiming * ReadWriteRace * WriteWriteRace * Deadlock * Starvation * AuthorizationError * AuthenticationError

Message Payload.alarms. severity

integer

Mandatory. How critical the alarm is

Any

Message Payload.alarms. persist

boolean

Mandatory. If this is an ongoing alarm

Any

Message Payload.alarms. timestamp

number

Mandatory. When the alarm initially started

Any

Message Payload.alarms. message

string

Optional. A message associated with this alarm such as an error message

Any

Message Payload. files

array (string)

Optional. List of cloud file IDs attached to this event

Any

Example of payload (generated)
[
  {
    "id": "string",
    "sourceId": "string",
    "appId": "string",
    "type": "string",
    "source": "string",
    "sourceLabel": "string",
    "timestamp": 0,
    "value": "string",
    "data": {},
    "unit": "string",
    "alarms": [
      {
        "type": "ItemOmission",
        "severity": 0,
        "persist": true,
        "timestamp": 0,
        "message": "string"
      }
    ],
    "files": [
      "string"
    ]
  }
]

zbos/monitoring/registration/request

SUB Request monitoring registrations

Request all monitoring services to register themselves using the topics below.

Channel tags
  • Monitoring

EmptyMessage

Empty message

zbos/monitoring/add

PUB Add monitoring source

Add monitoring source with their default values and extra settings. Settings can be retrieved using the settings API, see zbos/settings/get

Channel tags
  • Monitoring

AddMonitoringServiceRequest
Payload

Name

Type

Description

Accepted values

key

string

Any

service

object

Any

service. appId

string

Optional. The application id of this monitoring service

Any

service. source

string

Mandatory. The source of this monitoring service

Any

service. type

string

Mandatory. The type of this monitoring service

Any

service. label

string

Optional. Human-readable label

Any

service. unit

string

Optional. The unit of the monitoring events in this service

Any

service. default_settings

object

Optional. Any default settings to be overridden

Any

service.default_settings. enabled

boolean

Any

service.default_settings. storage_type

string

* disk * memory

service.default_settings. persistence_type

string

* hours * days * weeks * months * items

service.default_settings. persistence_value

integer

Any

service.default_settings. cloud_sync

boolean

Any

service.default_settings. push_notifications

boolean

Any

service.default_settings. email_notifications

boolean

Any

service. hidden_default_settings

array (string)

Optional. Hide certain default settings so the user can't change it

Any

service. extraSettings

object

Optional. Any extra settings to be registered

Any

Examples of payload
{
  "key": "some_key",
  "service": {
    "appId": "camera_mask_app",
    "source": "camera",
    "type": "mask",
    "label": "Mask detection",
    "extraSettings": {
      "some_setting": {
        "type": "boolean",
        "default_value": "true",
        "label_key": "some_setting"
      }
    },
    "options": {
      "appId": "camera_mask_app",
      "source": "camera",
      "type": "mask",
      "uniqueKey": "camera_mask_app.camera.mask",
      "defaultName": "Camera_mask_app camera mask"
    },
    "default_settings": {
      "enabled": true,
      "storage_type": "disk",
      "persistence_type": "days",
      "persistence_value": 7
    }
  }
}

zbos/monitoring/add/response/\{key}

SUB Response: Add monitoring source

Channel tags
  • Monitoring

SuccessMessage

Success message

Payload

Name

Type

Description

Accepted values

success

boolean

Any

message

string

Optional error message

Any

Examples of payload
{
  "success": true
}

zbos/monitoring/get

PUB Get monitoring sources

Channel tags
  • Monitoring

GetMonitoringOptions
Payload

Name

Type

Description

Accepted values

key

string

Any

appId

string

Any

source

string

Any

type

string

Any

Examples of payload
{
  "key": "some_key",
  "appId": "some_app_id",
  "uniqueKey": "some_app_id.null.null",
  "defaultName": "Some_app_id null null"
}
{
  "key": "some_key",
  "source": "some_source",
  "type": "some_type",
  "uniqueKey": "some_source.some_type",
  "defaultName": "Some_source some_type"
}

zbos/monitoring/get/response/\{key}

SUB Response: Get monitoring source

Channel tags
  • Monitoring

Array<MonitoringSource>
Payload

Name

Type

Description

Accepted values

Message Payload

array (object)

Any

Message Payload. id

string

Any

Message Payload. cloudId

string

Any

Message Payload. appId

string

Any

Message Payload. source

string

Any

Message Payload. type

string

Any

Message Payload. label

string

Any

Message Payload. unit

string

Any

Example of payload (generated)
[
  {
    "id": "string",
    "cloudId": "string",
    "appId": "string",
    "source": "string",
    "type": "string",
    "label": "string",
    "unit": "string"
  }
]

zbos/monitoring/event/add

PUB Add a new event

Channel tags
  • Monitoring

AddMonitoringEventRequest
Payload

Name

Type

Description

Accepted values

key

string

Any

event

object

Mandatory

Any

event. id

string

Mandatory for delete. A unique ID for the event

Any

event. sourceId

string

Optional. Monitoring source on cloud to associate this event to

Any

event. appId

string

Optional. The application id to which the event belongs to

Any

event. type

string

Mandatory. The type of event this is, no dots allowed

Any

event. source

string

Mandatory. What device produced this event, no dots allowed

Any

event. sourceLabel

string

Optional. Human-readable label for events of this type, used if no monitoring service exists for this event

Any

event. timestamp

number

Optional. The time at which the event occurred in unix seconds

Any

event. value

string

Optional. A value relating to the event such as a temperature

Any

event. data

object

Optional. Extra data related to the event

Any

event. unit

string

Optional. The type of unit the value is expressed in such as °C

Any

event. alarms

array (object)

Optional. Alarms attached to this event

Any

event.alarms. type

string

Mandatory. The type of alarm

* ItemOmission * ItemCommission * ServiceOmission * ServiceCommission * TransientServiceOmission * TransientServiceCommission * EarlyServiceOmission * LateServiceCommission * EarlyServiceStart * LateServiceStart * BoundedOmissionInterval * UndetectableValueError * BelowRange * AboveRange * BoundedValueChange * StuckValue * OutOfBounds * OutOfOrder * OutOfCalibration * EarlyDelivery * LateDelivery * HighRate * LowRate * RateJitter * EarlyService * DelayedService * SymmetricReplicationError * AsymmetricApproximateValue * AsymmetricExactValue * AsymmetricItemOmission * AsymmetricServiceOmission * AsymmetricTiming * ReadWriteRace * WriteWriteRace * Deadlock * Starvation * AuthorizationError * AuthenticationError

event.alarms. severity

integer

Mandatory. How critical the alarm is

Any

event.alarms. persist

boolean

Mandatory. If this is an ongoing alarm

Any

event.alarms. timestamp

number

Mandatory. When the alarm initially started

Any

event.alarms. message

string

Optional. A message associated with this alarm such as an error message

Any

event. files

array (string)

Optional. List of cloud file IDs attached to this event

Any

Examples of payload
{
  "key": "some_key",
  "event": {
    "appId": "SampleApplication",
    "type": "SomeType",
    "source": "SomeSource",
    "timestamp": 1349333576093,
    "data": {},
    "files": [],
    "valid": true,
    "options": {
      "appId": "SampleApplication",
      "source": "SomeSource",
      "type": "SomeType",
      "uniqueKey": "SampleApplication.SomeSource.SomeType",
      "defaultName": "SampleApplication SomeSource SomeType"
    }
  }
}

zbos/monitoring/event/add/response/\{key}

SUB response: Add a new event

Channel tags
  • Monitoring

SuccessMessage

Success message

Payload

Name

Type

Description

Accepted values

success

boolean

Any

message

string

Optional error message

Any

Examples of payload
{
  "success": true
}

zbos/monitoring/event/delete

PUB Delete an event

Channel tags
  • Monitoring

RemoveMonitoringEvent
Payload

Name

Type

Description

Accepted values

id

string

Mandatory. A unique ID for the event

Any

appId

string

Optional. The application id to which the event belongs to

Any

type

string

Optional. The type of event this is, no dots allowed

Any

source

string

Optional. What device produced this event, no dots allowed

Any

Examples of payload
{
  "id": "some_id",
  "type": "SomeType",
  "source": "SomeSource",
  "options": {
    "source": "SomeSource",
    "type": "SomeType",
    "uniqueKey": "SomeSource.SomeType",
    "defaultName": "SomeSource SomeType"
  }
}
{
  "id": "some_id",
  "options": {
    "uniqueKey": "null.null",
    "defaultName": "Null null"
  }
}
{
  "id": "some_id",
  "type": "SomeType",
  "options": {
    "type": "SomeType",
    "uniqueKey": "null.SomeType",
    "defaultName": "Null SomeType"
  }
}

zbos/monitoring/event/delete/event

SUB event: Delete an event

Channel tags
  • Monitoring

MonitoringResponse
Payload

Name

Type

Description

Accepted values

key

string

The key used by the add request

Any

success

boolean

Did the operation succeed

Any

id

string

The ID of the new event

Any

Example of payload (generated)
{
  "key": "string",
  "success": true,
  "id": "string"
}

zbos/monitoring/sync/datapoints/get

PUB Fetch all available data points for being used in a sync mapping.

Channel tags
  • Monitoring

AvailableDataPointsRequest
Payload

Name

Type

Description

Accepted values

key

string

Any

language

string

Optional. Set the language to have all translations filled in. The language format is ISO 639-1 language code, Eg: 'en' or 'en-US'

Any

Examples of payload
{
  "local": [
    {
      "id": "local_data_point_id_1",
      "appId": "modbus",
      "source": "142",
      "unit": "%"
    },
    {
      "id": "local_data_point_id_2",
      "appId": "modbus",
      "source": "180",
      "unit": "W"
    }
  ],
  "remote": [
    {
      "pointId": "point_1",
      "name": "State of Charge",
      "remoteSyncerId": "remote_1",
      "unit": "%",
      "frequency": "One_Minute"
    },
    {
      "pointId": "point_2",
      "name": "Battery Power",
      "remoteSyncerId": "remote_1",
      "unit": "W",
      "frequency": "One_Minute"
    },
    {
      "pointId": "point_3",
      "name": "State of Charge",
      "remoteSyncerId": "remote_2",
      "unit": "%",
      "frequency": "One_Minute"
    }
  ]
}

zbos/monitoring/sync/datapoints/get/response/\{key}

SUB response: Fetch all available data points for being used in a sync mapping.

Channel tags
  • Monitoring

AvailableDataPoints
Payload

Name

Type

Description

Accepted values

local

array (object)

Any

local. id

string

Any

local. appId

string

Any

local. source

string

Any

local. unit

string

Any

remote

array (object)

Any

remote. pointId

string

Any

remote. name

string

Any

remote. remoteSyncerId

string

Any

remote. unit

string

Any

remote. frequency

string

How often this data should be uploaded to the remote service

Any

Example of payload (generated)
{
  "local": [
    {
      "id": "string",
      "appId": "string",
      "source": "string",
      "unit": "string"
    }
  ],
  "remote": [
    {
      "pointId": "string",
      "name": "string",
      "remoteSyncerId": "string",
      "unit": "string",
      "frequency": "string"
    }
  ]
}

zbos/monitoring/sync/mapping/get

PUB Fetch the current active sync mapping.

Channel tags
  • Monitoring

KeyResult

Random key

Payload

Name

Type

Description

Accepted values

key

string

Required random key

Any

Examples of payload
{
  "key": "ABCxyz"
}

zbos/monitoring/sync/mapping/get/response/\{key}

SUB response: Fetch the current active sync mapping.

Channel tags
  • Monitoring

LocalRemoteMapping
Payload

Name

Type

Description

Accepted values

id

string

Any

local

object

Any

local. id

string

Any

local. appId

string

Any

local. source

string

Any

local. unit

string

Any

remotes

array (object)

Any

remotes. pointId

string

Any

remotes. name

string

Any

remotes. remoteSyncerId

string

Any

remotes. unit

string

Any

remotes. frequency

string

How often this data should be uploaded to the remote service

Any

Example of payload (generated)
{
  "id": "string",
  "local": {
    "id": "string",
    "appId": "string",
    "source": "string",
    "unit": "string"
  },
  "remotes": [
    {
      "pointId": "string",
      "name": "string",
      "remoteSyncerId": "string",
      "unit": "string",
      "frequency": "string"
    }
  ]
}

zbos/monitoring/sync/mapping/set

PUB Update the current active sync mapping.

Channel tags
  • Monitoring

SyncMappingUpdateRequest
Payload

Name

Type

Description

Accepted values

key

string

Any

update

array (object)

Any

update. id

string

Any

update. local

object

Any

update.local. id

string

Any

update.local. appId

string

Any

update.local. source

string

Any

update.local. unit

string

Any

update. remotes

array (object)

Any

update.remotes. pointId

string

Any

update.remotes. name

string

Any

update.remotes. remoteSyncerId

string

Any

update.remotes. unit

string

Any

update.remotes. frequency

string

How often this data should be uploaded to the remote service

Any

delete

array (object)

Any

delete. id

string

Any

delete. local

object

Any

delete.local. id

string

Any

delete.local. appId

string

Any

delete.local. source

string

Any

delete.local. unit

string

Any

delete. remotes

array (object)

Any

delete.remotes. pointId

string

Any

delete.remotes. name

string

Any

delete.remotes. remoteSyncerId

string

Any

delete.remotes. unit

string

Any

delete.remotes. frequency

string

How often this data should be uploaded to the remote service

Any

Examples of payload
{
  "key": "some_key",
  "update": [
    {
      "id": "567",
      "local": {
        "id": "local_data_point_id_2",
        "appId": "modbus",
        "source": "180",
        "unit": "W"
      },
      "remotes": [
        {
          "pointId": "point_5",
          "name": "Battery Power",
          "remoteSyncerId": "remote_1",
          "unit": "W",
          "frequency": "One_Minute"
        }
      ]
    }
  ],
  "delete": [
    {
      "id": "123",
      "local": {
        "id": "local_data_point_id_1",
        "appId": "modbus",
        "source": "142",
        "unit": "%"
      },
      "remotes": [
        {
          "pointId": "point_1",
          "name": "State of Charge",
          "remoteSyncerId": "remote_1",
          "unit": "%",
          "frequency": "One_Minute"
        },
        {
          "pointId": "point_3",
          "name": "State of Charge",
          "remoteSyncerId": "remote_2",
          "unit": "%",
          "frequency": "One_Minute"
        }
      ]
    }
  ]
}

zbos/monitoring/sync/mapping/set/response/\{key}

SUB response: Fetch the current active sync mapping.

Channel tags
  • Monitoring

SuccessMessage

Success message

Payload

Name

Type

Description

Accepted values

success

boolean

Any

message

string

Optional error message

Any

Examples of payload
{
  "success": true
}