Missed Team ’24? Catch up on announcements here.

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

Unable to reset password using REST API's

sasanth February 13, 2019

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

0 votes
David Willson March 3, 2022

Ever get this working?

0 votes
Edwin Kyalangalilwa
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.
February 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

sasanth February 14, 2019

Hai @Edwin Kyalangalilwa

Thanks for the response but Curl command is not working

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events