An API for your other systems
Payroll, HR and reporting systems read from Metraia with keys that each hold only what they need, over HTTPS, with every request in the audit log. It reads only, and never hands out messages or pay.
Other systems read from Metraia through its API: a payroll export taking last week’s punches, an HR system matching its people to Metraia’s by their payroll ids, a reporting tool, a screen in the break room showing today’s rota.
Keys, granted narrowly
Each system gets a key, a named identity for a machine. Keys are made under Access > Integrations by whoever manages integrations, the general manager in the roles Metraia starts with. The token is shown once; Metraia keeps only a hash of its secret.
A key reads what its grants cover, record by record. A grant is a capability over a place: a department, a group of departments, a location, or the whole organisation. The capabilities are:
- your structure: locations with their time zones, departments and positions
- people: names, titles, department, status and their ids in other systems
- email addresses and phone numbers, granted separately
- shifts in published weeks, and, separately, weeks not yet published
- time-off requests, without the notes people wrote
- clock-ins and clock-outs
- message board posts and replies
- the audit log, for the whole organisation only
So one key might read people in Deli & Hot Foods and nothing else; another, punches for the whole organisation.
Nobody grants more than they could see. For each grant, the person making the key must be able to see the same thing on the site, over the same place. The page offers only those grants, and the server checks again.
Safeguards
- HTTPS only, apart from a program on the same machine.
- Limits per key: the addresses it may be used from, an expiry date, and its own requests a minute (120 by default, up to 6,000). An address with too many refused requests is made to wait.
- Rotation without a gap: a new secret can leave the old one working for an hour, a day or a week while the other system is updated. A key can be disabled or deleted, and a running server notices within seconds.
- Every request audited: the key, what was asked, the status, how many records went back and the caller’s address. Refusals are recorded too, with the reason.
- No browser can use it: no cookies, no sessions.
What it does today
The API speaks JSON and is described in OpenAPI 3.1, published without a key. It reads only: no other system can change anything in Metraia, and other systems ask for what is new rather than being told. Messages between people, pay, passwords, two-step secrets, sign-in history, dates of birth and the notes people write on requests are never available through it.