sonarqubesonarqube-opssonarqube-web

Sonarqube API response with date-time in parameters


Trying to extract issues and getting this error while hitting SonarQube API:

api/issues/search?createdAfter=2013-05-01T13:00:00+0100

{"errors":[{"msg":"Date '2018-06-05 14:00:00 1000' cannot be parsed as either a date or date+time"}]}


Solution

  • You need to encode the '+' to be url friendly, so you need to replace if with %2B. See this page for more information : https://www.w3schools.com/tags/ref_urlencode.asp