[Solved] Outdated API documentation?

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.

if the above is not the solution, please feel free to edit the title and ask away

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.

Engineers typically dun like to do much documentation… :-p

it’s an openapi json, it’s usually automatically generated from the code :slight_smile:

without it, it would make hard for other devs to integrate with intervals.icu if we don’t know what API calls are available.

part of the documentation is in swagger, part of it is in the forum post and david + others here is always willing to help.

Your screenshot is /wellness/date but there is also /wellness

This doesn’t require a date.

1 Like

oops… I didn’t even look at swagger to check if it’s there.. (as its working for me)

oh you are absolutely right, i was looking at the wrong call :person_facepalming:

1 Like