Documentation · API reference
POST/api/v1/sites/{site}/goals/test

Post goal test

Parameters

sitein the address
neededThe site's id or name

What to send

object

The answer

Status 200

GoalTest What a goal would have counted, before it is saved (EV-09).

by_day
list of number or nullneededBy the day, for a small chart. `null` is a day nothing was counted.
days
integerneeded
note
stringneededWhat cannot be tested this way, in a sentence. Empty when all of it was.
period
PeriodViewneeded
times
numberneededTimes it would have been reached.

Asking

With your token from Settings
curl -X POST https://tidekeeper.eu/api/v1/sites/example.org/goals/test \
    -H "Authorization: Bearer $TIDEKEEPER_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{}'
With your token from Settings
const answer = await fetch("https://tidekeeper.eu/api/v1/sites/example.org/goals/test", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.TIDEKEEPER_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
}).then((r) => r.json());