List a tenant's events
const url = 'http://127.0.0.1:9090/api/attendance/tenants/acme/events?after=1180&limit=100&type=period.closed&source=erp&since=2026-10-19T00%3A00%3A00Z&until=2026-10-20T00%3A00%3A00Z';const options = { method: 'GET', headers: { 'X-Request-Id': '4f1c2b0e-8a7d-4c51-9e2f-3a6b8d0c1e7f', Authorization: 'Basic <credentials>' }};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'http://127.0.0.1:9090/api/attendance/tenants/acme/events?after=1180&limit=100&type=period.closed&source=erp&since=2026-10-19T00%3A00%3A00Z&until=2026-10-20T00%3A00%3A00Z' \ --header 'Authorization: Basic <credentials>' \ --header 'X-Request-Id: 4f1c2b0e-8a7d-4c51-9e2f-3a6b8d0c1e7f'The tenant’s events in Time and Attendance’s log, oldest first, a page at a time, each with its sequence number
(seq): the engine’s own (endpoint attendance) and those other systems posted into the tenant (endpoint
source:<source>). An event is never returned before every event with a lower seq is in place, so reading on
from next skips nothing. They are kept for the install’s retention_days once every sink they go to has taken
them, and until it does while one has not.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The tenant’s id.
Example
acmeQuery Parameters
Section titled “Query Parameters”Only events after the one with this sequence number: the next of
the page before. Default 0, from the oldest kept.
Example
1180At most this many events: 100 unless given, at most 1000.
Example
100Only events of this type.
Example
period.closedOnly the events this source posted (erp), or the engine’s own
(attendance).
Example
erpOnly events received at or after this time (RFC 3339).
Example
2026-10-19T00:00:00ZOnly events received before this time (RFC 3339).
Example
2026-10-20T00:00:00ZHeader Parameters
Section titled “Header Parameters”An id to follow the request by: answered back in X-Request-Id, and in the log, the audit trail and the events the request causes. 1 to 128 letters, digits, -, _, . or :; anything else is replaced by a new id.
Example
4f1c2b0e-8a7d-4c51-9e2f-3a6b8d0c1e7fResponses
Section titled “Responses”A page of events, oldest first.
A page of stored events.
object
The events, oldest first.
An event as it is kept: with the sequence number it was stored under.
object
The type’s fields.
object
The device’s id: whatever its package identifies it by (a serial number, a MAC address, a cloud id); “” for an event about a whole job (job., but not job.execution.) or a sync group; for an event a system posted, what it is about, as posted (“” when it named nothing); for Time and Attendance’s own, the person or timecard it is about.
The endpoint the device belongs to, by its id within the tenant; “sync:
The sync group of the endpoint (every endpoint is in one, its own unless it names one), by its id within the tenant; for a group’s own events, that group. Absent for an endpoint no longer configured, and for events of another engine.
Stable idempotency key, 32 hex digits: the same device record always gets the same id, and an event a system posted (endpoint “source:
The package that read it, “name@version”; for the gateway’s own events about a device, that device’s package; “houradvantage-connect” for a job’s or sync group’s own events; for an event a system posted, its source; “houradvantage-attend” for Time and Attendance’s own.
Connect’s own id of the person the event is about (data.user_id) in its group: opaque, and kept when the person’s user id changes. Present when the group keeps people and has the person.
To a sink with person_id only: the id, in the system the sink names, of the person the event is about (data.user_id), from the person’s external_ids; absent when they have none there.
When the gateway received it (for the gateway’s own events, when it made them), RFC 3339 UTC.
The admin API request that caused the event, made while it ran: a change made through the API, an event posted through it. Absent for an event no request caused: a device’s message, a job’s waves, Time and Attendance working a ledger out. A request id is a correlation id only: the caller may have chosen it.
object
The request’s id: the X-Request-Id it was answered with, and that its audit trail entry and log lines carry.
The Idempotency-Key it was sent with, if any.
Who made the request, as the server named them from its login or token, never as the caller says: the login’s user, or token:
The version of this contract the event follows.
The tenant the event belongs to: in Connect’s events, the Connect tenant its endpoint is of (or that it was posted into); in Time and Attendance’s, the Time and Attendance tenant. Events of the source “attendance” in Connect’s log say “default” but are no Connect tenant’s: only install-level sinks that name the source are sent them, and they stay in the log until those sinks have taken them, then retention removes them as any event. Time and Attendance keeps its own events in a log of its own.
The event type; the event reference describes each.
The sequence number it was stored under, one order across the whole
install. Read on from it with after.
The seq of the last event on the page, or the after asked for
when the page is empty: pass it as after for the next page.
Example
{ "events": [ { "data": { "person": "104552", "side": "pay", "tenant": "acme" }, "device": "104552/pay/2026-10-05", "endpoint": "attendance", "id": "9c1e7b6d4a0f8e5c2b1a9d8c7e6f3f2a", "package": "houradvantage-attend", "received_at": "2026-10-19T05:00:00Z", "schema": 3, "seq": 1205, "tenant": "acme", "type": "period.closed" } ], "next": 1205}until is not later than since, or source is not an id.
A refusal, and why.
object
Why the request was refused, in a sentence.
For a request whose parameters do not fit (422): what is wrong with each field. Absent otherwise.
What is wrong with one field of a request.
object
The parameter, as the request names it (values.volume for a
setting inside values).
What is wrong with it.
The request’s id, as its X-Request-Id header gives it: what to
quote when asking what happened to it.
Examplegenerated
{ "error": "example", "fields": [ { "field": "example", "message": "example" } ], "request_id": "example"}A login is configured and the request carries neither it nor an API token, or it carries a wrong login (WWW-Authenticate: Basic realm="Hour Advantage", no body). Or the request carries an API token that is not one (revoked, or never made), login or not (WWW-Authenticate: Bearer realm="Hour Advantage", error="invalid_token", the body the API token was refused).
Example
the API token was refusedHeaders
Section titled “Headers”The scheme to answer with: Basic realm="Hour Advantage", or for a refused token Bearer realm="Hour Advantage", error="invalid_token".
The Host header does not name a loopback address while one is required (no login configured, or the API listens on loopback), or the Origin header does not match the Host: {"error": ...} says which. Or no login is configured and the request carries Forwarded, X-Forwarded-For or X-Real-IP (a proxy forwarded it): the plain text body says so. Or an API token asks for a route its scope does not reach: the plain text body says so.
A refusal, and why.
object
Why the request was refused, in a sentence.
For a request whose parameters do not fit (422): what is wrong with each field. Absent otherwise.
What is wrong with one field of a request.
object
The parameter, as the request names it (values.volume for a
setting inside values).
What is wrong with it.
The request’s id, as its X-Request-Id header gives it: what to
quote when asking what happened to it.
Example
{ "error": "the Host must name this machine (localhost or a loopback address); an API reached by other names needs the admin login"}Example
a forwarded request needs the admin login; none is setNo such tenant.
A refusal, and why.
object
Why the request was refused, in a sentence.
For a request whose parameters do not fit (422): what is wrong with each field. Absent otherwise.
What is wrong with one field of a request.
object
The parameter, as the request names it (values.volume for a
setting inside values).
What is wrong with it.
The request’s id, as its X-Request-Id header gives it: what to
quote when asking what happened to it.
Example
{ "error": "no tenant 'acme'"}More than 2 admin logins are being checked at once: send the request again after the Retry-After seconds. A request carrying the login that checked out last, or an API token, is not held up.
Example
too many logins at once; try againHeaders
Section titled “Headers”Seconds to wait: 1.
Something went wrong in the gateway that asking again will not put right by itself; error says what.
A refusal, and why.
object
Why the request was refused, in a sentence.
For a request whose parameters do not fit (422): what is wrong with each field. Absent otherwise.
What is wrong with one field of a request.
object
The parameter, as the request names it (values.volume for a
setting inside values).
What is wrong with it.
The request’s id, as its X-Request-Id header gives it: what to
quote when asking what happened to it.
Example
{ "error": "db error: ERROR: permission denied for table settings"}The attendance engine does not run here.
A refusal, and why.
object
Why the request was refused, in a sentence.
For a request whose parameters do not fit (422): what is wrong with each field. Absent otherwise.
What is wrong with one field of a request.
object
The parameter, as the request names it (values.volume for a
setting inside values).
What is wrong with it.
The request’s id, as its X-Request-Id header gives it: what to
quote when asking what happened to it.
Example
{ "error": "the attendance engine does not run on this instance (start it with HOURADVANTAGE_ATTEND)"}