Terra

Integration

API
Unified API
SDK
SDK
Authentication
Authentication
Streaming
Streaming
Blood
Blood Report API
Planned Workout
Planned Workout
AI Interface
AI Interface

User engagement

Graph API
Graph API
Scores
Health Scores
Rewards
Health Rewards

Use cases

Enterprise
Enterprise
Insurance
Insurance

Developers

Wearable Data
Wearable Data
Community
Community
Documentation
Documentation

Learn

Blog
Blog
Podcast
Podcast
Events
Events
Reports
Reports

Company

Customers
Customers
Careers
Careers
Partners
Partners
Support
Support
Become an integration
Become an integration


Cookie Preferences

Essential CookiesAlways On
Advertisement Cookies
Analytics Cookies

Crunch Time: Embrace the Cookie Monster Within!

We use cookies to enhance your browsing experience and analyse our traffic. By clicking “Accept All”, you consent to our use of cookies according to our Cookie Policy. You can change your mind any time by visiting out cookie policy.

zap

Latest

zap

Popular

API

Unified API

SDK

Phone SDK

Authentication

Widget

Streaming

Streaming

Graph API

Graph API

Getting Garmin Cycling events

All

CompactBasilisk25 months ago

I want to capture my Garmin user’s cycling sessions. How would I be able to get these payloads through Terra API?

terra

Jeffadmin25 months ago

Hey there

You can easily retrieve Garmin activity sessions by making a GET request to the /activity endpoint using the Terra REST API. When making the request, specify the start_date and end_date for the time period you would like to retrieve activities for, as well as to_webhook=false if you dont want the data to be sent to your configured destination and returned in the response body (note that if data for this period has not been requested before, you may have to make the request again after 180 seconds as Garmin takes some time to aggregate the data).

Once our API returns the activity data, filter through the data: [...] array for objects with the metadata.type field equaling 1 (ActivityType.CYCLING). There is also:

  • Handbiking -> 14
  • Mountain Biking -> 15
  • Road Biking -> 16
  • Spinning -> 17
  • Stationary Biking -> 18
  • Utility Biking -> 19
  • Motorbiking -> 137

You can see the full list of activity types here