sonarqube-api

java.lang.IllegalStateException: Not a JSON Object

自古美人都是妖i 提交于 2020-03-17 11:13:08
问题 I am trying to get a json response from SonarQube using the SonarQube web API. While assigning the JsonElement into a JsonObject I am getting this error: java.lang.IllegalStateException: Not a JSON Object This is my Java class @Controller public class SonarController { @Autowired JenkinsDataService jenkinsService; @Autowired SonarDataService sonarService; HttpEntity<String> entity; @RequestMapping(value = { "/sonar" }) public void test(HttpServletRequest request, HttpServletResponse response

java.lang.IllegalStateException: Not a JSON Object

北城以北 提交于 2020-03-17 11:13:05
问题 I am trying to get a json response from SonarQube using the SonarQube web API. While assigning the JsonElement into a JsonObject I am getting this error: java.lang.IllegalStateException: Not a JSON Object This is my Java class @Controller public class SonarController { @Autowired JenkinsDataService jenkinsService; @Autowired SonarDataService sonarService; HttpEntity<String> entity; @RequestMapping(value = { "/sonar" }) public void test(HttpServletRequest request, HttpServletResponse response

How to install or uninstall SonarQube plug-ins with HTTP?

天涯浪子 提交于 2019-12-08 03:28:05
问题 I'm trying to install and uninstall SonarQube plug-ins via HTTP. If I call http://localhost:9000/api/plugins/installed I get a list of installed plug-ins as expected: {"plugins": [ { "key": "csharp", "name": "C#", "description": "Enables scanning of C# source files", "version": "5.7.0.612", "license": "GNU LGPL 3", "organizationName": "SonarSource", "organizationUrl": "http://www.sonarsource.com", "homepageUrl": "http://redirect.sonarsource.com/plugins/csharp.html", "issueTrackerUrl": "https:

REST API for getting project last analysis date?

我的未来我决定 提交于 2019-11-30 19:36:28
How do I get a project's last analysis time (the one you can see in the dashboard) with the REST API of SonarQube? I am working with SonarQube 4.5.6, but if it's only available on later versions I'd still be interested in how it is done. You can use the Resources API : https://nemo.sonarqube.org/api/resources/index?metrics=date&format=json and look at the 'date' field to get the last analysis time. [EDIT] API relevant since SonarQube v6.3: api/project_analyses/search [EDIT] Relevant API for SonarQube LTS v5.6.x: api/projects?versions=true And since you mention later versions, since SonarQube 5

REST API for getting project last analysis date?

为君一笑 提交于 2019-11-30 03:50:18
问题 How do I get a project's last analysis time (the one you can see in the dashboard) with the REST API of SonarQube? I am working with SonarQube 4.5.6, but if it's only available on later versions I'd still be interested in how it is done. 回答1: You can use the Resources API : https://nemo.sonarqube.org/api/resources/index?metrics=date&format=json and look at the 'date' field to get the last analysis time. 回答2: [EDIT] API relevant since SonarQube v6.3: api/project_analyses/search [EDIT] Relevant