Downtime API in the UI

So, in the service we can get the downtime and even the time when it went down and recovery time as well, so this downtime is it available through API, we have availability % and availability state APIs.

builtin:pgi.availability
builtin:pgi.availability.state

Do we have any particular API or can we derive like this below, give suggestions
api/v2/metrics/query?metricSelector=builtin:pgi.availability:splitBy(“dt.entity.process_group_instance”):partition(downtime,value(“true”,lt(100)),otherwise(“false”)):limit(5)

@bs43 You can use the metrics API

@p_devulapalli is right on point. this is how we pull the availability. All depends on how you want to see the data. Min by Min, Hour by hour etc…