Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,463,343
Community Members
 
Community Events
176
Community Groups

Unable to reset password using REST API's

Hai,

I'm trying to run the following curl to reset password for a user but getting the error with 400 Bad Request. Can anyone please let me know what am I missing in the curl command

Command: curl -k -u <admin>:<Password> -X PUT -H "Content-Type: application/json" "https://<Host:Port>/rest/api/1.0/admin/users/credentials?password=Password01&passwordConfirm=Password01&name=bob@example.com"

 

Error: {
"errors": [
{
"context": null,
"message": "No content to map to Object due to end of input",
"exceptionName": "java.io.EOFException"
}
]
}

Document Referredhttps://docs.atlassian.com/bitbucket-server/rest/5.16.0/bitbucket-rest.html#idm8288251120

Thanks

2 answers

Ever get this working?

0 votes
edwin Rising Star Feb 14, 2019

Hi @sasanth,

This is untested, but something like this should work.

Basically we're passing JSON with the request.

curl -k -u <admin>:<Password> \
-H "Content-Type: application/json" \
-X POST \
-d '{"password": "Password01","passwordConfirm": "Password01","name": "bob@example.com"}' \
https://<Host:Port>/rest/api/1.0/admin/users/credentials

 Screen Shot 2019-02-14 at 3.54.24 PM.png

Hai @edwin

Thanks for the response but Curl command is not working

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events