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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.