Hi,
We are trying to build a dashboard in PowerBI to report on SLAs for the last day, 7 days, and 30 days. We are trying to us the uptime and downtime properties of FSMServiceLevelPolicy to calculate the availability. I would like to build a custom Rest API to get this information, but I am stuck on just trying to get the script to work. The problem I am having with the script is that I can not figure out how to change the time range to what I want to use. I can create a custom SpacificTimeRange object, but I can't seem to get it to apply to anything. I pass it to getObject, but it still uses what ever is set in the UI if I am using the script console, and if I use function I created in Definitions, if just ignores the time range all together. Below is the script I am using any help would be greatly appreciated.