SonarQube 6.7 LTS API not working

I port SonarQube from version 5.6 to 6.7. I am using the SonarQube API with my Jenkins job, and the problem is that the group permissions API does not work with version 6.7 ...

I tried manually with Postman (POST raw JSON):

{ "groupName": "project-name-admin", "permission": "admin", "projectKey": "project-name" } 

Returned result:

 { "errors": [ { "msg": "Group name or group id must be provided" } ] } 

And this is the same if I use:

 { "groupId": 53, "permission": "admin", "projectKey": "project-name" } 

or

 { "groupId": 53, "groupName": "project-name-admin", "permission": "admin", "projectKey": "project-name" } 

It works with 6.5 verison, and I don't know where this problem might come from :(

Development team

@SonarQube: can you eliminate thaaaat, please?

+5
source share
1 answer

Submit data as application / x-www-form-urlencoded or form data. The SonarQube Web API does not process the POST body in raw JSON format. See the Java ServletRequest question for more (Tomcat is used under the hood).

+1
source

Source: https://habr.com/ru/post/1273632/


All Articles