API access to Intervals.icu

How can I create an “external” URL to point to a specific note (note, holiday, etc.)?

This is for hyperlinks from my more-prose logbooks to the appropriate i.icu content for further inspection or modification …

Thank you, boundsOnly works perfectly and is enough for me.

FYI request http://intervals.icu/api/v1/activity/i47602392/map?boundsOnly=true&bounds=left returns

{
    "status": 500,
    "error": "org.springframework.web.method.annotation.MethodArgumentTypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'float[]'; nested exception is java.lang.NumberFormatException: For input string: \"left\""
}

and for http://intervals.icu/api/v1/activity/i47602392/map?boundsOnly=true&bounds=0

{
    "status": 422,
    "error": "Expected left, top, right, bottom for bounds"
}

Am I doing smth wrong?

You need to supply a list of coordinates for bounds e.g. bounds=-34,18.35,-33.950452,18.36. So left=-34, top=18.35 etc.

I often get these when I request messages for many activities, i.e., repeated

https://intervals.icu/api/v1/activity/{id}/messages

What’s the actual rate limit or what’s the suggested approach of throttling requests?

PS: Retrying the request after a 0.1 s sleep seems to work for now, but I am happy to handle this better;-)

The limit is currently 10/s per IP address with a short bust multiplier so your 0.1 sleep is perfect. That limit is mostly to protect the servers from Intervals.icu web app bugs.

1 Like

Hi guys. I am really bad with this kind of stuff, and i would like to get some help.

I tried to get my fitness data with curl, i get that to json file with raspberry pi. Problem is currently, that my json file is quite empty:
{“timestamp”:“2024-10-27T14:46:12.535+00:00”,“status”:404,“error”:“Not Found”,“path”:“/api/v1/athlete/15071938/fitness”}

Can someone help me out, how to get daily fitness with this curl command and get it to json file? I am mostly looking for only fitness, fatigue and form data

You need to use the wellness endpoint: GET /api/v1/athlete/{id}/wellness{ext}

curl -u API_KEY:xxx ‘https://intervals.icu/api/v1/athlete/2049151/wellness?oldest=2024-10-01&newest=2024-10-30

1 Like

Hello,

I have been trying to use the api but I keep running into 403s with basically every single endpoint.

I have tried using the API docs and Postman, but they seem to give me 403(Access denied) as well. I have tried two different accounts(one with data, one fresh), both seem to behave the same way.

For example, I am trying to access this one:
https://intervals.icu/api/v1/activity/{athlete id}/hr-histogram

Using curl(or anything else) I get this:

Any ideas as to what I am doing wrong?

Thanks!