Event schemas
Every event is an envelope whose data is described by the schema named after its type. Each schema is a JSON Schema (draft 2020-12), and every event the gateway emits matches the schema of its type. Events explains each type in prose.
- 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. - action.result: The gateway’s own event: an action (an ordered group of commands, its steps, for one device) finished. The gateway emits it once per action, with the change that finished it (the change is never made without it): the answer to its last step (ok), an answer that failed a step or a step going unanswered (failed: the steps not yet handed out are skipped and never go), or a cancel (cancelled) or expiry (timed_out) that took back steps not yet handed out. An action that stopped at a gate says which (gate_step) and why (reason); a gate that did not pass also holds the device (device.held). Each step still has its own command.result; a step handed out before the action ended reports that way after it. The envelope’s endpoint and device are the device’s, and package is the package that built the action.
- biometric.attestation: A user’s answer to the device’s biometric consent question. Emitted by zk-push 3.4 when the clock uploads a consent record, which it does after the user answers the question at the device. Not biometric data itself: it is kept whether or not the endpoint collects biometrics.
- biometric.deleted: Templates of a user were deleted on the device: one template (kind and index given), every template of a kind (kind only), or all of the user’s templates (neither). Emitted by zk-push (2.0, 2.4 and 3.4) for a fingerprint delete in the operation log the clock uploads (operation 10, beside its device.log event); the log names the user but not the finger, so kind is fingerprint and index is absent. A row from before the device first reached the gateway gives none.
- biometric: A biometric template a user has on the device: a fingerprint, face, palm or finger vein, in the form the set_biometric action takes back. Emitted by zk-push (2.0, 2.4 and 3.4) when the clock uploads a template: after an enrolment at the device, or in answer to query_users, query_user or another query. Biometric data: dropped unless the endpoint collects biometrics, and for a person their sync group does not allow biometrics (see biometric.refused).
- biometric.photo: The photo a user’s face or palm template was enrolled from. Emitted by zk-push 2.4 when the clock uploads it: after an enrolment at the device, or in answer to query_users or query_user. Biometric data: dropped unless the endpoint collects biometrics, and for a person their sync group does not allow biometrics (see biometric.refused).
- biometric.refused: The gateway’s own event: a device sent templates or photos (biometric, biometric.photo or user.photo events) of a person whose sync group does not allow them biometrics (allow_biometrics is false). Those events are dropped before they are stored, sent to a sink or taken into the group, and the device is sent the package’s delete in the urgent lane (that action reports with its own action.result). The gateway emits one per person and event type in the message, once the message is kept. The envelope’s endpoint, device and package are the device’s.
- clock.restamped: Time and Attendance: sent when an operator re-stamps a clock’s punches (POST …/clocks/{id}/restamp): the clock’s punches from an instant on were given the clock’s record as it is now (its location, labels and values), each by a correction saying who and why, and those persons are worked out again from the punch’s workday. A re-stamp that finds every punch carrying the record already sends nothing. It is kept in Time and Attendance’s own event log and delivered to its sinks, the envelope’s endpoint “attendance”, its package “houradvantage-attend” and its device the tenant’s id.
- clock.shifted: Time and Attendance: sent when an operator shifts a clock’s punches (POST …/clocks/{id}/shift): the clock’s punches made from an instant up to another were each moved by a number of seconds (or, for a request that takes one back, put back to the instant they were made), each by a correction saying who and why, and those persons are worked out again from the punch’s workday. A shift that finds nothing to move sends nothing. It is kept in Time and Attendance’s own event log and delivered to its sinks, the envelope’s endpoint “attendance”, its package “houradvantage-attend” and its device the tenant’s id.
- command.result: The gateway’s own event: a device answered a command. The gateway emits one for each answer to a command it still has open, as the device’s package reads it from the device’s message; a repeated answer, or one for a command the gateway does not know, gives none. A command the device asks to have sent again (“not yet”) is answered once per try, and each answer is its own event. An answer that comes after the command was reported unanswered (command.unanswered) still gives one. The envelope’s endpoint, device and package are the device’s.
- command.unanswered: The gateway’s own event: a command handed to a device was lost. The gateway emits it once per command, and the step goes unanswered, which fails its action (action.result). A command is lost when the device answered a command handed out after it (a package whose results come in order,
[commands] resultsin its package.toml), when its package says the device restarted (M.restarted), or when an app gave up on it (cancelling its action with give_up). A command is never lost by how long it takes: no answer within any time is not a reason. A package that says a lost write is safe to hand out again has it handed out once more, without this event; lost twice it is unanswered. An answer that comes later still completes the command and gives a command.result. The envelope’s endpoint, device and package are the device’s. - device.back: The gateway’s own event: a device came back after an absence longer than its endpoint’s back_after_minutes. It is told once per return, when the device is let in again. Nothing looks for absences: a return is told when the device calls. The endpoint’s policy package’s back hook is called after it is stored. The envelope’s tenant, endpoint, group and device name the device.
- device.blocked: The gateway’s own event: a device that was allowed or waiting to be allowed was blocked (PATCH /api/tenants/{tenant}/devices/{endpoint}/{device} with status blocked, ctl device block). The gateway emits it once per block, however many requests block the device at the same moment. From then on nothing the device sends is taken in and nothing is sent to it: no reply, command, people list, PIN or template; what is queued for it waits. Connect cannot stop the device reaching the network or the MQTT broker: the operator’s own systems revoke what the device connects with (its broker credential, its client certificate, its address in a firewall) on this event. The envelope’s tenant, endpoint and device name the device (device is the device’s id), and package is its endpoint’s package. Endpoints cannot drop it (drop_events).
- device.clock_ahead: The gateway’s own event: a device was first seen with its clock set ahead, because a punch it sent was made more than tolerance_seconds after the moment it reached the gateway. It is told once, when the device is first seen so: while the device keeps sending such punches nothing more is told, and when a message of its punches comes with none ahead, the status is cleared, so a later fault is told again. While it is ahead the device’s info says so (clock_ahead: since and by_seconds, as first seen), and its punches from the future are marked clock_ahead and kept out of the person’s punch state and zone state. The envelope’s tenant, endpoint, group and device name the device.
- device.clock_behind: The gateway’s own event: a device was first seen with its clock behind, because the punches of its uploads, as the endpoint’s zone placed them, were made more than tolerance_seconds before they reached the gateway, by amounts within tolerance_seconds of one another, for longer than that amount. A clock that keeps standard time through daylight saving is an hour behind. A device that states its offset in every timestamp is never told so. It is told once, when the device is first seen so: while it keeps sending such punches nothing more is told, and when a message of its punches comes on time, the status is cleared, so a later fault is told again. Detection takes about as long as the lag after the clock goes wrong, an hour for an hour. While it is behind the device’s info says so (clock_behind: since and by_seconds, as first seen) and the punches of its messages that are not on time carry clock_behind_seconds; they are kept as reported. The envelope’s tenant, endpoint, group and device name the device.
- device.error: Something the device could not do with what it was sent (a command, or data it was given), as the device reports it in its error log. Emitted by zk-push 2.4, one per error row the clock uploads.
- device.held: The gateway’s own event: a gate step of an action did not pass (the device’s answer failed it, or it went unanswered), so the device is held. Nothing more is handed to the device, on any lane, until it is released by hand (POST /api/tenants/{tenant}/devices/{endpoint}/{device}/release, ctl device release; see device.released). What the device sends is taken in as usual. The gateway emits it once per hold, never without the action’s action.result, which has the same reason and its gate_step. Endpoints cannot drop it (drop_events). The envelope’s endpoint and device are the device’s, and package is the package that built the action.
- device.joined: The gateway’s own event: a device joined its tenant and its endpoint’s sync group. It is told when the device is allowed for the first time: registered as allowed, allowed after waiting (PATCH /api/tenants/{tenant}/devices/{endpoint}/{device} with status allowed), or added as it called in at an endpoint that lets strangers in (new_devices = “allow”). It is told once per device. The endpoint’s policy package’s joined hook is called after it is stored. The envelope’s tenant, endpoint, group and device name the device, and package is its endpoint’s package.
- device.log: A row of the device’s own operation log: power, menu use, enrolments, deletes, settings, alarms, door events. Emitted by zk-push (2.0, 2.4 and 3.4), one per row of the operation log the clock uploads (on first contact it uploads the whole log). A row recording a deleted user or deleted fingerprints also gives a user.deleted or biometric.deleted event, unless the row is from before the device first reached the gateway (an old delete in the whole log is news to no one).
- device.moved: The gateway’s own event: an allowed device moved to another sync group, because its endpoint’s group was changed (its sync_group set, changed or taken away). It is told once for each allowed device of the endpoint and each change. The endpoint’s policy package’s moved hook is called after it is stored. The envelope’s tenant, endpoint and device name the device, and group is the group it is in now.
- device.new: The gateway’s own event: a device the gateway did not know contacted an endpoint and registered itself. The gateway emits it once, when it adds the device to its register: allowed when the endpoint’s new_devices is allow, pending when it is hold. An endpoint whose new_devices is refuse keeps no record of the device and emits nothing. A device registered through the API or hourctl gives no device.new. The envelope’s endpoint and package are the endpoint’s, and device is the device’s id.
- device.options: Options read from the device, named as the device names them. Emitted by zk-push 2.4 when the clock answers the get_options command (beside the command’s command.result, whose result carries the same values as text).
- device.released: The gateway’s own event: a held device (device.held) was released by hand (POST /api/tenants/{tenant}/devices/{endpoint}/{device}/release, ctl device release). The gateway emits it once per release. What waits for the device goes out again or, with drop_queued, is cancelled: each action dropped has its own action.result (cancelled, or timed_out when it was past its expiry, with the reason “dropped when the device’s hold was released:
”). Endpoints cannot drop it (drop_events). The envelope’s endpoint and device are the device’s, and package is its endpoint’s package. - device.set_aside.expired: The gateway’s own event: MQTT messages of a device, set aside because what they waited for could take long (the device waiting to be allowed, registered or to present its key, its package failing on them, its endpoint or tenant stopped, its tenant full), were dropped without being taken in (
reasonsays why). One event per device (the envelope’s device is empty when the package could not tell which device sent them) each time messages are dropped, saying how many. What the messages carried is never in it. The envelope’s tenant, endpoint and device name where they came from, and package is the endpoint’s package (houradvantage when the endpoint is gone). - envelope: Every event, whatever its type.
datais described by the schema named aftertype(punch.json, user.json, …). Consumers must ignore fields they do not know: fields are added within a schema version. - exception.raised: Something someone has to look at in a person’s time: a missing punch, a value not allowed, or what a policy step names (late, a no-show). Sent when it first appears in the person’s ledger, and again if it is reopened after being excused, or comes back after it was fixed; working the ledger out again while it stays sends nothing. exception.resolved follows when it goes or is excused. Kept in Time and Attendance’s own event log (apart from Connect’s) and delivered to its sinks: the tenant’s (/api/attendance/tenants/{tenant}/sinks) and the install’s (/api/attendance/sinks). The envelope’s endpoint is “attendance”, its package “houradvantage-attend”, and its device the person’s id. The same event sent again has the same id.
- exception.resolved: An exception exception.raised told of no longer needs looking at: it is gone (a correction, a punch that arrived, or a change of setup put it right), or someone excused it (it stands, accepted as it is). Its other fields are those exception.raised gave. Kept in Time and Attendance’s own event log (apart from Connect’s) and delivered to its sinks: the tenant’s (/api/attendance/tenants/{tenant}/sinks) and the install’s (/api/attendance/sinks). The envelope’s endpoint is “attendance”, its package “houradvantage-attend”, and its device the person’s id. The same event sent again has the same id.
- id_card: A national identity card read at the device’s card reader. Emitted by zk-push 2.4 when the clock uploads the card it read. Every field is passed on as the device sent it, as text, and is "" when the device sent nothing for it. photo, fingerprint_1 and fingerprint_2 are the card’s portrait and fingerprint templates: biometric data, dropped unless the endpoint collects biometrics.
- inventory.extra_user: Sent by the gateway for a sync group that keeps people: a clock reported a user it still carries from a group it left (a clock that moved), and that this group does not hold. The user is not the group’s, and the group does not delete them: whether they stay is for the system that reads this event to decide, by deleting them through the clock’s commands. One event is sent for each such user each time the clock reports them (an inventory it uploads, say), so a user that stays is told again with each inventory. The envelope has endpoint “sync:
”, device "" and package “houradvantage-connect”; the event goes to the sinks the group names. - job.cancelled: A job was cancelled. The gateway sends it when a running or paused job is cancelled (
POST /api/tenants/{tenant}/jobs/{id}/cancel). Devices that had not started are cancelled with it; the actions of devices running are taken back (steps not yet handed out never go), and each of those devices then reports its own end. A cancelled job never completes. Envelope:endpointis one of the endpoints the job has devices on (one event to each),deviceis "",packageis “houradvantage-connect”; each change to the job gives a new id. - job.completed: A job is over. The gateway sends it when every device of a running or paused job has finished (succeeded, failed, timed out or been cancelled).
POST /api/tenants/{tenant}/jobs/{id}/retry-failedtakes its failed and timed-out devices again, and sends job.resumed. Envelope:endpointis one of the endpoints the job has devices on (one event to each),deviceis "",packageis “houradvantage-connect”; each change to the job gives a new id. - job.execution.cancelled: A job’s device was cancelled. The gateway sends it when the job is cancelled before the device started, or when the device’s action ended cancelled (the job was cancelled while it ran, or the action was cancelled by hand). Envelope:
endpointanddeviceare the device’s,packageis “houradvantage-connect”. Sent once per device and attempt. - job.execution.failed: A job’s device failed. The gateway sends it when the device’s action failed (a step failed or went unanswered), could not be started, or is no longer kept, or when the device is held (its action is then taken back); detail says which. A failed device counts toward the abort threshold, and retry-failed takes it again. Envelope:
endpointanddeviceare the device’s,packageis “houradvantage-connect”. Sent once per device and attempt. - job.execution.started: A job started a device. The gateway sends it when the job takes the device (its wave has started, max_concurrent leaves room and its window is open), just before it starts the device’s action. Envelope:
endpointanddeviceare the device’s,packageis “houradvantage-connect”. Sent once per device and attempt. - job.execution.succeeded: A job’s device succeeded. The gateway sends it when the device’s action finished with every step done. Envelope:
endpointanddeviceare the device’s,packageis “houradvantage-connect”. Sent once per device and attempt. - job.execution.timed_out: A job’s device ran out of time. The gateway sends it when the device’s action did not finish within the job’s timeout (counted from when the action was started; one hour unless the job says): the action expired, or, with steps handed out and still unanswered a minute after that, was taken back. A timed-out device counts toward the abort threshold, and retry-failed takes it again. Envelope:
endpointanddeviceare the device’s,packageis “houradvantage-connect”. Sent once per device and attempt. - job.paused: A job was paused. The gateway sends it when a running job is paused by hand (
POST /api/tenants/{tenant}/jobs/{id}/pause) or by its abort threshold; reason says which. While the job is paused no device starts; devices already running go on to their end. Envelope:endpointis one of the endpoints the job has devices on (one event to each),deviceis "",packageis “houradvantage-connect”; each change to the job gives a new id. - job.resumed: A job runs again. The gateway sends it when a paused job is resumed (
POST /api/tenants/{tenant}/jobs/{id}/resume), or whenPOST /api/tenants/{tenant}/jobs/{id}/retry-failedtakes the failed and timed-out devices of a completed job again (they are queued, each with its attempt raised by one). After a resume the abort threshold pauses the job again only on a new failure. Envelope:endpointis one of the endpoints the job has devices on (one event to each),deviceis "",packageis “houradvantage-connect”; each change to the job gives a new id. - job.started: A job was created. The gateway sends it once, when the job is created (
POST /api/tenants/{tenant}/jobs), before any device starts: state is running, wave is 0 and every device is queued. A job whose targets match no device sends no events. Envelope:endpointis one of the endpoints the job has devices on (one event to each),deviceis "",packageis “houradvantage-connect”; each change to the job gives a new id. - job.wave: A job moved on to a later wave. The gateway sends it when every device of the current wave succeeded and the rollout advances by itself (advance “auto”, the default), or when the job is told to advance (
POST /api/tenants/{tenant}/jobs/{id}/advance, running or paused). Advancing by itself can pass several waves at once; the event gives the wave reached. Devices of the new wave start in the same step, so counts may already show them running. Envelope:endpointis one of the endpoints the job has devices on (one event to each),deviceis "",packageis “houradvantage-connect”; each change to the job gives a new id. - leave.booked: What a leave request books changed while where it stands did not: a day of leave on a holiday added after the leave was approved books no time (the hours are back in the balance and the holiday is paid), or the time a day books was changed by a step. The request’s days are what it books now,
waswhat it booked before,becausewhat changed it. A change of where the request stands (approved, refused, waiting) is told by the event of that (leave.requested,leave.decided), with the same fields. Kept in Time and Attendance’s own event log and delivered to its sinks, as the other leave events are. The same event sent again has the same id. - leave.cancelled: A leave request is taken back (cancelled), and no other replaces it: its time is no longer in the person’s ledger. A request replaced by another is not cancelled: the other is requested in its turn, naming it in replaces. The fields are those of the request as it last stood. Kept in Time and Attendance’s own event log (apart from Connect’s) and delivered to its sinks: the tenant’s (/api/attendance/tenants/{tenant}/sinks) and the install’s (/api/attendance/sinks). It is told from the ledger of the pay period the request’s first day is in. The envelope’s endpoint is “attendance”, its package “houradvantage-attend”, and its device “
/leave/ ”. The same event sent again has the same id. - leave.decided: A leave request is approved at every stage (its time is now in the person’s ledger, in its category), rejected at a stage, or refused by the policy’s leave check (not enough balance, a blackout day: its approval cannot pass). With no approval rule for leave, a request waits for one decision at the stage “approval”. Kept in Time and Attendance’s own event log (apart from Connect’s) and delivered to its sinks: the tenant’s (/api/attendance/tenants/{tenant}/sinks) and the install’s (/api/attendance/sinks). It is told from the ledger of the pay period the request’s first day is in. The envelope’s endpoint is “attendance”, its package “houradvantage-attend”, and its device “
/leave/ ”. The same event sent again has the same id. - leave.requested: A leave request waits for a stage’s approval: for whoever approves that stage to act on. Sent when the request is made, again at each stage after the one before approves it, and again when a stage’s approval no longer holds (the request changed). With no approval rule for leave, a request waits for one decision at the stage “approval”. Kept in Time and Attendance’s own event log (apart from Connect’s) and delivered to its sinks: the tenant’s (/api/attendance/tenants/{tenant}/sinks) and the install’s (/api/attendance/sinks). It is told from the ledger of the pay period the request’s first day is in. The envelope’s endpoint is “attendance”, its package “houradvantage-attend”, and its device “
/leave/ ”. The same event sent again has the same id. - 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. - package.held: Time and Attendance: sent to a tenant following a shared package when a published version needs something the tenant has not set up (an accrual category or a measure the version reads). The tenant stays on the version it has (from) and the package status says so (“held at 1.0.0: version 1.1.0 needs accrual category rtt”); no ledger changes. When the tenant sets up what is missing it moves on at once, and package.updated is sent then. In its own event log, delivered to the tenant’s and the install’s sinks; the envelope’s endpoint “attendance”, its package “houradvantage-attend” and its device the tenant’s id.
- package.updated: Sent when a change makes a tenant take another version of a policy package: publishing a version of a shared package that a tenant following its major version takes from now on (one event to each such tenant; a tenant pinning a version gets none), activating a revision of a tenant’s own package (to the tenant), or, in Connect, a tenant adopting a shared package or changing what it adopted (to the tenant). The change is never made without it. In Connect, the envelope has endpoint “source:connect” (Connect’s own events about the tenant: a tenant’s sink is sent them by naming “connect” in its sources), device "" and package “houradvantage-connect”; each change gives a new id. In Time and Attendance it is kept in its own event log and delivered to its sinks (the tenant’s and the install’s), the envelope’s endpoint “attendance”, its package “houradvantage-attend” and its device the tenant’s id; it says the day the version is in force from (effective), from which the tenant’s people are worked out again.
- period.adjusted: The adjustments a timecard holds for a closed pay period are new or changed: changes recorded after that period closed (a late punch, a correction, a setup or policy change naming a day in it), paid in the period open when they were recorded. The closed period’s own timecard never changes; payroll pays these on top of it. Sent with the adjustments’ totals as they stand in this timecard each time they change; with none (“0.00”, no categories) when they left it, the closed period having been reopened. Kept in Time and Attendance’s own event log (apart from Connect’s) and delivered to its sinks: the tenant’s (/api/attendance/tenants/{tenant}/sinks) and the install’s (/api/attendance/sinks). The envelope’s endpoint is “attendance”, its package “houradvantage-attend”, and its device ”
/ / ” (the timecard holding the adjustments). The same event sent again has the same id. - period.closed: A pay period is closed for a person: their timecard as payroll pays it, with its totals. Sent once per close; a change recorded after the close shows as an adjustment, not a new period.closed. Kept in Time and Attendance’s own event log (apart from Connect’s) and delivered to its sinks: the tenant’s (/api/attendance/tenants/{tenant}/sinks) and the install’s (/api/attendance/sinks). The envelope’s endpoint is “attendance”, its package “houradvantage-attend”, and its device ”
/ / ” (the timecard). The same event sent again has the same id. - 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:
”, device "" and package “houradvantage-connect”; the event goes to the sinks the group names. - person.deleted: Sent by the gateway for a sync group that keeps people: a person was deleted from the group’s registry, through the admin API or taken in from a member device. The person and their credentials are deleted from every member that holds them. The person’s punch state (their recent punches, used for the duplicate and lockout checks) and the aliases of their old user ids are removed too. The envelope has endpoint “sync:
”, device "" and package “houradvantage-connect”; the event goes to the sinks the group names. - person.enrolled: Sent by the gateway for a sync group that keeps people: a person was enrolled at a clock (the clock reported a user the group did not have). They are the group’s person from then on, with what the clock reported (never their keypad PIN or password), kept on that clock alone until they are linked (given an id in another system: an external id, or a route of their own with one), when they are sent to every clock of the group as placement says. They count toward the tenant’s limit on people. The endpoint’s policy package’s enrolled hook is called after it is stored; a system deciding elsewhere links or deletes them through the API. Told once per enrollment. The envelope has endpoint “sync:
”, device "" and package “houradvantage-connect”; the event goes to the sinks the group names. - person.linked: An unlinked person was linked to the person they are (or unlinked, or linked to someone else): from the link on, their punches are that person’s. Carries both ids and the sender’s ids, so a sink can tell the sender who they are (Connect sets the person’s id from it, and their punches carry it from then on). Sent once for each link. Kept in Time and Attendance’s own event log (apart from Connect’s) and delivered to its sinks: the tenant’s (/api/attendance/tenants/{tenant}/sinks) and the install’s (/api/attendance/sinks). The envelope’s endpoint is “attendance”, its package “houradvantage-attend”, and its device the unlinked person’s id. The same event sent again has the same id.
- person.replaced: Sent by the gateway for a sync group, once: a person’s user id change (POST /api/tenants/{tenant}/sync/{name}/people/{user_id}/change-id) is done on every member. Each member that held the person either renamed them, or had them created under the new id, checked, and the old user deleted. It is not sent while a member is still working on the change or has failed it (POST /api/tenants/{tenant}/sync/{name}/people/{user_id}/retry-change-id carries a failed member on). Punches made under the old id still arrive, marked with sync.user_id_alias_of, for as long as the alias is kept (retention_days from the change). The envelope has endpoint “sync:
”, device "" and package “houradvantage-connect”; the event goes to the sinks the group names. - person.unlinked_seen: Punches arrived for someone the tenant does not know: their sender knows them by its own ids only (Connect’s id of the person, or the user on an endpoint), with no id of the tenant’s among them. They are kept as an unlinked person, and their hours are worked out with the tenant’s policy, so a manager sees them. Sent once, when they are first worked out; link them to the person they are with POST /api/attendance/tenants/{tenant}/unlinked/{id}/link. Kept in Time and Attendance’s own event log (apart from Connect’s) and delivered to its sinks: the tenant’s (/api/attendance/tenants/{tenant}/sinks) and the install’s (/api/attendance/sinks). The envelope’s endpoint is “attendance”, its package “houradvantage-attend”, and its device the unlinked person’s id. The same event sent again has the same id.
- photo: A photo the device took when someone tried to punch, uploaded by the device (zk-push 2.0, 2.4 and 3.4: the ATTPHOTO table). It is personal data: the gateway drops it before it is stored unless the endpoint sets biometrics = true.
- policy.hook_failed: The gateway’s own event: an endpoint’s policy package hook failed (its code raised an error, ran out of its limits, or returned what a hook may not), or said to do what could not be done (an action that could not be started, a command that could not be queued, a job that could not be made). Nothing of what failed is done, and the hook is not asked again: this is the policy’s answer, for the builder to act on through their own systems. Told once for the hook and what it was about, however often it ran; the route hook, asked again each time its punch is worked out again, is told once per attempt that fails. The envelope’s endpoint and device are the moment’s (for route, the punch’s).
- punch: A user punched in or out at a device. Sent by the device’s package for every attendance record the device uploads (zk-push 2.0, 2.4 and 3.4: each ATTLOG line; brightlink-cloud: each punch message), including records uploaded again, which keep their id. user_id, local_time, utc_offset, time, dst_ambiguous, time_zone and zoned are always there; the other fields are there when the device reports them. The gateway adds a sync object when the device’s sync group keeps punches, or keeps people and its placement does not put the user on this device. Where the punching person’s group keeps people, the gateway routes it (route or candidates); a punch routed later through the API is the same punch, sent again with the same id and its route.
- punch.unrouted: The gateway’s own event: a punch of a person of a group that keeps people goes nowhere until it is routed (the site’s /docs/policy/ page, Routes). The punch itself was stored as a punch event as any punch is, without a route: a sink that names no system is sent it, a sink that speaks for a system is not. It is kept aside until it is routed through the API (POST /api/tenants/{tenant}/sync/{group}/unrouted/{id}/route, or a route added to the person), when it is sent again with the same id and its route. Told once per punch and reason. The envelope’s endpoint and device are the punch’s.
- recalculation.parked: The attendance engine parked something it could not work out, saying why (reason): it is not tried again by the clock, only when something it is worked out from changes, or when a worker of another build takes it. unsettled: the records of one worker read each other’s time (ctx:other_records), and their policies kept changing each other: a change of one works the others out again, which changed it again, until a pass left a record’s time as it was after an earlier pass of the chain (relayed passes before it); a change of the person’s time is passed on to the worker’s other records no further, until something is recorded for one of them. Each record is kept as it was last worked out. failed: a person’s ledgers could not be worked out (a policy step that fails, data the policy cannot take, a step that ran out of work or memory); they stay as they were, with the error kept in their pending work (GET …/pending), until anything is recorded for them or their policy changes, or a worker of another build takes them; told once for the mark that failed. When what fails is common to a whole batch of the tenant’s people (a package that does not load), the tenant is told once, with persons, for as long as its batches keep failing, not each person. Kept in Time and Attendance’s own event log (apart from Connect’s) and delivered to its sinks: the tenant’s (/api/attendance/tenants/{tenant}/sinks) and the install’s (/api/attendance/sinks). The envelope’s endpoint is “attendance”, its package “houradvantage-attend”, and its device the person’s id.
- 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. - sink.behind: Sent when a sink falls behind retention: it has not taken events older than retention_days (counted in whole UTC days). Such events are never removed for their age: they are kept until the sink takes them, or until an operator moves the sink past them (sink.moved). A sink that is down, refusing, paused (its tenant suspended) or forgotten makes the log grow; this says so. Checked every hour, and sent once when the sink falls behind: not again while it stays behind. sink.caught_up follows once it has taken them. In Connect, the envelope has endpoint “source:connect” of the sink’s tenant (the default tenant’s for an install-level sink; a tenant’s sink is sent them by naming “connect” in its sources), device "" and package “houradvantage-connect”. In Time and Attendance it is kept in its own event log and delivered to its sinks (the tenant’s and the install’s), the envelope’s endpoint “attendance”, its package “houradvantage-attend” and its device the tenant’s id. A sink that is down is not sent the event about itself until it takes what came before it.
- sink.caught_up: Sent once when a sink that was behind retention (sink.behind) no longer is: it has taken every event older than retention_days, or an operator moved it past them (sink.moved). Checked every hour; falling behind again later is a new sink.behind. The envelope is that of sink.behind.
- sink.moved: Sent when an operator moves a sink by hand (POST …/sinks/{id}/position): back, to have it sent events again, or ahead, skipping what it has not taken. Moving a sink ahead is the only way an event leaves the log before every sink it is for has taken it: the operator’s decision, said here as well as in the audit trail. The events it skipped are removed once no other sink waits for them. The envelope is that of sink.behind. Each move is its own event, with an id of its own.
- sync.member: Sent by the gateway for a sync group when one of its member devices changes standing: it joined or left the group, the bulk-delete guard paused it, it was resumed, its package now declares something different for it, its labels changed, or a member that left was forgotten. Sent once per change. GET /api/tenants/{tenant}/sync/{name}/members shows where each member is with the group’s rows. The envelope has endpoint “sync:
”, device "" and package “houradvantage-connect”; the event goes to the sinks the group names. - sync.paused: Sent by the gateway for a sync group: the bulk-delete guard paused a member device. It reported that it cleared its users or its data (a data_cleared, users_cleared or factory_reset in its log, not one from before it joined), or more than 20 of its deletes were to be taken in within 10 minutes. Nothing it reported in that message is taken in, nothing of it goes to the other members, and nothing is sent to it, until it is resumed (POST /api/tenants/{tenant}/sync/{name}/members/{endpoint}/{device}/resume). A sync.member event with change paused is sent with it. The envelope has endpoint “sync:
”, device "" and package “houradvantage-connect”; the event goes to the sinks the group names. - tenant.limit_reached: Sent by the gateway when a tenant is found over one of its limits with nothing refused for it: people (the people its sync groups keep, all together, past limits.people). A write through the API that would add a person past the limit is refused (422); a tenant can be over it all the same, for instance when its limit is lowered below what it has. What a clock sends is never refused for the limit: a person enrolled at a clock is the group’s, and counts, so enrolling can take a tenant over it. Nothing is blocked and nothing is deleted: whoever wants people deleted does it in their own business logic reacting to this. Sent once, on the crossing: not again while the tenant stays over, however many people are added. Its coming back at or within the limit (people deleted, at a clock too; the limit raised or taken away; a group gone) is noticed but sends no event; going over again after that is a new crossing, sent again with an id of its own. The envelope has endpoint “sync:
” (the group whose write took the tenant over, or after a change of the setup the tenant’s first group that keeps people), device "" and package “houradvantage-connect”; the event goes to the sinks that group names. - timecard.approved: A person’s timecard for a pay period is approved at every stage its approval rule has: as a whole, or, where its side is approved by assignment, every assignment’s hours of it. Sent once; a change that takes the approval away (the timecard changed after it was approved) and a new approval send it again, with the totals as they are then. Kept in Time and Attendance’s own event log (apart from Connect’s) and delivered to its sinks: the tenant’s (/api/attendance/tenants/{tenant}/sinks) and the install’s (/api/attendance/sinks). The envelope’s endpoint is “attendance”, its package “houradvantage-attend”, and its device ”
/ / ” (the timecard). The same event sent again has the same id. - unparsed: A record the package could not interpret, passed on as the device sent it instead of being dropped: the device was told it was received and will not send it again. zk-push 2.0, 2.4 and 3.4 send it for an upload line they cannot read (a punch whose time cannot be read, a row that names no user, a row the package does not know); brightlink-cloud for a punch message without a usable userId or with a time it cannot place; the gateway for a row whose key (a user id, a list item’s key) is longer than 128 characters, the most a registry key may have (the row’s kind and field are in context,
rawhas the first 24 characters of the key and a hash of it, never the key); the MQTT listener for a message that cannot be set aside because its tenant has as many messages set aside as it may (raw is then the message as it came, context.topic its topic, and reason why it waited: no route of the package took it, its device waits to be allowed, and so on). Whatever sent it, arawof more than 16 KiB is cut (seeraw). - user.deleted: A user was deleted on the device, at its menu or by a command. zk-push 2.0, 2.4 and 3.4 send it for each user-deleted row of the device’s operation log (alongside that row’s device.log event), except a row from before the device first reached the gateway: the whole log a device uploads on first contact does not repeat old deletes.
- user.extended: A user’s extended verification settings, uploaded by the device when they change or on request (zk-push 2.4 and 3.4: USEREXTINFO rows; zk-push 2.4 also in answer to query_user_extended).
- user: A user record on the device, uploaded when the user is added or changed on the device, or on request (zk-push 2.0, 2.4 and 3.4: USER rows, for instance in answer to query_user). A changed record is a new event with a new id. Only user_id is always there; a field the device does not report is absent. Passwords and keypad PINs are never passed on, only whether the user has one.
- user.photo: A user’s enrolment (display) photo, uploaded by the device when it is added or changed, or on request (zk-push 2.0, 2.4 and 3.4: USERPIC rows). It is personal data: the gateway drops it before it is stored unless the endpoint sets biometrics = true, and drops it for a person whose sync group does not allow them biometrics (see biometric.refused).
- work_code: A work code the device holds: one of the codes a user can enter with a punch (punch’s work_code). Emitted by zk-push 2.4, one per code, when the clock uploads its work codes in answer to query_work_codes.