The Power of the Data Generator
One of our many tasks was: How can we let developers test our API quickly?
Reading from our docs, you as a developer can see what format we send our data in. However, when it comes to playing around with the API, you may not be completely sure as to what to expect in your webhook for each provider. Things such as what fields from sleep payload does Apple provide or does Google Fit provide Nutrition data. You can now get a comprehensive understanding of what kind of data you expect to receive using our data generator!
Who gives what
When you communicate with Terra, you are always given the same data structure. However, it would be really helpful to know during development the exact type of data each provider provides.
Let's say you are trying to integrate with us for Sleep data with Oura, Google Fit and Garmin. With our data generator, you can preemptively find out if these providers provide sleep data, and most importantly, which fields in our sleep data model do they provide.
Looking at the above example, you can see that Oura do indeed provide Sleep data. However, does not provide body, nutrition, or activity. Knowing this information before hand allows you to deal with cases where you can avoid unnecessary requests or unexpected empty responses from Terra. In addition, you can also confirm exactly which fields Oura provides so you can avoid hitting null
cases, or making sure that the field is populated with an int
or a double
!
Robust Testing
The data generator sends the data to your webhook exactly as shown in the terminal screen when you press "Send to Webhook". This feature is exceptionally useful for testing. Using generated data, you can make sure your backend is storing the data correctly, handling null or empty values as expected, or getting the data type you are expecting. The data generator also allows you to develop and test for a wearable or provider without you actually having the wearable itself!
Give it a go!
Always been on the edge on whether you should use Terra because you do not know the flow of our data or the data structure well? Now is the time for you to be completely sure of it. Go to our dashboard, sign up, and test it out for yourself!