The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Bitbucket server rest api to get project or repo level settings

Radhika kaur
December 15, 2022

Looking for easy way to save/export bitbucket project or repository settings to use as a backup. 
Tried below but that's not a known method
http://example.com/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/settings

Any help/suggestion is appreciated.


1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Ulrich Kuhnhardt _IzymesCo_
Atlassian Partner
December 15, 2022

Hello Radhika,

According to the REST API docs there is no single endpoint to fetch or restore all settings.

Repo settings endpoints are divided up into different aspects such as 

pull request settings: /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/settings/pull-requests

repo hooks: 

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

You would probably need a script to fetch and 'backup' the settings you need to keep, same for restore.

Hope that helps,

Ulrich, // Izymes

Radhika kaur
December 19, 2022

Thanks for the response @Ulrich Kuhnhardt _IzymesCo_ I figured it's not there but worth a try asking the community.

TAGS
AUG Leaders

Atlassian Community Events