Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Setting Repo description with rest api

Chad Fox November 2, 2019

None of the examples or documentation I can find for creating or updating a repository using the rest api for bitbucket server, show how to set the repo description.

Is there documentation for the full set of values that can be configured using the api?

How can you set the description?

This is for Bitbucket server / data center, not cloud.

Thanks

Chad 

2 answers

1 accepted

0 votes
Answer accepted
Stephen Crandell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 2, 2019

Check this page for the rest end points and what you can update: https://docs.atlassian.com/bitbucket-server/rest/5.16.0/bitbucket-rest.html

 

I was able to write code to update the repo name so I’m sure there is an endpoint for the description 

Stephen Crandell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 2, 2019

Just change the link to the version of Bitbucket you are on to get a more precise list

Chad Fox November 3, 2019

Thank you for the response.

It turns out it is just a key named "description", but I had another error in my JSON, so it was failing, leading me to believe I had the wrong key.

0 votes
Stephen Crandell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 2, 2019

You will have to use PUT and send the new description in the data. 

https://docs.atlassian.com/bitbucket-server/rest/5.16.0/bitbucket-rest.html#idm8287366304

 

try setting the description on the front end and then do the standard get and see if the description field is listed in that response. If it is then the above should work. 

himashuk December 21, 2020

@mrcrandell.sw

I have added description and put still not getting success, I have created blank repo using rest api now adding description gives error

{
    "name": "My repo",
    "forkable": false,
    "project": {
        "key": "PRJ"
    },
    "description": "MY desc"
}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events