Terra Docs
Dashboard
  • Docs
  • API Reference
  • Changelog
  • Get started ⚡️ Choose your integration
  • Health & Fitness API
    • Overview
    • Set up your Integrations
    • Connect a User
    • Receive data updates
    • Request Historical data
    • Write data
    • Debugging FAQ
    • Mobile-Only Sources: Apple, Samsung, Google Fit
      • iOS (Swift)
      • Android (Kotlin)
      • React Native
      • Flutter
  • Streaming API
    • Getting Started
    • Wearable -> Your app
      • iOS (Swift)
      • Android
    • Your app -> Terra
      • iOS (Swift)
      • Android
    • Terra -> Your Backend
  • Teams API
  • Biomarkers API - Upcoming
Powered by GitBook
On this page

Was this helpful?

  1. Streaming API

Getting Started

PreviousFlutterNextWearable -> Your app

Last updated 6 months ago

Was this helpful?

The Terra Streaming API enables real-time data streaming to metrics such as

  • Steps

  • Heart Rate

  • Distance covered

  • etc...

on a ~per second basis.

For longer span data, such as workouts, sleep, daily totals & more, please refer to the

The Streaming API gives access to all wearables that broadcast data through BLE, ANT+, or certain custom bluetooth protocols as well as phone sensors

  • Heart rate straps (Polar H10, Garmin HRM Pro, Wahoo TICKR FIT...)

  • Certain smartwatches (Apple Watch, , Xiaomi Mi Band 5 & 6...)

  • etc..

Data flow diagram for data streaming

How It Works

4 components need to all be working together for the streaming API to deliver data to you

  1. Wearable Device

  2. Producer (your mobile app, running the Terra RT SDK)

  3. Terra WebSocket Broker (Terra's server)

  4. Consumer (your server backend)

Here's a simplified overview of the process:

  1. Device Connection: The user connects their wearable device to your mobile app via Bluetooth Low Energy or ANT+, using one of Terra's real-time streaming SDKs.

  2. Producer Setup: Your mobile app establishes a Terra Streaming Producer connection with the Terra WebSocket Service, utilizing the real-time streaming SDK.

  3. Consumer Setup: To access the data stream on your server backend, you create a Terra Streaming Consumer connection with the Terra WebSocket Service. Once connected, the wearable data will begin streaming to your server in real time.

Wearable API
Garmin Fenix 6 & up