Automate Reddit
Explore Plans
Mobile menu Close menu
FitbitFitbit

History of Sleep duration above threshold

This query returns a list of events when you logged sleep above the target hours you specified. Note: this query will only return future events after this Applet is created.

About this query

Triggers, queries, and actions are the building blocks of Applets. Triggers tell an Applet to start, queries ask a question, and actions are its end result.

Developer info

Description
This query returns a list of events when you logged sleep above the target hours you specified. Note: this query will only return future events after this Applet is created.
API endpoint slug
fitbit.history_of_sleep_duration_above_threshold
Runtime method
performQuery("fitbit.history_of_sleep_duration_above_threshold")

Query fields

Target hours Text input > Regular expression

Label
Target hours
Helper text
e.g. 7.5
Slug
target_hours
Required
true
Can have default value
true

Ingredients

Total time slept in secondsThe total time you slept in seconds

Slug
TotalTimeSleptInSeconds
Filter code
Fitbit.historyOfSleepDurationAboveThreshold.TotalTimeSleptInSeconds
Type
String
Example
28800

Total time sleptThe total time you slept

Slug
TotalTimeSlept
Filter code
Fitbit.historyOfSleepDurationAboveThreshold.TotalTimeSlept
Type
String
Example
8h 0m

Date awokenDay when you awoke

Slug
DateAwoken
Filter code
Fitbit.historyOfSleepDurationAboveThreshold.DateAwoken
Type
Date (ISO8601)
Example
2020-07-07