How to create project in bit bucket using bit bucket REST API?

We are trying to create projects in bit bucket automatically.

Tried the following  options and it didn't work. can some one guide?

1. curl -k -X POST --user UID:PWD "https://bitbucketpilot.srv.westpac.com.au:50820/context/rest/api/1.0/projects" -d "name=vptest"

2. curl -X POST -v -u UID:PWD "https://bitbucketpilot.srv.westpac.com.au:50820/projects" -H "Content-Type: application/json" -d '{"scm": "git", "is_private": "true", "fork_policy": "no_public_forks"}'

3. curl-k -X POST --user "UID:PWD" https://bitbucketpilot.srv.westpac.com.au:50820/rest/api/1.0/projects?name='test_project'

 

 

1 answer

1 accepted

0 votes
Accepted answer

Hi Vaasanthi,

You can use this python api.

https://pypi.python.org/pypi/stashy/0.3

pip install stashy
import stashy

bitbucket = stashy.connect(host, user, pass)
bitbucket.projects.create("TEST", "Test")

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

421 views 5 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you