The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Experimental rest api method update user

aas
Contributor
December 18, 2019

I use direct link with token and HttpSession to update user information:

my $UpdateLink="$URL/secure/admin/user/EditUser.jspa?atl_token=$HTTPToken&fullName=$UserFullName&email=$UserEmail&username=$UserName&editName=$UserName&active=$UserActiveStatus";
my $UpdateUserQuery = $HTTPSession->post($UpdateLink);

  And have a problem - users don't become active. 

I want to use PUT ${jiraAdress}/rest/api/2/user method in my script, but it's marked as experimental. Is it dangerous to use it, because it can be changed any time and script will stop working?

The same Rest Api method in Crowd is not experimental and works properly. 

 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
brbojorque
Community Champion
December 18, 2019

Hi @aas ,

You need to add a header X=ExperimentalAPI: true in order for the request to be successful.

-

https://docs.atlassian.com/jira-servicedesk/REST/3.6.2/

Experimental methods

Methods marked as EXPERIMENTAL may change without notice. We are looking for your feedback for these methods. To use experimental methods, you must set this header in your requests: X-ExperimentalApi : true. This indicates that you are opting into the experimental preview. Once a resource or method moves out of the experimental phase, then this header will no longer be required nor checked.