- This topic has 5 replies, 5 voices, and was last updated October 29, 2022 by .
Collection time for Resource Reports
The forum ‘Scripting and APIs’ is closed to new topics and replies.
Hi,
Does anyone know how the specific time is determined when the daily samples are collected for the Resource Report that can be obtained through the ‘resources’ API? The frequency is set to daily or hourly in the ‘Site Settings’, but I cannot find anything about how the specific time is selected and if it ever changes.
We are retrieving this report for the last 24 hour period (e.g., v1/reports/resources?startTime=2021-05-04T11:45:53Z&endTime=2021-05-05T11:45:53Z), expecting to get just one set of samples, corresponding to the total resources. We have discovered that when the timing of the API call nearly coincides with the sample collection time you can end up getting two sampling reports, resulting in twice the resources reported (each VM has two samples).
We could add logic to check the SamplingTime and make sure we are only getting one collection cycle of the report, but we should not need this logic if we can schedule the API call sufficiently apart from the sample collection time.
Cheers,
Milos
The forum ‘Scripting and APIs’ is closed to new topics and replies.