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

Change Repository description via REST api

Nils Janßen April 29, 2021

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 3, 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.

Nils Janßen May 4, 2021

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
AUG Leaders

Atlassian Community Events