Skip to content

Updates to Fitbit's API endpoints for sleep? #26

@madprime

Description

@madprime

Looking at this:
https://github.com/OpenHumans/oh-fitbit-integration/blob/master/datauploader/tasks.py

... it seems that the endpoint is going to https://api.fitbit.com/1/user

That prefix is still used for the following:

  • Activity endpoints which have the a format https://api.fitbit.com/1/user/[user-id]/activities/tracker/...
  • Heart endpoints which have the a format https://api.fitbit.com/1/user/[user-id]/activities/heart/...
  • Body & weight endpoints which have the a format https://api.fitbit.com/1/user/[user-id]/activities/body/...

However from the sleep documentation: https://dev.fitbit.com/build/reference/web-api/sleep/

... I see the endpoint seems to be updated to be like https://api.fitbit.com/1.2/user/-/sleep/. (Note the "1.2".)

I was looking into this because I'd like to be collecting the sleep stages data (minute-by-minute information about which "stage" of sleep is occurring), which appears to be available in this new endpoint. (I think the old one is working but deprecated: https://dev.fitbit.com/build/reference/web-api/sleep-v1/ )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions