Enable LFS through Rest API

krausedj-alv June 28, 2016

How do I enable LFS through the Rest API for a given repository?

There is a private API rest/git-lfs/admin/projects/{projectKey}/repos/{repositorySlug}/enabled but this seems to 404 when I try it.

2 answers

0 votes
Jason Kemp May 17, 2017

The internal API "rest/git-lfs/admin/projects/{projectKey}/repos/{repositorySlug}/enabled" does actually work to control git-lfs, though all responses are empty.

GET will tell you if git-lfs is enabled or not. A return code of 200 if it is enabled, and 404 if it is not.

PUT (not POST) will enable git-lfs for the repo.

DELETE will disable git-lfs for the repo.

0 votes
krausedj-alv June 28, 2016

As a short term solution I may started doing the same Form POSTs the browser GUI gives.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events