Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Change Repository description via REST api

Dear Sir or Madam,

 

is it possible to alter the description of a given repository via REST api? I tried something like this but it did not change the description:

curl PUT -v -u <user>:<password> https://<server>/rest/api/1.0/projects/UIAP/repos/gkvuipaacau -H "Content-Type: application/json" -d "{\"description\":\"Test\"}"

Reason: I have to create a lot of repositories and change their respecitve descriptions.

 

Best Regards

Nils

1 answer

0 votes
Charlie Misonne Community Leader May 03, 2021

Hi Nils,

I assume you already to a look at the REST API documentation on this page?

I do not see the description in the PUT example so if it doesn't work there's a chance it is not supported.
What do you get as a response?

You could also inspect the http request your browser is perfoming when you update the description via the user interface and reuse that call.
I would try it myself but I do not have access to a Bitbucket server environment myself immediately.

Hi Charlie,

 

you assumed correctly but apparently my limited knowledge of cURL was the problem.

The property "description" is not mentioned in the examples but I have been able to change the property with this command:

 

curl -X PUT -u <user>:<password> https://<system>/rest/api/1.0/projects/UIAP/repos/gkvuipaacau -H "Content-Type:application/json" -d "{\"description\":\"Test_mit_put\"}"

Like Charlie Misonne likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

227 views 2 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you