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.
Schema id: urn:houradvantage:events:3:user
Fields
| Field | Type | Required | Description |
|---|---|---|---|
user_id | string | yes | The user’s id on the device. |
name | string | The user’s name, or "" when the device has none. zk-push 2.0 cuts it at the first control character and to 24 characters. | |
cards | array of object | The user’s cards; an empty list when the user has none. | |
cards[].number | string | yes | The card number as the reader gives it. |
cards[].format | string | How the card is read: raw, w26 or w34 (Wiegand 26 or 34 bits). Absent when the device does not say (zk-push never does). | |
cards[].facility | string | The facility code, where the device keeps it apart from the number. Absent otherwise (zk-push never does). | |
groups | array of string | The access groups the user belongs to, as the device numbers them; an empty list when none. | |
role | string | What the user may do on the device: user, enroller or admin. Absent when the device’s code has no name. | |
enabled | boolean | false: the user is kept on the device but may not punch. Absent when the device does not say (zk-push 3.4 reports only false, for its inactive users). | |
has_password | boolean | True when the user has a password on the device. The password itself is never sent. | |
has_keypad_pin | boolean | True when the user has a keypad PIN on the device. The PIN itself is never sent. Absent when the device does not say. | |
valid_from | string | When the user becomes valid, device wall-clock time “YYYY-MM-DD HH:MM:SS”. Absent when the device does not say. pattern ^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$ | |
valid_to | string | When the user stops being valid, device wall-clock time “YYYY-MM-DD HH:MM:SS”. Absent when the device does not say. pattern ^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$ | |
vendor | object | What the device said in its own terms, under one key naming the vendor or package (“zk”, “brightlink”). Not part of this contract: see the package’s documentation. |
Example
{ "user_id": "1001", "name": "Ana Diaz", "cards": [ { "number": "12345678" } ], "groups": [ "1" ], "role": "user", "has_password": false, "vendor": { "zk": { "privilege": 0, "timezones": "0000000000000000", "verify_mode": 0 } }}JSON Schema
user.json
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "urn:houradvantage:events:3:user", "title": "user: data", "description": "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.", "type": "object", "properties": { "user_id": { "type": "string", "description": "The user's id on the device." }, "name": { "type": "string", "description": "The user's name, or \"\" when the device has none. zk-push 2.0 cuts it at the first control character and to 24 characters." }, "cards": { "description": "The user's cards; an empty list when the user has none.", "type": "array", "items": { "type": "object", "properties": { "number": { "type": "string", "description": "The card number as the reader gives it." }, "format": { "type": "string", "description": "How the card is read: raw, w26 or w34 (Wiegand 26 or 34 bits). Absent when the device does not say (zk-push never does)." }, "facility": { "type": "string", "description": "The facility code, where the device keeps it apart from the number. Absent otherwise (zk-push never does)." } }, "required": [ "number" ] } }, "groups": { "description": "The access groups the user belongs to, as the device numbers them; an empty list when none.", "type": "array", "items": { "type": "string", "description": "An access group's number on the device." } }, "role": { "type": "string", "description": "What the user may do on the device: user, enroller or admin. Absent when the device's code has no name." }, "enabled": { "type": "boolean", "description": "false: the user is kept on the device but may not punch. Absent when the device does not say (zk-push 3.4 reports only false, for its inactive users)." }, "has_password": { "type": "boolean", "description": "True when the user has a password on the device. The password itself is never sent." }, "has_keypad_pin": { "type": "boolean", "description": "True when the user has a keypad PIN on the device. The PIN itself is never sent. Absent when the device does not say." }, "valid_from": { "type": "string", "description": "When the user becomes valid, device wall-clock time \"YYYY-MM-DD HH:MM:SS\". Absent when the device does not say.", "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$" }, "valid_to": { "type": "string", "description": "When the user stops being valid, device wall-clock time \"YYYY-MM-DD HH:MM:SS\". Absent when the device does not say.", "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$" }, "vendor": { "description": "What the device said in its own terms, under one key naming the vendor or package (\"zk\", \"brightlink\"). Not part of this contract: see the package's documentation.", "type": "object", "minProperties": 1, "maxProperties": 1, "additionalProperties": { "type": "object" } } }, "required": [ "user_id" ], "examples": [ { "user_id": "1001", "name": "Ana Diaz", "cards": [ { "number": "12345678" } ], "groups": [ "1" ], "role": "user", "has_password": false, "vendor": { "zk": { "privilege": 0, "timezones": "0000000000000000", "verify_mode": 0 } } } ]}