Skip to content

Exporting Breathing Rate Intraday by Date #171

Open
@MEINHL

Description

@MEINHL

Hi,

I am trying to export breathing rate data intraday by date, however could not find specific help on this in the python fitbit documentation. I have successfully authorized and then exported heart rate data, using the following call:

fit_statsHR = auth2_client.intraday_time_series('activities/heart', base_date="2022-05-14", detail_level='1sec')

However, breathing rate does not seem to work, even if it should be possible according to the fitbit documentation:
https://dev.fitbit.com/build/reference/web-api/intraday/get-br-intraday-by-date/

I am using this call:

fit_statsBR = auth2_client.intraday_time_series('br', base_date="2022-05-14")

This is the error I get:

`HTTPNotFound Traceback (most recent call last)
Input In [18], in <cell line: 1>()
----> 1 fit_statsBR = auth2_client.intraday_time_series('br', base_date="2022-05-14")

File ~\Documents\Projects\BBCDS\Actimetry\python-fitbit-master\fitbit\api.py:592, in Fitbit.intraday_time_series(self, resource, base_date, detail_level, start_time, end_time)
588 url = url + ('/%s' % (time_str))
590 url = url + '.json'
--> 592 return self.make_request(url)

File ~\Documents\Projects\BBCDS\Actimetry\python-fitbit-master\fitbit\api.py:256, in Fitbit.make_request(self, *args, **kwargs)
253 kwargs['headers'] = headers
255 method = kwargs.get('method', 'POST' if 'data' in kwargs else 'GET')
--> 256 response = self.client.make_request(*args, **kwargs)
258 if response.status_code == 202:
259 return True

File ~\Documents\Projects\BBCDS\Actimetry\python-fitbit-master\fitbit\api.py:99, in FitbitOauth2Client.make_request(self, url, data, method, **kwargs)
89 method = method or ('POST' if data else 'GET')
90 response = self._request(
91 method,
92 url,
(...)
96 **kwargs
97 )
---> 99 exceptions.detect_and_raise_error(response)
101 return response

File ~\Documents\Projects\BBCDS\Actimetry\python-fitbit-master\fitbit\exceptions.py:86, in detect_and_raise_error(response)
84 raise HTTPForbidden(response)
85 elif response.status_code == 404:
---> 86 raise HTTPNotFound(response)
87 elif response.status_code == 409:
88 raise HTTPConflict(response)

HTTPNotFound: <Response [404]>`

Is it possible to extract breathing rate, in the same way as heart rate data intraday by date?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions