If i look at the strava api documentation it appears you can only update the weight of an athlete by which requireds a Float, in the endpoint path instead of the request body.
Are you sending the whole object in the putrequest in the requestbody? Or did you copy paste it under the request instead of response by accident?
From the documentation: you can only update the athlete if you have the profile:write scope on your access token/refresh token. And i think this would be the issue atm, the mendix rest call seems to be fine.
It’s hard to say why your call isn’t working because there's not any info to go on. But here's some stuff you can check.
Does the Rest call action give you an error, and if so what is the error? (check the LatestHttpResponse object which you can access if you set an error handler on the rest call action) .
You might call the wrong endpoint, or the authorization doesn't work. Maybe they need additional headers etc.
If you do get a statuscode 200 in return maybe you can find an answer by setting your ‘Rest Consume’ loglevel to Trace to more easily check the exact request that you sent to the endpoint.
I got 2 log messages for my PUT request:
Request content for PUT request to https://www.strava.com/api/v3/athlete HTTP/1.1
Response content for PUT request to https://www.strava.com/api/v3/athlete
HTTP/1.1 200 OK
Date: Thu, 05 Mar 2020 14:05:32 GMT
Content-Type: application/json; charset=utf-8
Cache-Control: max-age=0, private, must-revalidate
Via: 1.1 linkerd
Status: 200 OK
X-XSS-Protection: 1; mode=block
- Looking at the first log-message I guess that I don’t have write access? Which is weird cuz I did put it in the scope.
- Looking at the second message, I do get info back but it is the original (unchanged) data.
Here is more information about how to configure the REST action.
Make sure the value in the form-data is a variable/value defined in your microflow – example $value – or is a constant.
Can also try setting the log level of the “REST Consume” to Trace, to see what the response of the PUT call is.