1. Overview
Bitbucket is a Git-based source code repository hosting service owned by Atlassian. It provides distributed version control and allows for collaboration on code projects, offering features like code review, pull requests, and CI/CD pipelines.
With the GoInsight Bitbucket node, you can automate your development and code management workflows. This integration allows you to programmatically interact with your Bitbucket account to manage the entire lifecycle of your software projects, including:
- Repository Management: Create, retrieve, update, and delete repositories.
- Code and Branching: Manage branches, tags, commits, and file contents within your repositories.
- Collaboration: Automate the creation and management of pull requests and comments.
- Project Organization: Handle projects and workspaces to structure your development efforts.
- CI/CD Integration: Create and monitor commit build statuses to integrate with your continuous integration pipelines.
2. Prerequisites
Before using this node, you must have a valid Bitbucket account. You will also need to generate an App Password with the necessary permissions (e.g., repository read/write, project administration) to authenticate your requests.
3. Credentials
For a detailed guide on how to obtain and configure your credentials, please refer to our official documentation: Credentials Configuration Guide.
4. Supported Operations
Summary
This node primarily operates on resources such as Branch, Commit, Commit Comment, Commit Status, File/Directory, Project, Pull Request, Repository, Tag, User, Workspace, and Workspace Member.
| Resource | Operation | Description |
|---|---|---|
| Branch | Create a Branch | Creates a new branch in a specified repository in Bitbucket using API token authentication. |
| Branch | Delete a Branch | Deletes a specific branch from a specified repository in Bitbucket using API token authentication. |
| Branch | Get Many Branches | Retrieves a paginated list of branches from a specified Bitbucket repository within a specified Bitbucket workspace. |
| Branch | Get a Branch | Retrieves details of a specific branch from a specified repository within a specified Bitbucket workspace. |
| Commit | Create a Commit | Creates a new commit in a specified repository in Bitbucket by uploading files using API token authentication. |
| Commit | Get Many Commits | Retrieves a paginated list of commits for a specified Bitbucket repository within a specified Bitbucket workspace. |
| Commit | Get a Commit | Retrieves a specified commit from a specified Bitbucket repository within a specified Bitbucket workspace. |
| Commit Comment | Create a Commit Comment | Creates a new comment on the specified commit in a Bitbucket repository. |
| Commit Comment | Delete a Commit Comment | Deletes a specified commit comment for a workspace from Bitbucket using API token authentication. |
| Commit Comment | Get Commit Comments | Retrieves a paginated list of comments for a specified commit from a specified Bitbucket repository within a specified Bitbucket workspace. |
| Commit Comment | Get a Commit Comment | Retrieves a specified commit comment from a specified Bitbucket repository within a specified Bitbucket workspace. |
| Commit Comment | Update a Commit Comment | Updates the contents of an existing commit comment in a Bitbucket repository. |
| Commit Status | Create Commit Status | Creates a new build status for a commit in Bitbucket using API token authentication. |
| Commit Status | Get Commit Statuses | Retrieves a paginated list of statuses (e.g. build results) for a specified commit from a specified Bitbucket repository within a specified Bitbucket workspace. |
| Commit Status | Get a Commit Status | Retrieves the specified build status for a specified commit from a specified Bitbucket repository within a specified Bitbucket workspace. |
| Commit Status | Update Commit Status | Updates (upserts) a build commit status on a specific commit in a Bitbucket repository. |
| File/Directory | Get File Directory Contents | Retrieves file or directory contents at a specified revision from Bitbucket. |
| File/Directory | Get a File Commits | Retrieves a paginated list of commits that modified the specified file from a specified Bitbucket repository within a specified Bitbucket workspace. |
| Project | Create a Project | Creates a project in a specified workspace in Bitbucket using API token authentication. |
| Project | Delete a Project | Deletes a specific project from a specified workspace in Bitbucket using API token authentication. |
| Project | Get Many Projects | Retrieves a paginated list of projects from a specified Bitbucket workspace. |
| Project | Get a Project | Retrieves a specific project from a workspace in Bitbucket using API token authentication. |
| Project | Update a Project | Updates metadata of an existing project in a Bitbucket workspace (name, description, visibility). |
| Pull Request | Create a Pull Request | Creates a new pull request in a specified repository in Bitbucket using API token authentication. |
| Pull Request | Get Many Pull Requests | Retrieves a paginated list of pull requests for a specified Bitbucket repository within a specified Bitbucket workspace. |
| Pull Request | Get a Pull Request | Retrieves a pull request from Bitbucket using API token authentication. |
| Pull Request | Update a Pull Request | Updates an existing open pull request in a Bitbucket repository (title, description, branches, state). |
| Repository | Create a Repository | Creates a new repository in a specified workspace in Bitbucket using API token authentication. |
| Repository | Delete a Repository | Deletes a specific repository from a Bitbucket workspace. This is a permanent, irreversible action. |
| Repository | Get Many Repositories | Retrieves a paginated list of repositories within a specified Bitbucket workspace. |
| Repository | Get a Repository | Retrieves a specific repository from a specified workspace in Bitbucket. |
| Repository | Update a Repository | Updates metadata of an existing repository in a Bitbucket workspace (name, description, website). |
| Tag | Create a Tag | Creates a new annotated tag in a specified repository in Bitbucket using API token authentication. |
| Tag | Delete a Tag | Deletes a specific tag from a specified repository in Bitbucket using API token authentication. |
| Tag | Get Many Tags | Retrieves a paginated list of tags for a specified Bitbucket repository within a specified Bitbucket workspace. |
| Tag | Get a Tag | Retrieves a tag from a specified repository in Bitbucket using API token authentication. |
| User | Get Current User | Gets the Bitbucket user associated with the provided credential. |
| Workspace | Get Many Workspaces | Retrieves a paginated list of workspaces accessible to the authenticated Bitbucket user. |
| Workspace | Get a Workspace | Retrieves a detail of a specific workspace from Bitbucket using API token authentication. |
| Workspace Member | Get Workspace Members | Retrieves a paginated list of members within a specified Bitbucket workspace. |
Operation Details
Create a Branch
Creates a new branch in a specified repository in Bitbucket using API token authentication. Idempotency Warning: This action is NOT idempotent and CANNOT be undone: repeated calls may error if the branch already exists. The function does not automatically reuse an existing branch. To avoid duplicates, verify branch existence before creating it.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: Slug (short name): lowercase alphanumeric with optional _, -, . (e.g., goinsight). UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: Slug (short name): lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
- BranchName: Name of the new ref to be created. Cannot contain special characters like *, ?, [, ], :, spaces, or .. Example: feature/login
- SourceBranch: Name of the source branch. How to obtain: 1. Call the bitbucket_branch_list interface with the same Workspace and RepoSlug. 2. Copy the name field value of the target branch object, or supply a new branch name to create a branch with this commit. Example: master, feature/my-change
Output:
- Branch (object): Branch data created in Bitbucket repository. - type (str): Type of the ref. - name (str): Name of the ref. - links (dict): Links of the ref. Include the following main fields: - self (dict): A link to a resource related to this object. This object includes href and name fields. - commits (dict): A link to a resource related to this object. This object includes href and name fields. - html (dicts): A link to a resource related to this object. This object includes href and name fields.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Delete a Branch
Deletes a specific branch from a specified repository in Bitbucket using API token authentication. ⚠️ WARNING: This operation is PERMANENT and CANNOT BE UNDONE. The branch reference is immediately removed from the repository with no recovery option via API.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
- BranchName: Name of the branch to be deleted. How to obtain: 1. Call the bitbucket_branch_list interface. 2. Find the target branch in the returned Branches array. 3. Copy the name field value of branch object. Example: fixbug
Output:
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Many Branches
Retrieves a paginated list of branches from a specified Bitbucket repository within a specified Bitbucket workspace. Key points: - For first-time calls, use smaller pagelen values (e.g., 10-20) to avoid context flooding. Increase only if needed. - Provide exactly one credential: access_token OR account+api_token, not both.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
Options:
- Query: Query string for filtering branches. Syntax:
[operator] . field_value can be case-sensitive. Supported operators: Operator Description Example = equal to name = "master" != not equal to name != "master" ~ case-insensitive text contains name ~ "feature/" !~ case-insensitive text does not contain name !~ "master" > greater than target.date > "2026-06-01" < less than target.date < "2026-06-01" >= greater than or equal to target.date >= "2026-06-01" <= less than or equal to target.date <= "2026-06-01" IN value present in list name IN ["master", "develop"] NOT IN value not present in list name NOT IN ["master", "develop"] Note: Common filterable fields: name, target.date References: https://developer.atlassian.com/cloud/bitbucket/rest/intro/#filtering - Sort: Sort order for branches. Default is ascending order. Descending order can be achieved by appending - to the sort parameter. Note: Sorted field can be one of the following: name, target.date. References: https://developer.atlassian.com/cloud/bitbucket/rest/intro/#filtering
- Page: Page number for paginated retrieval. Starts from 1. Defaults to 1.
- Pagelen: Maximum number of items per page. Valid range is 10-100. Defaults to 20.
Output:
- Branches (object-array): List of branch data retrieved from Bitbucket repository. Each branch object includes: - name (str): Name of the branch. - target (dict): The commit this branch points to. Includes hash (commit SHA), type (e.g. "commit"), links, repository, and author metadata. - links (dict): REST self, web UI html, and source-view code URLs.
- Pagination (object): A dict of pagination information. Includes the following fields: size (int, optional): Total number of objects in the response. This is an optional element that is not provided in all responses. page (int, optional): Page number of the current results. This is an optional element that is not provided in all responses. pagelen (int): Current number of objects on the existing page. Globally, the minimum length is 10 and the maximum is 100. Some APIs may specify a different default. next (str): Next page url or empty string if there is no next page prev (str): Previous page url or empty string if there is no previous page Note: These URLs already contain complete query parameters and can be directly used for the next API request without manually constructing pagination parameters.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get a Branch
Retrieves details of a specific branch from a specified repository within a specified Bitbucket workspace. What: Retrieves complete branch metadata including branch name, target commit hash, and resource links.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
- BranchName: Name of the branch to be retrieved. How to obtain: 1. Call Action bitbucket_branch_list with the same Workspace and RepoSlug. 2. In response Branches[], locate the target item by name. 3. Copy Branches[i].name into this parameter. Example: feature
Output:
- Branch (object): Dictionary of branch data retrieved from Bitbucket repository. - type (str): Type of the ref. - name (str): Name of the ref. - links (dict): Links of the ref. Include the following main fields: - self (dict): A link to a resource related to this object. This object includes href and name fields. - commits (dict): A link to a resource related to this object. This object includes href and name fields. - html (dicts): A link to a resource related to this object. This object includes href and name fields.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Create a Commit
Creates a new commit in a specified repository in Bitbucket by uploading files using API token authentication. Idempotency Warning: This action is NOT idempotent and CANNOT be undone: repeated calls may error if the commit already exists. The function does not automatically reuse an existing commit. To avoid duplicates, verify commit existence before creating it.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: Slug (short name): lowercase alphanumeric with optional _, -, . (e.g., goinsight). UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: Slug (short name): lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
- Files: Files to add or overwrite in the new commit. Required, non-empty dict. API semantics (Bitbucket POST /src files): Declares which repository paths this commit manipulates. When a path is uploaded with content (this action maps each dict entry to a form field), Bitbucket adds or overwrites that file. Paths referenced neither here nor in any upload field remain unchanged and carry over from the parent commit. To delete a file, the upstream API lists the path in the files metadata field without a matching upload field (replace with null set); this action only supports add/overwrite via dict entries. Rename/move by deleting the old path and adding content at the new path in the same commit when delete is supported. This API does not support renaming as an explicit operation. Format: - Keys: repository file paths, absolute from repo root (leading slash optional but recommended if the path matches a metadata name such as message or branch). - Values: full file contents as strings (text as plain string; binary files should be base64 encoded). File contents are treated as bytes and are not decoded as text. - You can add, modify, or overwrite multiple files in one request. Binary file handling: - Text files: provide raw string content - Binary files: MUST be base64 encoded before passing to this action. HTTP form-data cannot directly transmit binary data, base64 converts it to safe ASCII text. - Example (binary): {"logo.png": "iVBORw0KGgoAAAANSUhEUgAA..."} Example: {"src/app.py": "print('hello')", "/docs/readme.md": "# Title"}
Options:
- Message: Commit message. When omitted, Bitbucket will generate a default message like 'Committed via API'.
- Branch: The name of the branch the new commit should be created on. Defaults to "master". When omitted upstream, the commit is created on the main branch and becomes the main branch's new HEAD. Behavior: - Existing branch: the commit is created on top of that branch's current tip/HEAD. - New branch name (not yet in the repo): the new commit inherits from the main branch tip and the commit defines the new branch (main branch is not advanced unless the new branch name becomes the default main branch on an empty repo). - The branch field cannot be repeated in a single request. - Side effect: specifying a new branch name together with parents (upstream) and no file changes can create a branch without modifying files. How to obtain: 1. Call the bitbucket_branch_list interface with the same Workspace and RepoSlug. 2. Copy the name field value of the target branch object, or supply a new branch name to create a branch with this commit. Example: master, feature/my-change
Output:
- CommitUrl (string): The URL of the created commit. This URL can be used to: - View the commit details in a browser (e.g., https://bitbucket.org/workspace/repo/commits/hash) - Share the commit with team members - Use as a reference in subsequent API calls or documentation Format: https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/commit/{commit_hash} Example: https://api.bitbucket.org/2.0/repositories/goinsight/repo_2026/commit/38aec1fbed671cb0fbdecf371acbeac0f24b0f8f
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Many Commits
Retrieves a paginated list of commits for a specified Bitbucket repository within a specified Bitbucket workspace. Key points: - For first-time calls, use smaller pagelen values (e.g., 10-20) to avoid context flooding. Increase only if needed. - Provide exactly one credential: access_token OR account+api_token, not both.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
Options:
- IncludeBranch: Branch name to include from commits. How to obtain: 1. Call the bitbucket_branch_list interface. 2. Find the target branch in the returned Branches array. 3. Copy the name field value of branch object. Example: main
- ExcludeBranch: Branch name to exclude from commits. How to obtain: 1. Call the bitbucket_branch_list interface. 2. Find the target branch in the returned Branches array. 3. Copy the name field value of branch object. Example: release/legacy
- Path: Path within the repository to get commits from. How to obtain: 1. Call the bitbucket_file_directory_contents interface. 2. Find the target file in the returned Entries array. 3. Copy the path field value of file object. Example: src/main/java/com/example/app/Main.java
- Page: Page number for paginated retrieval. Starts from 1. Defaults to 1.
- Pagelen: Maximum number of items per page. Valid range is 10-100. Defaults to 20.
Output:
- Commits (object-array): List of commit data retrieved from Bitbucket repository. Each commit object includes: - hash (str): The full 40-character SHA-1 hash of the commit. - message (str): The commit message. - author (dict): The author of the commit. Includes name, email, and date. - date (str): The date and time the commit was created. - parents (list): The list of parent commit hashes. - links (dict): REST self, web UI html, and source-view code URLs.
- Pagination (object): A dict of pagination information. Includes the following fields: size (int, optional): Total number of objects in the response. This is an optional element that is not provided in all responses. page (int, optional): Page number of the current results. This is an optional element that is not provided in all responses. pagelen (int): Current number of objects on the existing page. Globally, the minimum length is 10 and the maximum is 100. Some APIs may specify a different default. next (str): Next page url or empty string if there is no next page prev (str): Previous page url or empty string if there is no previous page Note: These URLs already contain complete query parameters and can be directly used for the next API request without manually constructing pagination parameters.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get a Commit
Retrieves a specified commit from a specified Bitbucket repository within a specified Bitbucket workspace. What: Retrieves a single build/CI status for a commit by status key, including state, name, URL, and description.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
- CommitHash: Commit hash to retrieve. Full 40-character SHA or a unique prefix accepted by Bitbucket. How to obtain: 1. Call Action bitbucket_commit_list with the same Workspace and RepoSlug. 2. In response Commits[], locate the target item by hash. 3. Copy Commits[i].hash into this parameter. Example: a3f4c7d9b8e1234567890fedcba9876543210abc
Output:
- Commit (object): Commit data retrieved from Bitbucket repository. A repository commit object. Includes the following main fields: - type (str): Resource type identifier, e.g. "commit". - hash (str): Full commit SHA hash uniquely identifying this commit. - message (str): Commit message text. - date (str): Commit creation ISO8601 timestamp. - author (dict): Commit author information, including raw display string, type (e.g. "author"), and linked user object when available. - parents (list): Parent commit objects in the repository DAG; each entry includes hash, type, and links. - repository (dict): Repository this commit belongs to, including name, full_name, uuid, type, and links. - links (dict): Links to related resources for this commit. Main fields: - self (dict): API URL of this commit. Includes href field. - html (dict): Link to the commit page in the Bitbucket web UI. Includes href field. - comments (dict): Link to commit comments. Includes href field. - diff (dict): Link to the commit diff. Includes href field. - patch (dict): Link to the commit patch. Includes href field. - approve (dict): Link to the commit approve endpoint. Includes href field. - statuses (dict): Link to commit build/status results. Includes href field. - summary (dict): Rendered summary of the commit message, with raw, markup, html, and type fields. - rendered (dict): Rendered commit message, with raw, markup, html, and type fields. - participants (list): Users participating in commit discussion or review.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Create a Commit Comment
Creates a new comment on the specified commit in a Bitbucket repository. Idempotency Warning: - This action performs duplicate-checking by exact raw comment content. - If the same comment content already exists on the commit, the existing comment is returned. - This provides upsert-like behavior for commit comments.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
- CommitHash: Commit hash to add comment to. Full 40-character SHA or a unique prefix accepted by Bitbucket. How to obtain: 1. Call the bitbucket_commit_list interface with the same Workspace and RepoSlug. 2. Find the target commit in the returned Commits array. 3. Copy the hash field value of the commit object. Example: a3f4c7d9b8e1234567890fedcba9876543210abc
- Content: Plain-text comment body. Sent as content.raw in the request body. Supports Markdown when Markup is markdown (default).
Output:
- Comment (object): The created or existing Bitbucket commit comment object. Key fields: - id (int): Unique comment ID. Use as CommentId for get/update/delete actions. - type (str): Resource type, typically commit_comment. - created_on (str): ISO 8601 timestamp when the comment was created. - updated_on (str): ISO 8601 timestamp when the comment was last updated. - content (dict): Body with raw (plain text), markup (format), html (rendered). - deleted (bool): True if soft-deleted; content is blanked but the record remains. - links (dict): REST self, web UI html, and source-view code URLs. - commit (dict): Reference to the commit this comment belongs to.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Delete a Commit Comment
Deletes a specified commit comment for a workspace from Bitbucket using API token authentication. ⚠️ WARNING: This operation is PERMANENT and CANNOT BE UNDONE. The commit comment is immediately removed with no recovery option.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
- CommitHash: Commit hash to retrieve. Full 40-character SHA or a unique prefix accepted by Bitbucket. How to obtain: 1. Call the bitbucket_commit_list interface with the same Workspace and RepoSlug. 2. Find the target commit in the returned Commits array. 3. Copy the hash field value of the commit object. Example: a3f4c7d9b8e1234567890fedcba9876543210abc
- CommentId: ID of the comment to delete. How to obtain: 1. Call the bitbucket_commit_comment_list interface with the same Workspace, RepoSlug, and CommitHash. 2. Find the target comment in the returned Comments array. 3. Copy the id field value of the comment object. Example: 18566071
Output:
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Commit Comments
Retrieves a paginated list of comments for a specified commit from a specified Bitbucket repository within a specified Bitbucket workspace. Key points: - Provide exactly one credential: access_token OR account+api_token, not both. - CommitHash must be a full 40-character hexadecimal SHA (strict validation).
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
- CommitHash: Commit hash to retrieve. Full 40-character SHA or a unique prefix accepted by Bitbucket. How to obtain: 1. Call Action bitbucket_commit_list with the same Workspace and RepoSlug. 2. In response Commits[], locate the target item by hash. 3. Copy Commits[i].hash into this parameter. Example: a3f4c7d9b8e1234567890fedcba9876543210abc
Options:
- AdditionalFields: Extended request options (object). Supported keys: - query (str): Bitbucket filter mapped to upstream q. - sort (str): id, created_on, updated_on, or prefix with - for descending. - page (int): First-page page number for listings. - pagelen (int): Page size 10–100 for listings; default 20. - page_url (str): Full URL from Pagination.next or Pagination.prev. When set, only credentials are required. Pagination loop: When Pagination.next is non-empty, call again with page_url set to that value. Example: {"query": "created_on>=\"2026-06-01\"","sort": "-created_on","pagelen": 20}
Output:
- Comments (object-array): List of comment data retrieved from Bitbucket repository. Each comment object includes: - id (int): Unique comment ID. Use as CommentId for get/update/delete actions. - type (str): Resource type, typically commit_comment. - created_on (str): ISO 8601 timestamp when the comment was created. - updated_on (str): ISO 8601 timestamp when the comment was last updated. - content (dict): Body with raw (plain text), markup (format), html (rendered). - user (dict): Author with display_name, uuid, account_id, nickname, and links. - links (dict): REST self, web UI html, and source-view code URLs. - commit (dict): Reference to the commit this comment belongs to.
- Pagination (object): Pagination fields: size, page, pagelen, next, prev. Pagination loop: When next is non-empty, call again with AdditionalFields.page_url set to Pagination.next.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get a Commit Comment
Retrieves a specified commit comment from a specified Bitbucket repository within a specified Bitbucket workspace. What: Retrieves a single commit comment by commit hash and comment ID, including content, author, and timestamps.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
- CommitHash: Commit hash to retrieve. Full 40-character SHA or a unique prefix accepted by Bitbucket. How to obtain: 1. Call Action bitbucket_commit_list with the same Workspace and RepoSlug. 2. In response Commits[], locate the target item by hash. 3. Copy Commits[i].hash into this parameter. Example: a3f4c7d9b8e1234567890fedcba9876543210abc
- CommentId: ID of the comment to retrieve. Format: - Positive integer: A positive integer representing the comment ID. How to obtain: 1. Call Action bitbucket_commit_comment_list with the same Workspace, RepoSlug, and CommitHash. 2. In response Comments[], locate the target item by id. 3. Copy Comments[i].id into this parameter. Example: 482915736
Output:
- Comment (object): The retrieved Bitbucket commit comment object. Key fields: - id (int): Unique comment ID. Use as CommentId for get/update/delete actions. - type (str): Resource type, typically commit_comment. - created_on (str): ISO 8601 timestamp when the comment was created. - updated_on (str): ISO 8601 timestamp when the comment was last updated. - content (dict): Body with raw (plain text), markup (format), html (rendered). - user (dict): Author with display_name, uuid, account_id, nickname, and links. - links (dict): REST self, web UI html, and source-view code URLs. - commit (dict): Reference to the commit this comment belongs to.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Update a Commit Comment
Updates the contents of an existing commit comment in a Bitbucket repository. Defensive calling strategy: - Verify the commit exists using Get Many Commits before updating a comment on it - Confirm CommentId via Get Commit Comments with the same Workspace, RepoSlug, and CommitHash - Read the current comment first if you need to preserve or merge existing content
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
- CommitHash: Commit hash to retrieve. Full 40-character SHA or a unique prefix accepted by Bitbucket. How to obtain: 1. Call Action bitbucket_commit_list with the same Workspace and RepoSlug. 2. In response Commits[], locate the target item by hash. 3. Copy Commits[i].hash into this parameter. Example: a3f4c7d9b8e1234567890fedcba9876543210abc
- CommentId: ID of the comment to update. Format: - Positive integer: A positive integer representing the comment ID. How to obtain: 1. Call Action bitbucket_commit_comment_list with the same Workspace, RepoSlug, and CommitHash. 2. In response Comments[], locate the target item by id. 3. Copy Comments[i].id into this parameter. Example: 482915736
- Content: Required. Replacement text for the existing commit comment. Maps to upstream content.raw in the PUT body. Format: Markdown is supported (headings, lists, code blocks). Behavior: - Replaces the entire comment body; does not append or merge. - Read the current comment via bitbucket_commit_comment_list first if preserving original text. Example: Updated review: please address the null-check on line 42.
Output:
- Comment (object): Updated comment data from Bitbucket repository. Includes the following fields: - content (dict): Content of the comment. Includes the following fields: - raw (str): Raw content of the comment. - markup (str): Markup content of the comment. - markup_type (str): Markup type of the comment. - markup_type (str): Markup type of the comment.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Create Commit Status
Creates a new build status for a commit in Bitbucket using API token authentication. Idempotency Warning: - Bitbucket uniquely identifies statuses by commit hash and key. - Repeated calls with the same commit and key typically update the existing status. - This provides upsert-like behavior for commit build statuses.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
- CommitHash: Commit hash to retrieve. Full 40-character SHA or a unique prefix accepted by Bitbucket. How to obtain: 1. Call the bitbucket_commit_list interface with the same Workspace and RepoSlug. 2. Find the target commit in the returned Commits array. 3. Copy the hash field value of the commit object. Example: a3f4c7d9b8e1234567890fedcba9876543210abc
- Key: Unique identifier for this build status on the commit. Bitbucket treats commit + key as the stable identity; if the same key already exists, the existing status is overwritten (upsert). Use a stable, source-specific value per CI system or check. Example: MY-BUILD, ci/unit-tests, jenkins/main
- State: Current result of the build or check. Required. Must be exactly one of: SUCCESSFUL, FAILED, INPROGRESS (case-sensitive). Use INPROGRESS when the job starts, then SUCCESSFUL or FAILED when it finishes. Example: SUCCESSFUL
Options:
- Url: Link to the build result or details page shown in Bitbucket commit and pull request UI. Optional; omit if no external build URL exists. Supports URI templates evaluated at render time; available context variables are repository and commit (e.g., https://foo.com/builds/{repository.full_name}). Example: https://www.example.org/my-build-result
- Description: Short human-readable summary of the check outcome displayed alongside the status in the UI. Example: 42 tests passed
- Name: Display name for the build status in the Bitbucket UI (e.g., pipeline or job title). If omitted, Bitbucket may fall back to showing the key. Example: Unit Test Pipeline
Output:
- Status (object): The newly created (or overwritten) build status object returned by Bitbucket (HTTP 201). Empty dict on failure. Commit Status fields include: type (str): Resource type identifier, typically "build". key (str): Unique status identifier on this commit; same key on the same commit triggers upsert/overwrite. state (str): Build result state. One of: SUCCESSFUL, FAILED, INPROGRESS. url (str): Link to the build result or details page (may be a URI template resolved at render time). name (str): Display name shown in commit and pull request UI. description (str): Human-readable summary of the check outcome. refname (str): Branch or ref associated with the status; set to the PR source branch to attach this status to a pull request. created_on (str): ISO8601 timestamp when the status was first created. updated_on (str): ISO8601 timestamp when the status was last updated. links (dict): Related resource URLs. Includes: self (dict): Link to this build status API resource (href, optional name). commit (dict): Link to the parent commit (href, optional name).
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Commit Statuses
Retrieves a paginated list of statuses (e.g. build results) for a specified commit from a specified Bitbucket repository within a specified Bitbucket workspace. Key points: - Provide exactly one credential: access_token OR account+api_token, not both. - CommitHash must be a full 40-character hexadecimal SHA (strict validation).
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
- CommitHash: Commit hash to retrieve. Full 40-character SHA or a unique prefix accepted by Bitbucket. How to obtain: 1. Call Action bitbucket_commit_list with the same Workspace and RepoSlug. 2. In response Commits[], locate the target item by hash. 3. Copy Commits[i].hash into this parameter. Example: a3f4c7d9b8e1234567890fedcba9876543210abc
Options:
- AdditionalFields: Extended request options (object). Supported keys: - page (int): First-page page number for listings. - pagelen (int): Page size 10–100 for listings; default 20. - page_url (str): Full URL from Pagination.next or Pagination.prev. When set, only credentials are required. Pagination loop: When Pagination.next is non-empty, call again with page_url set to that value. Example: {"pagelen": 20}
Output:
- Statuses (object-array): List of commit statuses retrieved from Bitbucket. Each status object includes: - key (str): Unique identifier for the status. - state (str): Current state of the status, e.g. SUCCESSFUL, FAILED, INPROGRESS, STOPPED. - name (str): Human-readable name for the status. - url (str): URL linking to the status result. - description (str): Additional description of the status.
- Pagination (object): Pagination fields: size, page, pagelen, next, prev. Pagination loop: When next is non-empty, call again with AdditionalFields.page_url set to Pagination.next.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get a Commit Status
Retrieves the specified build status for a specified commit from a specified Bitbucket repository within a specified Bitbucket workspace. What: Retrieves a single build/CI status for a commit by status key, including state, name, URL, and description.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
- CommitHash: Commit hash to retrieve. Full 40-character SHA or a unique prefix accepted by Bitbucket. How to obtain: 1. Call Action bitbucket_commit_list with the same Workspace and RepoSlug. 2. In response Commits[], locate the target item by hash. 3. Copy Commits[i].hash into this parameter. Example: a3f4c7d9b8e1234567890fedcba9876543210abc
- Key: The unique key of the build status to retrieve. Format: - String: A string representing the status key. Must exactly match the status source identifier (e.g., my-build, ci/pipeline). How to obtain: 1. Call Action bitbucket_commit_status_list with the same Workspace, RepoSlug and CommitHash. 2. In response Statuses[], locate the target item by key. 3. Copy Statuses[i].key into this parameter. Example: my-build
Output:
- Status (object): Dictionary of commit status data retrieved from Bitbucket repository. Include the following main fields: - type (str): Type of the status. - created_on (str): ISO 8601 timestamp when the status was created. - updated_on (str): ISO 8601 timestamp when the status was last updated. - key (str): Unique status identifier on this commit. - state (str): State of the status. One of: SUCCESSFUL, FAILED, INPROGRESS. - url (str): Link to the status result or details page. - name (str): Display name shown in commit and pull request UI. - description (str): Description of the status. - refname (str): Branch or ref associated with the status. - links (dict): Links of the status. Include the following main fields: - self (dict): A link to a resource related to this object. This object includes href and name fields. - html (dict): A link to a resource related to this object. This object includes href and name fields.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Update Commit Status
Updates (upserts) a build commit status on a specific commit in a Bitbucket repository. Defensive calling strategy: - Verify the commit exists using Get Many Commits before posting a status update - Use a stable, unique key per CI job or pipeline stage so repeated runs update the same status - Set state to INPROGRESS before starting a build, then SUCCESSFUL or FAILED when complete
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
- CommitHash: Commit hash to retrieve. Full 40-character SHA or a unique prefix accepted by Bitbucket. How to obtain: 1. Call Action bitbucket_commit_list with the same Workspace and RepoSlug. 2. In response Commits[], locate the target item by hash. 3. Copy Commits[i].hash into this parameter. Example: a3f4c7d9b8e1234567890fedcba9876543210abc
- Key: The unique key of the build status to retrieve. Format: - String: A string representing the status key. Must exactly match the status source identifier (e.g., my-build, ci/pipeline). How to obtain: 1. Call Action bitbucket_commit_status_list with the same Workspace, RepoSlug and CommitHash. 2. In response Statuses[], locate the target item by key. 3. Copy Statuses[i].key into this parameter. Example: my-build
Options:
- State: Optional. Current build/check result. Must be exactly one of: SUCCESSFUL, FAILED, INPROGRESS (case-sensitive). Maps to upstream state. When to use each value: - INPROGRESS: job started but not finished - SUCCESSFUL: build passed - FAILED: build failed Behavior: Same commit + key upserts; repeated calls with the same key overwrite the existing status. Example: SUCCESSFUL
- Url: Optional. Link to the build result or details page shown in Bitbucket commit and pull request UI. Maps to upstream url. Only included when non-empty. Supports URI templates evaluated at render time. Example: https://ci.example.com/builds/12345
- Description: Optional. Short human-readable summary of the check outcome displayed alongside the status in the UI. Maps to upstream description. Only included when non-empty. Example: 42 tests passed
- Name: Optional. Display name for the build status in the Bitbucket UI (e.g., pipeline or job title). Maps to upstream name. Only included when non-empty. If omitted, Bitbucket may fall back to showing the key. Example: Unit Test Pipeline
Output:
- Status (object): Details of the updated commit status. Includes the following fields: - key (str): A unique key for the build status. - state (str): The state of the build status. Valid values: SUCCESSFUL, FAILED, INPROGRESS. - url (str): A URL linking to the build result. - description (str): A description of the build status. - name (str): A name for the build status.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get File Directory Contents
Retrieves file or directory contents at a specified revision from Bitbucket. Wraps GET /repositories/{workspace}/{repo_slug}/src/{commit}/{path}. Reference: https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/src/{branch} Agent routes: directory listing (Path + Entries + Pagination), file read (FileContent), metadata (AdditionalFields.format=meta), pagination (AdditionalFields.page_url ← Pagination.next).
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
Options:
- Path: Path to a file or directory relative to repository root. Use empty string or '/' for repo root. Defaults to "". How to obtain: 1. Call this interface on parent directory path to list Entries. 2. Copy the path field from a commit_file or commit_directory entry. Example: src/main.py, src/, README.md
- Branch: Branch name, commit hash or tag name. Defaults to "master". How to obtain: 1. Call the bitbucket_branch_list interface with the same Workspace and RepoSlug. 2. Copy the name field value of the branch object, or use a commit SHA / tag name. Example: master, main, a3f4c7d9b8e1234567890fedcba9876543210abc, v1.0.0
- AdditionalFields: Extended request options (object). Supported keys: - format (str): default | meta | rendered — response format for files. - query (str): Bitbucket filter mapped to upstream q (e.g., type = "commit_file"). - sort (str): path, type, size, attributes, or prefix with - for descending. - max_depth (int): Directory recursion depth; 0 = direct children only. - page (int): First-page page number for directory listings. - pagelen (int): Page size 10–100 for directory listings. - page_url (str): Full URL from Pagination.next or Pagination.prev for next/previous directory page. Pagination loop: When Pagination.next is non-empty, call this action again with page_url set to that value. Example: {"format": "default", "query": "path !~ \"node_modules\"", "sort": "path", "max_depth": 0}
Output:
- Content (object): Contains the following fields: - EntryType (str): file, directory, meta, or empty on failure. Indicates which output fields are populated. - FileContent (str): Raw or rendered file content when EntryType is file. Empty for directories. - Entries (list): Directory listing entries (commit_file / commit_directory) when EntryType is directory. - Property (dict): Metadata object when format=meta or upstream returns a single meta document.
- Pagination (object): Pagination when EntryType is directory. Fields: size, page, pagelen, next, prev. Pagination loop: When next is non-empty, call this action again with AdditionalFields.page_url set to Pagination.next.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get a File Commits
Retrieves a paginated list of commits that modified the specified file from a specified Bitbucket repository within a specified Bitbucket workspace. What: Retrieves a paginated list of commits that modified a specific file at a given revision.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
- FilePath: Path to the file within the repository. Format: - String: A string representing the file path. Must be relative to repository root (e.g., src/main.py, not /src/main.py). How to obtain: 1. Call Action bitbucket_directory_content_list with the same Workspace and RepoSlug. 2. In response Directories[], locate the target item by path. 3. Copy Directories[i].path into this parameter. Example: src/main.py
- Commit: Commit hash to retrieve. Full 40-character SHA or a unique prefix accepted by Bitbucket. How to obtain: 1. Call Action bitbucket_commit_list with the same Workspace and RepoSlug. 2. In response Commits[], locate the target item by hash. 3. Copy Commits[i].hash into this parameter. Example: a3f4c7d9b8e1234567890fedcba9876543210abc
Options:
- Query: Query string to filter repositories. Syntax:
[operator] . field_value can be case-sensitive. Supported operators: Operator Description Example = equal to path = "README.rst" != not equal to path != "README.txt" ~ case-insensitive text contains path ~ "readme" !~ case-insensitive text does not contain path !~ "test" > greater than size > 100 < less than size < 100 >= greater than or equal to size >= 100 <= less than or equal to size <= 100 IN value present in list attributes IN ["binary", "executable"] NOT IN value not present in list attributes NOT IN ["binary", "executable"] Note: Common filterable fields: path, size, attributes, commit.hash, commit.date. References: https://developer.atlassian.com/cloud/bitbucket/rest/intro/#filtering - Sort: Sort order of the repositories. Default is ascending order. Descending order can be achieved by appending - to the sort parameter. Note: Sorted field can be one of the following: path, size, attributes, commit.hash, commit.date. References: https://developer.atlassian.com/cloud/bitbucket/rest/intro/#filtering
Output:
- Commits (object-array): Array of commit data that modified the specified file. Each commit object includes: - path (str): File path relative to repository root. - size (int): File size in bytes. - type (str): Resource type, always "commit_file". - attributes (list): File attributes (e.g., ["binary"]). - commit (dict): Nested commit reference (hash, type, links). - links (dict): Links to file resources (self, history, meta). Note: To get full commit details, extract commit.hash and call bitbucket_commit_get.
- Pagination (object): A dict of pagination information. Includes the following fields: size (int, optional): Total number of objects in the response. This is an optional element that is not provided in all responses. page (int, optional): Page number of the current results. This is an optional element that is not provided in all responses. pagelen (int): Current number of objects on the existing page. Globally, the minimum length is 10 and the maximum is 100. next (str): Next page url or empty string if there is no next page. prev (str): Previous page url or empty string if there is no previous page. Note: These URLs already contain complete query parameters and can be directly used for the next API request without manually constructing pagination parameters.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Create a Project
Creates a project in a specified workspace in Bitbucket using API token authentication. Idempotency Warning: - This action checks for an existing project by project_key before creating it. - If the project exists, the existing project is returned instead of creating a duplicate. - This provides duplicate-check/upsert behavior by project key.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: - Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). - UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- ProjectKey: The project's key. Required in the request body as the key field. A unique identifier for the project within the workspace. Example: MARS.
- ProjectName: The name of the project. Required in the request body as the name field. Example: Mars Project.
Options:
- Description: Optional human-readable summary describing the project's purpose and scope. In Bitbucket, projects are containers used to organize repositories within a workspace; this text is displayed on the project overview page in the Bitbucket UI. Behavior: - Only included in the create payload when non-empty; omit or leave blank to create a project without a description. - If a project with the same ProjectKey already exists, this action returns the existing project and does not apply a new description (idempotent by key). Format: - Plain text string (Markdown is not supported). - Keep concise; no documented maximum length. Example: Software for colonizing mars.
- IsPrivate: Project visibility. Mapped to the request body field is_private. Default True. Meaning (per Bitbucket API): - Indicates whether the project is publicly accessible, or whether it is private to the team and consequently only visible to team members. - Note that private projects cannot contain public repositories.
Output:
- Project (object): Project created in Bitbucket workspace. Includes the following main fields: - type (str): Project type. Can be "project" or "custom". - uuid (str): Project UUID. - key (str): Project key/identifier. - created_on (str): Project creation timestamp. - updated_on (str): Project update timestamp. - name (str): Project name. - description (str): Project description. - is_private (bool): Whether the project is private. - has_publicly_visible_repos (bool): Whether the project is publicly visible. - links (dict): Project links. - owner (dict): Project owner.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Delete a Project
Deletes a specific project from a specified workspace in Bitbucket using API token authentication. ⚠️ WARNING: This operation is PERMANENT and CANNOT BE UNDONE. The project is immediately removed from the workspace with no recovery option.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- ProjectKey: Project key to be deleted. How to obtain: 1. Call the bitbucket_project_list interface. 2. Find the target project in the returned Projects array. 3. Copy the key field value of project object. Example: PRO5566
Output:
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Many Projects
Retrieves a paginated list of projects from a specified Bitbucket workspace. Key points: - For first-time calls, use smaller pagelen values (e.g., 10-20) to avoid context flooding. Increase only if needed. - Provide exactly one credential: access_token OR account+api_token, not both.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
Options:
- Page: Page number for paginated retrieval. Starts from 1. Defaults to 1.
- Pagelen: Maximum number of items per page. Valid range is 10-100. Defaults to 20.
Output:
- Projects (object-array): List of projects retrieved from Bitbucket. Each project is a dict with the following main fields: - type (str): Project type. Can be "project" or "custom". - uuid (str): Project UUID. - key (str): Project key/identifier. - created_on (str): Project creation timestamp. - updated_on (str): Project update timestamp. - name (str): Project name. - description (str): Project description. - is_private (bool): Whether the project is private. - has_publicly_visible_repos (bool): Whether the project is publicly visible. - links (dict): Project links. - owner (dict): Project owner. - workspace (dict): Project workspace.
- Pagination (object): A dict of pagination information. Includes the following fields: size (int, optional): Total number of objects in the response. This is an optional element that is not provided in all responses. page (int, optional): Page number of the current results. This is an optional element that is not provided in all responses. pagelen (int): Current number of objects on the existing page. Globally, the minimum length is 10 and the maximum is 100. Some APIs may specify a different default. next (str): Next page url or empty string if there is no next page prev (str): Previous page url or empty string if there is no previous page Note: These URLs already contain complete query parameters and can be directly used for the next API request without manually constructing pagination parameters.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get a Project
Retrieves a specific project from a workspace in Bitbucket using API token authentication. What: Retrieves complete project metadata including key, name, description, privacy settings, and workspace association.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: - Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). - UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- ProjectKey: Project key/identifier. Format: - String: A string representing the project key. Must exactly match the project identifier (e.g., PROJ, PROJ5566). How to obtain: 1. Call Action bitbucket_project_list with the same Workspace. 2. In response Projects[], locate the target item by key. 3. Copy Projects[i].key into this parameter. Example: PROJ5566
Output:
- Project (object): Project retrieved from Bitbucket workspace. Includes the following main fields: - type (str): Project type. Can be "project" or "custom". - uuid (str): Project UUID. - key (str): Project key/identifier. - created_on (str): Project creation timestamp. - updated_on (str): Project update timestamp. - name (str): Project name. - description (str): Project description. - is_private (bool): Whether the project is private. - has_publicly_visible_repos (bool): Whether the project is publicly visible. - links (dict): Project links. - owner (dict): Project owner. - workspace (dict): Project workspace.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Update a Project
Updates metadata of an existing project in a Bitbucket workspace (name, description, visibility). Defensive calling strategy: - Verify the project exists using Get Many Projects before updating - Confirm ProjectKey matches the target project; keys are case-sensitive - Only include fields you intend to change; omitted optional fields are left unchanged
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- ProjectKey: Project key/identifier to be updated. Format: - String: A string representing the project key. Must exactly match the project identifier (e.g., PROJ, PROJ5566). How to obtain: 1. Call Action bitbucket_project_list with the same Workspace. 2. In response Projects[], locate the target item by key. 3. Copy Projects[i].key into this parameter. Example: PROJ5566
Options:
- Name: New name for the project. Optional; include only when renaming. Omitted values are left unchanged. Maps to upstream name field. Example: Mars Project.
- Description: New description for the project. Optional; include only when updating the description. Omitted values are left unchanged. Maps to upstream description field. Example: This is a new description for the project.
- IsPrivate: Whether the project should be private. Optional; include only when changing visibility. Omitted values are left unchanged. Maps to upstream is_private field. Example: True
Output:
- Project (object): Updated project data from Bitbucket workspace. Includes the following main fields: - type (str): Project type. Can be "project" or "custom". - uuid (str): Project UUID. - key (str): Project key/identifier. - created_on (str): Project creation timestamp. - updated_on (str): Project update timestamp. - name (str): Project name. - description (str): Project description. - is_private (bool): Whether the project is private. - has_publicly_visible_repos (bool): Whether the project is publicly visible. - links (dict): Project links. - owner (dict): Project owner. - workspace (dict): Project workspace.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Create a Pull Request
Creates a new pull request in a specified repository in Bitbucket using API token authentication. Idempotency Warning: - This action is idempotent for open pull requests with the same source and destination branches. - If an open pull request already exists for the same branch pair, the existing pull request is returned instead of creating a duplicate. - This provides duplicate-check/upsert behavior based on branch pair uniqueness.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
- Title: Title of the new pull request. This will be displayed in the PR list and notifications. Guidelines: - Keep it concise and descriptive (recommended: 50-80 characters). - Use present tense (e.g., Add user authentication not Added user authentication). - Plain text only (Markdown/HTML not supported in title). - Emoji supported (e.g., 🚀 Deploy new feature). Example: Fix login bug for mobile users\" or \"Add OAuth2 authentication support
- SourceBranch: Name of the branch that contains the changes to be merged (e.g., a feature branch like feature/new-login). How to obtain: 1. Call Action bitbucket_branch_list with the same Workspace and RepoSlug. 2. Locate the branch that contains your commits. 3. Copy the name field value. Example: feature/user-authentication or bugfix/login-error
Options:
- DestinationBranch: Name of the branch into which the changes should be merged (e.g., \"master\", \"main\", or \"develop\"). How to obtain: 1. Call Action bitbucket_repository_get to check the repository's default branch. 2. Or call bitbucket_branch_list to see all available branches. Common values: master, main, develop, staging
- Description: Optional description text for the pull request. Provides additional context about the changes. Supports Markdown formatting. Use when: - You want to explain what changes are included in this PR.
- You need to provide context for reviewers (e.g., related issue numbers, testing notes). - You want to document breaking changes or migration steps.
Format:
- Plain text or Markdown syntax. - Can include multiple paragraphs, code blocks, lists, etc. Example: This PR adds user authentication feature with OAuth2 support. Related to issue #123.
Output:
- PullRequest (object): Pull request data created in Bitbucket repository. Includes the following main fields: - type (str): Resource type identifier, e.g. "pullrequest". - id (int): Pull request numeric ID. - title (str): Pull request title. - state (str): Current PR state, e.g. OPEN, MERGED, DECLINED. - reason (str): Close/decline reason text. - created_on (str): PR creation ISO8601 timestamp. - updated_on (str): Last update ISO8601 timestamp. - comment_count (int): Number of comments on the pull request. - task_count (int): Number of tasks associated with the pull request. - close_source_branch (bool): Whether the source branch will be closed when the PR is merged. - draft (bool): Whether the pull request is a draft. - queued (bool): Whether the pull request merge is queued. - mergeable (bool):Whether the pull request can be merged. Nested objects: - author (object): PR creator info, contains uuid, display_name, account_id. - source (object): Source branch info, contains branch.name, commit.hash, repository. - destination (object): Destination branch info, same structure as source. - links (object): Related API endpoints, contains html, self, approve, merge, etc. Full schema: See ResponseExample for complete structure.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Many Pull Requests
Retrieves a paginated list of pull requests for a specified Bitbucket repository within a specified Bitbucket workspace. Key points: - For first-time calls, use smaller pagelen values (e.g., 10-20) to avoid context flooding. Increase only if needed. - Provide exactly one credential: access_token OR account+api_token, not both.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
Options:
- Page: Page number for paginated retrieval. Starts from 1. Defaults to 1.
- Pagelen: Maximum number of items per page. Valid range is 10-100. Defaults to 20.
Output:
- PullRequests (object-array): Array object of pull requests data retrieved from Bitbucket repository. Each pull request object includes: - id (int): The unique identifier for the pull request. - title (str): The title of the pull request. - state (str): The state of the pull request. - source (dict): The source branch of the pull request. - destination (dict): The destination branch of the pull request. - mergeable (bool): Whether the pull request is mergeable. - links (dict): REST self, web UI html, and source-view code URLs.
- Pagination (object): A dict of pagination information. Includes the following fields: size (int, optional): Total number of objects in the response. This is an optional element that is not provided in all responses. page (int, optional): Page number of the current results. This is an optional element that is not provided in all responses. pagelen (int): Current number of objects on the existing page. Globally, the minimum length is 10 and the maximum is 100. Some APIs may specify a different default. next (str): Next page url or empty string if there is no next page prev (str): Previous page url or empty string if there is no previous page Note: These URLs already contain complete query parameters and can be directly used for the next API request without manually constructing pagination parameters.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get a Pull Request
Retrieves a pull request from Bitbucket using API token authentication. What: Retrieves complete pull request metadata including title, state, source/destination branches, mergeability, and comment counts.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: - Slug: lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). - UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). - Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
- PullRequestId: Pull request ID to retrieve. Format: - Positive integer: A positive integer representing the pull request ID. How to obtain: 1. Call Action bitbucket_pull_request_list with the same Workspace and RepoSlug. 2. In response PullRequests[], locate the target item by id. 3. Copy PullRequests[i].id into this parameter. Example: 108
Output:
- PullRequest (object): Pull request data retrieved from Bitbucket workspace. Includes the following main fields: - type (str): Resource type identifier, e.g. "pullrequest". - id (int): Pull request numeric ID. - title (str): Pull request title. - state (str): Current PR state, e.g. OPEN, MERGED, DECLINED. - reason (str): Close/decline reason text. - created_on (str): PR creation ISO8601 timestamp. - updated_on (str): Last update ISO8601 timestamp. - comment_count (int): Number of comments on the pull request. - task_count (int): Number of tasks associated with the pull request. - close_source_branch (bool): Whether the source branch will be closed when the PR is merged. - draft (bool): Whether the pull request is a draft. - queued (bool): Whether the pull request merge is queued. - mergeable (bool):Whether the pull request can be merged.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Update a Pull Request
Updates an existing open pull request in a Bitbucket repository (title, description, branches, state). Defensive calling strategy: - Verify PullRequestId exists and is OPEN using Get a Pull Request before updating - When retargeting branches, confirm both source and destination branches exist in the repository - Update one concern at a time (e.g. title first, then description) to simplify error diagnosis
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
- PullRequestId: ID of the pull request to update. Format: - Positive integer: A positive integer representing the pull request ID. How to obtain: 1. Call Action bitbucket_pull_request_list with the same Workspace and RepoSlug. 2. In response PullRequests[], locate the target item by id. 3. Copy PullRequests[i].id into this parameter. Example: 108
Options:
- Title: Optional. New pull request title. Maps to upstream title. Partial update: only included when non-empty; omitted values leave the current title unchanged. Only open pull requests can be updated. Example: Add user authentication module
- Description: Optional. New pull request description/body. Maps to upstream description. Partial update: only included when non-empty. Markdown is supported. Do not use for review comments → use PR comment APIs instead. Example: `## Summary
Adds OAuth2 login flow and session management.`
- State: Optional. New pull request state. Maps to upstream state. Partial update: only included when non-empty. Allowed values: OPEN, DECLINED, MERGED, SUPERSEDED (case-sensitive). Prefer dedicated Decline/Merge actions instead of setting MERGED/DECLINED here unless required. Example: OPEN
Output:
- PullRequest (object): Updated pull request data from Bitbucket repository. Includes the following main fields: - type (str): Resource type identifier, e.g. "pullrequest". - id (int): Pull request numeric ID. - title (str): Pull request title. - state (str): Current PR state, e.g. OPEN, MERGED, DECLINED. - reason (str): Close/decline reason text. - created_on (str): PR creation ISO8601 timestamp. - updated_on (str): Last update ISO8601 timestamp. - comment_count (int): Number of comments on the pull request. - task_count (int): Number of tasks associated with the pull request. - close_source_branch (bool): Whether the source branch will be closed when the PR is merged. - draft (bool): Whether the pull request is a draft. - queued (bool): Whether the pull request merge is queued. - mergeable (bool):Whether the pull request can be merged.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Create a Repository
Creates a new repository in a specified workspace in Bitbucket using API token authentication. Idempotency Warning: - This action is NOT idempotent and CANNOT be undone: repeated calls may fail if the repository slug already exists. - The function does not automatically reuse an existing repository. - For safe operation, check repository existence before calling.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: - Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). - UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: - Slug: lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). - UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). - Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
Options:
- ProjectKey: Project key for the repository. Defaults to "". How to obtain: 1. Call Action bitbucket_project_list with Workspace set to this action's workspace. 2. In response Projects[], locate the target item by key or uuid. 3. Copy Projects[i].key OR Projects[i].uuid into this parameter. Note: In order to set the project for the newly created repository, pass in either the project key or the project UUID as part of the request body. If the project key is not provided, the repository will be created in the default project.
- IsPrivate: Whether the repository should be private. Defaults to True. Note: - If the repository is public (IsPrivate=false), a valid ProjectKey must be supplied or validation fails. - Private repositories can be created without a project key (uses default project).
- Description: Optional human-readable summary of the repository's purpose. Displayed on the repository overview page in Bitbucket UI. Maps to upstream description field. Defaults to "". Behavior: - Only included in the create payload when non-empty; omit or leave blank to create without a description. - Plain text string (Markdown is not supported in this field). Example: Backend API service for order processing.
Output:
- Repository (object): Repository data created in Bitbucket workspace. Includes the following main fields: - type (str): Type of the repository. - uuid (str): Repository UUID. - name (str): Repository name. - slug (str): Repository slug. - full_name (str): Full repository name. - is_private (bool): Whether the repository is private. - scm (str): Repository source control management (SCM) system. - project (dict): Project data associated with the repository. - owner (dict): Owner data associated with the repository. - workspace (dict): Workspace data associated with the repository. - created_on (str): Date and time when the repository was created. - updated_on (str): Date and time when the repository was last updated. - size (int): Repository size in bytes. References: Bitbucket API Documentation: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-repo-slug-post
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Delete a Repository
Deletes a specific repository from a Bitbucket workspace. This is a permanent, irreversible action. ⚠️ WARNING: This operation is PERMANENT and CANNOT BE UNDONE. The entire repository and all its data are immediately removed with no recovery option.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
Output:
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Many Repositories
Retrieves a paginated list of repositories within a specified Bitbucket workspace. Key points: - For first-time calls, use smaller pagelen values (e.g., 10-20) to avoid context flooding. Increase only if needed. - Provide exactly one credential: access_token OR account+api_token, not both.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
Options:
- Role: The role of the member. Can be one of the following: admin, owner, collaborator, member. Default is owner.
- Query: Query string to filter repositories. Syntax:
[operator] . field_value can be case-sensitive. Supported operators: Operator Description Example = equal to name = "my-repo" != not equal to name != "my-repo" ~ case-insensitive text contains description ~ "my repo" !~ case-insensitive text does not contain description !~ "my repo" > greater than size > 100 < less than size < 100 >= greater than or equal to size >= 100 <= less than or equal to size <= 100 IN value present in list role IN ["admin", "member"] NOT IN value not present in list role NOT IN ["admin", "member"] References: https://developer.atlassian.com/cloud/bitbucket/rest/intro/#filtering - Sort: Sort order of the repositories. Default is ascending order. Descending order can be achieved by appending - to the sort parameter. Note: Sorted field can be one of the following: created_on, updated_on, full_name, name, slug, size, description. References: https://developer.atlassian.com/cloud/bitbucket/rest/intro/#filtering
- Page: Page number for paginated retrieval. Starts from 1. Defaults to 1.
- Pagelen: Maximum number of items per page. Valid range is 10-100. Defaults to 20.
Output:
- Repositories (object-array): Repository data retrieved from Bitbucket workspace. type (str): The type of the repository. uuid (str): The unique identifier for the repository. name (str): The name of the repository. full_name (str): The full name of the repository. slug (str): The slug of the repository. is_private (boolean): Whether the repository is private. created_on (str): The creation time of the repository. updated_on (str): The last update time of the repository. size (int): The size of the repository in bytes. language (str): The language of the repository. description (str): The description of the repository. scm (str): The source control management system used by the repository. links (dict): Links to related resources. owner (dict): The owner of the repository. workspace (dict): The workspace of the repository. project (dict): The project of the repository.
- Pagination (object): A dict of pagination information. Includes the following fields: size (int, optional): Total number of objects in the response. This is an optional element that is not provided in all responses. page (int, optional): Page number of the current results. This is an optional element that is not provided in all responses. pagelen (int): Current number of objects on the existing page. Globally, the minimum length is 10 and the maximum is 100. Some APIs may specify a different default. next (str): Next page url or empty string if there is no next page prev (str): Previous page url or empty string if there is no previous page Note: These URLs already contain complete query parameters and can be directly used for the next API request without manually constructing pagination parameters.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get a Repository
Retrieves a specific repository from a specified workspace in Bitbucket. What: Retrieves complete repository metadata including slug, visibility, SCM type, default branch, project, owner, and timestamps.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: Slug: lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
Output:
- Repository (object): Repository data retrieved from Bitbucket workspace. Includes the following main fields: - type (str): Type of the repository. - uuid (str): Repository UUID. - name (str): Repository name. - slug (str): Repository slug. - full_name (str): Full repository name. - is_private (bool): Whether the repository is private. - scm (str): Repository source control management (SCM) system. - project (dict): Project data associated with the repository. - owner (dict): Owner data associated with the repository. - workspace (dict): Workspace data associated with the repository. - created_on (str): Date and time when the repository was created. - updated_on (str): Date and time when the repository was last updated. - size (int): Repository size in bytes. References: Bitbucket API Documentation: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-repo-slug-post
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Update a Repository
Updates metadata of an existing repository in a Bitbucket workspace (name, description, website). Defensive calling strategy: - Verify the repository exists using Get Many Repositories before updating - When renaming, check that the new slug will not conflict with an existing repository - Only include fields you intend to change; omitted optional fields are left unchanged
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: - Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). - UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: - Slug: lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). - UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). - Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
Options:
- RepoName: Optional. New display name for the repository. Maps to upstream name. Partial update: only included when non-empty. Renaming changes the repository slug and clone URLs; existing webhooks and CI pipelines may need updating. Fails if the new slug conflicts with another repository. Example: My Repo Updated
- Description: Optional. New repository description. Maps to upstream description. Partial update: only included when non-empty; omitted values leave the current description unchanged. Plain text summary shown on the repository overview page. Example: Demo description for API testing
- Website: Optional. New website URL associated with the repository. Maps to upstream website. Partial update: only included when non-empty. Must be a valid HTTP/HTTPS URL pointing to project documentation or homepage. Example: https://example.com/docs
Output:
- Repository (object): Repository data updated in Bitbucket workspace. Includes the following main fields: - type (str): Type of the repository. - uuid (str): Repository UUID. - name (str): Repository name. - slug (str): Repository slug. - full_name (str): Full repository name. - is_private (bool): Whether the repository is private. - scm (str): Repository source control management (SCM) system. - project (dict): Project data associated with the repository. - owner (dict): Owner data associated with the repository. - workspace (dict): Workspace data associated with the repository. - created_on (str): Date and time when the repository was created. - updated_on (str): Date and time when the repository was last updated. - size (int): Repository size in bytes. References: Bitbucket API Documentation: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-repo-slug-post
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Create a Tag
Creates a new annotated tag in a specified repository in Bitbucket using API token authentication. Idempotency Warning: - This action checks whether the tag already exists before attempting creation. - If the tag exists, the existing tag object is returned instead of creating a duplicate. - This provides upsert-like behavior for tag creation.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: - Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). - UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: - Slug: lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). - UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). - Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
- TagName: Name of the new tag to be created. Required. Mapped to name in the request body. The tag name should not include any prefixes (e.g. refs/tags). Creates an annotated tag in the specified repository. How to obtain: 1. Choose a new tag name for the release or version marker. 2. Optionally call bitbucket_tag_list with the same Workspace and RepoSlug to verify the name is not already in use. Example: new-tag-name
- TargetCommit: Target commit hash for the new tag. Required. Mapped to target.hash in the request body. Specifies the commit the tag should point to. Short hash prefixes are supported but may return a 400 response if the prefix is ambiguous; using a full commit hash is the preferred approach. How to obtain: 1. Call the bitbucket_commit_list interface with the same Workspace and RepoSlug. 2. In response Commits[], locate the target item by hash. 3. Copy Commits[i].hash into this parameter. Example: a1b2c3d4e5f678901234567890abcdef12345678
Options:
- Message: Optional annotated tag message. Maps to upstream message in the tag creation body. Behavior: - If omitted or empty, Bitbucket uses a default message such as "Added tag for changeset ...". - Use for release notes or version summary visible in tag history. - Plain text string. Example: Release v1.0.0 — initial public release.
Output:
- Tag (object): Tag data created in Bitbucket repository. Includes the following main fields: - type (str): Resource type identifier, e.g. "tag". - name (str): Name of the tag. - links (dict): Links to related resources for this tag. Main fields: - self (dict): API URL of this tag ref. Includes href and name fields. - commits (dict): Link to commits reachable from this tag. Includes href and name fields. - html (dict): Link to the tag page in the Bitbucket web UI. Includes href and name fields. - target (dict): The commit this tag points to. Includes hash (commit SHA), type (e.g. "commit"), links, repository, and author metadata. - message (str): Annotated tag message (e.g. "Added tag for changeset ..."). - date (str): Tag creation ISO8601 timestamp. - tagger (dict): The user who created the tag, including type (e.g. "author"), raw display string, and user object when available.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Delete a Tag
Deletes a specific tag from a specified repository in Bitbucket using API token authentication. ⚠️ WARNING: This operation is PERMANENT and CANNOT BE UNDONE. The tag reference is immediately removed from the repository with no recovery option via API.
Input Parameters:
- Workspace: Bitbucket workspace name. Can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces. How to obtain: 1. Call the bitbucket_workspace_list interface. 2. Find the target workspace in the returned Workspaces array. 3. Copy the slug or uuid field value of workspace object. Example: {3d0bbf44-0617-4250-9925-23c9ad3be145} or goinsight
- RepoSlug: Repository slug/name. Can either be the repository ID (slug) or the repository UUID surrounded by curly-braces. How to obtain: 1. Call the bitbucket_repository_list interface. 2. Find the target repository in the returned Repositories array. 3. Copy the slug or uuid field value of repository object. Example: {21a54043-f1b9-4739-8bc2-752a1231388c} or new_test_repository
- TagName: Name of the tag to be deleted. How to obtain: 1. Call the bitbucket_tag_list interface. 2. Find the target tag in the returned Tags array. 3. Copy the name field value of tag object. Example: v1.0.0
Output:
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Many Tags
Retrieves a paginated list of tags for a specified Bitbucket repository within a specified Bitbucket workspace. Key points: - For first-time calls, use smaller pagelen values (e.g., 10-20) to avoid context flooding. Increase only if needed. - Provide exactly one credential: access_token OR account+api_token, not both.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: - Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). - UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: - Slug: lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). - UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). - Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
Options:
- Query: Query string for filtering tags. Syntax:
[operator] . field_value can be case-sensitive. Supported operators: Operator Description Example = equal to name = "v1.0.0" != not equal to name != "v1.0.0" ~ case-insensitive text contains name ~ "v1.0.0" !~ case-insensitive text does not contain name !~ "v1.0.0" > greater than name > "v1.0.0" < less than name < "v1.0.0" >= greater than or equal to name >= "v1.0.0" <= less than or equal to name <= "v1.0.0" IN value present in list name IN ("v1.0.0", "v1.0.1") NOT IN value not present in list name NOT IN ("v1.0.0", "v1.0.1") Logical combination operators: OR logical OR name = "v1.0.0" OR name = "v1.0.1" NOT logical NOT NOT name = "v1.0.0" Note: Common filterable fields: name, message, date, target.date References: https://developer.atlassian.com/cloud/bitbucket/rest/intro/#filtering - Sort: Sort order for tags. Default is ascending order. Descending order can be achieved by appending - to the sort parameter. Note: Sorted field can be one of the following: name, message, date, target.date. References: https://developer.atlassian.com/cloud/bitbucket/rest/intro/#filtering
- Page: Page number for paginated retrieval. Starts from 1. Defaults to 1.
- Pagelen: Maximum number of items per page. Valid range is 10-100. Defaults to 20.
Output:
- Tags (object-array): List of tag data retrieved from Bitbucket repository. Each tag is a dict with the following main fields: - type (str): The type of the tag. - date (str): The date of the tag. - name (str): The name of the tag. - message (str): The message of the tag. - target (dict): The target of the tag. Contains the following fields: - hash (str): The hash of the target commit. - date (str): The date of the target commit. - links (dict): Links to related resources. Contains the following fields: - self (dict): The link to the tag. - html (dict): The link to the tag in the browser. - commits (dict): The link to the commits of the tag.
- Pagination (object): A dict of pagination information. Includes the following fields: size (int, optional): Total number of objects in the response. This is an optional element that is not provided in all responses. page (int, optional): Page number of the current results. This is an optional element that is not provided in all responses. pagelen (int): Current number of objects on the existing page. Globally, the minimum length is 10 and the maximum is 100. Some APIs may specify a different default. next (str): Next page url or empty string if there is no next page prev (str): Previous page url or empty string if there is no previous page Note: These URLs already contain complete query parameters and can be directly used for the next API request without manually constructing pagination parameters.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get a Tag
Retrieves a tag from a specified repository in Bitbucket using API token authentication. What: Retrieves complete tag metadata including tag name, target commit hash, and resource links.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: - Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). - UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
- RepoSlug: Bitbucket repository identifier (slug or UUID). Format: - Slug: lowercase alphanumeric with optional _, -, . (e.g., new_test_repository). - UUID: GUID wrapped in curly braces (e.g., {21a54043-f1b9-4739-8bc2-752a1231388c}). - Do NOT use name or full_name (full_name is workspace/repo). How to obtain: 1. Call Action bitbucket_repository_list with Workspace set to this action's workspace. 2. In response Repositories[], locate the target item by slug or uuid. 3. Copy Repositories[i].slug OR Repositories[i].uuid into this parameter. Example: new_test_repository or {21a54043-f1b9-4739-8bc2-752a1231388c}
- TagName: Name of the tag to retrieve. Format: - String: A string representing the tag name. Must exactly match the tag name (e.g., v1.0.0, v1.0.1). How to obtain: 1. Call the bitbucket_tag_list interface with the same Workspace and RepoSlug. 2. In response Tags[], locate the target item by name. 3. Copy Tags[i].name into this parameter. Example: v1.0.0
Output:
- Tag (object): Tag data retrieved from Bitbucket repository. Includes the following main fields: - type (str): Resource type identifier, e.g. "tag". - name (str): Name of the tag. - links (dict): Links to related resources for this tag. Main fields: - self (dict): API URL of this tag ref. Includes href and name fields. - commits (dict): Link to commits reachable from this tag. Includes href and name fields. - html (dict): Link to the tag page in the Bitbucket web UI. Includes href and name fields. - target (dict): The commit this tag points to. Includes hash (commit SHA), type (e.g. "commit"), links, repository, and author metadata. - message (str): Annotated tag message (e.g. "Added tag for changeset ..."). - date (str): Tag creation ISO8601 timestamp. - tagger (dict): The user who created the tag, including type (e.g. "author"), raw display string, and user object when available.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Current User
Gets the Bitbucket user associated with the provided credential. What it does: Retrieves profile information for the Bitbucket account that owns the credential you selected. This is useful for: - Verifying that your credential is valid - Getting the user's UUID or account_id for use in other Bitbucket actions - Checking account status and permissions Note: This returns the credential owner's info, not the workflow executor's info.
Output:
- User (object): Core Identity: - type (str): The type of the user (always "user"). - username (str): The username of the user. - display_name (str): The display name of the user. - nickname (str): The nickname of the user. - uuid (str): The UUID of the user (format: {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}). - account_id (str): The account ID of the user (format: 712020:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). Account Info: - created_on (str): The creation date of the user (ISO 8601 format). - account_status (str): Account status (e.g., "active", "inactive"). - is_staff (bool): Whether the user is a Bitbucket staff member. - has_2fa_enabled (bool|null): Whether two-factor authentication is enabled (null if unknown). - location (str|null): User's location (null if not set). Links: - links (object): Related API endpoints and resources: - self.href (str): API URL for this user. - avatar.href (str): User's avatar image URL. - repositories.href (str): API URL for user's repositories. - snippets.href (str): API URL for user's snippets. - html.href (str): Web URL for user's profile page. - hooks.href (str): API URL for workspace hooks (if applicable).
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Many Workspaces
Retrieves a paginated list of workspaces accessible to the authenticated Bitbucket user. Key points: - For first-time calls, use smaller pagelen values (e.g., 10-20) to avoid context flooding. Increase only if needed. - Provide exactly one credential: access_token OR account+api_token, not both.
Options:
- Admin: Indicates whether to retrieve only administrator workspaces. (0=all, 1=only administrator workspaces, 2=not administrator workspaces)
- Page: Page number for paginated retrieval. Starts from 1. Defaults to 1.
- Pagelen: Maximum number of items per page. Valid range is 10-100. Defaults to 20.
Output:
- Workspaces (object-array): Workspace data retrieved from Bitbucket. Each workspace object includes: - type (str): Type of the workspace, e.g., 'workspace_access'. - administrator (bool): Indicates whether the workspace is an administrator workspace. - workspace (dict): Each workspace contains the following fields: - type (str): Type of the workspace, e.g., 'workspace_base'. - uuid (str): UUID of the workspace. - slug (str): Slug of the workspace. - links (dict): Links to the workspace. Includes the following fields: - self (dict): Link to the workspace. Includes the following fields: - href (str): URL to the workspace.
- Pagination (object): A dict of pagination information. Includes the following fields: - size (int, optional): Total number of objects in the response. This is an optional element that is not provided in all responses. - page (int, optional): Page number of the current results. This is an optional element that is not provided in all responses. - pagelen (int): Current number of objects on the existing page. Globally, the minimum length is 10 and the maximum is 100. Some APIs may specify a different default. - next (str): Next page url or empty string if there is no next page - prev (str): Previous page url or empty string if there is no previous page Note: These URLs already contain complete query parameters and can be directly used for the next API request without manually constructing pagination parameters.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get a Workspace
Retrieves a detail of a specific workspace from Bitbucket using API token authentication. What: Retrieves complete workspace metadata including slug, name, UUID, privacy settings, and resource links.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: - Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). - UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
Output:
- Workspace (object): Workspace data retrieved from Bitbucket. Includes the following fields: slug (str): The workspace slug. name (str): The workspace name. created_on (str): The workspace creation date. type (str): The workspace type. uuid (str): The workspace UUID. is_private (bool): Whether the workspace is private. is_privacy_enforced (bool): Whether the workspace enforces privacy. forking_mode (str): The workspace forking mode. links (dict): Links to related resources. Includes the following fields: self (str): The URL of the workspace resource. repositories (str): The URL of the workspace repository in the UI. projects (str): The URL of the workspace project in the UI. members (str): The URL of the workspace members in the UI.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Workspace Members
Retrieves a paginated list of members within a specified Bitbucket workspace. Key points: - Provide exactly one credential: access_token OR account+api_token, not both. - Requires workspace admin or member-list permissions depending on workspace settings.
Input Parameters:
- Workspace: Bitbucket workspace identifier (slug or UUID). Format: - Slug: lowercase alphanumeric with optional _, -, . (e.g., goinsight). - UUID: GUID wrapped in curly braces (e.g., {3d0bbf44-0617-4250-9925-23c9ad3be145}). How to obtain: 1. Call Action bitbucket_workspace_list (no workspace filter required). 2. In response Workspaces[], locate the target item by workspace.slug or workspace.uuid. 3. Copy Workspaces[i].workspace.slug OR Workspaces[i].workspace.uuid into this parameter. Example: goinsight or {3d0bbf44-0617-4250-9925-23c9ad3be145}
Options:
- Query: Query parameters for filtering by email address. How to obtain: 1. Call the bitbucket_current_user_get interface. 2. Copy the email field value of User object. Example: ["test@example.com", "test2@example.com"]
- AdditionalFields: Extended request options (object). Supported keys: - page (int): First-page page number for listings. - pagelen (int): Page size 10–100 for listings; default 20. - page_url (str): Full URL from Pagination.next or Pagination.prev. When set, only credentials are required. Pagination loop: When Pagination.next is non-empty, call again with page_url set to that value. Example: {"pagelen": 20}
Output:
- Members (object-array): Member data retrieved from Bitbucket. Each member is represented as a dict containing details: - type (str, required): Type of the member, e.g., 'workspace_membership'. - user (dict): User data. Includes the following fields: - nickname (str): Nickname of the member. - display_name (str): Display name of the member. - uuid (str): UUID of the member. - account_id (str): Account ID of the member. - type (str): Type of the member, e.g., 'user' or 'team'. - links (dict): Links to the member's profile. Includes the following fields: - self (dict): Link to the member's profile. Includes the following fields: - href (str): URL to the member's profile. - links (dict): Links to the member. Includes the following fields: - self (dict): Link to the member. Includes the following fields: - href (str): URL to the member.
- Pagination (object): Pagination fields: size, page, pagelen, next, prev. Pagination loop: When next is non-empty, call again with AdditionalFields.page_url set to Pagination.next.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
5. Example Usage
This section will guide you through creating a simple workflow to automatically create a new repository in your Bitbucket account.
The workflow will consist of a Start node, a Bitbucket node configured to "Create a Repository", and an Answer node to display the result.
1. Add the Bitbucket Node
- On the workflow canvas, click the "+" button to add a new node.
- Select the "Tools" tab in the pop-up panel.
- Find and select "Bitbucket" from the list of tools.
- In the list of supported operations for Bitbucket, click on "Create a Repository" to add the node to the canvas.
2. Configure the Node
- Click on the newly added "Create a Repository" node to open its configuration panel on the right.
- Credentials: In the credentials field, click the dropdown menu and select your pre-configured Bitbucket credential.
- Parameters: Fill in the required input parameters for the action.
- Workspace: Enter the name or slug of your Bitbucket workspace. This is typically your username or your team's name. For example, my-team-workspace.
- RepoSlug: Provide a URL-friendly name for your new repository. This slug should only contain lowercase letters, numbers, hyphens, and underscores. For example, new-automation-project.
- IsPrivate (Optional): Toggle this switch to true if you want the repository to be private, or false for a public repository.
3. Run and Validate
- Once all required parameters are correctly filled, any error indicators on the workflow canvas will disappear.
- Click the "Run Test" button in the top-right corner of the canvas to execute the workflow.
- After a successful execution, you can click the logs icon in the top-right corner to view the detailed input and output of the node, confirming that the repository was created.
After completing these steps, your workflow is fully configured. When run, it will create a new repository in your specified Bitbucket workspace.
6. FAQs
Q: I'm getting a 401 Unauthorized or 403 Forbidden error. What should I do?
A: This usually indicates an issue with your credentials or permissions. Please check the following:
- Correct Credentials: Ensure you have selected the correct Bitbucket credential in the node configuration.
- App Password Scopes: Go to your Bitbucket account settings and verify that the App Password you are using has the necessary permissions (scopes) for the operation you are trying to perform. For example, to create a repository, you need repository:write and repository:admin permissions.
Q: How do I find my Workspace slug?
A: Your workspace slug is part of the URL when you are browsing Bitbucket. For example, in the URL https://bitbucket.org/my-team-workspace/, the workspace slug is my-team-workspace.
Q: What is the difference between ProjectKey and RepoSlug?
A: A RepoSlug is the unique, URL-friendly identifier for a specific repository. A ProjectKey is an identifier for a project, which is a container used to organize multiple related repositories within a workspace. A repository can optionally belong to a project.
7. Official Documentation
For more in-depth information about the Bitbucket API and its capabilities, please refer to the Bitbucket Official API Documentation.
Leave a Reply.