Forums

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

Creating git repository via REST-API

giuseppe_clinaz
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!
January 30, 2019

Hi guys, 

does someone know whether these commands, besides the URL, will be valid after the API changes?

curl -k -X POST --user user:pass "https://api.bitbucket.org/1.0/repositories" -d "name=project_name"

and

curl -s -u user:passwd -k --header "Content-Type: application/json" -X PUT "https://bitbucket.**.com/rest/api/1.0/projects/{project-KEY}/repos/{REPONAME}/permissions/groups?permission=REPO_WRITE&name={GROUP NAME}"

 

1 answer

1 accepted

1 vote
Answer accepted
jredmond
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 30, 2019

The Bitbucket Server API (the second in your example, with `https://bitbucket.**.com/rest/api`) is built into the Bitbucket Server version you've installed. That API only changes when the BB Server version changes, and (unless you perform an upgrade on 12 April 2019) it will not change on 12 April 2019.

For Bitbucket Cloud (the first one, with `api.bitbucket.org`), all 1.0 endpoints are being discontinued as of 12 April 2019 (per https://developer.atlassian.com/cloud/bitbucket/deprecation-notice-v1-apis/). You will need to update the call to use the corresponding 2.0 endpoint: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D#post

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events