Skip to content

Communication protocol

The API and the UI talk to each other using JSON and the communication protocol defines a set of a well-known objects.

As an exception, the execute operation can return RAW output instead of JSON.

Esmith db records

Objects passed to and returned by APIs must reflect esmith db format and respect the upper/lower case notation of property names:

  "name": "keyname",
  "type": "typename",
  "props": {
      "FirstProp": "FirstPropValue",

Please note that name and type field are reserved.


Host goofy inside the hosts database.

Original esmith db notation:

    Description=Goofy workstation

Equivalent JSON notation:

  "name": "goofy",
  "type": "local",
  "props": {
      "Description": "Goofy workstation",
      "IpAddress": ""


If invoked with -j option, the signal-event command outputs the event progress in JSON format.



Special fields:

  • steps: set the total number of event actions
  • step: identify the current running step
  • progress: percentage of event completion
  • status: can be success or failed in case of failure


A successful response has no special requirements and is defined by the application needs.

For instance, a success message could be an empty object {} or as simple as:

    "state": "success"


If something goes wrong, APIs must output a JSON object which describes the error reason.

For instance:

    "type": "Error",
    "message": "Generic error reason",
    "attributes": {
        "output": "output from the system"

The type field is mandatory. Its value is a string identifying the error type. See the "Well-known errors" section below.

The message property should be used if an error is not caused by a specific attribute. On the other hand, there could be cases where the attributes object is empty, or undefined because the error condition does not depend on any of the attributes or attributes are not defined at all.

Note that the same Error object could represent multiple failure reasons.

Well-known errors

The list of well-known errors includes:

  • validation
  • event failure
  • invalid input


Validation error:

  "type": "NotValid",
  "message": "Validation failed",
  "attributes": [
      "parameter": "name",
      "value": "test4",
      "error": "valid_hostname_fqdn"

Event failure

Event has failed:

  "type": "EventFailed",
  "message": "See /var/log/messages"

Invalid input

Invalid JSON object input:

  "type": "InvalidInput",
  "message": "No JSON data available"


Configuration suggestions displayed inside the UI. An hint must always contain the following fields:

  • count: the count of hints for the module, 0 means no hints
  • message: if the hint is not bounded to a specific field, a general message for the module
  • link: a link to external documentation
  • details: contains hints specific to one ore more property. Object format: <prop_name>:<message>

Unused field should be set to null

Example of simple hint:

  "count": 1,
  "details": null,
  "message": "must_configure_backup_data",
  "link": ""

Example of multiple hint:

  "count": 2,
  "details": {
    "snmpd": "service_not_consistent",
    "smartd": "service_not_consistent"
  "message": null,
  "link": null