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://bitbucket.example.com/context/rest/api/1.0/projects" -d "name=vptest"
2. curl -X POST -v -u UID:PWD "https://bitbucket.example.com/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://bitbucket.example.com/rest/api/1.0/projects?name='test_project'
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")
I am able to create a project in Bibucket server using this API:
curl -D- -u username:Password -d "{ \"key\": \"PRA\", \"name\": \"My project\", \"description\": \"My First project through API\" }" -H "C
ontent-Type: application/json" http://servername:7990/rest/api/1.0/projects
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have a similar request
curl -D- -u username:Password -d "{ \"key\": \"PRA\", \"name\": \"My project VVP\", \"description\": \"My First project through API\" }" -H "Content-Type: application/json" https://bitbucketexample.com/rest/api/1.0/projects
*https://bitbucketexample.com replaced with my URL.
but i got an error
{"errors":[{"context":null,"message":"You are not permitted to access this resource","exceptionName":"com.atlassian.bitbucket.AuthorisationException"}]
I am a admin, so what is missing here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.