Sam
3 November 2025 21:31
1
Hello @david and team,
The current swagger JSON document /wellness like this:
but the date does seem optional. It seems querying on it comes back with the whole lot of /wellness uploaded since, like, ever:
% ./misc/api.sh -j /wellness |jq length
2690
% ./misc/api.sh -j /wellness |jq -r '.[0].id'
2018-06-24
Maybe that’s not really optimal for the DBs/network and probably should really be optional?
And would it be possible instead to be able to specify a date range? Currently, if I want to know the fitness of the last 7 days, I need to query each date, which is a bit slow for my app to do.
app4g
3 November 2025 23:46
2
I have just implemented some API support for wellness.
GET /api/v1/athlete/{id}/wellness?oldest=2020-12-01&newest=2020-12-31
[
{
"id": "2020-12-01",
"updated": "2021-01-01T15:14:22.925+0000",
"weight": 72.6,
"restingHR": 44,
"hrv": null,
"menstrualPhase": null,
"menstrualPhasePredicted": null,
"kcalConsumed": null,
"sleepSecs": null,
"sleepQuality": null,
"soreness": 1,
"fatigue": 2,
"stress": 3,
"mood": 4,
"motivation": 3,
"spO…
if the above is not the solution, please feel free to edit the title and ask away
Sam
4 November 2025 04:10
3
Oh thanks this worked!
So, I think the swagger documentation is pretty outdated then, the links https://intervals.icu/api/v1/docs/swagger-ui/index.html don’t mention this oldest or newest paramter, same goes for the other interface Intervals.icu API docs
I’ll update the title to ask for an updated API documentation or at least a openapi spec json to make it easy to integrate.
app4g
4 November 2025 04:12
4
Engineers typically dun like to do much documentation… :-p
Sam
4 November 2025 04:13
5
it’s an openapi json, it’s usually automatically generated from the code
without it, it would make hard for other devs to integrate with intervals.icu if we don’t know what API calls are available.
app4g
4 November 2025 08:09
6
part of the documentation is in swagger, part of it is in the forum post and david + others here is always willing to help.
R2Tom
4 November 2025 08:31
7
Your screenshot is /wellness/date but there is also /wellness
This doesn’t require a date.
1 Like
app4g
4 November 2025 08:45
8
oops… I didn’t even look at swagger to check if it’s there.. (as its working for me)
Sam
4 November 2025 08:49
9
oh you are absolutely right, i was looking at the wrong call
1 Like