• Community
  • Products
  • Jira
  • Questions
  • Using /rest/api/2/group/user Delete method to remove user from a group results in error message - curl: no URL specified! curl: try 'curl --help' or 'curl --manual' for more information 'groupname' is not recognized as an internal or external command

Using /rest/api/2/group/user Delete method to remove user from a group results in error message - curl: no URL specified! curl: try 'curl --help' or 'curl --manual' for more information 'groupname' is not recognized as an internal or external command

Using /rest/api/2/group/user Delete method to remove user from a group results in error message -

curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information 'groupname' is not recognized as an internal or external command,operable program or batch file.

Command which we are using is -

curl -D- -u admin:admin -X DELETE -G -d 'username=testuser&groupname=jira-users' -H "Content-Type: application/json" http://localhost:8080/rest/api/2/group/user

5 answers

I just got this to work using a curl command like:

curl --insecure --fail --silent --show-error -D- -u adimnuser:password -X DELETE -H "Content-Type: application/json" "https://server.company.com/rest/api/2/group/user?username=testuser&groupname=jira-users"

The key things for me were to put the data payload in the URL as parameters, instead of in a separate POST data packet.  Also, because of the ampersand in the URL, wrap the URL in quotes.

HI!

you first have to install CURL on you local computer to use it!

 

Regards, Mirko

Curl is already installled on my local system -

curl --version

curl 7.40.0 (x86_64-pc-win32) libcurl/7.40.0 OpenSSL/1.0.1g zlib/1.2.8 WinIDN libssh2/1.4.3_DEV

Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtsp scp sftp smtp smtps telnet tftp

Features: AsynchDNS IDN IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL libz

Even i tried to create issue by executing below commd & it got successfull.

curl -D- -u adimn:admin -X POST -d@C:\test_curl.txt -H "Content-Type: application/json" http://localhost:8080/rest/api/2/issue

 

 

 

 

Is there any different method to pass mulitple arguments in windows becuse when i am passing like -X DELETE -G -d 'username=testuser&groupname=jira-users' , it shows 'groupname' is not recognized as an internal or external command,operable program or batch file.

While same is working on Unix machine.

Hello sorry if I impede your conversation or topic. Since this is related to curl I would like to know the syntax for curl  (api to be used) command which could be handy to upload a zip file to confluence page?

I'd like to use that in an python script to upload some files to confluence.

any hints appreciated.

many thanks

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Apr 17, 2018 in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

768 views 2 19
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you