Loki Docs
Tools › Check-ins › Get a habit summary

Get a habit summary

get_habit_summaryReads
What it does
Reads only. Changes nothing.
Permission
Check-ins, read checkins:read

What your assistant is told

Per-habit status for ONE local day: whether each habit was scheduled, whether it was met, the amount logged vs its target, and the current streak. date is YYYY-MM-DD in the user's LOCAL calendar; tz buckets the day locally (check-ins are stored in UTC) and defaults to the zone on their profile, so pass it only to override that. Use this to answer "how did I do today?" and to see what's still outstanding. For today, each habit also carries next — when it is next due — so "when can I take the next one?" has an answer you should not work out yourself. Instants are UTC; say them in the user's local time. - reason: "time" — a planned time. When at is later than plannedAt, the habit's minimum gap pushed it ("your 20:00 is now 21:00, eight hours after the 13:00 one"). - reason: "gap" — no planned time; it can be done again from at. - reason: "dropped" — the gap pushed today's next time past the end of the day, so today no longer expects it. readyAt is when the gap since the last counting entry runs out.

Parameters

  • datetext, optionalLocal calendar date, YYYY-MM-DD. Omit for today in tz.
  • tztext, optionalIANA time zone, e.g. "Europe/Bucharest". Omit to use the user's profile zone.