Hey @sungod !
While I don't have a definitive answer for you - I did do some testing to work out what the answer is.
I tested using the API call history endpoint which says that t0 is limited to the last 31 days.
What I found that it was actually 32 days from this second (right now). It seems the API server, as it is checking the parameters, checks the epoch time you pass to it with the epoch time from (32 x 86400 seconds ago).
I'm not surprised by the extra day - at Meraki, we nearly always under-promise and over-perform - this way no one complains when the "from today" is ambiguous! 😉
Going on to look at your use case, I would be tempted to build in redundancy in to your scripting, so you have duplication of data that you then de-dupe afterwards, or make the call more frequently, so you can always go back and get missing data later if it occurs. For me personally, this would be better than relying on having one call from your server once per months and then having no redundancy for any type of issue (anything from missing data, through to power failure on the server at the time you are making the call).
So I would do one of the following:
De-dupe model:
Every week:
- Get the last 31 days of data
- De-dupe data
Utilise t1:
Every week:
- check when the last data was
- t0 = the last data point (or 31 days max)
- t1 = now
- check for any duplication at the start of the data set (possibly an overlapping second at the start)
As for a definitive answer to what "from today" means, let's wait to see if one of my colleagues in the API engineering team reply 😄