API returns 404: Not Found

Hi,

i’m trying to call a toggle for a light with “http://url:port/api/services/light/toggle/light.house?api_password=password” but it won`t work and i get the status 404: Not Found.

What can be the problem, i can’t call any api service like this.
When i use the Developer Tools the service works like a charm.

Thank you.

This is not the correct usage of the api. It needs to be a request of type ‘POST’ to http://url:port/api/services/light/toggle with a body of

{ "entity_id" : "light.house"}

ok,

but http://url:8123/api/states/light.house?api_password=password will give me feedback from the light.
Is this a other usage of the api?

Thanks

Retrieving the state is a 'GET` request

Calling a service or setting the state requires a ‘POST’ request.

ok, i understand.
Thank you very much.