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

PUT /rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/browse/{path} error, add or edit

zeedub
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 3, 2023

Hello,

I have been trying for days to add a file from Node VIA REST API. I am 100% sure that I am sending it correct. I am now trying in Postman with the following info

 

This is bitbucket server btw:

/rest/api/latest/projects/EPS/repos/gm-email/browse/test.html

 

I am sending form-data

branch

message

content - file, I have also tried string

 

return:

{
"errors": [
{
"context": null,
"message": "An error occurred while processing the request. Check the server logs for more information.",
"exceptionName": null
}
]
}
if I leave content null
{
"errors": [
{
"context": null,
"message": "Parameter 'content' cannot be null.",
"exceptionName": null
}
]
}
I have structured the content all sorts of ways from file to buffer to plain string no matter what it will not work. 
Any help would be appreciated, I think there may be a bug with this call.
Thanks!

1 answer

0 votes
Javier AMENGUAL CAMARA (contractor)
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 17, 2023

Did you solve the problem? Because I am having the same problem

David Jansons
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 21, 2023

Are you by any chance using a repo HTTP access token to run the REST request?

We recently closed a bug related to this issue.

If you are using a repo HTTP access token, can you please try with a personal HTTP access token as a work around?

If this is the cause of the issue, I would recommend updating your server to a version that contains the bugfix.

David Jansons
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 21, 2023

If the above suggestion doesn't resolve the issue, can you please provide:

  • The version of bitbucket you are running. (This can be found at the bottom of the webpage when viewing a screen on your server)
  • The error message from the logs (You may need your admin to get this for you if you don't have access to the server)

If we can't resolve the issue with the extra two bits of above data, the next step would be raising a support request.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events