Non-grouped timeseries endpoints
We have introduced Get Grouped Timeseries endpoints since February 2024. Check out the Get Heartrate endpoint for an example. It has been supported by all Junction API SDKs (backend), as well as all relevant Junction Mobile SDKs (Native iOS, Native Android, Flutter) since 2024 as well. The Get Grouped Timeseries endpoints have several advantages:- They use cursor-based pagination, allowing you to fetch and process data incrementally.
- They expose the data source attributions, which are absent from the legacy endpoints.
Recommended Action
For Junction API SDKs, the client methods for the Get Timeseries (Legacy) endpoints have been marked as deprecated since 2024. Make sure you use the
latest Junction API SDK releases, and take action on all the deprecations.For relevant Junction Mobile SDKs (Native iOS, Native Android, Flutter), there is no action for you to take assuming you use the latest SDK releases.For direct API calls, make sure your request URL paths include
/grouped, your logic expects the grouped timeseries response schema, and that you handle pagination.The hypnogram timeseries type
We have introduced a new Sleep Cycle summary type (sleep_cycle) which captures the detailed hypnogram of a sleep session.
It replaces the existing hypnogram timeseries type. More details can be found here: Sleep Cycle Summary
Recommended Action
Start processing the new
historical.data.sleep_cycle.created, daily.data.sleep_cycle.created and daily.data.sleep_cycle.updated events.
Stop processing the historical.timeseries.hypnogram.created, daily.timeseries.hypnogram.created and daily.timeseries.hypnogram.updated events.Redefining Source and Provider
Junction has redefined what Source and Provider mean across our API and event schemas:The new definitions of Provider and Source
The new definitions of Provider and Source
A Source context comprises:
- the Provider (slug only)
- the Source Type
- the App ID (optional)
name, logo and slug trio you have been receiving in many data events.1
All Data Events (daily.data.*)
Inside the Source context located at Once the deprecation cycle ends, Junction will remove the deprecated fields:
$.data.source, the name, logo, and slug fields are
now deprecated.Junction no longer embeds these Provider object fields in every data event, except for the provider
slug.Using the Steps data event as an illustration, originally
the source field described the wearable data provider. As part of this redefinition, the source field is
reappropriated to track the Source context of the steps timeseries value group. So we have added a few
new Source context fields, and marked several Provider fields as deprecated:daily.data.steps.created (Current)
daily.data.steps.created (Future)
Recommended Action
Stop parsing
name, logo and slug when processing the $.data.source field in
all Data Events (daily.data.*).If you need the Provider information, you can obtain it through the Get Providers
endpoint.
2
Get Summary endpoints
This applies to:
- Get Activity:
GET /v2/summary/activity/* - Get Body:
GET /v2/summary/body/* - Get Meal:
GET /v2/summary/meal/* - Get Profile:
GET /v2/summary/profile/* - Get Sleep:
GET /v2/summary/sleep/* - Get Workouts:
GET /v2/summary/workouts/*
name, logo, and slug sub-fields under the source field
in each and every summary are now deprecated.Junction no longer embeds these Provider object fields in every summary, except for the provider
slug.Using the Get Profile endpoint as an illustration, the source object has
been reappropriated as the Source context of this Profile summary. So we have added a few new Source context fields,
and marked several Provider fields as deprecated:Profile (Current)
Profile (Future)
Recommended Action
Stop parsing
name, logo and slug fields in all Get Summary endpoint responses.If you need the Provider information, you can obtain it through the Get Providers
endpoint.
3
Provider Connection events
This applies to:
- Provider Connection Created:
provider.connection.created.
source field in this event to provider, aligning with the redefinition of Source
and Provider.To illustrate the change, originally the source field described the wearable data provider. As part of this
redefinition, source no longer applies in this context. Junction has introduced an identical
provider field as its replacement:provider.connection.created (Current)
source field:provider.connection.created (Future)
Recommended Action
Update your
provider.connection.created event parsing logic to parse the provider field,
and stop parsing the source field.The is_final flag in historical.data.*.created events
We are removing the is_final flag from the Historical Pull Completed (historical.data.*.created) events.
For each resource, Junction now signals one Historical Pull Completed event, only after we have finished fetching
all data chunks. This means is_final no longer has a meaning, since the event itself is final.
Recommended Action
Stop parsing
is_final as a required field when processing historical.data.*.created events.