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
Community Members
Community Events
Community Groups

API to create a file doesn't returns the commitId ?

I am creating a new file in the bitbucket using the api given in the doc at

The API successfully created the file in bitbucket but it didn't return the commitId. Since the API is to "Create a commit by uploading a file", it should have returned the commitId ?

Also is there any other way I can retrieve this commitId ?


1 answer

0 votes
Caroline R Atlassian Team Jan 07, 2022

Hi, @Deepak Patankar

Thank you for reaching out to Atlassian Community!

You could use the verbose option to receive the commit ID, for example:

curl POST -u username:AppPassword 
-F /repo/path/to/image.png=@image.png
--form 'message=my commit message' -v

It will give you the following information:


I hope this helps, but do let me know if you have any questions.

Kind regards,

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events