Create Group "api/user_groups/create" cannot use anymore

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube Server / Community Build, Scanner, Plugin, and any relevant extension) SonarQ CE 25.3
  • how is SonarQube deployed: zip
  • what are you trying to achieve: api/user_groups/create can created Group via API
  • what have you tried so far to achieve this: when i used this api/user_groups/create, and got error 404 with path.

Hello guys , im not sure, look like with path api/user_groups/create was deprecated, what could i do for create groups via API.
Thank you

Hey there.

While POST api/user_groups/create is deprecated in lieu of POST/api/v2/authorizations/groups, it should still be accessible. It’s deprecated for now, not removed.

colin@MAC-L0251 sonarqube-25.3.0.104237 % curl -u username:password -X POST 'http://localhost:9000/api/user_groups/create?name=TestGroup3'
{"group":{"id":"61292157-e429-4b90-ad44-14e35943d600","name":"TestGroup3","membersCount":0,"default":false}}                                                                    
colin@MAC-L0251 sonarqube-25.3.0.104237 % curl -u username:password -X GET 'http://localhost:9000/api/server/version'                     
25.3.0.104237     

Are you doing anything differently than me? Can you show me the commands you’re running?

Hello Colin
Thanks for quickly reply.

If i used exactly commands same as you, it worked as expected.
Path /api/user_groups/create got issue with a symbol at the end '. So sorry

BTW, when i used this command

curl -u username:password -X POST 'http://localhost:9000/api/user_groups/create' -d "name=TestGroup3"

i got issue statuscode 400 with error
{“errors”:[{“msg”:“The \u0027name\u0027 parameter is missing”}]}%
im not sure what i was wrong ?
thank you.

Hey @Nguyen_Thai_Trung

I’m not so sure! It might come down to how your specific implementation of curl is parsing the request. I tried it out and it was successful. Can’t spot any differences between what you tried and what I tried.

colinmueller@colins-macbook-air ~ % curl -X POST -u squ_a031949b8699713c8a588d911d7c41c26a0378d9: 'http://localhost:9000/api/user_groups/create' -d "name=TestGroup" 
{"group":{"id":"32caa329-1ddf-4ecd-b610-454bc46c3b3f","name":"TestGroup","membersCount":0,"default":false}}%

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