Health and Reference Data
Two small things that don't belong to any resource. Health is for whatever is watching your instance, and the currency list is reference data you'd use when creating a bank account.
Check server health
Reports whether the API is up and whether it can reach its database. This is what you point an uptime monitor at.
In the app: Nothing in the app calls this. It's for monitoring, container health checks, and load balancer probes.
Auth: None. This is the only endpoint that skips authentication entirely, and it also sits outside monetr's normal request handling, so it doesn't open a database transaction or get traced. HEAD exists so uptime checkers that use it don't fill your logs with errors.
Example
Response attributes
Watch the status code, not only the body. When the database ping fails you get a 500, with dbHealthy set to
false. A monitor checking only for 200 will catch that, but one parsing the body should check both.
GET List currencies
Returns every currency the server can format amounts for, which comes from the operating system's locale data rather than a list monetr maintains.
In the app: The currency picker when you create or edit a bank account.
Auth: API key, subscription required.
Example
A flat array of ISO 4217 codes, nothing more. The real list is much longer, this is a sample.
Because the list comes from the host's locale data, two instances on different base images can hand back different sets. If a currency you expect is missing, that's a locale package on the server rather than something monetr decided. A code missing here can still be a perfectly valid currency, monetr has no formatting information for it.
The codes here are what you pass as currency when creating a bank account,
and they decide how many decimal places an amount implies. See Money.