# Get service/host history with API

**URL:** <https://community.icinga.com/t/get-service-host-history-with-api/1388>\
**Category:** Icinga 2\
**Tags:** api\
**Created:** [June 4, 2019, 10:25am UTC](https://community.icinga.com/t/get-service-host-history-with-api/1388 "2019-06-04T10:25:34Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![dnsmichi](https://community.icinga.com/user_avatar/community.icinga.com/dnsmichi/32/7721_2.png) [@dnsmichi](https://community.icinga.com/u/dnsmichi)\
**Post date:** [June 4, 2019, 1:13pm UTC](https://community.icinga.com/t/get-service-host-history-with-api/1388/4 "2019-06-04T13:13:38Z")

</div>

Ah, I forgot, this only works for the main history view. This can be filtered as well, and needs the [JSON format](https://icinga.com/docs/icingaweb2/latest/doc/20-Advanced-Topics/#global-url-parameters).

```auto
http://192.168.33.5/icingaweb2/monitoring/list/eventhistory?timestamp%3E=-7%20days&(service_description=random-001)&modifyFilter=&format=json

```

Cheers,  
Michael

---

_[View the full topic](https://community.icinga.com/t/get-service-host-history-with-api/1388)._
