I'm trying to create a project using REST API. Every time I'm getting internal server error like this:
Hi, Aman, thank you for reaching out to Atlassian Community.
I tested this on my side and was able to create a project using the following API:
Here is an example that you can follow, you just need to inform your workspace ID, the project name, and the key you would like to create:
curl --request POST -u username:AppPassword \
--url 'https://api.bitbucket.org/2.0/workspaces/{workspace_ID}/projects' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"key": "{inform_a_key}",
"name": "{project_name}",
"is_private": true
}'
Please let me know how it goes and feel free to share any additional questions or concerns regarding this case.
Kind regards,
Caroline
Our annual user conference, Team ’22 is back! Join us in Las Vegas starting April 5th or attend digitally on April 6th. Register now: https://events.atlassian.com/team22
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The payload is from the example:
{
"name": "CloudX",
"key": "CEX",
"description": "This Project is for the CloudX.",
"is_private": true,
"has_publicly_visible_repos": false,
"type": "project",
"uuid": "c35b960d-3c0e-467b-81d4-b43368beac96",
"links": {
"avatar": {
"href": "https://.../default.png"
}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You haven't provided any information as to which Bitbucket REST API endpoint you're sending that request to or the method, so I'll have to guess.... you're sending a POST request to:
/2.0/workspaces/{workspace}/projects
You haven't advised if the request works if you omit all the un-required parameters and just define the required ones like name
, key
, is_private
and description
, so I'll have to guess... you haven't tested that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Sunny Ape,
I've tried only required parameters and still getting the same. I've updated the URL in question as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm able to create projects in one of the workspaces of my Bitbucket Cloud account using that REST API endpoint with only those required parameters without any errors.
Nobody else seems to be reporting any problems with Bitbucket Cloud's REST API, so if it's affecting just you and just that REST API endpoint and no others, and you've tried all the obvious usual things like:
...and the error persists, I suggest you raise a support request with Atlassian.
Good luck.
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.