The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Bitbucket repo creation using REST API

Silambarasan
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!
October 20, 2021

I tried to create repo as per the documentation. I have ended up with below error. Please help me to give some insights on how to clear this issue ?

Documentation:

https://docs.atlassian.com/bitbucket-server/rest/6.10.0/bitbucket-rest.html

Refer doc Section: /rest/api/1.0/projects/{projectKey}/repos

Error:

Parameter conditions "create" not met for actual request parameters:

Input request :

curl -X POST \
https://bitbucket.myOrg.com/projects/myProject/repos/ \
-H 'Authorization: Bearer *******NzgxOp6QjEOo8QaaTQSf*******' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"name" : "some-repo",
"scmId": "git",
"forkable": true

}'

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Ulrich Kuhnhardt _IzymesCo_
Atlassian Partner
October 20, 2021

you'll have to use this url

{BASE_URL}/rest/api/1.0/projects/{projectKey}/repos

Hope that helps. 

TAGS
AUG Leaders

Atlassian Community Events