Rate this page:
Bitbucket Cloud projects make it easier for teams to focus on a goal, product, or process by organizing their repositories.
POST /2.0/workspaces/{workspace}/projects
Creates a new project.
Note that the avatar has to be embedded as either a data-url or a URL to an external image as shown in the examples below:
1 2$ body=$(cat << EOF { "name": "Mars Project", "key": "MARS", "description": "Software for colonizing mars.", "links": { "avatar": { "href": "data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/..." } }, "is_private": false } EOF ) $ curl -H "Content-Type: application/json" \ -X POST \ -d "$body" \ https://api.bitbucket.org/2.0/teams/teams-in-space/projects/ | jq . { // Serialized project document }
or even:
1 2$ body=$(cat << EOF { "name": "Mars Project", "key": "MARS", "description": "Software for colonizing mars.", "links": { "avatar": { "href": "http://i.imgur.com/72tRx4w.gif" } }, "is_private": false } EOF ) $ curl -H "Content-Type: application/json" \ -X POST \ -d "$body" \ https://api.bitbucket.org/2.0/teams/teams-in-space/projects/ | jq . { // Serialized project document }
project:admin
string
This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: {workspace UUID}
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
curl --request POST \
--url 'https://api.bitbucket.org/2.0/workspaces/{workspace}/projects' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"type": "<string>",
"links": {
"html": {
"href": "<string>",
"name": "<string>"
},
"avatar": {
"href": "<string>",
"name": "<string>"
}
},
"uuid": "<string>",
"key": "<string>",
"owner": {
"type": "<string>"
},
"name": "<string>",
"description": "<string>",
"is_private": true,
"created_on": "<string>",
"updated_on": "<string>",
"has_publicly_visible_repos": true
}'
GET /2.0/workspaces/{workspace}/projects/{project_key}
Returns the requested project.
project
string
The project in question. This is the actual key
assigned
to the project.
string
This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: {workspace UUID}
.
1 2 3 4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/workspaces/{workspace}/projects/{project_key}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
PUT /2.0/workspaces/{workspace}/projects/{project_key}
Since this endpoint can be used to both update and to create a project, the request body depends on the intent.