Skip to content

list.changed

Sent by the gateway for a sync group that keeps the lists domain: one of its items (a work code, job code, tip code or message) was added, changed or deleted, through the admin API 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:list.changed

Fields

FieldTypeRequiredDescription
kindstringyesThe list the item is in: work_code, job_code, tip_code or message.
keystringyesThe item’s key within its list, as the admin API names it (PUT /api/tenants/{tenant}/sync/{name}/lists/{kind}/{key}): a code, or a message’s id.
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).

Example

{
"kind": "work_code",
"key": "7",
"version": 15,
"deleted": false,
"origin": "device:office/CG0001"
}

JSON Schema

list.changed.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "urn:houradvantage:events:3:list.changed",
"title": "list.changed: data",
"description": "Sent by the gateway for a sync group that keeps the lists domain: one of its items (a work code, job code, tip code or message) was added, changed or deleted, through the admin API 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": "The list the item is in: work_code, job_code, tip_code or message."
},
"key": {
"type": "string",
"description": "The item's key within its list, as the admin API names it (PUT /api/tenants/{tenant}/sync/{name}/lists/{kind}/{key}): a code, or a message's id."
},
"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)."
}
},
"required": [
"kind",
"key",
"version",
"deleted",
"origin"
],
"examples": [
{
"kind": "work_code",
"key": "7",
"version": 15,
"deleted": false,
"origin": "device:office/CG0001"
}
]
}