List Recent Sync Events
curl --request GET \
--url https://api.example.com/api/v1/users/{user_id}/sync/recent \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/users/{user_id}/sync/recent"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/users/{user_id}/sync/recent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/users/{user_id}/sync/recent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/users/{user_id}/sync/recent"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/users/{user_id}/sync/recent")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/users/{user_id}/sync/recent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"run_id": "<string>",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider": "<string>",
"source": "pull",
"stage": "queued",
"status": "in_progress",
"event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scope": "live",
"message": "<string>",
"progress": 0.5,
"items_processed": 1,
"items_total": 1,
"error": "<string>",
"primary_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {},
"window_start": "2023-11-07T05:31:56Z",
"window_end": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"timestamp": "2023-11-07T05:31:56Z"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Sync Status
List Recent Sync Events
Return the most recent stored sync events (newest first).
Events are kept in Redis for 24 h. Use this to seed the UI before opening the SSE stream, or to inspect history without subscribing.
GET
/
api
/
v1
/
users
/
{user_id}
/
sync
/
recent
List Recent Sync Events
curl --request GET \
--url https://api.example.com/api/v1/users/{user_id}/sync/recent \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/users/{user_id}/sync/recent"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/users/{user_id}/sync/recent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/users/{user_id}/sync/recent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/users/{user_id}/sync/recent"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/users/{user_id}/sync/recent")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/users/{user_id}/sync/recent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"run_id": "<string>",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider": "<string>",
"source": "pull",
"stage": "queued",
"status": "in_progress",
"event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scope": "live",
"message": "<string>",
"progress": 0.5,
"items_processed": 1,
"items_total": 1,
"error": "<string>",
"primary_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {},
"window_start": "2023-11-07T05:31:56Z",
"window_end": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"timestamp": "2023-11-07T05:31:56Z"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Headers
Path Parameters
Query Parameters
Required range:
1 <= x <= 200Response
Successful Response
Identifier shared by all events of the same sync run.
Provider slug (e.g. 'garmin', 'apple', 'whoop').
How the sync was initiated / what transport delivers data.
Available options:
pull, webhook, sdk, backfill, xml_import, linked_account Coarse-grained stage label for a sync run.
Available options:
queued, started, fetching, processing, saving, completed, failed, cancelled Overall outcome state for the run.
Available options:
in_progress, success, partial, failed, cancelled, skipped, unfinished, stale Unique ID for this event.
Whether the run backfills history or delivers current data.
Available options:
historical, live Optional 0..1 progress.
Required range:
0 <= x <= 1Required range:
x >= 0Required range:
x >= 0For LINKED_ACCOUNT events: the OW user whose sync run produced this data.
Was this page helpful?

