get_sleep_by_date_range
Retrieve raw sleep logs in JSON format from Fitbit for a specified date range using 'startDate' and 'endDate' parameters in 'YYYY-MM-DD' format. Maximum range allowed is 100 days.
Instructions
Get the raw JSON response for sleep logs from Fitbit for a specific date range. Requires 'startDate' and 'endDate' parameters in 'YYYY-MM-DD' format. Note: The API enforces a maximum range of 100 days.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
endDate | Yes | The end date for which to retrieve sleep data (YYYY-MM-DD). | |
startDate | Yes | The start date for which to retrieve sleep data (YYYY-MM-DD). |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"endDate": {
"description": "The end date for which to retrieve sleep data (YYYY-MM-DD).",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"type": "string"
},
"startDate": {
"description": "The start date for which to retrieve sleep data (YYYY-MM-DD).",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"type": "string"
}
},
"required": [
"startDate",
"endDate"
],
"type": "object"
}