API call service.getsla seems to return the wrong value under at least one condition.
If my getsla time window STARTS during one of the “Service times”, getsla incorrectly counts ALL outages, including those during service times as “down” instead of “up”.
If my getsla time window ENDS during one of the “Service times” or starts and ends outside of “Service times”, the SLA calculation is correct and the outages during the service times are not counted as “down”.
To reproduce this, create a trigger and associate a service. Set a service time window. Fire trigger during service time. Call getsla starting during service time window. Result will count service as down instead of up.