Applications

API for communication with ZBOS by Zora Robotics.

Channels

zbos/applications/categories/get

PUB Get application categories

Get all application categories.

Channel tags
  • Applications

GetApplicationCategoriesRequest
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

Example of payload (generated)
{
  "key": "string",
  "language": "string"
}

zbos/applications/categories/get/response/\{key}

SUB Response: Get application categories

Channel tags
  • Applications

Array<ApplicationCategory>
Payload

Name

Type

Description

Accepted values

Message Payload

array (object)

Any

Message Payload. id

string

Any

Message Payload. name

string

Use name for a static name, or name_key for a translatable name

Any

Message Payload. name_key

string

Use name for a static name, or name_key for a translatable name

Any

Message Payload. weight

integer

Any

Examples of payload
{
  "id": "category_1",
  "name": "Category 1",
  "weight": 10
}
{
  "id": "category_2",
  "weight": 20,
  "name_key": "category_2_key"
}

zbos/applications/apps/get

PUB Get applications

Get all applications with optional filters.

Channel tags
  • Applications

GetApplicationsRequest
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

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": "abc",
  "limit": 20,
  "offset": 20,
  "filters": [
    {
      "field": "category_id",
      "value": "category_1",
      "operator": "and",
      "match_type": "exact"
    }
  ]
}

zbos/applications/apps/get/response/\{key}

SUB Response: Get applications

Channel tags
  • Applications

Array<Application>
Payload

Name

Type

Description

Accepted values

Message Payload

array (object)

Any

Message Payload. id

string

This could be a package name, or some other defined unique ID

Any

Message Payload. name

string

Use name for a static name, or name_key for a translatable name

Any

Message Payload. name_key

string

Use name for a static name, or name_key for a translatable name

Any

Message Payload. category_id

string

Any

Message Payload. weight

integer

Any

Message Payload. actions

array (object)

Any

Message Payload.actions. application_id

string

Any

Message Payload.actions. name

string

Use name for a static name, or name_key for a translatable name

Any

Message Payload.actions. name_key

string

Use name for a static name, or name_key for a translatable name

Any

Message Payload.actions. type

string

List of available actions: open: Opens an application handled by the RAILopen_control: Opens an application handled by the control settings: Opens the settings, handled by the control datasource: Edit the datasource, handled by the control other: Should be handled by the app itself

* open * open_control * settings * datasources * other

Message Payload.actions. data

object

Optional data that an action might need.

Any

Message Payload.actions. key

string

Any

Message Payload. optional

boolean

Adds this application to the list of optional apps, which determines if the app is shown to the user

Any

Message Payload. icon_uri

string

The path to an image on the robot or the url to an image

Any

Examples of payload
{
  "id": "com.zorabots.application.one",
  "name": "Application 1",
  "weight": 10,
  "actions": [
    {
      "name": "Open",
      "type": "open",
      "data": {
        "key1": "value1"
      },
      "valid": true,
      "application_id": "com.zorabots.application.one"
    },
    {
      "name": "Settings",
      "type": "settings",
      "valid": true,
      "application_id": "com.zorabots.application.one"
    },
    {
      "name": "Datasource",
      "type": "datasources",
      "valid": true,
      "application_id": "com.zorabots.application.one"
    }
  ],
  "optional": false,
  "category_id": "category_1"
}
{
  "id": "com.zorabots.application.two",
  "weight": 20,
  "actions": [
    {
      "type": "open",
      "data": {
        "key1": "value1"
      },
      "valid": true,
      "application_id": "com.zorabots.application.two",
      "name_key": "Open"
    },
    {
      "name": "Some other action",
      "type": "other",
      "data": {
        "key1": "value1"
      },
      "valid": true,
      "application_id": "com.zorabots.application.two"
    }
  ],
  "optional": false,
  "name_key": "application_2_key",
  "category_id": "category_1"
}

zbos/applications/apps/changed/event/\{app}

PUB Application changed

Fired when an app was added or changed.

Channel tags
  • Applications

Application
Payload

Name

Type

Description

Accepted values

id

string

This could be a package name, or some other defined unique ID

Any

name

string

Use name for a static name, or name_key for a translatable name

Any

name_key

string

Use name for a static name, or name_key for a translatable name

Any

category_id

string

Any

weight

integer

Any

actions

array (object)

Any

actions. application_id

string

Any

actions. name

string

Use name for a static name, or name_key for a translatable name

Any

actions. name_key

string

Use name for a static name, or name_key for a translatable name

Any

actions. type

string

List of available actions: open: Opens an application handled by the RAILopen_control: Opens an application handled by the control settings: Opens the settings, handled by the control datasource: Edit the datasource, handled by the control other: Should be handled by the app itself

* open * open_control * settings * datasources * other

actions. data

object

Optional data that an action might need.

Any

actions. key

string

Any

optional

boolean

Adds this application to the list of optional apps, which determines if the app is shown to the user

Any

icon_uri

string

The path to an image on the robot or the url to an image

Any

Examples of payload
{
  "id": "com.zorabots.application.one",
  "name": "Application 1",
  "weight": 10,
  "actions": [
    {
      "name": "Open",
      "type": "open",
      "data": {
        "key1": "value1"
      },
      "valid": true,
      "application_id": "com.zorabots.application.one"
    },
    {
      "name": "Settings",
      "type": "settings",
      "valid": true,
      "application_id": "com.zorabots.application.one"
    },
    {
      "name": "Datasource",
      "type": "datasources",
      "valid": true,
      "application_id": "com.zorabots.application.one"
    }
  ],
  "optional": false,
  "category_id": "category_1"
}

zbos/applications/icons/get

PUB Get application icon

Get the application icons for the passed application ID.

Channel tags
  • Applications

GetApplicationIconRequest
Payload

Name

Type

Description

Accepted values

key

string

Any

max_width

integer

Optional, can be used to decrease payload size

Any

max_height

integer

Optional, can be used to decrease payload size

Any

application_id

string

Any

Examples of payload
{
  "key": "abc",
  "valid": true,
  "max_width": 100,
  "max_height": 100,
  "application_id": "com.zorabots.application.one"
}

zbos/applications/icons/get/response/\{key}

SUB Response: Get application icon

Channel tags
  • Applications

ApplicationIcon
Payload

Name

Type

Description

Accepted values

application_id

string

Any

icon

string

Base 64 encoded PNG

Any

Examples of payload
{
  "icon": "{base64 encoded png}",
  "application_id": "com.zorabots.application.one"
}

zbos/applications/actions/start

PUB Start application action

Start an application action.

Channel tags
  • Applications

ApplicationAction
Payload

Name

Type

Description

Accepted values

application_id

string

Any

name

string

Use name for a static name, or name_key for a translatable name

Any

name_key

string

Use name for a static name, or name_key for a translatable name

Any

type

string

List of available actions: open: Opens an application handled by the RAILopen_control: Opens an application handled by the control settings: Opens the settings, handled by the control datasource: Edit the datasource, handled by the control other: Should be handled by the app itself

* open * open_control * settings * datasources * other

data

object

Optional data that an action might need.

Any

key

string

Any

Examples of payload
{
  "name": "Open",
  "type": "open",
  "data": {
    "key1": "value1"
  },
  "key": "some_key",
  "valid": true,
  "application_id": "com.zorabots.application.one"
}
{
  "name": "Settings",
  "type": "settings",
  "key": "some_key",
  "valid": true,
  "application_id": "com.zorabots.application.one"
}
{
  "name": "Datasource",
  "type": "datasources",
  "key": "some_key",
  "valid": true,
  "application_id": "com.zorabots.application.one"
}
{
  "name": "Some other action",
  "type": "other",
  "data": {
    "key1": "value1"
  },
  "key": "some_key",
  "valid": true,
  "application_id": "com.zorabots.application.one"
}

zbos/applications/actions/start/response/\{key}

SUB Response: Start application action

Channel tags
  • Applications

SuccessMessage

Success message

Payload

Name

Type

Description

Accepted values

success

boolean

Any

message

string

Optional error message

Any

Examples of payload
{
  "success": true
}

zbos/applications/registration/request

PUB Request application registrations

Request all apps to register themselves using the topics below.

Channel tags
  • Applications

EmptyMessage

Empty message

zbos/applications/registration/add

PUB Add application registration

Registers an application to the applications list. Should be executed every time the application is started.

Channel tags
  • Applications

RegisterApplicationRequest
Payload

Name

Type

Description

Accepted values

key

string

Any

application

object

Any

application. id

string

This could be a package name, or some other defined unique ID

Any

application. name

string

Use name for a static name, or name_key for a translatable name

Any

application. name_key

string

Use name for a static name, or name_key for a translatable name

Any

application. category_id

string

Any

application. weight

integer

Any

application. actions

array (object)

Any

application.actions. application_id

string

Any

application.actions. name

string

Use name for a static name, or name_key for a translatable name

Any

application.actions. name_key

string

Use name for a static name, or name_key for a translatable name

Any

application.actions. type

string

List of available actions: open: Opens an application handled by the RAILopen_control: Opens an application handled by the control settings: Opens the settings, handled by the control datasource: Edit the datasource, handled by the control other: Should be handled by the app itself

* open * open_control * settings * datasources * other

application.actions. data

object

Optional data that an action might need.

Any

application.actions. key

string

Any

application. optional

boolean

Adds this application to the list of optional apps, which determines if the app is shown to the user

Any

application. icon_uri

string

The path to an image on the robot or the url to an image

Any

Examples of payload
{
  "key": "abc",
  "application": {
    "id": "com.zorabots.application.one",
    "name": "Application 1",
    "weight": 10,
    "actions": [
      {
        "name": "Open",
        "type": "open",
        "data": {
          "key1": "value1"
        },
        "valid": true,
        "application_id": "com.zorabots.application.one"
      },
      {
        "name": "Settings",
        "type": "settings",
        "valid": true,
        "application_id": "com.zorabots.application.one"
      }
    ],
    "optional": false,
    "category_id": "category_1",
    "icon_uri": "/sdcard/zbos_media_library/background.jpg"
  },
  "valid": true
}
{
  "key": "def",
  "application": {
    "id": "com.zorabots.application.two",
    "name": "Application 2",
    "weight": 20,
    "actions": [
      {
        "name": "Open",
        "type": "open",
        "data": {
          "key1": "value1"
        },
        "valid": true,
        "application_id": "com.zorabots.application.two"
      },
      {
        "name": "Settings",
        "type": "settings",
        "valid": true,
        "application_id": "com.zorabots.application.two"
      }
    ],
    "optional": false,
    "category_id": "category_1",
    "icon_uri": "https://www.zorarobotics.be/sites/default/files/styles/desktop_fixed_height_1x/public/2020-05/zorabots-robot-james-web.png?itok=5kw5HYOg"
  },
  "valid": true
}
{
  "key": "ghi",
  "application": {
    "id": "com.zorabots.application.three",
    "name": "Application 3",
    "weight": 30,
    "actions": [
      {
        "name": "Open",
        "type": "open",
        "data": {
          "key1": "value1"
        },
        "valid": true,
        "application_id": "com.zorabots.application.three"
      },
      {
        "name": "Settings",
        "type": "settings",
        "valid": true,
        "application_id": "com.zorabots.application.three"
      }
    ],
    "optional": false,
    "category_id": "category_1"
  },
  "valid": true
}

zbos/applications/registration/add/response/\{key}

PUB Response: Add application registration

Channel tags
  • Applications

SuccessMessage

Success message

Payload

Name

Type

Description

Accepted values

success

boolean

Any

message

string

Optional error message

Any

Examples of payload
{
  "success": true
}

zbos/applications/registration/remove

PUB Remove application registration

Unregister an application from the applications list.

Channel tags
  • Applications

UnregisterApplicationRequest
Payload

Name

Type

Description

Accepted values

key

string

Any

id

string

Any

Examples of payload
{
  "key": "abc",
  "id": "com.zorabots.application.one",
  "valid": true
}

zbos/applications/registration/remove/response/\{key}

PUB Response: Remove application registration

Channel tags
  • Applications

SuccessMessage

Success message

Payload

Name

Type

Description

Accepted values

success

boolean

Any

message

string

Optional error message

Any

Examples of payload
{
  "success": true
}

zbos/applications/datasources/get

PUB Get the content of a specific application datasource file

Publish on this topic to get the content of a datasource Payload is json with a key for the response topic \{"key":aKey}

Channel tags
  • Applications

DatasourceGetRequest
Payload

Name

Type

Description

Accepted values

applicationName

string

Any

datasourceId

string

Any

Examples of payload
{
  "applicationName": "string",
  "datasourceId": "string",
  "valid": true
}

zbos/applications/datasources/get/response/\{key}

SUB Response: Get datasource

Will return a JSON string with the content of the datasource data file

Channel tags
  • Applications

String
Payload

Name

Type

Description

Accepted values

Message Payload

string

Any

Example of payload (generated)
"string"

zbos/applications/datasources/set

PUB Save the datasource

Publish on this topic to save the datasource data (changes) Payload is json with a key for the response topic \{"key":aKey} The Payload is a JSON string of an object with following keys: application name, datasource id and datasource data

Channel tags
  • Applications

DatasourceSetRequest
Payload

Name

Type

Description

Accepted values

applicationName

string

Any

datasourceId

string

Any

datasourceData

string

Any

Examples of payload
{
  "applicationName": "string",
  "datasourceId": "string",
  "datasourceData": "string",
  "valid": true
}

zbos/applications/datasources/set/response/\{key}

SUB Response: Datasource saved

A message object (with key 'success') is publish on this topic when the datasource has been saved

Channel tags
  • Applications

SuccessMessage

Success message

Payload

Name

Type

Description

Accepted values

success

boolean

Any

message

string

Optional error message

Any

Examples of payload
{
  "success": true
}