Is there a web_api to get the list of issues got updated?

  • SonarQube version - 8.8
  • I want to call the api to get the list of issues updated after the give date. Something like createdAfter API. Once I get the list I need to update the database for my internal reporting board.
  • Checked the web-api documentation, found nothing for the updated issues.

Hi @ramadevi04g ,

Please check GET api/issues/search and the createdAfter query parameter, which should be exactly what you are looking for.

Joe

Hi Joe,

Yes this api gives only the issues created. I want to get the issues that are updated. For example, issues status might changed to resolved.

Thanks
Rama

1 Like

Hi @ramadevi04g ,

Thanks for the clarification. There is no simple query parameter for what you need so you have a few options to consider:

  • use the s=UPDATE_DATE sort query parameter and perform a diff on the last JSON response in the past you received so you can compare only what has changed
  • use some sort of script language (or even use jq) to filter/sort by updateDate key for each issue

Joe

Hi Joe,

Thank you for the suggestion.
I have another issue with this api. When I am trying to retrieve the issues created after (Date), I am getting the issues created including the date (This is expected). But in my use case I need the issues that are created exactly after that time. I am trying to give the data+time format. But I am getting error. This is the sample “2021-08-27T21:44:33+0000”. Could you please suggest me?
Sample api Code Quality and Code Security | SonarQube

Thanks
Rama

Hi Joe,

My bad, I forgot to encode the “+” character. Thank for the help.

Thanks
Rama

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.