I'm migrating SonarQube from 5.6 version to 6.7. I'm using SonarQube API with my Jenkins jobs and the problem is the API for groups permissions isn't working with 6.7 version...
I've tried manually with Postman (POST raw JSON) this :
{
"groupName": "project-name-admin",
"permission": "admin",
"projectKey": "project-name"
}
The result returned is :
{
"errors": [
{
"msg": "Group name or group id must be provided"
}
]
}
And it's 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's working with 6.5 verison and I've no idea where this problem may come from :(
@SonarQube developers team : can you fix thaaaat please ?
Send data as application/x-www-form-urlencoded or form-data. SonarQube Web API doesn't handle POST body in raw JSON format. See this question about Java ServletRequest to know more (Tomcat is used under the hood).