23 Mar 2023 10:18 PM - last edited on 20 Aug 2024 03:04 PM by Michal_Gebacki
What is the syntax to use problem API to grab problem list of last month & last week?
e.g.
https://${EnvURI}/api/v2/problems?pageSize=500&from=?&to=?
Solved! Go to Solution.
24 Mar 2023 08:42 AM
Hi @avrildong
Last month -1M/M to now/M (not the last 30 days), before last month -2M/M to -1M/M
Last week -1w/w to now/w (not the last 7 days), before last week -2w/w to -1w/w
I hope it helps.
Best regards,
Mizső
24 Mar 2023 10:10 PM - last edited on 27 Mar 2023 07:41 AM by MaciejNeumann
Thank you!
#1. Some issue on https://${URI}/api/v2/problems?from=-1M/M&to=now/M (results cover all nextpage full list):
I tested "Last month -1M/M to now/M" on Mar24, it returns the list of Feb23 (Mar24 prior date-1month) -Feb28 (last date of last calendar month), but not Feb01-Feb28.
>
Feb 22 P-230217577 (= Feb23 UTC)
Feb 28 P-230222494
#2. FYI only - below looks like good:
#2.1) About "Last week -1w/w to now/w": test pass
https://${URI}/api/v2/problems?from=-1w/w&to=now/w > random pick the result
Mar 13/Last Mon: P-23039598
Mar 18/Last Sat: P-230314067
#2.2) I am still running "before last month -2M/M to -1M/M" one, but runtime results looks like as expected ( expected to be Jan01-Jan31 list, need further validation, however positive). So that I have no doubt on this one.
Any idea on #1 issue?
25 Mar 2023 05:34 AM
Hi @avrildong,
I do not konw what is the problem with your AP call.
In my case on my dashboards it works. See bleow an actual view for february and the previous months:
Do you have data before Feb 22 P-230217577?
Best regards,
Mizső
03 Apr 2023 11:45 PM
Thank you! I will check further at my side.