Skip to content

access.changed

Sent by the gateway for a sync group that keeps the access domain: one of its rows (a schedule, holiday, access group or zone) 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:access.changed

Fields

FieldTypeRequiredDescription
kindstringyesThe row’s kind: schedule, holiday, access_group or zone.
keystringyesThe row’s key within its kind, as the admin API names it (PUT /api/tenants/{tenant}/sync/{name}/access/{kind}/{key}).
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": "schedule",
"key": "day-shift",
"version": 12,
"deleted": false,
"origin": "api:admin"
}

JSON Schema

access.changed.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "urn:houradvantage:events:3:access.changed",
"title": "access.changed: data",
"description": "Sent by the gateway for a sync group that keeps the access domain: one of its rows (a schedule, holiday, access group or zone) 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 row's kind: schedule, holiday, access_group or zone."
},
"key": {
"type": "string",
"description": "The row's key within its kind, as the admin API names it (PUT /api/tenants/{tenant}/sync/{name}/access/{kind}/{key})."
},
"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": "schedule",
"key": "day-shift",
"version": 12,
"deleted": false,
"origin": "api:admin"
}
]
}