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

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events