<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Alex Venetidis on Medium]]></title>
        <description><![CDATA[Stories by Alex Venetidis on Medium]]></description>
        <link>https://medium.com/@alex_36748?source=rss-feb8af09db8a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*GOu0TVmtOqB9wMEg5yEWcg.jpeg</url>
            <title>Stories by Alex Venetidis on Medium</title>
            <link>https://medium.com/@alex_36748?source=rss-feb8af09db8a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 04:27:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alex_36748/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[July updates]]></title>
            <link>https://medium.com/terraapi/july-updates-7bcc65fb10ca?source=rss-feb8af09db8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/7bcc65fb10ca</guid>
            <category><![CDATA[tracking]]></category>
            <category><![CDATA[fitness]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[product-updates]]></category>
            <category><![CDATA[integration]]></category>
            <dc:creator><![CDATA[Alex Venetidis]]></dc:creator>
            <pubDate>Mon, 21 Aug 2023 20:24:12 GMT</pubDate>
            <atom:updated>2023-08-21T20:24:12.395Z</atom:updated>
            <content:encoded><![CDATA[<p>MyFitnessPal Integration, New Data Destinations, and a Revamped Landing Page for Terra API! 🚀</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pdqXdRXDTB_Z2BdyM2lCyA.png" /></figure><h3>MyFitnessPal Integration</h3><h4>🍽 ️What?</h4><p>We’re thrilled to announce that the MyFitnessPal integration is back! Users can now authenticate with MyFitnessPal and seamlessly sync their food data to their favorite fitness and health apps through Terra. This integration allows users to conveniently share their dietary information and maintain a holistic view of their health and fitness journey.</p><h4>🔗 How?</h4><p>To enable data sharing with MyFitnessPal, we explored innovative ways for users to connect their accounts with Terra through diary-sharing settings. This streamlined process allows for a seamless flow of food data between MyFitnessPal and other apps using the Terra API.</p><h4>💡 Why?</h4><p>The MyFitnessPal integration has been highly sought after by developers and users alike, given MyFitnessPal’s massive user base of over 200 million worldwide. When we temporarily took down the integration in the past, it sparked curiosity and anticipation among users, who eagerly awaited its return. Recognizing the demand, we worked diligently to bring it back and enhance the overall experience of sharing food data through Terra.</p><h3>New Destinations Beyond Webhooks:</h3><h4>🗄️ What?</h4><p>We’re excited to introduce new data destinations beyond webhooks for the Terra API. Developers can now connect Terra directly to their SQL databases or S3 buckets, making it even easier to integrate users’ health data into their applications.</p><h4>🔌 How?</h4><p>We established robust connections with popular data storage services such as SQL databases and Amazon S3 to facilitate this seamless connection. Now, developers can effortlessly receive Terra data without writing additional code.</p><h4>💼 Why?</h4><p>We understand that many developers already have established data storage solutions in place before integrating with Terra. By providing direct connections to SQL databases and S3 buckets, we eliminate the need for an extra layer of complexity, making it simpler for developers to access users’ wearable device data within their apps.</p><h3>New Landing Page</h3><h4>🏞️ What?</h4><p>We’ve given our landing page (<a href="https://tryterra.co/">https://tryterra.co</a>) a fresh, vibrant makeover! The revamped landing page now boasts engaging designs, captivating graphics, and comprehensive explanations of our various products and features.</p><h4>🎨 How?</h4><p>Our design and engineering teams worked closely together to rethink how we present information about the Terra API and its offerings to potential users. The goal was to make it easy for visitors to get an overview of what Terra offers and understand the benefits of integrating with our platform.</p><h4>🌟 Why?</h4><p>We recognized that our previous landing page needed improvement in effectively communicating the value and capabilities of the Terra API. As newcomers&#39; first point of contact, the landing page is crucial in shaping users’ perceptions of Terra. By revamping it with a focus on clarity and aesthetics, we aim to create an exceptional first impression and enhance the overall user experience.</p><h3>Conclusion</h3><p>These latest updates showcase our commitment to continuous improvement and innovation. The return of the MyFitnessPal integration brings power to millions of users, allowing them to share their food data seamlessly through Terra. Introducing new data destinations beyond webhooks simplifies the integration process for developers, while the revamped landing page sets the stage for a delightful and informative experience for all those exploring Terra’s API. As we progress, we will continue striving for excellence and deliver cutting-edge solutions to empower health and fitness apps worldwide. 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7bcc65fb10ca" width="1" height="1" alt=""><hr><p><a href="https://medium.com/terraapi/july-updates-7bcc65fb10ca">July updates</a> was originally published in <a href="https://medium.com/terraapi">Terra</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[June Updates]]></title>
            <link>https://medium.com/terraapi/july-updates-57227203e4b0?source=rss-feb8af09db8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/57227203e4b0</guid>
            <category><![CDATA[fitness]]></category>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[product-updates]]></category>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Alex Venetidis]]></dc:creator>
            <pubDate>Tue, 18 Jul 2023 11:39:37 GMT</pubDate>
            <atom:updated>2023-08-15T10:21:33.606Z</atom:updated>
            <content:encoded><![CDATA[<p>🔧 Debugging Tools, New Test Integration, and Coros Planned Workouts: Enhancing Development and User Experience</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MPQIOeZgobds2UyaKqFY2A.png" /></figure><h4>TL;DR:</h4><p>Debugging tools have been enabled for the Terra API, providing valuable metrics in webhooks for tracing and troubleshooting. A new test integration allows developers to incorporate Terra API-specific tests in their CI/CD pipeline. Coros now supports pushing planned workouts, enhancing the integration of workout plans with their devices.</p><h3>Debugging Tools</h3><h4>🛠️ What?</h4><p>New debugging tools have been enabled for the Terra API, offering developers insights into the performance and execution of webhooks. The headers of webhooks now include metrics such as the duration it took for the webhook to go through Terra’s service before reaching you, as well as a trace ID for further troubleshooting assistance.</p><h4>⚙️ How?</h4><p>By leveraging the power of OpenTelemetry, we have instrumented our entire codebase to gain deep insights into the inner workings of our services. This instrumentation allows us to provide valuable metrics and tracing capabilities to developers for enhanced observability.</p><h4>🤔 Why?</h4><p>We understand that our customers value transparency and want more insight into Terra’s services&#39; performance. By offering these debugging tools, developers can better understand the behavior and timing of webhooks, leading to improved troubleshooting and optimization of their integration with Terra. Additionally, these tools enable us to have better observability, enhancing further and optimizing our services.</p><h3>New Test Integration</h3><h4>🧪 What?</h4><p>A new test integration has been released, enabling developers to incorporate authentication method testing and generic data requesting in their CI/CD pipeline. This integration allows developers to mock authentication and generate every possible data field in Terra’s data models.</p><h4>⚙️ How?</h4><p>We have created a “dummy provider” specifically for testing purposes, which always permits authentication. This allows developers to simulate various authentication scenarios and test their handling of different data fields.</p><h4>🤔 Why?</h4><p>Our users have expressed the need for including Terra API-specific tests in their CI/CD pipeline. By providing this new test integration, developers can now build automated testing processes to ensure their systems can handle every event type that Terra might send. This allows for greater confidence in the reliability and stability of their integrations with Terra.</p><h3>Coros Planned Workouts</h3><h4>🏋️‍♂️ What?</h4><p>Coros now supports pushing planned workouts directly to their devices. Users can now seamlessly see and follow their workout plans with their Coros devices.</p><h4>⚙️ How?</h4><p>Through a strong partnership with Coros, we have gained access to their platform’s capabilities, enabling us to export planned workouts directly to Coros devices. This integration ensures that users can easily access and follow their workout plans within the Coros ecosystem.</p><h4>🤔 Why?</h4><p>Planned workout integrations are becoming increasingly popular among fitness apps. As demand for this functionality grows, we strive to expand our support for various devices and apps that allow users to integrate their workout plans seamlessly. By partnering with Coros, we can provide users with an enhanced experience, allowing them to follow their workout plans with their Coros devices effortlessly.</p><p>Introducing debugging tools, a new test integration, and the support for Coros planned workouts all enhance the Terra ecosystem&#39;s development process and user experience. The debugging tools provide valuable insights for tracing and troubleshooting, the new test integration enables automated testing of Terra-specific scenarios, and the Coros integration allows users to access and follow their planned workouts seamlessly. These additions showcase our commitment to continuously improving and expanding our offerings to meet the evolving needs of our customers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=57227203e4b0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/terraapi/july-updates-57227203e4b0">June Updates</a> was originally published in <a href="https://medium.com/terraapi">Terra</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[May Updates]]></title>
            <link>https://medium.com/terraapi/may-updates-f437dba63916?source=rss-feb8af09db8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/f437dba63916</guid>
            <category><![CDATA[product-updates]]></category>
            <category><![CDATA[gpt]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[fitness]]></category>
            <dc:creator><![CDATA[Alex Venetidis]]></dc:creator>
            <pubDate>Thu, 29 Jun 2023 16:59:32 GMT</pubDate>
            <atom:updated>2023-06-29T16:59:32.628Z</atom:updated>
            <content:encoded><![CDATA[<h4>OdinAI and GraphAPI: Harnessing the Power of AI and Visualizations for Health Apps</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6FgRikAL1zj2fDSJkaNYtQ.jpeg" /></figure><h4>TL;DR:</h4><p>OdinAI empowers health apps to generate personalized recommendations using GPT-4, leveraging LLMs and health data. GraphAPI provides an easy-to-use API for fitness and health app developers to incorporate interactive visualizations based on users’ data, enhancing the user experience.</p><h3>OdinAI 💪</h3><h4>🧠 What?</h4><p>OdinAI makes it easy for health apps to generate recommendations, powered by GPT-4. Developers can send their recommendations to OdinAI, which then generates valuable insights based on the combination of LLMs (Large Language Models) and health data. These insights can be accessed through the OdinAI API and displayed to users within the app. Check out our Product Hunt launch <a href="https://www.producthunt.com/posts/odinai-by-terra">here</a>!</p><h4>⚙️ How?</h4><p>OdinAI utilizes the power of existing LLMs to process and analyze health data. By merging recommendation providers’ training philosophy with users’ fitness data, connected through Terra, OdinAI generates personalized insights that help keep users on track with an app’s internal recommendation engine. This will ideally keep them on track towards their own goals, and more engaged with the app as a whole.</p><h4>🤔 Why?</h4><p>OdinAI represents the next wave of fitness training, powered by AI. By leveraging advanced language models and health data already accessible through Terra, health apps can provide users with personalized recommendations and insights that enhance their fitness journeys. Instead of providing static recommendation plans, OdinAI empowers apps to provide training and recovery protocols in an interactive way, by taking into account previous data to propel the user along their journey. This technology opens up new possibilities for customization and adaptive training programs, taking user experience to the next level.</p><h3>GraphAPI 📊</h3><h4>What?</h4><p>GraphAPI is our attempt at an easy-to-use API for health app developers to incorporate interactive visualizations of fitness and health data. GraphAPI allows users to request specific graphs and visualizations using natural language commands. For example, a user can simply say, “Show me my deep sleep over the past week,” and the API will generate the corresponding graph for the requested data, by fetching it through Terra API.</p><h4>⚙️ How?</h4><p>To enable seamless integration of visualizations, our team has developed a starting library of graphs and visual components. Developers can prompt the API and connect the graph output directly into their app, in a plug-and-play fashion, allowing health data to be visualized and presented in a user-friendly manner within their apps. We process the users’ input and extract all the necesary information from it in order to create a graph of any data the user desires.</p><h4>🤔 Why?</h4><p>Visualizations are an essential component of fitness and health apps as they help users better understand their data and derive actionable insights. By offering GraphAPI, we aim to empower developers to provide visually engaging experiences that enable users to interpret and digest their health and fitness data more easily. This self-serve visualization capability enhances user engagement and fosters a deeper understanding of personal progress. We see this, in combination with OdinAI, empowering users to spot correlations by overlaying different data such as e.g. strenuous activity minutes and deep sleep, and crafting a better path forward vis-a-vis their health.</p><h3>Wrapping up</h3><p>This month we keep it short and sweet with two major new advancements. OdinAI and GraphAPI bring powerful capabilities to health app developers. OdinAI leverages advanced AI models and health data to generate personalized recommendations, while GraphAPI offers an intuitive API for incorporating interactive visualizations. By harnessing the power of AI and visualizations, health apps can provide users with tailored insights and a visually compelling experience, ultimately enhancing their fitness and health journeys.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f437dba63916" width="1" height="1" alt=""><hr><p><a href="https://medium.com/terraapi/may-updates-f437dba63916">May Updates</a> was originally published in <a href="https://medium.com/terraapi">Terra</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[April Updates]]></title>
            <link>https://medium.com/terraapi/april-updates-d0e46396985e?source=rss-feb8af09db8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d0e46396985e</guid>
            <category><![CDATA[product-updates]]></category>
            <category><![CDATA[workout]]></category>
            <category><![CDATA[fitness]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[training]]></category>
            <dc:creator><![CDATA[Alex Venetidis]]></dc:creator>
            <pubDate>Thu, 11 May 2023 13:27:13 GMT</pubDate>
            <atom:updated>2023-05-11T13:27:13.900Z</atom:updated>
            <content:encoded><![CDATA[<h4>📝 New Integrations, Chunking Mechanism, Writing Workouts &amp; Body Metrics to TrainingPeaks</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8S8PwDO8pqTk99JSKbybrQ.png" /></figure><h4>TL;DR:</h4><p>We’ve added Aktiia and MacrosFirst as new integrations, created a new chunking mechanism for Fitbit payloads to receive data in reverse chronological order, and enabled writing workouts and body metrics to TrainingPeaks through a new feature.</p><h3>New Integrations:</h3><h4>🔌 What?</h4><p>We’ve integrated with Aktiia and MacrosFirst, which are fitness tracking and nutrition apps respectively. Aktiia is a wearable that measures blood pressure 24/7, while MacrosFirst is a nutrition tracking app that helps users calculate their macro intake to achieve their fitness goals.</p><h4>🤔 Why?</h4><p>We aim to provide our customers with a wide range of integrations so that end users can track all their fitness-related data in one place, regardless of the source. Integrating with these new services enables us to offer more options to our customers.</p><h4>💻 How?</h4><p>Our engineers worked with the developers of MacrosFirst to establish a secure connection to their APIs &amp; develop their APIs with features that make it easier for devs to access data from them. Users can now authenticate with these services and access their data through our API.</p><h3>New Chunking Mechanism in Reverse Chronological Order:</h3><h4>📅 What?</h4><p>We’ve re-built our chunking mechanism for Fitbit payloads, so that requests are made in reverse chronological order. This means that the most recent payloads are received first, followed by older ones, making the user experience more seamless.</p><h4>🤔 Why?</h4><p>Fitbit has very restrictive rate limits, which means we can only request a limited amount of data at a time. If an application wants to backfill more than two months of data, we’ll need to keep retrying requests until we can fetch all the required data. By receiving the most recent data first, users can immediately see their latest fitness data, which is what most people are interested in.</p><h4>💻 How?</h4><p>Our engineering team has modified how we send requests for data from Fitbit, when those constitute large requests of over a month. We now make sequential requests in reverse chronological order, which allows us to retrieve the most recent data first. This enables us to provide end users with a better experience while still constrained by Fitbit’s rate limits.</p><h3>Writing Workouts &amp; Body Metrics to TrainingPeaks:</h3><h4>🏋️‍♀️ What?</h4><p>We’ve built a new feature that allows developers to write body metrics, such as heart rate variability (HRV), to TrainingPeaks, as well as planned workouts. This enables athletes to collate their workout and recovery data in one place and export training plans from apps into TrainingPeaks.</p><h4>🤔 Why?</h4><p>We’re expanding our ability to write data back to all our integrations, enabling two-way communication with the apps that use Terra. We want to provide our customers’ end users with more options to track their data and make it easier to export data to the platforms they use.</p><h4>💻 How?</h4><p>Developers can use a POST request and send a Terra data model to write workouts and body metrics to TrainingPeaks. Our system makes all the necessary conversions and transmits the request over to the respective API of TrainingPeaks. This enables athletes to see the training plans and body metrics generated from customers’ apps, while still having the power of data contained in their TrainingPeaks account.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d0e46396985e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/terraapi/april-updates-d0e46396985e">April Updates</a> was originally published in <a href="https://medium.com/terraapi">Terra</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[March Updates]]></title>
            <link>https://medium.com/terraapi/march-updates-d6e3f39fb8ec?source=rss-feb8af09db8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d6e3f39fb8ec</guid>
            <category><![CDATA[biohacking]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[product-updates]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Alex Venetidis]]></dc:creator>
            <pubDate>Tue, 04 Apr 2023 10:46:58 GMT</pubDate>
            <atom:updated>2023-04-06T15:01:41.449Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PZdFO2TJxiT4WmVkRVaa8A.png" /></figure><h4>tl; dr</h4><ul><li><strong>New integrations: </strong>Hello Clue, TrainAsOne, Tredict, Hammerhead, and TrainingPeaks posting of planned workouts allow for more comprehensive tracking of fitness data.</li><li>Our in-house <strong>machine learning model for Freestyle Libre pro </strong>sensors significantly increases glucose-reading accuracy to close to 100%.</li><li>We now <strong>retry rate-limited requests to Withings,</strong> ensuring users always receive data.</li></ul><h3>📈 New Integrations:</h3><h4>👉 What:</h4><p>🚀 We’re excited to announce several new integrations, making it easier than ever to get started with our fitness data aggregation platform.</p><ul><li>Hello Clue: Track your menstrual cycle and connect it to your fitness data.</li><li>TrainAsOne: Personalized training plans based on your fitness level and goals.</li><li>Tredict: Plan and analyze your endurance training and racing.</li><li>Hammerhead (Posting planned workouts): Seamlessly integrate your planned workouts from Hammerhead Karoo to your fitness apps.</li><li>TrainingPeaks (Posting planned workouts): Streamline your training plan by posting your workouts from TrainingPeaks to your other fitness apps.</li></ul><h4>👉 Why:</h4><p>By adding new integrations to our platform, we’re making it easier for users to connect their data from different sources in one place.</p><h4>👉 How:</h4><p>We’re constantly working to expand the number of integrations we support, making it easier for users to get started with our platform. Our goal is to provide a seamless user experience, regardless of which fitness apps and devices you use.</p><h3>🧠 FreestyleLibre Pro calibration algorithm</h3><h4>📉 What:</h4><p>Our team has developed an in-house calibration algorithm for Freestyle Libre Pro sensors, bringing our glucose-reading accuracy up to close to 100%. Our algorithm is based on a machine learning model that maps raw sensor data to the user’s real glucose levels, improving accuracy and removing erratic values.</p><h4>📉 Why:</h4><p>Glucose-reading accuracy is essential for people managing their blood sugar levels, and we want to ensure our platform provides the most accurate data possible. Our customers want the best experience possible for their end users, and we strive to provide that.</p><h4>📉 How:</h4><p>We collected a large dataset of glucose readings and sensor data from Freestyle Libre sensors and used this data to train our machine-learning model. Our model now provides highly accurate glucose readings, which can be used to improve the management of diabetes and other blood sugar-related conditions.</p><h4>🔄 What:</h4><p>We’re now retrying rate-limited requests for Withings, so you don’t have to worry about handling rate limits imposed by providers. If a request to Withings for data gets rate limited, we’ll automatically retry it at a later time when Withings rate limits are reset.</p><h4>🔄 Why:</h4><p>Rate limits can cause frustration and inconvenience for users, and we want to ensure our platform delivers data reliably and without interruption, taking pain points away from the experience rather than relaying them through</p><h4>🔄 How:</h4><p>Our platform keeps track of data requests, and when rate limits are hit, we automatically dispatch a task to retry the request at a later time when the rate limits are reset. This ensures that our users receive data, no matter what, and in a timely manner.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d6e3f39fb8ec" width="1" height="1" alt=""><hr><p><a href="https://medium.com/terraapi/march-updates-d6e3f39fb8ec">March Updates</a> was originally published in <a href="https://medium.com/terraapi">Terra</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[REST APIs for the health-tech space: How to build your API]]></title>
            <link>https://medium.com/terraapi/rest-apis-for-the-health-tech-space-how-to-build-your-api-877d429b896a?source=rss-feb8af09db8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/877d429b896a</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[webhooks]]></category>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[health]]></category>
            <category><![CDATA[blog]]></category>
            <dc:creator><![CDATA[Alex Venetidis]]></dc:creator>
            <pubDate>Fri, 31 Mar 2023 20:40:25 GMT</pubDate>
            <atom:updated>2023-03-31T20:42:18.520Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X0Ye-vGA-OmFue90ob_7Xw.jpeg" /></figure><h4>tl; dr</h4><ul><li>Use OAuth2 or other secure authentication mechanisms to protect user data.</li><li>Design clear and consistent naming conventions for endpoints and URL paths using appropriate HTTP methods.</li><li>Use query parameters for filtering</li><li>Implement versioning to avoid breaking changes for existing users.</li><li>Provide endpoints for accessing historical data for metrics such as heart rate, HRV, and sleep.</li><li>Implement webhooks to provide a more efficient and scalable method of accessing data by notifying third-party applications of updates rather than requiring them to poll for new information constantly.</li></ul><h4>Intro</h4><p>Fitness and wearable technology have become increasingly popular in recent years, with more and more people using devices to track their health and fitness metrics.</p><p>To allow third-party developers to access this data, many companies have created REST APIs that provide access to users’ historical data and real-time updates through webhooks.</p><p>In this article, we will discuss the best practices for designing REST APIs for health and wearable companies, focusing on authentication, REST endpoints, and webhooks.</p><h3>🔓 Authentication</h3><p>Authentication is crucial to any REST API, especially regarding sensitive user data like health and fitness metrics. 💪 As mentioned, OAuth2 is the preferred authentication method for fitness and wearable APIs.</p><h4>Example of an OAuth2 flow:</h4><ol><li>The user initiates the authentication flow by clicking the “Login with [Service Name]” button in the third-party app.</li><li>The app redirects the user to the OAuth2 authorization server of the service, along with some parameters that specify the app’s client ID, the desired scope of access (e.g. read-only access to heart rate data), and a redirect URI that the server will use to redirect the user back to the app once the authentication flow is complete.</li><li>The authorization server prompts the user to log in, and then asks them to grant the app access to the requested scope of data.</li><li>If the user grants access, the authorization server generates an access token and sends it back to the app at the specified redirect URI.</li><li>The app can then use this access token to authenticate requests to the API, by including it in the Authorization header of each request.</li></ol><p>Note that OAuth2 also supports refresh tokens, which can be used to obtain a new access token once the old one expires. This helps ensure that even fi the access token gets compromised, it can be refreshed, blocking the potential attacker from getting further data.</p><p><strong>Example of an oauth1 flow:</strong></p><ol><li>The third-party app sends a request to the OAuth1 provider (i.e., the API provider) for a request token.</li><li>The OAuth1 provider responds with a request token and secret. The request token is a temporary token used in the next steps of the authentication process.</li><li>The user is then redirected to the OAuth1 provider’s login page to enter their credentials, with the request token in the query parameters of the request. The user logs in with their credentials and authorizes the third-party app to access their data.</li><li>Once the user has logged in, they are redirected back to the third-party app’s callback URL, along with the request token. The request token is included in the URL as a query parameter.</li><li>The third-party app sends a signed request to the OAuth1 provider to exchange the request token for an access token. The OAuth1 provider verifies the signature and exchanges the request token for an access token and access token secret.</li><li>The OAuth1 provider responds with an access token and secret. The access token is a long-lived token that can be used to make authorized API requests on behalf of the user. The secret is a shared secret used to verify the authenticity of subsequent requests.</li><li>The third-party app can now use the access token to make authorized API requests on behalf of the user. Each API request must include the access token and a signature generated using the app’s API secret and the access token secret.</li></ol><p>The API provider can then verify the signature and check that the access token is valid and authorized to access the requested data.</p><p>It’s worth noting that the specifics of the OAuth1 flow can vary depending on the implementation. Additionally, OAuth1 can be much more complex to implement than other authentication methods, such as OAuth2, as evidenced in the steps above.</p><h4>Example of a username &amp; password flow:</h4><ol><li>The third-party app sends a request to the API that includes the user’s username and password for the fitness data provider’ app.</li><li>The API checks the username and password against its user database to verify that they are correct. If the credentials are correct, the API generates an authentication token, and optionally a refresh token, and sends it back to the user in the response.</li><li>The third-party app then includes the authentication token in subsequent requests to the API to retrieve data for a given user.</li><li>If the access token expires, the refresh token can be used to generate a new access token</li></ol><p>It’s worth noting that username and password-based authentication mechanisms have some drawbacks compared to other authentication methods. For example, passwords can be easily compromised if they are not stored securely, and users may reuse passwords across multiple services.</p><p>Additionally, transmitting passwords over the network can be risky if the connection is not secure. As a result, many APIs and web services are moving towards more secure authentication methods, such as OAuth2.</p><h4>Authentication: Conclusion</h4><p>As outlined above, oauth2 provides a good compromise between security &amp; ease of implementation for Fitness data providers to allow third-party apps access to their data</p><h3>REST endpoints for querying historical data</h3><p>Once authentication is in place, the next step is to define REST endpoints for querying historical data. These endpoints should be designed to be easy to understand and use, with clear documentation and examples.</p><h4>Advice when designing a REST API structure</h4><p><strong>1. Use clear and consistent naming conventions for your endpoints and URL paths.</strong></p><ul><li>It’s important to use clear, descriptive names for your endpoints and URL paths that accurately reflect the type of data being returned. Avoid using abbreviations or acronyms that may be unclear or confusing to users. Additionally, be consistent in your naming conventions throughout your API to make it easy for developers to understand and navigate.</li></ul><p><strong>2. Use HTTP methods appropriately.</strong></p><ul><li>The HTTP method you choose should match the type of action being performed on the resource. For example, use GET to retrieve data, POST to create new data, PUT to update existing data, and DELETE to delete data.</li></ul><p><strong>3. Use query parameters for filtering and pagination.</strong></p><ul><li>Query parameters allow developers to filter and paginate results, making retrieving specific subsets of data easier. Use clear and descriptive parameter names and provide documentation on how to use them.</li></ul><p><strong>4. Avoid using body parameters for GET requests.</strong></p><ul><li>While it’s technically possible to include parameters in the request body for GET requests, this is generally discouraged because it can make it harder for developers to understand and use your API.</li></ul><p><strong>5. Use versioning to avoid breaking changes.</strong></p><ul><li>As your API evolves over time, it’s important to version your endpoints to avoid breaking changes for existing users. Include a version number in your URL path to indicate which version of the API the user is accessing.</li></ul><p>When designing endpoints for accessing specific metrics, consider organizing the URL path in a way that makes sense for the returned data. For example, if you have separate endpoints for heart rate, HRV, and sleep data, you might structure your URL paths like this:</p><ul><li>/v1/users/{user_id}/heart_rate</li><li>/v1/users/{user_id}/hrv</li><li>/v1/users/{user_id}/sleep</li></ul><p>Alternatively, you could use query parameters to retrieve data for specific metrics within a single endpoint:</p><ul><li>/v1/users/{user_id}/data?metric=heart_rate</li><li>/v1/users/{user_id}/data?metric=hrv</li><li>/v1/users/{user_id}/data?metric=sleep</li></ul><p>Ultimately, the key is to choose an approach that is consistent, easy to understand, and meets the needs of your users. Keep in mind each fitness API provider has different data provided, and structuring it should make sense in the context of the metrics available, and the overarching goal of what information you want to provide third-party apps with.</p><p>To get a better idea for what querying heart rate could look like for a specific user, here’s a more detailed example of a GET request achieving that:</p><pre>GET /api/v1/users/{user_id}/heart_rate?start_date={start_date}&amp;end_date={end_date} HTTP/1.1<br>Host: api.example.com<br>Authorization: Bearer &lt;access_token&gt;</pre><p>In this example, the {user_id} parameter would be replaced with the unique ID of the user whose heart rate data is being queried. The start_date and end_date parameters would be replaced with the desired date range for the query. Note that the access token obtained through <strong>OAuth2</strong> is included in the Authorization header of the request, to ensure that only authorized users can access the data.</p><p>The API might respond with a JSON object that looks something like this:</p><pre>{<br>  &quot;data&quot;: [<br>    {<br>      &quot;timestamp&quot;: &quot;2022-03-29T12:34:56+01:00&quot;,<br>      &quot;value&quot;: 75<br>    },<br>    {<br>      &quot;timestamp&quot;: &quot;2022-03-30T12:34:56+01:00&quot;,<br>      &quot;value&quot;: 80<br>    },<br>    {<br>      &quot;timestamp&quot;: &quot;2022-03-31T12:34:56+01:00&quot;,<br>      &quot;value&quot;: 82<br>    }<br>  ]<br>}</pre><p>This response would include an array of heart rate measurements for the specified user and date range, along with a timestamp for each measurement. It is ideal to provide time zone information where possible in the API response. This can be done in ISO8601 format, as shown above, or timestamps can be timezone-naive, with the timezon for the payload being provided as an offset in seconds.</p><h4>NOTE: Timezones</h4><p>Keep in mind providing timezone information for each metric recording is crucial. Many APIs out there forego this, and only provide the user’s currently set time zone information. This makes it incredibly difficult for developers to accurately use historical data recorded in the past, as they have no knowledge of when exactly the metric was recorded.</p><h3>Implementation of webhooks</h3><p>Webhooks are a way for the API to send real-time updates to third-party apps when new data becomes available. To implement webhooks, the API should define a callback URL that the app can use to receive updates. Here’s an example of how this might work, for the example used previously of heart rate data:</p><ol><li>The app registers a callback/webhook URL with the API, by setting this as a setting in the API’s developer portal. Alternatively, a POST request that includes the URL as a parameter, and uses a client ID &amp; client Secret for authentication would also work, if the API does not provide a management dashboard.</li><li>Whenever new heart rate data becomes available for the user, the API sends a POST request to the registered callback URL, along with a JSON payload that includes the new data.</li><li>The app receives the POST request and processes the new data in real-time.</li></ol><p>Here’s an example of what the JSON payload might look like:</p><pre>{<br>  &quot;event&quot;: &quot;new_heart_rate_measurement&quot;,<br>  &quot;user_id&quot;: &quot;12345&quot;,<br>  &quot;data&quot;: {<br>    &quot;timestamp&quot;: &quot;2022-04-01T12:34:56Z&quot;,<br>    &quot;value&quot;: 85<br>  }<br>}</pre><p>In this example, the API sends a POST request to the registered callback URL whenever a new heart rate measurement becomes available for the user with ID “12345”. The JSON payload includes an event field that indicates the type of update being sent, a user_id field that identifies the user whose data has been updated, and a data field that includes the new heart rate measurement itself.</p><p>When the app receives this POST request, it can then process the new data in real-time. For example, it might update a dashboard that displays the user’s heart rate over time, or trigger an alert if the heart rate exceeds a certain threshold.</p><p>Overall, webhooks provide a more efficient and scalable way to receive real-time updates than polling for new data regularly. The API can ensure that third-party apps are always up-to-date with the latest user data by implementing webhooks.</p><h3>Conclusion</h3><p>In conclusion, when designing a REST API for fitness and wearable data, it’s important to prioritize user security, scalability, and ease of use. To achieve these goals, it’s essential to consider the following best practices:</p><ul><li>Use OAuth2 or other secure authentication mechanisms to protect user data.</li><li>Design clear and consistent naming conventions for endpoints and URL paths, using appropriate HTTP methods.</li><li>Use query parameters for filtering and pagination, and avoid using body parameters for GET requests.</li><li>Implement versioning to avoid breaking changes for existing users.</li><li>Implement webhooks, which provide a more efficient and scalable method of accessing data by notifying third-party applications of updates, rather than requiring them to poll for new information constantly.</li></ul><p>In addition to these best practices, it’s also crucial to consider the unique needs of fitness and wearable data. This includes providing endpoints for accessing historical data for metrics such as heart rate, HRV, and sleep and the heavy use of webhooks.</p><p>By following these best practices and implementing webhooks, you can create a REST API that offers secure, efficient and user-friendly access to fitness and wearable data.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=877d429b896a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/terraapi/rest-apis-for-the-health-tech-space-how-to-build-your-api-877d429b896a">REST APIs for the health-tech space: How to build your API</a> was originally published in <a href="https://medium.com/terraapi">Terra</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[March updates]]></title>
            <link>https://medium.com/terraapi/march-updates-7821733775?source=rss-feb8af09db8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/7821733775</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[fitness]]></category>
            <category><![CDATA[infrastructure]]></category>
            <category><![CDATA[developer]]></category>
            <dc:creator><![CDATA[Alex Venetidis]]></dc:creator>
            <pubDate>Thu, 02 Mar 2023 14:18:29 GMT</pubDate>
            <atom:updated>2023-03-06T20:24:16.618Z</atom:updated>
            <content:encoded><![CDATA[<h3>Product updates</h3><p>Every month we write some updates to our <a href="https://tryterra.co/products/api">API</a>, <a href="https://tryterra.co/products/sdk">SDK</a>, and front-end solutions. Here’s March:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PZdFO2TJxiT4WmVkRVaa8A.png" /></figure><h3>🚀 TL;DR:</h3><p>We’ve added five new integrations (Decathlon, Strava, Tredict, Cronometer, and PUL), improved standardization for Garmin payloads, and made significant performance upgrades to our system.</p><h3>🔌 New Integrations:</h3><h4>What?</h4><p>We’re excited to announce that we’ve added five new integrations to our platform: Decathlon, Strava, Tredict, Cronometer, and PUL. These integrations allow us to gather more data from various fitness-tracking devices and apps.</p><h4>Why?</h4><p>We aim to make it easy for developers to access and use fitness data from various sources. Adding these new integrations expands the range of data accessed through our platform, giving developers more flexibility and options for their applications.</p><h4>How?</h4><p>We’ve added these integrations to our platform and updated our API documentation to include details on accessing the new data streams. Developers can now start using these integrations immediately to access the needed data.</p><h3>📊 Additional Standardization for Garmin Payloads:</h3><h4>What?</h4><p>We’ve made additional standardization updates to our platform to handle Garmin payloads better. Specifically, we send empty payloads if no data is retrieved, consistent with every other provider.</p><h4>Why?</h4><p>Garmin payloads are unique in that they are sent asynchronously and in parts, making it difficult to handle compared to other sources. Standardizing how we handle Garmin payloads ensures that our platform behaves consistently across all providers.</p><h4>How?</h4><p>We now wait for 2–3 minutes to check if any additional data comes in and then dispatch the payload as a whole, containing all its different elements. This ensures developers receive complete and consistent data from Garmin, just like from other providers.</p><h3>💻 Massively Increased Performance:</h3><h4>What?</h4><p>We’ve made significant internal optimizations to our platform that have led to much better and more efficient processing of requests.</p><h4>Why?</h4><p>As our platform grows and more developers use our service, we need to ensure that we can handle heavier workloads without any reduction in performance. Our focus is on scaling our platform to meet the needs of all our customers, no matter how large or small.</p><h4>How?</h4><p>We’ve modulated the way we handle queuing for requests and have implemented a more robust elastic scaling system for heavier workloads. We’ve upgraded our systems across the board to enable handling whatever is thrown at them. These changes have led to faster processing times and reduced request times, which ultimately means a better developer user experience.</p><p>🎉 We’re excited about these updates to our platform and hope that they make it even easier for developers to access and use fitness data in their applications.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7821733775" width="1" height="1" alt=""><hr><p><a href="https://medium.com/terraapi/march-updates-7821733775">March updates</a> was originally published in <a href="https://medium.com/terraapi">Terra</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[February updates — Terra API]]></title>
            <link>https://medium.com/terraapi/february-updates-terra-api-6cd63f6d860f?source=rss-feb8af09db8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/6cd63f6d860f</guid>
            <category><![CDATA[fitness]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[product-updates]]></category>
            <category><![CDATA[fitness-api]]></category>
            <category><![CDATA[integration]]></category>
            <dc:creator><![CDATA[Alex Venetidis]]></dc:creator>
            <pubDate>Tue, 14 Feb 2023 09:52:06 GMT</pubDate>
            <atom:updated>2023-02-14T16:23:12.824Z</atom:updated>
            <content:encoded><![CDATA[<h3>February updates — Terra API</h3><p>Get ready for a bunch of new integrations added to Terra’s API, starting the new year with a BOOM 💣 💥</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BOUCXBSAbNbg5Too2YPCMg.png" /></figure><p>tl;dr</p><ul><li>Nolio, Ketomojo, Trainxhale, Lezyne, CyclingAnalytics, EatThisMuch, and LiveRowing are <strong>new integrations</strong> added to Terra’s API.</li><li>A new feature has been added that <strong>allows requests that get rate-limited by providers to be retried automatically</strong>, currently enabled for Fitbit.</li><li>A beta version, “2022–12–12” has been released that <strong>removes the need to handle “user_reauth” payloads</strong>, simplifying developers’ work by keeping the user_id constant even if the user re-authenticates with a fitness data provider.</li></ul><h3>Fuel your users’ fitness journeys with new integrations! 💪🚴‍♂️</h3><h4>What?</h4><p>We’re thrilled to announce the addition of several new integrations to our platform: Nolio, Ketomojo, Trainxhale, Lezyne, CyclingAnalytics, EatThisMuch, and LiveRowing! 🔌 These integrations will give end users even more options for tracking and analyzing their progress and reaching their fitness goals.</p><h4>Why?</h4><p>Our goal has always been to provide our users with the best possible experience; to do so, we need to offer a diverse range of integrations that cater to everyone’s needs. 🌈 With these new additions, we can expand our reach further and offer more options for tracking and analyzing workouts across various activities. Whether you’re a runner, cyclist, or rower, there’s something for everyone in this batch of integrations.</p><h4>How?</h4><p>We’ve been working closely with these companies to build the necessary infrastructure to support these integrations and to integrate their APIs. 🤝 We’re constantly looking for ways to improve our offerings and provide our users with the best possible experience, and these new integrations are just the latest step in that direction. Get ready to take your fitness journey to the next level with these exciting new integrations! 💪🏋️‍♂️</p><h3>Get Data No Matter What! 💪</h3><h4>What?</h4><p>We’re excited to announce a new feature on our platform: retries for rate-limited requests. 💻 This allows requests that are rate-limited by providers to be retried automatically later.</p><h4>Why?</h4><p>This is about ensuring that developers get webhooks with updated data as expected, even if Terra’s request to a provider is rate-limited. With this new feature, developers will always get data no matter what, even if they hit providers’ rate limits. This is because we keep track of data gathered for a given request, and if a rate limit is hit, we send the currently fetched data and retry the request later automatically. 🔌</p><h4>How?</h4><p>To implement this feature, we had to create the infrastructure to keep track of data gathered for a given request and determine the timing for retrying requests that get rate-limited. We are starting with Fitbit and plan to expand to more integrations. 🔜 No more waiting for data! 💻 With our new retries for rate-limited requests, you’ll always get the data you need when you need it. 💪</p><h3>New Version! (Beta)</h3><h4>What?</h4><p>A new beta version, “2022–12–12” has been released, simplifying developers’ work by removing the need to handle “user_reauth” payloads. In addition to the above improvements, we aim to add more features to this API version to improve it further. These features will be designed to make the API more user-friendly and efficient while providing developers with the tools to manage their data and integrations better.</p><h4>Why?</h4><p>The beta version is designed to simplify developers’ work by not requiring them to handle “user_reauth” events. The user_id is now constant even if the user re-authenticates with a given fitness data provider, making it easier for developers to track and manage their data.</p><h4>How?</h4><p>This change has been made possible by the user_id only be provided after the user has successfully authenticated. This eliminates the need for developers to store or keep track of the user_id before authentication, making their job simpler and less prone to errors.</p><p>Stay tuned for more updates and new features in future releases!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6cd63f6d860f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/terraapi/february-updates-terra-api-6cd63f6d860f">February updates — Terra API</a> was originally published in <a href="https://medium.com/terraapi">Terra</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[January Updates — Terra API]]></title>
            <link>https://medium.com/terraapi/january-updates-terra-api-bbecbf740bb1?source=rss-feb8af09db8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/bbecbf740bb1</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[updates]]></category>
            <category><![CDATA[product-updates]]></category>
            <category><![CDATA[fitness]]></category>
            <category><![CDATA[terra]]></category>
            <dc:creator><![CDATA[Alex Venetidis]]></dc:creator>
            <pubDate>Mon, 09 Jan 2023 13:47:23 GMT</pubDate>
            <atom:updated>2023-01-09T13:47:23.426Z</atom:updated>
            <content:encoded><![CDATA[<h3>January Updates</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BPip_rxP6JVZssER6jGQjA.png" /></figure><p>Ho-ho-ho 🎅🏻🎄 Unwrap the gift of new integrations with our API this holiday season! Santa came bearing gifts this year, and he’s been lifting 💪 (we have his data and can verify it, he uses Terra)</p><h4>tl, dr:</h4><ul><li><strong>New integrations</strong> added to platform: FinalSurge, Hammerhead, Komoot, TrainerRoad, XOSS, Xert, BrytonSport, Today’s Plan, and Wger.</li><li><strong>Send structured workout plans</strong> to various fitness providers via the API. Plans can be tailored towards cardio or weight training.</li><li><strong>Calculate adjusted maximum speed for workouts.</strong> Provided for advanced analytics using statistical models used to filter out erroneous spikes in speed data for more accurate representation of maximum speed during a workout.</li></ul><h3>Exciting integration news! 🎉 🤓</h3><h4>What?</h4><p>We’re excited to announce that we’ve added a bunch of new integrations to our platform! 🔌 We’ve added FinalSurge, Hammerhead, Komoot, TrainerRoad, XOSS, Xert, BrytonSport, Today’s Plan, and Wger to our list of integrations. These new additions cover a wide range of activities and will provide our users with even more options for tracking and analyzing their workouts and progress. 💪</p><h4>How?</h4><p>We worked closely with these companies to integrate their APIs and build the necessary infrastructure to support these integrations. 🤝 We’re always looking for ways to expand our offerings and provide our users with the best possible experience, so stay tuned for more updates and integrations in the future. 🔜</p><h4>Why?</h4><p>Our goal is to provide a diverse range of integrations that cater to the needs of all end users. 🌈 These new integrations allow us to further expand our reach and offer more options for tracking and analyzing workouts across a variety of activities. Whether you’re a runner, cyclist, or gym-goer, there’s something for everyone in this batch of integrations. 🏃‍♂️🚴‍♀️🏋️‍♂️”</p><h3>Planned workouts for your users! 💪🎉</h3><h4>What?</h4><p>We’re excited to announce a new feature on our platform: the ability to send structured workout plans to various fitness providers via our API. 💻 These plans can be tailored towards cardio or weight training, giving users the option to choose the type of workout that best fits their goals. Whether you’re looking to improve your endurance or build strength, we have a plan for you. 💪</p><h4>How?</h4><p>In order to provide this service, we had to find a universally accepted structure that could be adapted to work with a variety of fitness providers. This required some research and experimentation to ensure compatibility with multiple platforms. In addition, we optimized our API’s ability to accept data from developers to ensure a smooth integration process. 🔌</p><h4>Why?</h4><p>We’ve received numerous requests from developers for the ability to access sending workout plans to users, particularly on Garmin. As a company, our goal is to provide as many resources as possible to help apps using us help their users reach their fitness goals. We are always looking for ways to improve and expand our offerings, and this new feature is just one way we are working towards that goal. 🏋️‍♂️</p><p>If you’re a fitness enthusiast looking for a platform that offers writing planned workouts via an API, look no further. Our platform has you covered. 💪🔝</p><h3>Adjusted maximum speed calculation for our API users! 🏃‍♂️</h3><h4>What?</h4><p>We are excited to announce a new addition to our API: the ability to calculate adjusted maximum speed for workouts. This new field, “adjusted_max_speed_meters_per_second”, is part of our ongoing efforts to provide advanced analytics and extract more value from the raw data we already provide.</p><h4>Why?</h4><p>Some users have noticed strange, inexplicable spikes in speed recorded by their smart watches during workouts. These spikes were likely caused by GPS sensor errors. To fix this issue, we developed statistical models to filter out these artifacts and make the data more accurate. We also wanted to offer developers an easy way to access this additional, processed information.</p><h4>How?</h4><p>To calculate adjusted maximum speed, we used statistical models to filter out the erroneous spikes in speed data. This allows us to give a more accurate representation of a user’s maximum speed during a workout.</p><p>Ready to supercharge your fitness app with advanced analytics? 💪 Don’t miss out on this valuable way to get even more value from your data. 🏋️‍♂️</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bbecbf740bb1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/terraapi/january-updates-terra-api-bbecbf740bb1">January Updates — Terra API</a> was originally published in <a href="https://medium.com/terraapi">Terra</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[December Updates]]></title>
            <link>https://medium.com/terraapi/december-updates-f74c2b5613fc?source=rss-feb8af09db8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/f74c2b5613fc</guid>
            <category><![CDATA[fitness-api]]></category>
            <category><![CDATA[product-updates]]></category>
            <category><![CDATA[fitness]]></category>
            <category><![CDATA[integration]]></category>
            <dc:creator><![CDATA[Alex Venetidis]]></dc:creator>
            <pubDate>Mon, 12 Dec 2022 09:02:14 GMT</pubDate>
            <atom:updated>2022-12-12T09:02:14.817Z</atom:updated>
            <content:encoded><![CDATA[<p>Guess what? More integrations! Just the usual 😉 But also more heart rate-related information and more developer-friendly logic for large requests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D9JCHQLZi3QErKozald6iA.png" /></figure><h3>Heart rate zone information ❤️ 🩺</h3><h4>What?</h4><p>We’ve made it easier to capture &amp; analyze heart rate zone information by adding these to our data models, so that workout summaries can contain more meaningful training information, used to power workout insights, and help adapt athletes’ training intensity.</p><h4>How?</h4><p>Harmonizing heart rate zone data isn’t as straightforward as it may seem. WHOOP provides standard heart rate zones 1–5, in 10% increments starting from 50%, but Fitbit provides its own three custom zones, namely “Fat Burn”, “Cardio”, and “Peak”, ranging from 50–70%, 70–85%, and 85–100% respectively. This means that we needed to somehow account for this. We decided to include start and end heart rate % in each possible heart rate zone value to account for this and provide the five standard ones by default. For all providers who don’t give these calculations, we go ahead and make the calculations ourselves where possible.</p><h4>Why?</h4><p>Our users have been asking us if we could provide more fields beyond “training intensity” that they could use to feed their algorithms to optimize athlete training. We’re always aiming to provide as much data as possible. This addition falls right in line with our vision in terms of data access and helps provide richer data.</p><h3>Wow, more integrations! 🔌 🤓</h3><h4>What?</h4><p>Christmas is coming near 🎄 so Terra comes bearing more integrations to all! We’ve added Cardiomood, Rouvy, and Technogym integrations to satisfy all your connection needs 🎅 we made yet another cycling-focused integration with Rouvy, added more gym-specific focus with Technogym, and got more highly accurate data insights with Cardiomood.</p><h4>How?</h4><p>Speaking with a few of these companies &amp; figuring out the way around others’ APIs, we’ve built out the infrastructure needed to support the above. We’re looking at adding both more integrations &amp; more data types, so check out the other changes this month 😉</p><h4>Why?</h4><p>A lot of our focus has been on diversifying the range of integrations we have in our repertoire and delving deeper into the genres we already have. Rouvy fits in with our cycling integrations, such as our Zwift API integration, Cardiomood with our clinical-grade data ones, such as the Biostrap integration, and Technogym branches off into a new category of gym-focused integrations.</p><h3>Better processing for large queries 〰️</h3><h4>What?</h4><p>Whenever a query was made for a period spanning over a month, we would break that request up into one-week segments 📆 &amp; send that to developers’ webhooks, regardless of whether there was any data for each given week. Instead, we now aggregate all the data queries internally and send requests to developers’ webhooks based on the total amount of data, chunking it by segments of a maximum of 10MB or ten objects within the data list.</p><h4>Why? 🤔</h4><p>We realized our previous system didn’t make any sense 🤯 the initial algorithm meant that many of the payloads sent to developers could be empty and would create unnecessary load &amp; noise on their servers for no reason. Instead, the new data chunking system works around potential limitations on data sent by having a cap on the total number of bytes in one request. This is arbitrarily set at the moment but is something that can be customized on a per-developer basis down the line to suit different needs.</p><h4>How?</h4><p>By clever use of multi-threading and spawning separate processes, we create all the data requests in parallel and provide a callback to our task manager, to be executed when all these requests are complete. This way, we aren’t hanging any threads while waiting for the data requests to be completed, and we can process the entirety of the data once it eventually gets fetched. Result? Happy developers and happy lambda functions which can get data under 10MB per request 😊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f74c2b5613fc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/terraapi/december-updates-f74c2b5613fc">December Updates</a> was originally published in <a href="https://medium.com/terraapi">Terra</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>