Forums

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

Set Allow LFS on Creation of Repository using BitBucket API

Serge Charbonneau
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 14, 2025

How do I set Allow LFS on the creation of a repository from the BitBucket API?

 

To set Allow forks, I set forkable to true on the body of my BitBucket API POST command.

 

Is there an equivalent flag that can be included in the body of my BitBucket API POST command to set Allow LFS?

2 answers

0 votes
Serge Charbonneau
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 17, 2025

Hello Marc,

 

Thank you for the quick response.

 

I'm currently building a Power Shell script to import files and folders from another source control tool to Git and BitBucket.  This script automates the creation of 266 repos.  Since some of the files to be imported are quite large (most of them are binary files), I want to use LFS.  And since the repos are created automatically with the script, I would have liked to check Allow LFS through the API as opposed to having to check the checkbox from the GUI 266 times.

 

Let me know if you think of something to avoid having to perform this manual intervention 266 times.

 

Thank you again and best regards,

 

Serge

Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 18, 2025

Hi @Serge Charbonneau

When I try to create a new repository using this link: https://bitbucket.org/workspace_id/workspace/create/repository

I can't see any LFS option, AFAIK, LFS is enabled by default when creating a repository, you'll just have to install Git LFS locally to upload files to LFS. See this documentation.

Let me know if I'm missing something in the creation of repository UI.

Regards,
Mark C

0 votes
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 17, 2025

Hi @Serge Charbonneau

Welcome to the community.

Unfortunately, there's no option to set the setting "Allow LFS" via API at the moment.

May I kindly ask what exactly you're trying to achieve?

Regards,
Mark C

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events