Syntax problem API to grab problem list of last month and week

What is the syntax to use problem API to grab problem list of last month & last week?

  • last month & last week 2 patterns - recurring  / reusable syntax.
  • last month must be exact calendar month, such as 2022Jun, 2023Jan (not last 30 days);
  • last week must be exact calendar last week, such as “Mon 1AM-Sun 1AM EST”  (not last 7 days: NOT regarding NOW; cannot use now-1w thing as now is dynamic)

e.g.

https://${EnvURI}/api/v2/problems?pageSize=500&from=?&to=?

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ő

@Mizső

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?

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ő

@Mizső

Thank you! I will check further at my side.