API and clear wellness field

Hi,

How can I clear the value of the “sleepSecs” field using the curl command ?

The following syntax does not modify the stored data :

> curl -X PUT https://intervals.icu/api/v1/athlete/xxxx/wellness/2023-04-23 \
>  -H "Content-Type: application/json" \
>  -H "accept: */*" \
>  -u "API_KEY:xxxxxxxxxxxxxxxxx" \
>  -d '{"sleepSecs":null}'

Thank you for your help.

Best regards.

You can´t clear a field. Maybe NA works??

It’s blocking. I can push data with non-null values but I cannot automatically erase a history over a period of one year, for example.

We can clear numeric fields by passing in -1.

Thanks David Tinker :wink:

1 Like