Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Getting 405 error when trying to update email address using cloud REST API

Jay Keck
Contributor
November 30, 2018

I'm on a linux system trying to access a cloud jira instance to change the email address of  users. When I issue the command below I'm getting a 405 error. Originally I was getting a 301, but I figured out I needed https vs http. But I'm not seeing what the issue is with this request.

curl -verbose -s -f -X PUT -u 'myuser@password' -H 'Content-Type: application/json' --data '{ "name": "admin", "emailAddress": "newemail@domain.com" }' 'https://myjira.atlassian.net/rest/api/2/user?key=admin'

Thanks in advance for any help or advice,

jay

1 answer

1 accepted

0 votes
Answer accepted
Elifcan Cakmak
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 3, 2018

Hello,

405 error is "Method Not Allowed". I can't find a method for Cloud to update user's email. Are you sure the method exists?

https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-api-3-user-get

It's possible for Jira Server but I'm not sure you can do it on Cloud.

Regards,

Elifcan

Jay Keck
Contributor
December 12, 2018

Hi Elifcan,

You are right, the cloud doesn't support this operation. I had been doing this on server successfully and didn't check to see if the cloud API set supported it, Do'h!

Jay

Suggest an answer

Log in or Sign up to answer