person.changed
Sent by the gateway for a sync group that keeps people: a person in the group’s registry was added or changed, through the admin API or taken in from a member device. Each change sends one event: a change to the person’s record, a credential added or removed (template, face photo, display photo), or a user id change. A write that changes nothing (a device echoing what it was sent) sends none. Keypad PINs, passwords and template or photo bytes are never carried: credentials appear only by their metadata. The envelope has endpoint “sync:
Schema id: urn:houradvantage:events:3:person.changed
Fields
| Field | Type | Required | Description |
|---|---|---|---|
user_id | string | yes | The person’s user id in the group. For a user id change, the new id. |
version | integer | yes | The 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 |
changed | array of string | yes | The names of the fields this change set or cleared: person fields (name, role, enabled, valid_from, valid_to, cards, groups, labels, devices, biometrics, keypad_pin, password; deleted when a deleted person is written again), “credentials” when a credential was added or removed, “user_id” for a user id change. A secret is named, never given. |
origin | string | yes | Who made the change: “api: |
credentials | array of object | Every credential the registry holds for the person after the change; an empty list when there is none. The gateway always sends it. | |
credentials[].kind | string | yes | What it is: fingerprint, face, face_photo, palm, finger_vein or iris (biometric templates and photos), or photo (the display photo). A template kind the device’s package does not name is type_ |
credentials[].slot | integer | yes | Which one of its kind: the finger (0-9) for a fingerprint, the device’s index for other templates, 0 for a display photo. at least 0 |
credentials[].format | string | yes | The format tag of the bytes: ” |
credentials[].sha256 | string | yes | The SHA-256 of the credential’s bytes, 64 lowercase hex digits: tells one template from another without carrying it. |
Examples
{ "user_id": "1001", "version": 42, "changed": [ "name", "cards" ], "origin": "api:admin", "credentials": [ { "kind": "fingerprint", "slot": 6, "format": "zk:fingerprint:10", "sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08" } ]}{ "user_id": "1001", "version": 43, "changed": [ "credentials" ], "origin": "device:office/CG0001", "credentials": []}JSON Schema
person.changed.json
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "urn:houradvantage:events:3:person.changed", "title": "person.changed: data", "description": "Sent by the gateway for a sync group that keeps people: a person in the group's registry was added or changed, through the admin API or taken in from a member device. Each change sends one event: a change to the person's record, a credential added or removed (template, face photo, display photo), or a user id change. A write that changes nothing (a device echoing what it was sent) sends none. Keypad PINs, passwords and template or photo bytes are never carried: credentials appear only by their metadata. The envelope has endpoint \"sync:<group>\", device \"\" and package \"houradvantage-connect\"; the event goes to the sinks the group names.", "type": "object", "properties": { "user_id": { "type": "string", "description": "The person's user id in the group. For a user id change, the new 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." }, "changed": { "type": "array", "items": { "type": "string" }, "description": "The names of the fields this change set or cleared: person fields (name, role, enabled, valid_from, valid_to, cards, groups, labels, devices, biometrics, keypad_pin, password; deleted when a deleted person is written again), \"credentials\" when a credential was added or removed, \"user_id\" for a user id change. A secret is named, never given." }, "origin": { "type": "string", "description": "Who made the change: \"api:<login>\" for the admin API (\"api:local\" when the API has no login), \"device:<endpoint>/<device>\" for a member device whose report the group took in (a person enrolled there, or a change where the group shares the domain with its devices), or \"policy:enrolled\" for what an endpoint's policy wrote on an enrollment." }, "credentials": { "type": "array", "description": "Every credential the registry holds for the person after the change; an empty list when there is none. The gateway always sends it.", "items": { "type": "object", "description": "One credential, by its metadata.", "properties": { "kind": { "type": "string", "description": "What it is: fingerprint, face, face_photo, palm, finger_vein or iris (biometric templates and photos), or photo (the display photo). A template kind the device's package does not name is type_<n>." }, "slot": { "type": "integer", "minimum": 0, "description": "Which one of its kind: the finger (0-9) for a fingerprint, the device's index for other templates, 0 for a display photo." }, "format": { "type": "string", "description": "The format tag of the bytes: \"<vendor>:<kind>[:<version>]\" for a template (\"zk:fingerprint:10\"), \"jpeg\" for a display photo. A device takes only formats it declares." }, "sha256": { "type": "string", "description": "The SHA-256 of the credential's bytes, 64 lowercase hex digits: tells one template from another without carrying it." } }, "required": [ "kind", "slot", "format", "sha256" ] } } }, "required": [ "user_id", "version", "changed", "origin" ], "examples": [ { "user_id": "1001", "version": 42, "changed": [ "name", "cards" ], "origin": "api:admin", "credentials": [ { "kind": "fingerprint", "slot": 6, "format": "zk:fingerprint:10", "sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08" } ] }, { "user_id": "1001", "version": 43, "changed": [ "credentials" ], "origin": "device:office/CG0001", "credentials": [] } ]}