Overview

Terra provides two main methods of receiving data from your users. HTTP requests and webhook PUSHes.

HTTP requests allow you to manually request for recent or historical data for any of your users at any time. You should note however that SDK integrations do not support retreival of data through HTTP requests and the requests should instead be performed on the device. See HTTP Requests for more.

Webhooks allow you immediate access to new user data. We send a POST request to your configured webhook URL whenever we are notified or detect new data is available for any of your users. All you need to do is listen for these pushes and process them on your backend. See Webhooks for more.


Primer

All returned JSON payloads containing data will adhere to the following format (apart from athlete where data will be an object instead of an array):

📘

Data field

The data field can always contain one or more objects of a given DataModel type

{
  "user": TerraUser,
  "data": Array<DataModel>,
  "type": PayloadType
}

All fields in the returned payload are nullable, apart from user.user_id, user.provider, and data which are guaranteed to be populated with a string, string, and empty or populated array respectively.