Rest Api shows "Page not found"

Hi, I am new in icinga.
I have tried to call rest api to get the host’s data but I am getting following response
API:
curl -H ‘Accept: application/json’
-u ‘username:password’
https://192.168../icingaweb2/director/host?name=vostro’

Response: No Response.
What I am missing I don’t understand.
I have tried for ,many api’s but got the same response

Hi and welcome to the icinga community.

Have you created a corresponding api user with appropriate permissions already? What does

icinga2 object list -t ApiUser

tells about it?

No. I didnt knew about this. Can you help me with this?

You just need a configuration similar to example described [here] (https://icinga.com/docs/icinga2/latest/doc/09-object-types/#objecttype-apiuser) and the reload icinga2.

I have added this in conf.

object ApiUser “root” {
password = “mysecretapipassword”
permissions = [ “*” ]
}

but still getting no response.

That’s a different API, he’s talking about the Director REST API.

@amit Try adding -vvv to the curl request for a more verbose output.

Cheers,
Michael