Forums

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

Add repository settings description for existing repos

himashuk December 21, 2020

I have created blank repo using rest api post and passing description at the same time, it's worked out but for already existing repos how to add description, I have used PUT for existing repo but not working

 

/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}

{

     "name": "my-repo",

         "description": "My custom description"
}
 

1 answer

0 votes
Evan Slaughter
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 24, 2020

Hey @himashuk,

It looks like the PUT request you're making ought to work - though if you're only attempting to modify the description, you shouldn't need to include the 'name' attribute in the PUT request's payload.

I tested the following cURL command against my local instance and it updated the description without issue - so look to see if it helps do the trick for you: 

curl --location --request PUT 'https://mybitbucketinstance.com/rest/api/1.0/projects/PROJECTNAME/repos/REPOSLUG' \
-u adminusername:adminpassword \
--header 'Content-Type: application/json' \
--data-raw '{

"description": "My custom description"

}' \
-k

If you look to still be getting an error, feel free to post back with the error or response you're getting back or shoot us the details over at https://support.atlassian.com/contact. :)

Thanks,

Evan

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events