Skip to content

setting.changed

Sent by the gateway for a sync group that keeps the settings domain: one setting’s value was set or cleared, for one settings class or for the standard setting names (class ”*”), through the admin API (PUT /api/tenants/{tenant}/sync/{name}/settings/{class}) or taken in from a member device. The envelope has endpoint “sync:”, device "" and package “houradvantage-connect”; the event goes to the sinks the group names.

Schema id: urn:houradvantage:events:3:setting.changed

Fields

FieldTypeRequiredDescription
kindstringyesAlways “setting”.
keystringyes”/”: the settings class (”*” for a standard setting name) and the setting’s name.
versionintegeryesThe row’s version: the change’s position among the group’s changes. A higher version is a later change within the group. at least 1
deletedbooleanyestrue: the row was deleted, and it is deleted from every member that holds it. false: the row was added or changed.
originstringyesWho made the change: “api:” for the admin API (“api:local” when the API has no login), or “device:/” for a member device whose report the group took in (only where the group shares the domain with its devices).
valueanyThe setting’s value after the change, as it was written (any JSON value). Absent when the setting was cleared (deleted is true), and when the package marks the setting sensitive.

Example

{
"kind": "setting",
"key": "zk-push-tft/volume",
"version": 21,
"deleted": false,
"origin": "api:admin",
"value": 70
}

JSON Schema

setting.changed.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "urn:houradvantage:events:3:setting.changed",
"title": "setting.changed: data",
"description": "Sent by the gateway for a sync group that keeps the settings domain: one setting's value was set or cleared, for one settings class or for the standard setting names (class \"*\"), through the admin API (PUT /api/tenants/{tenant}/sync/{name}/settings/{class}) or taken in from a member device. The envelope has endpoint \"sync:<group>\", device \"\" and package \"houradvantage-connect\"; the event goes to the sinks the group names.",
"type": "object",
"properties": {
"kind": {
"type": "string",
"description": "Always \"setting\"."
},
"key": {
"type": "string",
"description": "\"<class>/<name>\": the settings class (\"*\" for a standard setting name) and the setting's name."
},
"version": {
"type": "integer",
"minimum": 1,
"description": "The row's version: the change's position among the group's changes. A higher version is a later change within the group."
},
"deleted": {
"type": "boolean",
"description": "true: the row was deleted, and it is deleted from every member that holds it. false: the row was added or changed."
},
"origin": {
"type": "string",
"description": "Who made the change: \"api:<login>\" for the admin API (\"api:local\" when the API has no login), or \"device:<endpoint>/<device>\" for a member device whose report the group took in (only where the group shares the domain with its devices)."
},
"value": {
"description": "The setting's value after the change, as it was written (any JSON value). Absent when the setting was cleared (deleted is true), and when the package marks the setting sensitive."
}
},
"required": [
"kind",
"key",
"version",
"deleted",
"origin"
],
"examples": [
{
"kind": "setting",
"key": "zk-push-tft/volume",
"version": 21,
"deleted": false,
"origin": "api:admin",
"value": 70
}
]
}