Hi,
I'm trying to query alerts by a date including a hour, minute and second timestamp.
Following query returns 1 alert object, which is expected:
https://api.eu.opsgenie.com/v2/alerts?query=createdAt>26-01-2025
Following query returns a empty array:
https://api.eu.opsgenie.com/v2/alerts?query=createdAt>26-01-2025'T'00:00:00
{ "data": [], "paging": {}, "took": 0.01, "requestId": "1b9fd7c6-ce1e-425a-a486-0b9d4e7affaa" }
Am I doing something wrong? According to below error message I'm following the time formatting correctly:
{ "message": "Time is accepted in following formats: [dd-MM-yyyy] - [dd-MM-yyyy'T'hh:mm:ss] - [dd-MM-yyyy'T'HH:mm:ssz]", "took": 0.0, "requestId": "d236e633-7195-45c0-a9d3-228ba9df3334" }
Thanks
Hey Dries,
Hope you're doing well.
The datetime value has to be within double quotes.
You can try -> query=createdAt>"15-10-2024T00:00:00Z"
Hope that helps :)
Thanks, that solved my issue!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.