PUT /rest/api/2/user?username={username} Returns 405 Method Not Allowed

PUT /rest/api/2/user?username=bob.smith@aquera.com Returns 405 Method Not Allowed

Content-Type: application/json

Accept: application/json

Authorization: Basic ....

"name": "bob.smith@aquera.com",
"emailAddress": "bob.smith@aquera.com",
"displayName": "Bob Smithhy"


Returns 405 Method No Allowed

1 answer

This widget could not be displayed.

I think you need to use POST, not PUT.

curl -d@/tmp/a -u <admin>:<password> -X POST -H "Content-Type: application/json" https://yoursite.atlassian.net/rest/api/2/user

POST is to create a new user, which works well.  We need to update an existing user which is why we are trying to get the PUT to work.

Yes, PUT works fine too.

[ec2-user@ip-10-111-111-111 ~]$ cat /tmp/a
{ "displayName" : "Admin User" }

[ec2-user@ip-10-111-111-111 ~]$ curl -d@/tmp/a -k -u <admin>:<password> -X PUT -H "Content-Type: application/json" https://yoursite.atlassian.net/jira/rest/api/2/user?username=admin

What version JIRA are you using? Have you tried escaping the @ symbol in the URL? 

PUT /rest/api/2/user?username=bob.smith%40aquera.com

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted 10 hours ago in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

32 views 1 0
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