Get host/service history with API

Hi, I’m trying to get the history of a given host / service with curl.I’m talking about the history you can see when you go to the history tab on any host or even the one on the main menu filtering by host.

if i do:

curl --insecure -u myAPIuser:mypsw -X "GET" "myapiurl:5665/v1/objects/hosts?host=myhost"
I see no mention to the history whatsoever, only to the last state.

Is there any way to achieve this? Can I for example reach somehow /v1/eventhistory?

Thanks in advance.

if you are using icingaweb2, look at that post:


But that would mean going with the icingaweb2 user authentication but not with the API one, right?

thanks for your response.

yes thats an icingaweb user

That wouldn´t work for me unfortunately, as I was provided only a API user.

Isn´t there any way to retrieve this event history filtering by host from the API itself(dunno how it’s called, core api)?


icingaweb2 reads that information from ido or icingadb, and there is no endpoint in icinga2 api to access historic data