Bosch IoT Insights

Configuring the manifest file

Every widget must define an insights-manifest.json file (also called manifest file for short) which contains information like the widget name,
the configurations it will offer in the editor, and which other projects can access this widget.

→ Check for example the manifest file template for Angular here.

You need to configure the following important properties in this file:

  1. name: represents the name of the widget. The name cannot be empty and has to be unique within a given repository.

  2. allowedProjects: provides a list of projects which are allowed to use this widget. Leave it empty if you do not want to share the widget with other projects, and you can update this at any time as needed.

  3. file: defines the entry point of the web component.

  4. displayName: defines a human-readable display name of the widget. This will be used to show the widget in the editor list.

  5. description: provides a short description of the widget. This will be used to show the widget in the editor list.

  6. includeDataSourceConfig: when set to true, adds the data source block to the widget configurator. If set to false, the widget configurator will not include a data source configuration option.

  7. configProperties : defines configurable properties of the widget. Project admins will be able to use the widget editor view (see Examples below) to provide their own values for these properties. The supported property types are presented in the following table:

    Type

    Behavior

    Example

    string

    Provides a string input field in the widget editor.

    "name": {
    "type": "string",
    "label": {
    "en": "Name",
    "de": "Name"
    },
    "default": "name value"


    number

    Provides a numeric input field in the widget editor.

    "number": {
    "type": "number",
    "label": {
    "en": "Number",
    "de": "Number"
    },
    "default": 2
    }

    boolean

    Provides a checkbox editor in the widget editor.

    "isNameMandatory": {
    "type": "boolean",
    "default": true,
    "label": {
    "en": "Is name mandatory",
    "de": "Ist der Name obligatorisch?"
    }
    }

    map

    Provides a key-value editor in its own independent section.

    "map": {
    "label": {
    "en": "Country code",
    "de": "Landesvorwahl"
    },
    "type": "map"
    }

    iteratingPath

    Provides a drop-down with iterating paths of the configured data source.

    The iterating path index can be further modified.

    "iterating": {
    "type": "iteratingPath",
    "label": {
    "en": "Iterating path",
    "de": "Iterating path"
    }
    }

    staticPath

    Provides a drop-down with static paths of the configured data source.

    "myProperty": {
    "type": "staticPath",
    "label": {
    "en": "Static path",
    "de": "Static path"
    }
    }

    RestRequestDefinition

    Provides a REST request definition editor in its own independent section.

    "restCall": {
    "label": {
    "en": "My external rest request",
    "de": ""
    },
    "type": "RestRequestDefinition"
    }


  8. $schema: provides a reference to the schema file ( insights-manifest.schema.json ) which explains the schema of the insights-manifest.json file, such as the values accepted by the corresponding properties.

    Here is an example in the demo repository.

Examples from the UI

This section provides an example of how the configProperties listed in the table above will look in the widget configuration editor.

String

images/confluence/download/attachments/5189560897/name-version-1-modificationdate-1737025845000-api-v2.png

Number

images/confluence/download/attachments/5189560897/number-version-1-modificationdate-1737025845000-api-v2.png

Boolean

images/confluence/download/attachments/5189560897/boolean-version-1-modificationdate-1737025845000-api-v2.png

Map

images/confluence/download/attachments/5189560897/map-version-1-modificationdate-1737025845000-api-v2.png

Iterating path

images/confluence/download/attachments/5189560897/image-2024-12-19_15-8-30-version-1-modificationdate-1736761721000-api-v2.png

The iterating path index can be further modified as shown below.

images/confluence/download/attachments/5189560897/image-2024-12-19_15-12-1-version-1-modificationdate-1736761721000-api-v2.png


Static path

images/confluence/download/attachments/5189560897/image-2024-12-19_15-14-3-version-1-modificationdate-1736761721000-api-v2.png

Rest request definition

images/confluence/download/attachments/5189560897/image-2024-12-19_15-42-21-version-1-modificationdate-1736761721000-api-v2.png