Documentation · API reference
GET/api/v1/sites/{site}/when

When in the week readers come: each hour of each weekday

When in the week readers come: each hour of each weekday.

Parameters

sitein the address
neededA site's id or name
periodin the query
The period averaged over; four weeks unless given
metricsin the query
`visitors` (the default) or `views`

The answer

Status 200

WhenResponse When in the week readers come.

busiest
WhenCell or null
by_hour
list of number or nullneededEach hour of the day, averaged over every day.
caveats
list of CaveatViewWhat these averages say of themselves: a stretch someone left out of comparisons is in none of them.
metric
stringneeded`visitors` (counted once in each hour they came) or `views`.
period
PeriodViewneeded
quietest
WhenCell or null
rows
list of WhenRowneededSeven rows, from the day the site's week starts on.
site
stringneeded

Asking

With your token from Settings
curl https://tidekeeper.eu/api/v1/sites/example.org/when \
    -H "Authorization: Bearer $TIDEKEEPER_TOKEN"
With your token from Settings
const answer = await fetch("https://tidekeeper.eu/api/v1/sites/example.org/when", {
  headers: {
    Authorization: `Bearer ${process.env.TIDEKEEPER_TOKEN}`,
  },
}).then((r) => r.json());