Get host/service history with API

if you are using icingaweb2, look at that post: