Thank you for the clarification. I was able to use the multipart content type to submit new files into the bitbucket repo. However, when I try to update an existing file, an error shows up:
curl -XPUT … -F sourceCommitId=xxxxx …
“message”:"‘definition/foo’ could not be created because it already exists. A previous commit ID must be provided when editing an existing file to prevent concurrent modifications.",
I provided the commit ID from the latest commit on the branch for sourceCommitId.
Is the parameter “sourceCommitId” incorrect labeled ?
The documentation says that if the commit ID is null, then it is expecting to store a new file, which is like the behavior I am seeing, ie the REST agent can’t find the commit ID from multiform content, and assigning it null, and then expects the file to be new.