Bitbucket
Elevate your software delivery from planning to production and beyond, with built-in AI, CI/CD, and a best-in-class Jira integration.
Categories: Project Management
Type: bitbucket/v1
Connections
Version: 1
API Key Authorization
Properties
Name | Label | Type | Description | Required |
---|---|---|---|---|
username | Username | STRING | Email address of your Bitbucket account. | true |
password | API Key | STRING | API key creation steps in documentation. | true |
Actions
Create Repository
Name: createRepository
Creates a repository in a selected workspace.
Properties
Name | Label | Type | Description | Required |
---|---|---|---|---|
workspace | Workspace | STRING | Workspace in which repository will be created. | true |
repo_slug | Repository Slug | STRING | Repository slug that is used as identifier for the repository. | true |
name | Name | STRING | The name of the repository. | true |
scm | Source Control Management. | STRING Optionsgit | Specifies the version control system that your repository will use. | true |
project | Project | OBJECT Properties{STRING(key)} | Parent project of the repository. | true |
is_private | Is Private | BOOLEAN Optionstrue, false | Whether the repository is private or not. | false |
description | Description | STRING | The description of repository. | false |
fork_policy | Fork Policy | STRING Optionsallow_forks, no_public_forks, no_forks | Specifies the fork policy for the repository. | false |
language | Language | STRING | Main programming language of the repository | false |
Example JSON Structure
{
"label" : "Create Repository",
"name" : "createRepository",
"parameters" : {
"workspace" : "",
"repo_slug" : "",
"name" : "",
"scm" : "",
"project" : {
"key" : ""
},
"is_private" : false,
"description" : "",
"fork_policy" : "",
"language" : ""
},
"type" : "bitbucket/v1/createRepository"
}
Output
Type: OBJECT
Properties
Name | Type | Description |
---|---|---|
type | STRING | The type of the object (usually "repository"). |
links | OBJECT Properties{{STRING(href), STRING(name)}(self), {STRING(href), STRING(name)}(html), {STRING(href), STRING(name)}(avatar), {STRING(href), STRING(name)}(pullrequests), {STRING(href), STRING(name)}(commits), {STRING(href), STRING(name)}(forks), {STRING(href), STRING(name)}(watchers), {STRING(href), STRING(name)}(downloads), [{STRING(href), STRING(name)}](clone), {STRING(href), STRING(name)}(hooks)} | A collection of relevant resource links. |
uuid | STRING | The globally unique identifier for the repository. |
full_name | STRING | The full name of the repository (workspace/repo_slug). |
is_private | BOOLEAN Optionstrue, false | Indicates whether the repository is private. |
scm | STRING | The source control system (only "git" is supported). |
owner | OBJECT Properties{STRING(type)} | The user or team that owns the repository. |
name | STRING | The display name of the repository. |
description | STRING | A short description of the repository. |
created_on | STRING | Timestamp of when the repository was created. |
updated_on | STRING | Timestamp of the last repository update. |
size | INTEGER | Total size of the repository in bytes. |
language | STRING | The primary programming language of the repository. |
has_issues | BOOLEAN Optionstrue, false | Indicates whether the issue tracker is enabled. |
has_wiki | BOOLEAN Optionstrue, false | Indicates whether the wiki is enabled. |
fork_policy | STRING | Repository fork policy. |
project | OBJECT Properties{STRING(type)} | Project that the repository belongs to. |
mainbranch | OBJECT Properties{STRING(type)} | The default branch of the repository. |
Output Example
{
"type" : "",
"links" : {
"self" : {
"href" : "",
"name" : ""
},
"html" : {
"href" : "",
"name" : ""
},
"avatar" : {
"href" : "",
"name" : ""
},
"pullrequests" : {
"href" : "",
"name" : ""
},
"commits" : {
"href" : "",
"name" : ""
},
"forks" : {
"href" : "",
"name" : ""
},
"watchers" : {
"href" : "",
"name" : ""
},
"downloads" : {
"href" : "",
"name" : ""
},
"clone" : [ {
"href" : "",
"name" : ""
} ],
"hooks" : {
"href" : "",
"name" : ""
}
},
"uuid" : "",
"full_name" : "",
"is_private" : false,
"scm" : "",
"owner" : {
"type" : ""
},
"name" : "",
"description" : "",
"created_on" : "",
"updated_on" : "",
"size" : 1,
"language" : "",
"has_issues" : false,
"has_wiki" : false,
"fork_policy" : "",
"project" : {
"type" : ""
},
"mainbranch" : {
"type" : ""
}
}
Create Project
Name: createProject
Creates a project in selected workspace.
Properties
Name | Label | Type | Description | Required |
---|---|---|---|---|
workspace | Workspace | STRING | Workspace where the project will be added. | true |
name | Name | STRING | The name of the project. | true |
key | Key | STRING | Key of the project (eg. AT, for a project named Atlassian). Project keys must start with a letter and may only consist of ASCII letters, numbers and underscores (A-Z, a-z, 0-9, _). | true |
description | Description | STRING | The description of project. | false |
is_private | Is Private | BOOLEAN Optionstrue, false | Whether the project is private or not. | false |
Example JSON Structure
{
"label" : "Create Project",
"name" : "createProject",
"parameters" : {
"workspace" : "",
"name" : "",
"key" : "",
"description" : "",
"is_private" : false
},
"type" : "bitbucket/v1/createProject"
}
Output
Type: OBJECT
Properties
Name | Type | Description |
---|---|---|
metrics | OBJECT Properties{INTEGER(org_keywords)} |
Output Example
{
"metrics" : {
"org_keywords" : 1
}
}
List Projects
Name: listProjects
Returns list of projects from workspace.
Properties
Name | Label | Type | Description | Required |
---|---|---|---|---|
workspace | Workspace | STRING | Workspace from which projects are to be listed. | true |
Example JSON Structure
{
"label" : "List Projects",
"name" : "listProjects",
"parameters" : {
"workspace" : ""
},
"type" : "bitbucket/v1/listProjects"
}
Output
Type: ARRAY
Items Type: OBJECT
Properties
Name | Type | Description |
---|---|---|
type | STRING | The type of the object (typically 'project'). |
links | OBJECT Properties{{STRING(href), STRING(name)}(html), {STRING(href), STRING(name)}(avatar)} | Relevant links for the project. |
uuid | STRING | Globally unique identifier for the project. |
key | STRING | Unique key identifying the project within the workspace. |
owner | OBJECT Properties{STRING(type)} | The workspace or user who owns the project. |
name | STRING | Human-readable name of the project. |
description | STRING | Description of the project. |
is_private | BOOLEAN Optionstrue, false | Indicates whether the project is private. |
created_on | DATE_TIME | Timestamp of when the project was created. |
updated_on | DATE_TIME | Timestamp of the last update to the project. |
has_publicly_visible_repos | BOOLEAN Optionstrue, false | Indicates if the project contains any public repositories. |
Output Example
[ {
"type" : "",
"links" : {
"html" : {
"href" : "",
"name" : ""
},
"avatar" : {
"href" : "",
"name" : ""
}
},
"uuid" : "",
"key" : "",
"owner" : {
"type" : ""
},
"name" : "",
"description" : "",
"is_private" : false,
"created_on" : "2021-01-01T00:00:00",
"updated_on" : "2021-01-01T00:00:00",
"has_publicly_visible_repos" : false
} ]
List Repositories
Name: listRepositories
Returns list of repositories from workspace.
Properties
Name | Label | Type | Description | Required |
---|---|---|---|---|
workspace | Workspace | STRING | Workspace from which repositories are to be listed. | true |
Example JSON Structure
{
"label" : "List Repositories",
"name" : "listRepositories",
"parameters" : {
"workspace" : ""
},
"type" : "bitbucket/v1/listRepositories"
}
Output
Type: ARRAY
Items Type: OBJECT
Properties
Name | Type | Description |
---|---|---|
type | STRING | The type of the object (usually "repository"). |
links | OBJECT Properties{{STRING(href), STRING(name)}(self), {STRING(href), STRING(name)}(html), {STRING(href), STRING(name)}(avatar), {STRING(href), STRING(name)}(pullrequests), {STRING(href), STRING(name)}(commits), {STRING(href), STRING(name)}(forks), {STRING(href), STRING(name)}(watchers), {STRING(href), STRING(name)}(downloads), [{STRING(href), STRING(name)}](clone), {STRING(href), STRING(name)}(hooks)} | A collection of relevant resource links. |
uuid | STRING | The globally unique identifier for the repository. |
full_name | STRING | The full name of the repository (workspace/repo_slug). |
is_private | BOOLEAN Optionstrue, false | Indicates whether the repository is private. |
scm | STRING | The source control system (only "git" is supported). |
owner | OBJECT Properties{STRING(type)} | The user or team that owns the repository. |
name | STRING | The display name of the repository. |
description | STRING | A short description of the repository. |
created_on | STRING | Timestamp of when the repository was created. |
updated_on | STRING | Timestamp of the last repository update. |
size | INTEGER | Total size of the repository in bytes. |
language | STRING | The primary programming language of the repository. |
has_issues | BOOLEAN Optionstrue, false | Indicates whether the issue tracker is enabled. |
has_wiki | BOOLEAN Optionstrue, false | Indicates whether the wiki is enabled. |
fork_policy | STRING | Repository fork policy. |
project | OBJECT Properties{STRING(type)} | Project that the repository belongs to. |
mainbranch | OBJECT Properties{STRING(type)} | The default branch of the repository. |
Output Example
[ {
"type" : "",
"links" : {
"self" : {
"href" : "",
"name" : ""
},
"html" : {
"href" : "",
"name" : ""
},
"avatar" : {
"href" : "",
"name" : ""
},
"pullrequests" : {
"href" : "",
"name" : ""
},
"commits" : {
"href" : "",
"name" : ""
},
"forks" : {
"href" : "",
"name" : ""
},
"watchers" : {
"href" : "",
"name" : ""
},
"downloads" : {
"href" : "",
"name" : ""
},
"clone" : [ {
"href" : "",
"name" : ""
} ],
"hooks" : {
"href" : "",
"name" : ""
}
},
"uuid" : "",
"full_name" : "",
"is_private" : false,
"scm" : "",
"owner" : {
"type" : ""
},
"name" : "",
"description" : "",
"created_on" : "",
"updated_on" : "",
"size" : 1,
"language" : "",
"has_issues" : false,
"has_wiki" : false,
"fork_policy" : "",
"project" : {
"type" : ""
},
"mainbranch" : {
"type" : ""
}
} ]
Triggers
Repository Push
Name: repositoryPush
Triggers whenever a repository push occurs.
Type: DYNAMIC_WEBHOOK
Properties
Name | Label | Type | Description | Required |
---|---|---|---|---|
workspace | Workspace | STRING | Workspace where the repository is located. | true |
repository | Repository | STRING Depends Onworkspace | Repository that will be connected to the trigger. | true |
Output
The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.
JSON Example
{
"label" : "Repository Push",
"name" : "repositoryPush",
"parameters" : {
"workspace" : "",
"repository" : ""
},
"type" : "bitbucket/v1/repositoryPush"
}
Additional instructions
Connection Setup
Bitbucket API Token Creation
- Go to the Bitbucket website.
- Click Settings.
- Click Atlassian account settings.
- Click Security.
- Click Create and manage API tokens.
- Click Create API token with scopes.
- Enter name of your API token.
- Choose expiry date of your API token.
- Click Next.
- Select Bitbucket.
- Click Next.
- Find and select these scopes:
- admin:project:bitbucket
- admin:repository:bitbucket
- read:project:bitbucket
- read:repository:bitbucket
- read:user:bitbucket
- read:webhook:bitbucket
- read:workspace:bitbucket
- write:webhook:bitbucket
- After you have selected scopes click Next.
- Click Create token.
- Click on Copy. Make sure to save your newly created API token because after this step you won’t be able to view it again.
- Click Close.