Skip to main content
Junction fetches the historical data immediately when the connection is established. The pull range can be estimated by [now - days_to_pull, now].
The configurable maximum through Team Data Pull Preferences is 365 days. For Apple HealthKit, the iOS SDK also supports configuring numberOfDaysToBackFill up to 1,095 days when no team pull preference applies.

Customizing historical data pull range

Org Management API is available for the Scale plan.
You can configure the historical pull range using the Team Data Pull Preferences feature of the Org Management API. You can specify a number of days to backfill that uniformly applies to all resources of a provider, as well as overriding the number of days to backfill for specific resources.
The Team Data Pull Preferences you specified are advisory. There are scenarios in which Junction systems may not adhere strictly to your stated preferences.

Apple HealthKit (iOS SDK)

The iOS SDK defaults to 90 days of historical data. You can change this using numberOfDaysToBackFill when configuring VitalHealthKitClient. The SDK caps this setting at 1,095 days (3 years).
For each resource, the SDK uses the first available value in this order:
  1. The resource-specific Team Data Pull Preference.
  2. The provider-wide Team Data Pull Preference.
  3. The SDK’s numberOfDaysToBackFill setting (90 days by default).
The historical range is anchored to the SDK’s initial sync state. The SDK retains that state, so changing configuration or team pull preferences does not automatically restart or extend an existing historical backfill. Data ingestion bounds and the user’s HealthKit authorization window can further restrict the data available to sync.