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

Figures over time

The same metrics over time: one point for every day or hour.

Parameters

sitein the address
neededA site's id or name
grainin the query
`day` or `hour`. Follows the period when left out

The answer

Status 200

SeriesResponse

annotations
list of AnnotationViewneededNotes on the chart that fall in the period.
caveats
list of CaveatViewneeded
compare
PeriodView or null
grain
stringneeded`day` or `hour`.
metrics
list of stringneeded
period
PeriodViewneeded
points
list of PointneededOne point for every day or hour of the period. A point with `null` values is a time nothing was being counted: a gap, not a zero.
previous
list of Point or null
previous_totals
list of number or null or null
site
stringneeded
totals
list of number or nullneeded

Asking

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