Welcome to Animus Talk

This is where users of Animus Heart can share ideas,
solve problems and inspire fellow enthusiasts.

Animus Heart?

API Update a Function property fails with response 400 bad request

Hi all!

I’m new to this and hope someone can please help me out. I can use the api to ask for all devices, specific device and functions. When I try the example in the documentation to change the color of the hearts led I just get 400 Bad Request back.

I use Postman and here is how the request looks like:
Header contains: Content-Type: application/json and Authorization: Bearer API-Key
“hue”: 0.325,
“saturation”: 1.0,
“lightness”: 0.5,
“temperature”: 0,
“metadata”: {},
“timestamp”: 1553518539356

With Curl trying to switch off the Hearts led:
curl -X PUT “” -H “Authorization: Bearer API-Key” -H “Content-Type: application/json” -d ‘{“value”:false}’

I recieve Heart Center Error 500, it’s quite a big message, but it also says: “Something went terribly wrong and we are a bit embarresed about that. See the logs for more information about what went wrong.”

I wonder where the logs are located? The activity log is empty.

How can I get this to work?



The problem is solved! The cause was that I had a pre-script on the collection that added the header Content-Type: application/json which I also “manually” added on the request so I had two Content-Type. After fixing that it seems to work just fine!

1 Like