I use metrics API V2 to see availability for a host, but it gives me a different result than the host detail page. Those are the screen shots of the same host.
as you can see there is 0.02% difference. I use host availability % aka builtin:host.availability metric for the data explorer. As I understand, it is because of the maintenance mode which is not calculated with these metrics.
Do you know any other way to get availability on which maintenance mode will be included or is there any way for that in the API?
I would check your time frames and host entity to ensure that you are looking at the same apples to apples. Maintenance windows are designed to preserve availability metrics and therefor you should have the same values from the host page to the data explorer page.