23 Feb 2022 10:30 AM - last edited on 24 Feb 2022 09:54 AM by MaciejNeumann
Hello!
When I make an API call to get metrics information I always use the "from" parameter and add a "now-24h", for example.
I'm trying to see, but I can't, what I can do to put absolute times, for example: 2022-02-23 10:00 - 2022-02-22: 10:00
If you could tell me where to find the documentation I would appreciate it, because I have found something similar, but in my case it doesn't apply.
Greetings!
Solved! Go to Solution.
01 Apr 2022 12:00 PM
Hi @Litodrako1992,
the following format is supported by the API for the 'from' and 'now' fields:
params = {
'from': '2022-03-20T00:00:00.000+02:00',
'now': '2022-03-31T00:00:00.000+02:00'
}
The +02:00 defines the UTC timezone, which for my case is +02:00, adjust this value to your timezone as needed, default is UTC +00:00 (basically means you could also leave that last part out)
You can also leave the milliseconds out, just in case you may need them.
So a simplified version of the timestamp could look like this: 2022-03-20T00:00:00
Best,
Mark