Hey there,
Yes, Terra can retrieve historical data for extended periods, including one year of step data!
To request months of historical data, you would make a request to Terra's REST API .
Here's an example for retrieving daily data (which includes steps) over a date range :
import requests
api_key = '<YOUR-API-KEY>'
dev_id = '<YOUR-DEV-ID>'
resp = requests.get( 'https://api.tryterra.co/v2/daily',
params={ 'start_date': '2022-01-01', 'end_date': '2024-04-01', 'user_id': '<USER-ID>', 'to_webhook': 'true' },
headers={'x-api-key': api_key, 'dev-id': dev_id}
)
An additional note: This method requires a webhook to be configured as the response may be too big for a HTTP request. The data will be sent to your webhook in chunks!
You would then receive the data in Terra's standardized JSON format to process it into CSV or Excel format in your application. Hope this helps!