These docs are for v7.1.0. Click to read the latest docs for v7.6.0.

Configuration v1 REST APIs

This page describes the configuration v1 rest APIs.

REST APIs

The ESF configuration service REST APIs are exposed by the com.eurotech.framework.rest.configuration bundle, providing the following REST APIs under the /configuration/v1 path:

MethodPathRoles AllowedEncodingRequest ParametersDescription
GET/factoryComponentsconfigurationJSONNoneThe method lists all the FactoryComponents Pids tracked by the ConfigurationService
POST/factoryComponentsconfigurationJSONFactoryComponentConfiguration objectCreates a new ConfigurableComponent instance by creating a new configuration from a Configuration Admin factory.
The FactoryComponentConfiguration object passed as request parameter will provide all the information needed to generate the instance. It links the factory Pid to be used, the target instance Pid, the properties to be used when creating the instance, and if the request should be persisted with a snapshot.
DELETE/factoryComponents/{pid}? takeSnapshot ={takeSnapshot}configurationJSONpid = A String representing the pid of the instance generated by a Factory Component that needs to deleted

takeSnapshot = an optional (default false) boolean to specify if a new snapshot needs to be created after the delete operation
For the specified Pid and optional takeSnapshot query parameter, the ConfigurationService instance will delete the corresponding ConfigurableComponent instance.
GET/configurableComponentsconfigurationJSONNoneLists the tracked configurable component Pids
GET/configurableComponents/configurationsconfigurationJSONNoneLists all the component configurations of all the ConfigurableComponents tracked by the ConfigurationService
GET/configurableComponents/configurations/byFilter/{filter}configurationJSONfilter = A String representing an OSGi filterLists the component configurations of all the ConfigurableComponents tracked by the ConfigurationService that match the filter specified
GET/configurableComponents/configurations/byPid/{pid}configurationJSONpid = A String representing the pid of a configurable component instanceProvides the ComponentConfiguration of the ConfigurableComponent matching the specified Pid
GET/configurableComponents/configurations/byPid/{pid}/_defaultconfigurationJSONpid = A String representing the pid of a configurable component instanceProvides the default Component Configuration for the component identified by the specified Pid
POST/configurableComponents/configurations/byPid/{pid}/_updateconfigurationJSONpid = A String representing the pid of a configurable component instance

ComponentConfigurationUpdateRequest = the updated configuration provided in the request body
Allows to update the component configuration identified by the provided PID
POST/configurableComponents/configurations/_updateconfigurationJSONcomponentConfigurations = the list of updated configurations provided in the request bodyAllows to update the configuration of multiple configurable components
GET/snapshotsconfigurationJSONNoneLists all the available snapshot IDs managed by the framework
GET/snapshots/{id}configurationJSONid = the snapshot IdReturns the content of a given snapshot tracked by the framework.
POST/snapshots/_writeconfigurationJSONNoneTriggers the framework to take and persist a snapshot.
POST/snapshots/_rollbackconfigurationJSONNoneRollbacks the framework to the last saved snapshot if available.
POST/snapshots/{id}/_rollbackconfigurationJSONid = the snapshot IdRollbacks the framework to the snapshot identified by the provided ID
POST/snapshots/_uploadconfigurationConsumes: XMLFramework snapshot in XML form provided in the request bodyUploads a snapshot. The framework will update the component(s) configuration accordingly to the configurations received.

/factoryComponents | GET

Request

URL: https://<gateway-ip>/services/configuration/v1/factoryComponents

Response

[
    "org.eclipse.kura.wire.Conditional",
    "org.eclipse.kura.cloudconnection.raw.mqtt.publisher.RawMqttPublisher",
    "org.eclipse.kura.misc.cloudcat.CloudCat",
    "org.eclipse.kura.core.db.H2DbServer",
    "org.eclipse.kura.wire.Fifo",
    "org.eclipse.kura.cloudconnection.raw.mqtt.cloud.RawMqttCloudEndpoint",
    "org.eclipse.kura.core.keystore.FilesystemKeystoreServiceImpl",
    "org.eclipse.kura.cloud.publisher.CloudPublisher",
    "org.eclipse.kura.core.db.H2DbService",
    "org.eclipse.kura.wire.CloudSubscriber",
    "org.eclipse.kura.wire.RegexFilter",
    "org.eclipse.kura.wire.Logger",
    "org.eclipse.kura.wire.Timer",
    "com.eurotech.framework.log.manager.LogManager",
    "com.eurotech.framework.log.journald.wire.JournaldWireComponent",
    "org.eclipse.kura.cloudconnection.raw.mqtt.subscriber.RawMqttSubscriber",
    "org.eclipse.kura.cloud.subscriber.CloudSubscriber",
    "org.eclipse.kura.ssl.SslManagerService",
    "org.eclipse.kura.core.data.transport.mqtt.MqttDataTransport",
    "com.eurotech.framework.log.journald.JournaldLogReader",
    "org.eclipse.kura.provisioning.ProvisioningService",
    "org.eclipse.kura.wire.CloudPublisher",
    "org.eclipse.kura.wire.H2DbWireRecordFilter",
    "org.eclipse.kura.cloud.CloudService",
    "org.eclipse.kura.data.DataService",
    "org.eclipse.kura.wire.H2DbWireRecordStore",
    "org.eclipse.kura.wire.Join",
    "com.eurotech.framework.log.publisher.LogPublisher"
]

/factoryComponents | POST

Request

URL: https://<gateway-ip>/services/configuration/v1/factoryComponents
Request Body:

{
    "factoryPid": "org.eclipse.kura.core.db.H2DbServer",
    "pid": "myH2DbServer",
    "properties" : [],
    "takeSnapshot" : false
}

The request must be provided with the following elements:

  • factoryPid: the factory used to generate the new instance
  • pid: the new instance process id
  • properties: eventual properties that will be used to instantiate the new instance and will override the defaults. A list of string, object pair is needed and can be optionally empty.
  • takeSnapshot: specifies if after the creation of a new component a snapshot needs to be taken.

/factoryComponents | DELETE

Request

URL: https://<gateway-ip>/services/configuration/v1/factoryComponents/{pid}?takeSnapshot={takeSnapshot}

  • takeSnapshot: can be either true or false. If set to true, after the deletion, the framework will take a snapshot.

/configurableComponents | GET

Request

URL: https://<gateway-ip>/services/configuration/v1/configurableComponents

Response

[
    "org.eclipse.kura.clock.ClockService",
    "org.eclipse.kura.net.admin.NetworkConfigurationService",
    "org.eclipse.kura.position.PositionService",
    "com.eurotech.framework.internal.ansible.provider.AnsibleServiceImpl",
    "org.eclipse.kura.internal.useradmin.store.RoleRepositoryStoreImpl",
    "com.eurotech.framework.internal.ansible.cloud.AnsibleActivityHandler",
    "default.diagnostic.publisher",
    "org.eclipse.kura.net.admin.FirewallConfigurationService",
    "com.eurotech.framework.internal.fail2ban.Fail2BanConfigurator",
    "default.log.publisher",
    "org.eclipse.kura.wire.graph.WireGraphService",
    "com.eurotech.framework.internal.floodingprotection.FloodingProtectionConfigurator",
    "org.eclipse.kura.ssl.SslManagerService",
    "org.eclipse.kura.http.server.manager.HttpService",
    "org.eclipse.kura.cloud.app.command.CommandCloudApp",
    "default.ping.publisher",
    "org.eclipse.kura.db.H2DbService",
    "com.eurotech.framework.diagnostics.DiagnosticsService",
    "org.eclipse.kura.core.data.transport.mqtt.MqttDataTransport",
    "org.eclipse.kura.deployment.agent",
    "DMKeystore",
    "LogReaderJournald",
    "default.alert.publisher",
    "org.eclipse.kura.core.deployment.CloudDeploymentHandlerV2",
    "HttpsKeystore",
    "com.eurotech.framework.security.aide.AideTamperDetectionServiceConfigurator",
    "org.eclipse.kura.provisioning.ProvisioningService",
    "LogManagerAuth",
    "com.eurotech.framework.security.journald.fss.FssTamperDetectionServiceConfigurator",
    "org.eclipse.kura.watchdog.WatchdogService",
    "org.eclipse.kura.cloud.CloudService",
    "LogManagerActivity",
    "org.eclipse.kura.data.DataService",
    "LogManagerDefault",
    "org.eclipse.kura.web.Console",
    "SSLKeystore",
    "com.eurotech.framework.net.vpn.client.VpnClient",
    "org.eclipse.kura.internal.rest.provider.RestService",
    "com.eurotech.framework.reboot.RebootService"
]

/configurableComponents/configurations | GET

Request

URL: https://<gateway-ip>/services/configuration/v1/configurableComponents/configurations

Response

[
    {
        "pid": "org.eclipse.kura.clock.ClockService",
        "definition": {
            "ad": [
                {
                    "option": [],
                    "name": "enabled",
                    "description": "Whether or not to enable the ClockService",
                    "id": "enabled",
                    "type": "BOOLEAN",
                    "cardinality": 0,
                    "_default": "true",
                    "required": true,
                    "otherAttributes": {}
                },
                {
                    "option": [],
                    "name": "clock.set.hwclock",
                    "description": "Whether or not to sync the system hardware clock after the system time gets set",
                    "id": "clock.set.hwclock",
                    "type": "BOOLEAN",
                    "cardinality": 0,
                    "_default": "true",
                    "required": true,
                    "otherAttributes": {}
                },
                {
                    "option": [
                        {
                            "label": "java-ntp",
                            "value": "java-ntp",
                            "otherAttributes": {}
                        },
                        {
                            "label": "ntpd",
                            "value": "ntpd",
                            "otherAttributes": {}
                        },
                        {
                            "label": "chrony-advanced",
                            "value": "chrony-advanced",
                            "otherAttributes": {}
                        }
                    ],
                    "name": "clock.provider",
                    "description": "Source for setting the system clock. Verify the availabiliy of the selected provider before activate it.",
                    "id": "clock.provider",
                    "type": "STRING",
                    "cardinality": 0,
                    "_default": "java-ntp",
                    "required": true,
                    "otherAttributes": {}
                },
                {
                    "option": [],
                    "name": "clock.ntp.host",
                    "description": "The hostname that provides the system time via NTP",
                    "id": "clock.ntp.host",
                    "type": "STRING",
                    "cardinality": 0,
                    "_default": "0.pool.ntp.org",
                    "required": true,
                    "otherAttributes": {}
                },
                {
                    "option": [],
                    "name": "clock.ntp.port",
                    "description": "The port number that provides the system time via NTP",
                    "id": "clock.ntp.port",
                    "type": "INTEGER",
                    "cardinality": 0,
                    "min": "1",
                    "max": "65535",
                    "_default": "123",
                    "required": true,
                    "otherAttributes": {}
                },
                {
                    "option": [],
                    "name": "clock.ntp.timeout",
                    "description": "The NTP timeout in milliseconds",
                    "id": "clock.ntp.timeout",
                    "type": "INTEGER",
                    "cardinality": 0,
                    "min": "1000",
                    "_default": "10000",
                    "required": true,
                    "otherAttributes": {}
                },
                {
                    "option": [],
                    "name": "clock.ntp.max-retry",
                    "description": "The maximum number of retries for the initial synchronization (with interval clock.ntp.retry.interval). If set to 0 the service will retry forever.",
                    "id": "clock.ntp.max-retry",
                    "type": "INTEGER",
                    "cardinality": 0,
                    "min": "0",
                    "_default": "0",
                    "required": true,
                    "otherAttributes": {}
                },
                {
                    "option": [],
                    "name": "clock.ntp.retry.interval",
                    "description": "When sync fails, interval in seconds between each retry.",
                    "id": "clock.ntp.retry.interval",
                    "type": "INTEGER",
                    "cardinality": 0,
                    "min": "1",
                    "_default": "5",
                    "required": true,
                    "otherAttributes": {}
                },
                {
                    "option": [],
                    "name": "clock.ntp.refresh-interval",
                    "description": "Whether or not to sync the clock and if so, the frequency in seconds.  If less than zero - no update, if equal to zero - sync once at startup, if greater than zero - the frequency in seconds to perform a new clock sync",
                    "id": "clock.ntp.refresh-interval",
                    "type": "INTEGER",
                    "cardinality": 0,
                    "_default": "3600",
                    "required": true,
                    "otherAttributes": {}
                },
                {
                    "option": [],
                    "name": "RTC File Name",
                    "description": "The RTC File Name. It defaults to /dev/rtc0. This option is not used if chrony-advanced option is selected in clock.provider.",
                    "id": "rtc.filename",
                    "type": "STRING",
                    "cardinality": 0,
                    "_default": "/dev/rtc0",
                    "required": true,
                    "otherAttributes": {}
                },
                {
                    "option": [],
                    "name": "Chrony Configuration",
                    "description": "Chrony configuration file.|TextArea",
                    "id": "chrony.advanced.config",
                    "type": "STRING",
                    "cardinality": 0,
                    "required": false,
                    "otherAttributes": {}
                }
            ],
            "icon": [
                {
                    "resource": "ClockService",
                    "size": 32,
                    "otherAttributes": {}
                }
            ],
            "name": "ClockService",
            "description": "ClockService Configuration",
            "id": "org.eclipse.kura.clock.ClockService",
            "otherAttributes": {}
        },
        "properties": {
            "clock.ntp.host": {
                "array": false,
                "type": "String",
                "value": "0.pool.ntp.org"
            },
            "clock.ntp.max-retry": {
                "array": false,
                "type": "Integer",
                "value": 0
            },
            "clock.set.hwclock": {
                "array": false,
                "type": "Boolean",
                "value": true
            },
            "clock.ntp.timeout": {
                "array": false,
                "type": "Integer",
                "value": 10000
            },
            "enabled": {
                "array": false,
                "type": "Boolean",
                "value": false
            },
            "clock.ntp.retry.interval": {
                "array": false,
                "type": "Integer",
                "value": 5
            },
            "kura.service.pid": {
                "array": false,
                "type": "String",
                "value": "org.eclipse.kura.clock.ClockService"
            },
            "service.pid": {
                "array": false,
                "type": "String",
                "value": "org.eclipse.kura.clock.ClockService"
            },
            "clock.ntp.port": {
                "array": false,
                "type": "Integer",
                "value": 123
            },
            "clock.provider": {
                "array": false,
                "type": "String",
                "value": "java-ntp"
            },
            "clock.ntp.refresh-interval": {
                "array": false,
                "type": "Integer",
                "value": 3600
            },
            "rtc.filename": {
                "array": false,
                "type": "String",
                "value": "/dev/rtc1"
            },
            "chrony.advanced.config": {
                "array": false,
                "type": "String",
                "value": ""
            }
        }
    },
  ...
]

/configurableComponents/configurations/byFilter/{filter} | GET

Request

URL: https://<gateway-ip>/services/configuration/v1/configurableComponents/configurations/byFilter/(service.pid=org.eclipse.kura.clock.ClockService)

Response

[
    {
        "pid": "org.eclipse.kura.clock.ClockService",
        "definition": {
            "ad": [
                {
                    "option": [],
                    "name": "enabled",
                    "description": "Whether or not to enable the ClockService",
                    "id": "enabled",
                    "type": "BOOLEAN",
                    "cardinality": 0,
                    "_default": "true",
                    "required": true,
                    "otherAttributes": {}
                },
                {
                    "option": [],
                    "name": "clock.set.hwclock",
                    "description": "Whether or not to sync the system hardware clock after the system time gets set",
                    "id": "clock.set.hwclock",
                    "type": "BOOLEAN",
                    "cardinality": 0,
                    "_default": "true",
                    "required": true,
                    "otherAttributes": {}
                },
                {
                    "option": [
                        {
                            "label": "java-ntp",
                            "value": "java-ntp",
                            "otherAttributes": {}
                        },
                        {
                            "label": "ntpd",
                            "value": "ntpd",
                            "otherAttributes": {}
                        },
                        {
                            "label": "chrony-advanced",
                            "value": "chrony-advanced",
                            "otherAttributes": {}
                        }
                    ],
                    "name": "clock.provider",
                    "description": "Source for setting the system clock. Verify the availabiliy of the selected provider before activate it.",
                    "id": "clock.provider",
                    "type": "STRING",
                    "cardinality": 0,
                    "_default": "java-ntp",
                    "required": true,
                    "otherAttributes": {}
                },
                {
                    "option": [],
                    "name": "clock.ntp.host",
                    "description": "The hostname that provides the system time via NTP",
                    "id": "clock.ntp.host",
                    "type": "STRING",
                    "cardinality": 0,
                    "_default": "0.pool.ntp.org",
                    "required": true,
                    "otherAttributes": {}
                },
                {
                    "option": [],
                    "name": "clock.ntp.port",
                    "description": "The port number that provides the system time via NTP",
                    "id": "clock.ntp.port",
                    "type": "INTEGER",
                    "cardinality": 0,
                    "min": "1",
                    "max": "65535",
                    "_default": "123",
                    "required": true,
                    "otherAttributes": {}
                },
                {
                    "option": [],
                    "name": "clock.ntp.timeout",
                    "description": "The NTP timeout in milliseconds",
                    "id": "clock.ntp.timeout",
                    "type": "INTEGER",
                    "cardinality": 0,
                    "min": "1000",
                    "_default": "10000",
                    "required": true,
                    "otherAttributes": {}
                },
                {
                    "option": [],
                    "name": "clock.ntp.max-retry",
                    "description": "The maximum number of retries for the initial synchronization (with interval clock.ntp.retry.interval). If set to 0 the service will retry forever.",
                    "id": "clock.ntp.max-retry",
                    "type": "INTEGER",
                    "cardinality": 0,
                    "min": "0",
                    "_default": "0",
                    "required": true,
                    "otherAttributes": {}
                },
                {
                    "option": [],
                    "name": "clock.ntp.retry.interval",
                    "description": "When sync fails, interval in seconds between each retry.",
                    "id": "clock.ntp.retry.interval",
                    "type": "INTEGER",
                    "cardinality": 0,
                    "min": "1",
                    "_default": "5",
                    "required": true,
                    "otherAttributes": {}
                },
                {
                    "option": [],
                    "name": "clock.ntp.refresh-interval",
                    "description": "Whether or not to sync the clock and if so, the frequency in seconds.  If less than zero - no update, if equal to zero - sync once at startup, if greater than zero - the frequency in seconds to perform a new clock sync",
                    "id": "clock.ntp.refresh-interval",
                    "type": "INTEGER",
                    "cardinality": 0,
                    "_default": "3600",
                    "required": true,
                    "otherAttributes": {}
                },
                {
                    "option": [],
                    "name": "RTC File Name",
                    "description": "The RTC File Name. It defaults to /dev/rtc0. This option is not used if chrony-advanced option is selected in clock.provider.",
                    "id": "rtc.filename",
                    "type": "STRING",
                    "cardinality": 0,
                    "_default": "/dev/rtc0",
                    "required": true,
                    "otherAttributes": {}
                },
                {
                    "option": [],
                    "name": "Chrony Configuration",
                    "description": "Chrony configuration file.|TextArea",
                    "id": "chrony.advanced.config",
                    "type": "STRING",
                    "cardinality": 0,
                    "required": false,
                    "otherAttributes": {}
                }
            ],
            "icon": [
                {
                    "resource": "ClockService",
                    "size": 32,
                    "otherAttributes": {}
                }
            ],
            "name": "ClockService",
            "description": "ClockService Configuration",
            "id": "org.eclipse.kura.clock.ClockService",
            "otherAttributes": {}
        },
        "properties": {
            "clock.ntp.host": {
                "array": false,
                "type": "String",
                "value": "0.pool.ntp.org"
            },
            "clock.ntp.max-retry": {
                "array": false,
                "type": "Integer",
                "value": 0
            },
            "clock.set.hwclock": {
                "array": false,
                "type": "Boolean",
                "value": true
            },
            "clock.ntp.timeout": {
                "array": false,
                "type": "Integer",
                "value": 10000
            },
            "enabled": {
                "array": false,
                "type": "Boolean",
                "value": false
            },
            "clock.ntp.retry.interval": {
                "array": false,
                "type": "Integer",
                "value": 5
            },
            "kura.service.pid": {
                "array": false,
                "type": "String",
                "value": "org.eclipse.kura.clock.ClockService"
            },
            "service.pid": {
                "array": false,
                "type": "String",
                "value": "org.eclipse.kura.clock.ClockService"
            },
            "clock.ntp.port": {
                "array": false,
                "type": "Integer",
                "value": 123
            },
            "clock.provider": {
                "array": false,
                "type": "String",
                "value": "java-ntp"
            },
            "clock.ntp.refresh-interval": {
                "array": false,
                "type": "Integer",
                "value": 3600
            },
            "rtc.filename": {
                "array": false,
                "type": "String",
                "value": "/dev/rtc1"
            },
            "chrony.advanced.config": {
                "array": false,
                "type": "String",
                "value": ""
            }
        }
    }
]

/configurableComponents/configurations/byPid/{pid} | GET

Request

URL: https://<gateway-ip>/services/configuration/v1/configurableComponents/configurations/byPid/org.eclipse.kura.clock.ClockService

Response

{
    "pid": "org.eclipse.kura.clock.ClockService",
    "definition": {
        "ad": [
            {
                "option": [],
                "name": "enabled",
                "description": "Whether or not to enable the ClockService",
                "id": "enabled",
                "type": "BOOLEAN",
                "cardinality": 0,
                "_default": "true",
                "required": true,
                "otherAttributes": {}
            },
            {
                "option": [],
                "name": "clock.set.hwclock",
                "description": "Whether or not to sync the system hardware clock after the system time gets set",
                "id": "clock.set.hwclock",
                "type": "BOOLEAN",
                "cardinality": 0,
                "_default": "true",
                "required": true,
                "otherAttributes": {}
            },
            {
                "option": [
                    {
                        "label": "java-ntp",
                        "value": "java-ntp",
                        "otherAttributes": {}
                    },
                    {
                        "label": "ntpd",
                        "value": "ntpd",
                        "otherAttributes": {}
                    },
                    {
                        "label": "chrony-advanced",
                        "value": "chrony-advanced",
                        "otherAttributes": {}
                    }
                ],
                "name": "clock.provider",
                "description": "Source for setting the system clock. Verify the availabiliy of the selected provider before activate it.",
                "id": "clock.provider",
                "type": "STRING",
                "cardinality": 0,
                "_default": "java-ntp",
                "required": true,
                "otherAttributes": {}
            },
            {
                "option": [],
                "name": "clock.ntp.host",
                "description": "The hostname that provides the system time via NTP",
                "id": "clock.ntp.host",
                "type": "STRING",
                "cardinality": 0,
                "_default": "0.pool.ntp.org",
                "required": true,
                "otherAttributes": {}
            },
            {
                "option": [],
                "name": "clock.ntp.port",
                "description": "The port number that provides the system time via NTP",
                "id": "clock.ntp.port",
                "type": "INTEGER",
                "cardinality": 0,
                "min": "1",
                "max": "65535",
                "_default": "123",
                "required": true,
                "otherAttributes": {}
            },
            {
                "option": [],
                "name": "clock.ntp.timeout",
                "description": "The NTP timeout in milliseconds",
                "id": "clock.ntp.timeout",
                "type": "INTEGER",
                "cardinality": 0,
                "min": "1000",
                "_default": "10000",
                "required": true,
                "otherAttributes": {}
            },
            {
                "option": [],
                "name": "clock.ntp.max-retry",
                "description": "The maximum number of retries for the initial synchronization (with interval clock.ntp.retry.interval). If set to 0 the service will retry forever.",
                "id": "clock.ntp.max-retry",
                "type": "INTEGER",
                "cardinality": 0,
                "min": "0",
                "_default": "0",
                "required": true,
                "otherAttributes": {}
            },
            {
                "option": [],
                "name": "clock.ntp.retry.interval",
                "description": "When sync fails, interval in seconds between each retry.",
                "id": "clock.ntp.retry.interval",
                "type": "INTEGER",
                "cardinality": 0,
                "min": "1",
                "_default": "5",
                "required": true,
                "otherAttributes": {}
            },
            {
                "option": [],
                "name": "clock.ntp.refresh-interval",
                "description": "Whether or not to sync the clock and if so, the frequency in seconds.  If less than zero - no update, if equal to zero - sync once at startup, if greater than zero - the frequency in seconds to perform a new clock sync",
                "id": "clock.ntp.refresh-interval",
                "type": "INTEGER",
                "cardinality": 0,
                "_default": "3600",
                "required": true,
                "otherAttributes": {}
            },
            {
                "option": [],
                "name": "RTC File Name",
                "description": "The RTC File Name. It defaults to /dev/rtc0. This option is not used if chrony-advanced option is selected in clock.provider.",
                "id": "rtc.filename",
                "type": "STRING",
                "cardinality": 0,
                "_default": "/dev/rtc0",
                "required": true,
                "otherAttributes": {}
            },
            {
                "option": [],
                "name": "Chrony Configuration",
                "description": "Chrony configuration file.|TextArea",
                "id": "chrony.advanced.config",
                "type": "STRING",
                "cardinality": 0,
                "required": false,
                "otherAttributes": {}
            }
        ],
        "icon": [
            {
                "resource": "ClockService",
                "size": 32,
                "otherAttributes": {}
            }
        ],
        "name": "ClockService",
        "description": "ClockService Configuration",
        "id": "org.eclipse.kura.clock.ClockService",
        "otherAttributes": {}
    },
    "properties": {
        "clock.ntp.host": {
            "array": false,
            "type": "String",
            "value": "0.pool.ntp.org"
        },
        "clock.ntp.max-retry": {
            "array": false,
            "type": "Integer",
            "value": 0
        },
        "clock.set.hwclock": {
            "array": false,
            "type": "Boolean",
            "value": true
        },
        "clock.ntp.timeout": {
            "array": false,
            "type": "Integer",
            "value": 10000
        },
        "enabled": {
            "array": false,
            "type": "Boolean",
            "value": false
        },
        "clock.ntp.retry.interval": {
            "array": false,
            "type": "Integer",
            "value": 5
        },
        "kura.service.pid": {
            "array": false,
            "type": "String",
            "value": "org.eclipse.kura.clock.ClockService"
        },
        "service.pid": {
            "array": false,
            "type": "String",
            "value": "org.eclipse.kura.clock.ClockService"
        },
        "clock.ntp.port": {
            "array": false,
            "type": "Integer",
            "value": 123
        },
        "clock.provider": {
            "array": false,
            "type": "String",
            "value": "java-ntp"
        },
        "clock.ntp.refresh-interval": {
            "array": false,
            "type": "Integer",
            "value": 3600
        },
        "rtc.filename": {
            "array": false,
            "type": "String",
            "value": "/dev/rtc1"
        },
        "chrony.advanced.config": {
            "array": false,
            "type": "String",
            "value": ""
        }
    }
}

/configurableComponents/configurations/byPid/{pid}/_default | GET

Request

URL: https://<gateway-ip>/services/configuration/v1/configurableComponents/configurations/byPid/org.eclipse.kura.clock.ClockService/_default

Response

{
    "pid": "org.eclipse.kura.clock.ClockService",
    "definition": {
        "ad": [
            {
                "option": [],
                "name": "enabled",
                "description": "Whether or not to enable the ClockService",
                "id": "enabled",
                "type": "BOOLEAN",
                "cardinality": 0,
                "_default": "true",
                "required": true,
                "otherAttributes": {}
            },
            {
                "option": [],
                "name": "clock.set.hwclock",
                "description": "Whether or not to sync the system hardware clock after the system time gets set",
                "id": "clock.set.hwclock",
                "type": "BOOLEAN",
                "cardinality": 0,
                "_default": "true",
                "required": true,
                "otherAttributes": {}
            },
            {
                "option": [
                    {
                        "label": "java-ntp",
                        "value": "java-ntp",
                        "otherAttributes": {}
                    },
                    {
                        "label": "ntpd",
                        "value": "ntpd",
                        "otherAttributes": {}
                    },
                    {
                        "label": "chrony-advanced",
                        "value": "chrony-advanced",
                        "otherAttributes": {}
                    }
                ],
                "name": "clock.provider",
                "description": "Source for setting the system clock. Verify the availabiliy of the selected provider before activate it.",
                "id": "clock.provider",
                "type": "STRING",
                "cardinality": 0,
                "_default": "java-ntp",
                "required": true,
                "otherAttributes": {}
            },
            {
                "option": [],
                "name": "clock.ntp.host",
                "description": "The hostname that provides the system time via NTP",
                "id": "clock.ntp.host",
                "type": "STRING",
                "cardinality": 0,
                "_default": "0.pool.ntp.org",
                "required": true,
                "otherAttributes": {}
            },
            {
                "option": [],
                "name": "clock.ntp.port",
                "description": "The port number that provides the system time via NTP",
                "id": "clock.ntp.port",
                "type": "INTEGER",
                "cardinality": 0,
                "min": "1",
                "max": "65535",
                "_default": "123",
                "required": true,
                "otherAttributes": {}
            },
            {
                "option": [],
                "name": "clock.ntp.timeout",
                "description": "The NTP timeout in milliseconds",
                "id": "clock.ntp.timeout",
                "type": "INTEGER",
                "cardinality": 0,
                "min": "1000",
                "_default": "10000",
                "required": true,
                "otherAttributes": {}
            },
            {
                "option": [],
                "name": "clock.ntp.max-retry",
                "description": "The maximum number of retries for the initial synchronization (with interval clock.ntp.retry.interval). If set to 0 the service will retry forever.",
                "id": "clock.ntp.max-retry",
                "type": "INTEGER",
                "cardinality": 0,
                "min": "0",
                "_default": "0",
                "required": true,
                "otherAttributes": {}
            },
            {
                "option": [],
                "name": "clock.ntp.retry.interval",
                "description": "When sync fails, interval in seconds between each retry.",
                "id": "clock.ntp.retry.interval",
                "type": "INTEGER",
                "cardinality": 0,
                "min": "1",
                "_default": "5",
                "required": true,
                "otherAttributes": {}
            },
            {
                "option": [],
                "name": "clock.ntp.refresh-interval",
                "description": "Whether or not to sync the clock and if so, the frequency in seconds.  If less than zero - no update, if equal to zero - sync once at startup, if greater than zero - the frequency in seconds to perform a new clock sync",
                "id": "clock.ntp.refresh-interval",
                "type": "INTEGER",
                "cardinality": 0,
                "_default": "3600",
                "required": true,
                "otherAttributes": {}
            },
            {
                "option": [],
                "name": "RTC File Name",
                "description": "The RTC File Name. It defaults to /dev/rtc0. This option is not used if chrony-advanced option is selected in clock.provider.",
                "id": "rtc.filename",
                "type": "STRING",
                "cardinality": 0,
                "_default": "/dev/rtc0",
                "required": true,
                "otherAttributes": {}
            },
            {
                "option": [],
                "name": "Chrony Configuration",
                "description": "Chrony configuration file.|TextArea",
                "id": "chrony.advanced.config",
                "type": "STRING",
                "cardinality": 0,
                "required": false,
                "otherAttributes": {}
            }
        ],
        "icon": [
            {
                "resource": "ClockService",
                "size": 32,
                "otherAttributes": {}
            }
        ],
        "name": "ClockService",
        "description": "ClockService Configuration",
        "id": "org.eclipse.kura.clock.ClockService",
        "otherAttributes": {}
    },
    "properties": {
        "clock.ntp.host": {
            "array": false,
            "type": "String",
            "value": "0.pool.ntp.org"
        },
        "clock.provider": {
            "array": false,
            "type": "String",
            "value": "java-ntp"
        },
        "clock.ntp.port": {
            "array": false,
            "type": "Integer",
            "value": 123
        },
        "clock.ntp.max-retry": {
            "array": false,
            "type": "Integer",
            "value": 0
        },
        "clock.ntp.refresh-interval": {
            "array": false,
            "type": "Integer",
            "value": 3600
        },
        "rtc.filename": {
            "array": false,
            "type": "String",
            "value": "/dev/rtc0"
        },
        "clock.set.hwclock": {
            "array": false,
            "type": "Boolean",
            "value": true
        },
        "enabled": {
            "array": false,
            "type": "Boolean",
            "value": true
        },
        "clock.ntp.timeout": {
            "array": false,
            "type": "Integer",
            "value": 10000
        },
        "clock.ntp.retry.interval": {
            "array": false,
            "type": "Integer",
            "value": 5
        }
    }
}

/configurableComponents/configurations/byPid/{pid}/_update | POST

Request

URL: https://<gateway-ip>/services/configuration/v1/configurableComponents/configurations/byPid/org.eclipse.kura.clock.ClockService/_update

Request Body:

{
  "takeSnapshot":true,
  "componentConfigurationRequest": {
      "properties": {
          "enabled": {
              "type": "boolean",
              "value": false,
              "array": false
          }
      }
  }
}

🚧

Network configuration changes

Every service may need a different set of parameters and combination of them to reach the desired result. For the NetworkAdminService, for example, the following configuration is required to disable a specific network interface (enp2s0) and prevent re-enabling at reboot. Please verify offline the REST APIs executed and the different deploying scenarios before distributing updates to the fleet of devices.

{
    "takeSnapshot":true,
    "componentConfigurationRequest": {
        "properties": {
            "net.interface.enp2s0.config.ip4.status": {
                "type": "string",
                "value": "netIPv4StatusDisabled",
                "array": false
            },
            "net.interface.enp2s0.config.autoconnect": {
                "type": "boolean",
                "value": false,
                "array": false
            }
        }
    }
}

/configurableComponents/configurations/_update | POST

Request

URL: https://<gateway-ip>/services/configuration/v1/configurableComponents/configurations/_update

Request Body:

{
    "takeSnapshot": true,
    "componentConfigurations": [
        {
            "pid": "org.eclipse.kura.clock.ClockService",
            "properties": {
                "enabled": {
                    "type": "boolean",
                    "value": false,
                    "array": false
                }
            }
        }
    ]
}

/snapshots | GET

Request

URL: https://<gateway-ip>/services/configuration/v1/snapshots

Response

[
    0,
    1630930775789,
    1630930776355,
    1630930776839,
    1630930797402,
    1630930805305
]

/snapshots/{id} | GET

Request

URL: https://<gateway-ip>/services/configuration/v1/snapshots/{id}

Response

[
    {
        "pid": "org.eclipse.kura.clock.ClockService",
        "properties": {
            "clock.ntp.host": {
                "array": false,
                "type": "String",
                "value": "0.pool.ntp.org"
            },
            "clock.ntp.port": {
                "array": false,
                "type": "Integer",
                "value": 123
            },
            "clock.provider": {
                "array": false,
                "type": "String",
                "value": "java-ntp"
            },
            "clock.ntp.max-retry": {
                "array": false,
                "type": "Integer",
                "value": 0
            },
            "clock.ntp.refresh-interval": {
                "array": false,
                "type": "Integer",
                "value": 3600
            },
            "rtc.filename": {
                "array": false,
                "type": "String",
                "value": "/dev/rtc1"
            },
            "clock.set.hwclock": {
                "array": false,
                "type": "Boolean",
                "value": true
            },
            "clock.ntp.timeout": {
                "array": false,
                "type": "Integer",
                "value": 10000
            },
            "enabled": {
                "array": false,
                "type": "Boolean",
                "value": true
            },
            "clock.ntp.retry.interval": {
                "array": false,
                "type": "Integer",
                "value": 5
            },
            "kura.service.pid": {
                "array": false,
                "type": "String",
                "value": "org.eclipse.kura.clock.ClockService"
            },
            "service.pid": {
                "array": false,
                "type": "String",
                "value": "org.eclipse.kura.clock.ClockService"
            }
        }
    },
  ...
]

/snapshots/_write | POST

Request

URL: https://<gateway-ip>/services/configuration/v1/snapshots/_write

Response

1631095409516

/snapshots/_rollback | POST

Request

URL: https://<gateway-ip>/services/configuration/v1/snapshots/_rollback

Response

1631093011618

/snapshots/{id}/_rollback | POST

Request

URL: https://<gateway-ip>/services/configuration/v1/snapshots/1631095409516/_rollback

/snapshots/_upload | POST

Request

URL: https://<gateway-ip>/services/configuration/v1/snapshots/_upload

<?xml version="1.0" encoding="UTF-8"?><esf:configurations xmlns:esf="http://eurotech.com/esf/2.0" xmlns:ocd="http://www.osgi.org/xmlns/metatype/v1.2.0">
    <esf:configuration pid="org.eclipse.kura.clock.ClockService">
        <esf:properties>
            <esf:property array="false" encrypted="false" name="clock.ntp.host" type="String">
                <esf:value>0.pool.ntp.org</esf:value>
            </esf:property>
            <esf:property array="false" encrypted="false" name="clock.ntp.port" type="Integer">
                <esf:value>123</esf:value>
            </esf:property>
            <esf:property array="false" encrypted="false" name="clock.provider" type="String">
                <esf:value>java-ntp</esf:value>
            </esf:property>
            <esf:property array="false" encrypted="false" name="clock.ntp.max-retry" type="Integer">
                <esf:value>0</esf:value>
            </esf:property>
            <esf:property array="false" encrypted="false" name="clock.ntp.refresh-interval" type="Integer">
                <esf:value>3600</esf:value>
            </esf:property>
            <esf:property array="false" encrypted="false" name="rtc.filename" type="String">
                <esf:value>/dev/rtc1</esf:value>
            </esf:property>
            <esf:property array="false" encrypted="false" name="clock.set.hwclock" type="Boolean">
                <esf:value>true</esf:value>
            </esf:property>
            <esf:property array="false" encrypted="false" name="clock.ntp.timeout" type="Integer">
                <esf:value>10000</esf:value>
            </esf:property>
            <esf:property array="false" encrypted="false" name="enabled" type="Boolean">
                <esf:value>true</esf:value>
            </esf:property>
            <esf:property array="false" encrypted="false" name="clock.ntp.retry.interval" type="Integer">
                <esf:value>5</esf:value>
            </esf:property>
            <esf:property array="false" encrypted="false" name="kura.service.pid" type="String">
                <esf:value>org.eclipse.kura.clock.ClockService</esf:value>
            </esf:property>
            <esf:property array="false" encrypted="false" name="service.pid" type="String">
                <esf:value>org.eclipse.kura.clock.ClockService</esf:value>
            </esf:property>
        </esf:properties>
    </esf:configuration>
</esf:configurations>