Bitbucket (version v1.*.*)

add_default_reviewer

Adds the specified user to the repository's list of default reviewers.

This method is idempotent. Adding a user a second time has no effect.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

target_username (required)

This can either be the username or the UUID of the default reviewer, surrounded by curly-braces, for example: {account UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

add_deploy_key

Create a new deploy key in a repository. Note: If authenticating a deploy key with an OAuth consumer, any changes to the OAuth consumer will subsequently invalidate the deploy key.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

add_ssh_key

Adds a new SSH public key to the specified user account and returns the resulting key.

Parameters

selected_user (required)

This can either be the UUID of the account, surrounded by curly-braces, for example: {account UUID}, OR an Atlassian Account ID.

Type: string

$body

The new SSH key object. Note that the username property has been deprecated due to privacy changes.

Type: object

{
  "type" : "Required string",
  "created_on" : "date-time",
  "last_used" : "date-time",
  "comment" : "The comment parsed from the SSH key (if present)",
  "links" : {
    "self" : {
      "name" : "string",
      "href" : "uri"
    }
  },
  "label" : "The user-defined label for the SSH key",
  "uuid" : "The SSH key's immutable ID.",
  "key" : "The SSH public key value in OpenSSH format.",
  "owner" : {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string"
  }
}

approve_commit

Approve the specified commit as the authenticated user.

This operation is only available to users that have explicit access to the repository. In contrast, just the fact that a repository is publicly accessible to users does not give them the ability to approve commits.

Parameters

commit (required)

The commit's SHA1.

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

approve_pull_request

Approve the specified pull request as the authenticated user.

Parameters

pull_request_id (required)

The id of the pull request.

Type: integer

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

bulk_upload_commit_report_annotations

Bulk upload of annotations. Annotations are individual findings that have been identified as part of a report, for example, a line of code that represents a vulnerability. These annotations can be attached to a specific file and even a specific line in that file, however, that is optional. Annotations are not mandatory and a report can contain up to 1000 annotations.

Add the annotations you want to upload as objects in a JSON array and make sure each annotation has the external_id field set to a unique value. If you want to use an existing id from your own system, we recommend prefixing it with your system's name to avoid collisions, for example, mySystem-annotation001. The external id can later be used to identify the report as an alternative to the generated UUID. You can upload up to 100 annotations per POST request.

Possible field values:

annotation_type: VULNERABILITY, CODE_SMELL, BUG result: PASSED, FAILED, IGNORED, SKIPPED severity: HIGH, MEDIUM, LOW, CRITICAL

Please refer to the Code Insights documentation for more information.

Parameters

commit (required)

The commit for which to retrieve reports.

Type: string

repo_slug (required)

The repository.

Type: string

reportId (required)

Uuid or external-if of the report for which to get annotations for.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

$body

The annotations to create or update

Type: array

[ {
  "type" : "Required string",
  "summary" : "The message to display to users.",
  "result" : "The state of the report. May be set to PENDING and later updated.",
  "severity" : "The severity of the annotation.",
  "updated_on" : "The timestamp when the report was updated.",
  "path" : "The path of the file on which this annotation should be placed. This is the path of the file relative to the git repository. If no path is provided, then it will appear in the overview modal on all pull requests where the tip of the branch is the given commit, regardless of which files were modified.",
  "created_on" : "The timestamp when the report was created.",
  "line" : "The line number that the annotation should belong to. If no line number is provided, then it will default to 0 and in a pull request it will appear at the top of the file specified by the path field.",
  "link" : "A URL linking to the annotation in an external tool.",
  "external_id" : "ID of the annotation provided by the annotation creator. It can be used to identify the annotation as an alternative to it's generated uuid. It is not used by Bitbucket, but only by the annotation creator for updating or deleting this specific annotation. Needs to be unique.",
  "annotation_type" : "The type of the report.",
  "details" : "The details to show to users when clicking on the annotation.",
  "uuid" : "The UUID that can be used to identify the annotation."
} ]

change_issue

Makes a change to the specified issue.

The fields of the changes object are strings, not objects. This allows for immutable change log records, even after user accounts, milestones, or other objects recorded in a change entry, get renamed or deleted.

The assignee_account_id field stores the account id. When POSTing a new change and changing the assignee, the client should therefore use the user's account_id in the changes.assignee_account_id.new field.

This call requires authentication. Private repositories or private issue trackers require the caller to authenticate with an account that has appropriate authorization.

Parameters

issue_id (required)

The issue id

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

$body

The new issue state change. The only required elements are changes.[].new. All other elements can be omitted from the body.

Type: object

{
  "issue" : {
    "type" : "Required string",
    "updated_on" : "date-time",
    "edited_on" : "date-time",
    "kind" : "string. Possible values: bug | enhancement | proposal | task",
    "reporter" : {
      "type" : "Required string",
      "website" : "string",
      "created_on" : "date-time",
      "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
      "links" : {
        "followers" : {
          "name" : "string",
          "href" : "uri"
        },
        "repositories" : {
          "name" : "string",
          "href" : "uri"
        },
        "following" : {
          "name" : "string",
          "href" : "uri"
        },
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "has_2fa_enabled" : "boolean",
      "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
      "display_name" : "string",
      "uuid" : "string",
      "username" : "string",
      "account_id" : "The user's Atlassian account ID.",
      "is_staff" : "boolean"
    },
    "repository" : {
      "type" : "Required string",
      "is_private" : "boolean",
      "owner" : {
        "type" : "Required string",
        "website" : "string",
        "created_on" : "date-time",
        "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
        "links" : {
          "followers" : {
            "name" : "string",
            "href" : "uri"
          },
          "repositories" : {
            "name" : "string",
            "href" : "uri"
          },
          "following" : {
            "name" : "string",
            "href" : "uri"
          },
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_2fa_enabled" : "boolean",
        "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
        "display_name" : "string",
        "uuid" : "string",
        "username" : "string"
      },
      "updated_on" : "date-time",
      "parent" : "repository",
      "fork_policy" : "\nControls the rules for forking this repository.\n\n* **allow_forks**: unrestricted forking\n* **no_public_forks**: restrict forking to private forks (forks cannot\n  be made public later)\n* **no_forks**: deny all forking\n",
      "description" : "string",
      "project" : {
        "type" : "Required string",
        "owner" : {
          "type" : "Required string",
          "website" : "string",
          "created_on" : "date-time",
          "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
          "links" : {
            "followers" : {
              "name" : "string",
              "href" : "uri"
            },
            "repositories" : {
              "name" : "string",
              "href" : "uri"
            },
            "following" : {
              "name" : "string",
              "href" : "uri"
            },
            "self" : {
              "name" : "string",
              "href" : "uri"
            },
            "html" : {
              "name" : "string",
              "href" : "uri"
            },
            "avatar" : {
              "name" : "string",
              "href" : "uri"
            }
          },
          "has_2fa_enabled" : "boolean",
          "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
          "display_name" : "string",
          "uuid" : "string",
          "username" : "string"
        },
        "is_private" : "\nIndicates whether the project is publicly accessible, or whether it is\nprivate to the team and consequently only visible to team members.\nNote that private projects cannot contain public repositories.",
        "updated_on" : "date-time",
        "created_on" : "date-time",
        "name" : "The name of the project.",
        "description" : "string",
        "links" : {
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_publicly_visible_repos" : "\nIndicates whether the project contains publicly visible repositories.\nNote that private projects cannot contain public repositories.",
        "uuid" : "The project's immutable id.",
        "key" : "The project's key."
      },
      "language" : "string",
      "uuid" : "The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.",
      "has_issues" : "boolean",
      "mainbranch" : {
        "name" : "The name of the ref.",
        "links" : {
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "commits" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "type" : "Required string",
        "target" : {
          "type" : "Required string",
          "date" : "date-time",
          "summary" : {
            "markup" : "The type of markup language the raw content is to be interpreted in.",
            "raw" : "The text as it was typed by a user.",
            "html" : "The user's content rendered as HTML."
          },
          "author" : {
            "type" : "Required string",
            "raw" : "The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.",
            "user" : {
              "type" : "Required string",
              "website" : "string",
              "created_on" : "date-time",
              "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
              "links" : {
                "followers" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "repositories" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "following" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "self" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "html" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "avatar" : {
                  "name" : "string",
                  "href" : "uri"
                }
              },
              "has_2fa_enabled" : "boolean",
              "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
              "display_name" : "string",
              "uuid" : "string",
              "username" : "string"
            }
          },
          "message" : "string",
          "hash" : "string",
          "parents" : [ "base_commit" ],
          "repository" : "repository",
          "participants" : [ {
            "type" : "Required string",
            "approved" : "boolean",
            "role" : "string. Possible values: PARTICIPANT | REVIEWER",
            "state" : "string. Possible values: approved | changes_requested",
            "user" : {
              "type" : "Required string",
              "website" : "string",
              "created_on" : "date-time",
              "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
              "links" : {
                "followers" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "repositories" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "following" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "self" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "html" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "avatar" : {
                  "name" : "string",
                  "href" : "uri"
                }
              },
              "has_2fa_enabled" : "boolean",
              "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
              "display_name" : "string",
              "uuid" : "string",
              "username" : "string",
              "account_id" : "The user's Atlassian account ID.",
              "is_staff" : "boolean"
            },
            "participated_on" : "The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented."
          } ]
        },
        "default_merge_strategy" : "The default merge strategy for pull requests targeting this branch.",
        "merge_strategies" : [ "string. Possible values: merge_commit | squash | fast_forward" ]
      },
      "full_name" : "The concatenation of the repository owner's username and the slugified name, e.g. \"evzijst/interruptingcow\". This is the same string used in Bitbucket URLs.",
      "has_wiki" : "boolean",
      "size" : "integer",
      "created_on" : "date-time",
      "name" : "string",
      "links" : {
        "forks" : {
          "name" : "string",
          "href" : "uri"
        },
        "downloads" : {
          "name" : "string",
          "href" : "uri"
        },
        "clone" : [ {
          "name" : "string",
          "href" : "uri"
        } ],
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "commits" : {
          "name" : "string",
          "href" : "uri"
        },
        "watchers" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        },
        "hooks" : {
          "name" : "string",
          "href" : "uri"
        },
        "pullrequests" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "scm" : "string. Possible values: git"
    },
    "title" : "string",
    "priority" : "string. Possible values: trivial | minor | major | critical | blocker",
    "version" : {
      "type" : "Required string",
      "name" : "string",
      "links" : {
        "self" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "id" : "integer"
    },
    "content" : {
      "markup" : "The type of markup language the raw content is to be interpreted in.",
      "raw" : "The text as it was typed by a user.",
      "html" : "The user's content rendered as HTML."
    },
    "component" : {
      "type" : "Required string",
      "name" : "string",
      "links" : {
        "self" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "id" : "integer"
    },
    "milestone" : {
      "type" : "Required string",
      "name" : "string",
      "links" : {
        "self" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "id" : "integer"
    },
    "created_on" : "date-time",
    "links" : {
      "comments" : {
        "name" : "string",
        "href" : "uri"
      },
      "attachments" : {
        "name" : "string",
        "href" : "uri"
      },
      "watch" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "vote" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "votes" : "integer",
    "id" : "integer",
    "assignee" : {
      "type" : "Required string",
      "website" : "string",
      "created_on" : "date-time",
      "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
      "links" : {
        "followers" : {
          "name" : "string",
          "href" : "uri"
        },
        "repositories" : {
          "name" : "string",
          "href" : "uri"
        },
        "following" : {
          "name" : "string",
          "href" : "uri"
        },
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "has_2fa_enabled" : "boolean",
      "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
      "display_name" : "string",
      "uuid" : "string",
      "username" : "string",
      "account_id" : "The user's Atlassian account ID.",
      "is_staff" : "boolean"
    },
    "state" : "string. Possible values: new | open | resolved | on hold | invalid | duplicate | wontfix | closed"
  },
  "created_on" : "date-time",
  "name" : "string",
  "changes" : {
    "component" : {
      "new" : "string",
      "old" : "string"
    },
    "milestone" : {
      "new" : "string",
      "old" : "string"
    },
    "kind" : {
      "new" : "string",
      "old" : "string"
    },
    "assignee" : {
      "new" : "string",
      "old" : "string"
    },
    "state" : {
      "new" : "string",
      "old" : "string"
    },
    "title" : {
      "new" : "string",
      "old" : "string"
    },
    "priority" : {
      "new" : "string",
      "old" : "string"
    },
    "version" : {
      "new" : "string",
      "old" : "string"
    },
    "content" : {
      "new" : "string",
      "old" : "string"
    }
  },
  "links" : {
    "issue" : {
      "name" : "string",
      "href" : "uri"
    },
    "self" : {
      "name" : "string",
      "href" : "uri"
    }
  },
  "type" : "Required string",
  "message" : {
    "markup" : "The type of markup language the raw content is to be interpreted in.",
    "raw" : "The text as it was typed by a user.",
    "html" : "The user's content rendered as HTML."
  },
  "user" : {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string",
    "account_id" : "The user's Atlassian account ID.",
    "is_staff" : "boolean"
  }
}

check_export_issues_status

This endpoint is used to poll for the progress of an issue export job and return the zip file after the job is complete. As long as the job is running, this will return a 200 response with in the response body a description of the current status.

After the job has been scheduled, but before it starts executing, this endpoint's response is:

{ "type": "issue_job_status", "status": "ACCEPTED", "phase": "Initializing", "total": 0, "count": 0, "pct": 0 }

Then once it starts running, it becomes:

{ "type": "issue_job_status", "status": "STARTED", "phase": "Attachments", "total": 15, "count": 11, "pct": 73 }

Once the job has successfully completed, it returns a stream of the zip file.

Parameters

repo_name (required)

The name of the repo

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

task_id (required)

The ID of the export task

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

check_import_issues_status

When using GET, this endpoint reports the status of the current import task.

After the job has been scheduled, but before it starts executing, this endpoint's response is:

< HTTP/1.1 202 Accepted
{
    "type": "issue_job_status",
    "status": "PENDING",
    "phase": "Attachments",
    "total": 15,
    "count": 0,
    "percent": 0
}

Once it starts running, it is a 202 response with status STARTED and progress filled.

After it is finished, it becomes a 200 response with status SUCCESS or FAILURE.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

compare_commits

Produces a raw git-style diff.

Single commit spec

If the spec argument to this API is a single commit, the diff is produced against the first parent of the specified commit.

Two commit spec

Two commits separated by .. may be provided as the spec, e.g., 3a8b42..9ff173. When two commits are provided and the merge query parameter is true or absent, this API produces a 3-way diff, also referred to as a merge diff. This is equivalent to merging the left branch into the right branch and then computing the diff of the merge commit against its first parent (the right branch). These diffs have the same behavior as pull requests that show the 3-way diff, such as the Bitbucket Cloud Pull Request. For a simple git-style diff, add merge=false to the query.

The two commits are interpreted as follows:

  • First commit: the commit containing the changes we wish to preview
  • Second commit: the commit representing the state to which we want to compare the first commit
  • Note: This is the opposite of the order used in git diff.

Comparison to patches

While similar to patches, diffs:

  • Don't have a commit header (username, commit message, etc)
  • Support the optional path=foo/bar.py query param to filter the diff to just that one file diff

Response

The raw diff is returned as-is, in whatever encoding the files in the repository use. It is not decoded into unicode. As such, the content-type is text/plain.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

spec (required)

A commit SHA (e.g. 3a8b42) or a commit range using double dot notation (e.g. 3a8b42..9ff173).

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

binary

Generate diffs that include binary files, true if omitted.

Type: boolean

context

Generate diffs with lines of context instead of the usual three.

Type: integer

ignore_whitespace

Generate diffs that ignore whitespace.

Type: boolean

merge

If true, the source commit is merged into the destination commit, and then a diff from the destination to the merge result is returned. If false, a simple 'two dot' diff between the source and destination is returned. True if omitted.

Type: boolean

path

Limit the diff to a particular file (this parameter can be repeated for multiple paths).

Type: string

renames

Whether to perform rename detection, true if omitted.

Type: boolean

compare_commits_stats

Produces a response in JSON format with a record for every path modified, including information on the type of the change and the number of lines added and removed.

Single commit spec

If the spec argument to this API is a single commit, the diff is produced against the first parent of the specified commit.

Two commit spec

Two commits separated by .. may be provided as the spec, e.g., 3a8b42..9ff173. When two commits are provided and the merge query parameter is true or absent, this API produces a 3-way diff, also referred to as a merge diff. This is equivalent to merging the left branch into the right branch and then computing the diff of the merge commit against its first parent (the right branch). These diffs have the same behavior as pull requests that show the 3-way diff, such as the Bitbucket Cloud Pull Request. For a simple git-style diff, add merge=false to the query.

The two commits are interpreted as follows:

  • First commit: the commit containing the changes we wish to preview
  • Second commit: the commit representing the state to which we want to compare the first commit
  • Note: This is the opposite of the order used in git diff.
Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

spec (required)

A commit SHA (e.g. 3a8b42) or a commit range using double dot notation (e.g. 3a8b42..9ff173).

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

ignore_whitespace

Generate diffs that ignore whitespace

Type: boolean

merge

If true, the source commit is merged into the destination commit, and then a diffstat from the destination to the merge result is returned. If false, a simple 'two dot' diffstat between the source and destination is returned. True if omitted.

Type: boolean

path

Limit the diffstat to a particular file (this parameter can be repeated for multiple paths).

Type: string

renames

Whether to perform rename detection, true if omitted.

Type: boolean

create_branch

Creates a new branch in the specified repository.

The payload of the POST should consist of a JSON document that contains the name of the tag and the target hash.

This call requires authentication. Private repositories require the caller to authenticate with an account that has appropriate authorization.

The branch name should not include any prefixes (e.g. refs/heads). This endpoint does support using short hash prefixes for the commit hash, but it may return a 400 response if the provided prefix is ambiguous. Using a full commit hash is the preferred approach.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

create_branch_restriction

Creates a new branch restriction rule for a repository.

kind describes what will be restricted. Allowed values include: push, force, delete and restrict_merges.

Different kinds of branch restrictions have different requirements:

  • push and restrict_merges require users and groups to be specified. Empty lists are allowed, in which case permission is denied for everybody.

The restriction applies to all branches that match. There are two ways to match a branch. It is configured in branch_match_kind:

  1. glob: Matches a branch against the pattern. A '*' in pattern will expand to match zero or more characters, and every other character matches itself. For example, 'foo*' will match 'foo' and 'foobar', but not 'barfoo'. '*' will match all branches.
  2. branching_model: Matches a branch against the repository's branching model. The branch_type controls the type of branch to match. Allowed values include: production, development, bugfix, release, feature and hotfix.

The combination of kind and match must be unique. This means that two glob restrictions in a repository cannot have the same kind and pattern. Additionally, two branching_model restrictions in a repository cannot have the same kind and branch_type.

users and groups are lists of users and groups that are except from the restriction. They can only be configured in push and restrict_merges restrictions. The push restriction stops a user pushing to matching branches unless that user is in users or is a member of a group in groups. The restrict_merges stops a user merging pull requests to matching branches unless that user is in users or is a member of a group in groups. Adding new users or groups to an existing restriction should be done via PUT.

Note that branch restrictions with overlapping matchers is allowed, but the resulting behavior may be surprising.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

$body

The new rule

Type: object

{
  "type" : "Required string",
  "branch_match_kind" : "Indicates how the restriction is matched against a branch. The default is `glob`.",
  "branch_type" : "Apply the restriction to branches of this type. Active when `branch_match_kind` is `branching_model`. The branch type will be calculated using the branching model configured for the repository.",
  "kind" : "The type of restriction that is being applied.",
  "pattern" : "Apply the restriction to branches that match this pattern. Active when `branch_match_kind` is `glob`. Will be empty when `branch_match_kind` is `branching_model`.",
  "groups" : [ {
    "type" : "Required string",
    "owner" : {
      "type" : "Required string",
      "website" : "string",
      "created_on" : "date-time",
      "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
      "links" : {
        "followers" : {
          "name" : "string",
          "href" : "uri"
        },
        "repositories" : {
          "name" : "string",
          "href" : "uri"
        },
        "following" : {
          "name" : "string",
          "href" : "uri"
        },
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "has_2fa_enabled" : "boolean",
      "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
      "display_name" : "string",
      "uuid" : "string",
      "username" : "string"
    },
    "full_slug" : "The concatenation of the workspace's slug and the group's slug,\nseparated with a colon (e.g. `acme:developers`)\n",
    "workspace" : {
      "type" : "Required string",
      "is_private" : "Indicates whether the workspace is publicly accessible, or whether it is\nprivate to the members and consequently only visible to members.\nNote that private workspaces cannot contain public repositories.",
      "updated_on" : "date-time",
      "created_on" : "date-time",
      "name" : "The name of the workspace.",
      "links" : {
        "projects" : {
          "name" : "string",
          "href" : "uri"
        },
        "repositories" : {
          "name" : "string",
          "href" : "uri"
        },
        "snippets" : {
          "name" : "string",
          "href" : "uri"
        },
        "members" : {
          "name" : "string",
          "href" : "uri"
        },
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "owners" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "uuid" : "The workspace's immutable id.",
      "slug" : "The short label that identifies this workspace."
    },
    "name" : "string",
    "links" : {
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "slug" : "The \"sluggified\" version of the group's name. This contains only ASCII\ncharacters and can therefore be slightly different than the name"
  } ],
  "links" : {
    "self" : {
      "name" : "string",
      "href" : "uri"
    }
  },
  "id" : "The branch restriction status' id.",
  "value" : "integer",
  "users" : [ {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string"
  } ]
}

create_build_status_for_commit

Creates a new build status against the specified commit.

If the specified key already exists, the existing status object will be overwritten.

When creating a new commit status, you can use a URI template for the URL. Templates are URLs that contain variable names that Bitbucket will evaluate at runtime whenever the URL is displayed anywhere similar to parameter substitution in Bitbucket Connect. For example, one could use https://foo.com/builds/{repository.full_name} which Bitbucket will turn into https://foo.com/builds/foo/bar at render time. The context variables available are repository and commit.

Parameters

commit (required)

The commit's SHA1.

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

$body

The new commit status object.

Type: object

{
  "type" : "Required string",
  "updated_on" : "date-time",
  "created_on" : "date-time",
  "name" : "An identifier for the build itself, e.g. BB-DEPLOY-1",
  "description" : "A description of the build (e.g. \"Unit tests in Bamboo\")",
  "links" : {
    "commit" : {
      "name" : "string",
      "href" : "uri"
    },
    "self" : {
      "name" : "string",
      "href" : "uri"
    }
  },
  "state" : "Provides some indication of the status of this commit",
  "uuid" : "The commit status' id.",
  "key" : "An identifier for the status that's unique to\n        its type (current \"build\" is the only supported type) and the vendor,\n        e.g. BB-DEPLOY",
  "refname" : "\nThe name of the ref that pointed to this commit at the time the status\nobject was created. Note that this the ref may since have moved off of\nthe commit. This optional field can be useful for build systems whose\nbuild triggers and configuration are branch-dependent (e.g. a Pipeline\nbuild).\nIt is legitimate for this field to not be set, or even apply (e.g. a\nstatic linting job).",
  "url" : "A URL linking back to the vendor or build system, for providing more information about whatever process produced this status. Accepts context variables `repository` and `commit` that Bitbucket will evaluate at runtime whenever at runtime. For example, one could use https://foo.com/builds/{repository.full_name} which Bitbucket will turn into https://foo.com/builds/foo/bar at render time."
}

create_commit_comment

Creates new comment on the specified commit.

To post a reply to an existing comment, include the parent.id field:

Parameters

commit (required)

The commit's SHA1.

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

$body

The specified comment.

Type: object

{
  "type" : "Required string",
  "updated_on" : "date-time",
  "parent" : "comment",
  "deleted" : "boolean",
  "inline" : {
    "path" : "The path of the file this comment is anchored to.",
    "from" : "The comment's anchor line in the old version of the file.",
    "to" : "The comment's anchor line in the new version of the file. If the 'from' line is also provided, this value will be removed."
  },
  "created_on" : "date-time",
  "links" : {
    "code" : {
      "name" : "string",
      "href" : "uri"
    },
    "self" : {
      "name" : "string",
      "href" : "uri"
    },
    "html" : {
      "name" : "string",
      "href" : "uri"
    }
  },
  "id" : "integer",
  "user" : {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string",
    "account_id" : "The user's Atlassian account ID.",
    "is_staff" : "boolean"
  },
  "content" : {
    "markup" : "The type of markup language the raw content is to be interpreted in.",
    "raw" : "The text as it was typed by a user.",
    "html" : "The user's content rendered as HTML."
  },
  "commit" : {
    "type" : "Required string",
    "date" : "date-time",
    "summary" : {
      "markup" : "The type of markup language the raw content is to be interpreted in.",
      "raw" : "The text as it was typed by a user.",
      "html" : "The user's content rendered as HTML."
    },
    "author" : {
      "type" : "Required string",
      "raw" : "The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.",
      "user" : {
        "type" : "Required string",
        "website" : "string",
        "created_on" : "date-time",
        "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
        "links" : {
          "followers" : {
            "name" : "string",
            "href" : "uri"
          },
          "repositories" : {
            "name" : "string",
            "href" : "uri"
          },
          "following" : {
            "name" : "string",
            "href" : "uri"
          },
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_2fa_enabled" : "boolean",
        "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
        "display_name" : "string",
        "uuid" : "string",
        "username" : "string"
      }
    },
    "message" : "string",
    "hash" : "string",
    "parents" : [ "base_commit" ],
    "repository" : {
      "type" : "Required string",
      "is_private" : "boolean",
      "owner" : {
        "type" : "Required string",
        "website" : "string",
        "created_on" : "date-time",
        "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
        "links" : {
          "followers" : {
            "name" : "string",
            "href" : "uri"
          },
          "repositories" : {
            "name" : "string",
            "href" : "uri"
          },
          "following" : {
            "name" : "string",
            "href" : "uri"
          },
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_2fa_enabled" : "boolean",
        "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
        "display_name" : "string",
        "uuid" : "string",
        "username" : "string"
      },
      "updated_on" : "date-time",
      "parent" : "repository",
      "fork_policy" : "\nControls the rules for forking this repository.\n\n* **allow_forks**: unrestricted forking\n* **no_public_forks**: restrict forking to private forks (forks cannot\n  be made public later)\n* **no_forks**: deny all forking\n",
      "description" : "string",
      "project" : {
        "type" : "Required string",
        "owner" : {
          "type" : "Required string",
          "website" : "string",
          "created_on" : "date-time",
          "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
          "links" : {
            "followers" : {
              "name" : "string",
              "href" : "uri"
            },
            "repositories" : {
              "name" : "string",
              "href" : "uri"
            },
            "following" : {
              "name" : "string",
              "href" : "uri"
            },
            "self" : {
              "name" : "string",
              "href" : "uri"
            },
            "html" : {
              "name" : "string",
              "href" : "uri"
            },
            "avatar" : {
              "name" : "string",
              "href" : "uri"
            }
          },
          "has_2fa_enabled" : "boolean",
          "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
          "display_name" : "string",
          "uuid" : "string",
          "username" : "string"
        },
        "is_private" : "\nIndicates whether the project is publicly accessible, or whether it is\nprivate to the team and consequently only visible to team members.\nNote that private projects cannot contain public repositories.",
        "updated_on" : "date-time",
        "created_on" : "date-time",
        "name" : "The name of the project.",
        "description" : "string",
        "links" : {
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_publicly_visible_repos" : "\nIndicates whether the project contains publicly visible repositories.\nNote that private projects cannot contain public repositories.",
        "uuid" : "The project's immutable id.",
        "key" : "The project's key."
      },
      "language" : "string",
      "uuid" : "The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.",
      "has_issues" : "boolean",
      "mainbranch" : {
        "name" : "The name of the ref.",
        "links" : {
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "commits" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "type" : "Required string",
        "target" : "commit",
        "default_merge_strategy" : "The default merge strategy for pull requests targeting this branch.",
        "merge_strategies" : [ "string. Possible values: merge_commit | squash | fast_forward" ]
      },
      "full_name" : "The concatenation of the repository owner's username and the slugified name, e.g. \"evzijst/interruptingcow\". This is the same string used in Bitbucket URLs.",
      "has_wiki" : "boolean",
      "size" : "integer",
      "created_on" : "date-time",
      "name" : "string",
      "links" : {
        "forks" : {
          "name" : "string",
          "href" : "uri"
        },
        "downloads" : {
          "name" : "string",
          "href" : "uri"
        },
        "clone" : [ {
          "name" : "string",
          "href" : "uri"
        } ],
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "commits" : {
          "name" : "string",
          "href" : "uri"
        },
        "watchers" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        },
        "hooks" : {
          "name" : "string",
          "href" : "uri"
        },
        "pullrequests" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "scm" : "string. Possible values: git"
    },
    "participants" : [ {
      "type" : "Required string",
      "approved" : "boolean",
      "role" : "string. Possible values: PARTICIPANT | REVIEWER",
      "state" : "string. Possible values: approved | changes_requested",
      "user" : {
        "type" : "Required string",
        "website" : "string",
        "created_on" : "date-time",
        "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
        "links" : {
          "followers" : {
            "name" : "string",
            "href" : "uri"
          },
          "repositories" : {
            "name" : "string",
            "href" : "uri"
          },
          "following" : {
            "name" : "string",
            "href" : "uri"
          },
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_2fa_enabled" : "boolean",
        "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
        "display_name" : "string",
        "uuid" : "string",
        "username" : "string",
        "account_id" : "The user's Atlassian account ID.",
        "is_staff" : "boolean"
      },
      "participated_on" : "The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented."
    } ]
  }
}

create_commit_report_annotation

Creates or updates an individual annotation for the specified report. Annotations are individual findings that have been identified as part of a report, for example, a line of code that represents a vulnerability. These annotations can be attached to a specific file and even a specific line in that file, however, that is optional. Annotations are not mandatory and a report can contain up to 1000 annotations.

Just as reports, annotation needs to be uploaded with a unique ID that can later be used to identify the report as an alternative to the generated UUID. If you want to use an existing id from your own system, we recommend prefixing it with your system's name to avoid collisions, for example, mySystem-annotation001.

Possible field values:

annotation_type: VULNERABILITY, CODE_SMELL, BUG result: PASSED, FAILED, IGNORED, SKIPPED severity: HIGH, MEDIUM, LOW, CRITICAL

Please refer to the Code Insights documentation for more information.

Parameters

annotationId (required)

Either the uuid or external-id of the annotation.

Type: string

commit (required)

The commit the report belongs to.

Type: string

repo_slug (required)

The repository.

Type: string

reportId (required)

Either the uuid or external-id of the report.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

$body

The annotation to create or update

Type: object

{
  "type" : "Required string",
  "summary" : "The message to display to users.",
  "result" : "The state of the report. May be set to PENDING and later updated.",
  "severity" : "The severity of the annotation.",
  "updated_on" : "The timestamp when the report was updated.",
  "path" : "The path of the file on which this annotation should be placed. This is the path of the file relative to the git repository. If no path is provided, then it will appear in the overview modal on all pull requests where the tip of the branch is the given commit, regardless of which files were modified.",
  "created_on" : "The timestamp when the report was created.",
  "line" : "The line number that the annotation should belong to. If no line number is provided, then it will default to 0 and in a pull request it will appear at the top of the file specified by the path field.",
  "link" : "A URL linking to the annotation in an external tool.",
  "external_id" : "ID of the annotation provided by the annotation creator. It can be used to identify the annotation as an alternative to it's generated uuid. It is not used by Bitbucket, but only by the annotation creator for updating or deleting this specific annotation. Needs to be unique.",
  "annotation_type" : "The type of the report.",
  "details" : "The details to show to users when clicking on the annotation.",
  "uuid" : "The UUID that can be used to identify the annotation."
}

create_deployment_variable

Create a deployment environment level variable.

Parameters

environment_uuid (required)

The environment.

Type: string

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

$body

The variable to create

Type: object

{
  "type" : "Required string",
  "uuid" : "The UUID identifying the variable.",
  "value" : "The value of the variable. If the variable is secured, this will be empty.",
  "secured" : "If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.",
  "key" : "The unique name of the variable."
}

create_environment

Create an environment.

Parameters

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

$body

The environment to create.

Type: object

{
  "type" : "Required string",
  "name" : "The name of the environment.",
  "uuid" : "The UUID identifying the environment."
}

create_issue

Creates a new issue.

This call requires authentication. Private repositories or private issue trackers require the caller to authenticate with an account that has appropriate authorization.

The authenticated user is used for the issue's reporter field.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

$body

The new issue. The only required element is title. All other elements can be omitted from the body.

Type: object

{
  "type" : "Required string",
  "updated_on" : "date-time",
  "edited_on" : "date-time",
  "kind" : "string. Possible values: bug | enhancement | proposal | task",
  "reporter" : {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string",
    "account_id" : "The user's Atlassian account ID.",
    "is_staff" : "boolean"
  },
  "repository" : {
    "type" : "Required string",
    "is_private" : "boolean",
    "owner" : {
      "type" : "Required string",
      "website" : "string",
      "created_on" : "date-time",
      "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
      "links" : {
        "followers" : {
          "name" : "string",
          "href" : "uri"
        },
        "repositories" : {
          "name" : "string",
          "href" : "uri"
        },
        "following" : {
          "name" : "string",
          "href" : "uri"
        },
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "has_2fa_enabled" : "boolean",
      "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
      "display_name" : "string",
      "uuid" : "string",
      "username" : "string"
    },
    "updated_on" : "date-time",
    "parent" : "repository",
    "fork_policy" : "\nControls the rules for forking this repository.\n\n* **allow_forks**: unrestricted forking\n* **no_public_forks**: restrict forking to private forks (forks cannot\n  be made public later)\n* **no_forks**: deny all forking\n",
    "description" : "string",
    "project" : {
      "type" : "Required string",
      "owner" : {
        "type" : "Required string",
        "website" : "string",
        "created_on" : "date-time",
        "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
        "links" : {
          "followers" : {
            "name" : "string",
            "href" : "uri"
          },
          "repositories" : {
            "name" : "string",
            "href" : "uri"
          },
          "following" : {
            "name" : "string",
            "href" : "uri"
          },
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_2fa_enabled" : "boolean",
        "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
        "display_name" : "string",
        "uuid" : "string",
        "username" : "string"
      },
      "is_private" : "\nIndicates whether the project is publicly accessible, or whether it is\nprivate to the team and consequently only visible to team members.\nNote that private projects cannot contain public repositories.",
      "updated_on" : "date-time",
      "created_on" : "date-time",
      "name" : "The name of the project.",
      "description" : "string",
      "links" : {
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "has_publicly_visible_repos" : "\nIndicates whether the project contains publicly visible repositories.\nNote that private projects cannot contain public repositories.",
      "uuid" : "The project's immutable id.",
      "key" : "The project's key."
    },
    "language" : "string",
    "uuid" : "The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.",
    "has_issues" : "boolean",
    "mainbranch" : {
      "name" : "The name of the ref.",
      "links" : {
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "commits" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "type" : "Required string",
      "target" : {
        "type" : "Required string",
        "date" : "date-time",
        "summary" : {
          "markup" : "The type of markup language the raw content is to be interpreted in.",
          "raw" : "The text as it was typed by a user.",
          "html" : "The user's content rendered as HTML."
        },
        "author" : {
          "type" : "Required string",
          "raw" : "The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.",
          "user" : {
            "type" : "Required string",
            "website" : "string",
            "created_on" : "date-time",
            "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
            "links" : {
              "followers" : {
                "name" : "string",
                "href" : "uri"
              },
              "repositories" : {
                "name" : "string",
                "href" : "uri"
              },
              "following" : {
                "name" : "string",
                "href" : "uri"
              },
              "self" : {
                "name" : "string",
                "href" : "uri"
              },
              "html" : {
                "name" : "string",
                "href" : "uri"
              },
              "avatar" : {
                "name" : "string",
                "href" : "uri"
              }
            },
            "has_2fa_enabled" : "boolean",
            "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
            "display_name" : "string",
            "uuid" : "string",
            "username" : "string"
          }
        },
        "message" : "string",
        "hash" : "string",
        "parents" : [ "base_commit" ],
        "repository" : "repository",
        "participants" : [ {
          "type" : "Required string",
          "approved" : "boolean",
          "role" : "string. Possible values: PARTICIPANT | REVIEWER",
          "state" : "string. Possible values: approved | changes_requested",
          "user" : {
            "type" : "Required string",
            "website" : "string",
            "created_on" : "date-time",
            "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
            "links" : {
              "followers" : {
                "name" : "string",
                "href" : "uri"
              },
              "repositories" : {
                "name" : "string",
                "href" : "uri"
              },
              "following" : {
                "name" : "string",
                "href" : "uri"
              },
              "self" : {
                "name" : "string",
                "href" : "uri"
              },
              "html" : {
                "name" : "string",
                "href" : "uri"
              },
              "avatar" : {
                "name" : "string",
                "href" : "uri"
              }
            },
            "has_2fa_enabled" : "boolean",
            "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
            "display_name" : "string",
            "uuid" : "string",
            "username" : "string",
            "account_id" : "The user's Atlassian account ID.",
            "is_staff" : "boolean"
          },
          "participated_on" : "The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented."
        } ]
      },
      "default_merge_strategy" : "The default merge strategy for pull requests targeting this branch.",
      "merge_strategies" : [ "string. Possible values: merge_commit | squash | fast_forward" ]
    },
    "full_name" : "The concatenation of the repository owner's username and the slugified name, e.g. \"evzijst/interruptingcow\". This is the same string used in Bitbucket URLs.",
    "has_wiki" : "boolean",
    "size" : "integer",
    "created_on" : "date-time",
    "name" : "string",
    "links" : {
      "forks" : {
        "name" : "string",
        "href" : "uri"
      },
      "downloads" : {
        "name" : "string",
        "href" : "uri"
      },
      "clone" : [ {
        "name" : "string",
        "href" : "uri"
      } ],
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "commits" : {
        "name" : "string",
        "href" : "uri"
      },
      "watchers" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      },
      "hooks" : {
        "name" : "string",
        "href" : "uri"
      },
      "pullrequests" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "scm" : "string. Possible values: git"
  },
  "title" : "string",
  "priority" : "string. Possible values: trivial | minor | major | critical | blocker",
  "version" : {
    "type" : "Required string",
    "name" : "string",
    "links" : {
      "self" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "id" : "integer"
  },
  "content" : {
    "markup" : "The type of markup language the raw content is to be interpreted in.",
    "raw" : "The text as it was typed by a user.",
    "html" : "The user's content rendered as HTML."
  },
  "component" : {
    "type" : "Required string",
    "name" : "string",
    "links" : {
      "self" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "id" : "integer"
  },
  "milestone" : {
    "type" : "Required string",
    "name" : "string",
    "links" : {
      "self" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "id" : "integer"
  },
  "created_on" : "date-time",
  "links" : {
    "comments" : {
      "name" : "string",
      "href" : "uri"
    },
    "attachments" : {
      "name" : "string",
      "href" : "uri"
    },
    "watch" : {
      "name" : "string",
      "href" : "uri"
    },
    "self" : {
      "name" : "string",
      "href" : "uri"
    },
    "html" : {
      "name" : "string",
      "href" : "uri"
    },
    "vote" : {
      "name" : "string",
      "href" : "uri"
    }
  },
  "votes" : "integer",
  "id" : "integer",
  "assignee" : {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string",
    "account_id" : "The user's Atlassian account ID.",
    "is_staff" : "boolean"
  },
  "state" : "string. Possible values: new | open | resolved | on hold | invalid | duplicate | wontfix | closed"
}

create_issue_comment

Creates a new issue comment.

Parameters

issue_id (required)

The issue id

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

$body

The new issue comment object.

Type: object

{
  "type" : "Required string",
  "updated_on" : "date-time",
  "parent" : "comment",
  "deleted" : "boolean",
  "inline" : {
    "path" : "The path of the file this comment is anchored to.",
    "from" : "The comment's anchor line in the old version of the file.",
    "to" : "The comment's anchor line in the new version of the file. If the 'from' line is also provided, this value will be removed."
  },
  "created_on" : "date-time",
  "links" : {
    "code" : {
      "name" : "string",
      "href" : "uri"
    },
    "self" : {
      "name" : "string",
      "href" : "uri"
    },
    "html" : {
      "name" : "string",
      "href" : "uri"
    }
  },
  "id" : "integer",
  "user" : {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string",
    "account_id" : "The user's Atlassian account ID.",
    "is_staff" : "boolean"
  },
  "content" : {
    "markup" : "The type of markup language the raw content is to be interpreted in.",
    "raw" : "The text as it was typed by a user.",
    "html" : "The user's content rendered as HTML."
  },
  "issue" : {
    "type" : "Required string",
    "updated_on" : "date-time",
    "edited_on" : "date-time",
    "kind" : "string. Possible values: bug | enhancement | proposal | task",
    "reporter" : {
      "type" : "Required string",
      "website" : "string",
      "created_on" : "date-time",
      "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
      "links" : {
        "followers" : {
          "name" : "string",
          "href" : "uri"
        },
        "repositories" : {
          "name" : "string",
          "href" : "uri"
        },
        "following" : {
          "name" : "string",
          "href" : "uri"
        },
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "has_2fa_enabled" : "boolean",
      "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
      "display_name" : "string",
      "uuid" : "string",
      "username" : "string",
      "account_id" : "The user's Atlassian account ID.",
      "is_staff" : "boolean"
    },
    "repository" : {
      "type" : "Required string",
      "is_private" : "boolean",
      "owner" : {
        "type" : "Required string",
        "website" : "string",
        "created_on" : "date-time",
        "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
        "links" : {
          "followers" : {
            "name" : "string",
            "href" : "uri"
          },
          "repositories" : {
            "name" : "string",
            "href" : "uri"
          },
          "following" : {
            "name" : "string",
            "href" : "uri"
          },
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_2fa_enabled" : "boolean",
        "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
        "display_name" : "string",
        "uuid" : "string",
        "username" : "string"
      },
      "updated_on" : "date-time",
      "parent" : "repository",
      "fork_policy" : "\nControls the rules for forking this repository.\n\n* **allow_forks**: unrestricted forking\n* **no_public_forks**: restrict forking to private forks (forks cannot\n  be made public later)\n* **no_forks**: deny all forking\n",
      "description" : "string",
      "project" : {
        "type" : "Required string",
        "owner" : {
          "type" : "Required string",
          "website" : "string",
          "created_on" : "date-time",
          "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
          "links" : {
            "followers" : {
              "name" : "string",
              "href" : "uri"
            },
            "repositories" : {
              "name" : "string",
              "href" : "uri"
            },
            "following" : {
              "name" : "string",
              "href" : "uri"
            },
            "self" : {
              "name" : "string",
              "href" : "uri"
            },
            "html" : {
              "name" : "string",
              "href" : "uri"
            },
            "avatar" : {
              "name" : "string",
              "href" : "uri"
            }
          },
          "has_2fa_enabled" : "boolean",
          "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
          "display_name" : "string",
          "uuid" : "string",
          "username" : "string"
        },
        "is_private" : "\nIndicates whether the project is publicly accessible, or whether it is\nprivate to the team and consequently only visible to team members.\nNote that private projects cannot contain public repositories.",
        "updated_on" : "date-time",
        "created_on" : "date-time",
        "name" : "The name of the project.",
        "description" : "string",
        "links" : {
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_publicly_visible_repos" : "\nIndicates whether the project contains publicly visible repositories.\nNote that private projects cannot contain public repositories.",
        "uuid" : "The project's immutable id.",
        "key" : "The project's key."
      },
      "language" : "string",
      "uuid" : "The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.",
      "has_issues" : "boolean",
      "mainbranch" : {
        "name" : "The name of the ref.",
        "links" : {
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "commits" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "type" : "Required string",
        "target" : {
          "type" : "Required string",
          "date" : "date-time",
          "summary" : {
            "markup" : "The type of markup language the raw content is to be interpreted in.",
            "raw" : "The text as it was typed by a user.",
            "html" : "The user's content rendered as HTML."
          },
          "author" : {
            "type" : "Required string",
            "raw" : "The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.",
            "user" : {
              "type" : "Required string",
              "website" : "string",
              "created_on" : "date-time",
              "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
              "links" : {
                "followers" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "repositories" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "following" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "self" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "html" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "avatar" : {
                  "name" : "string",
                  "href" : "uri"
                }
              },
              "has_2fa_enabled" : "boolean",
              "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
              "display_name" : "string",
              "uuid" : "string",
              "username" : "string"
            }
          },
          "message" : "string",
          "hash" : "string",
          "parents" : [ "base_commit" ],
          "repository" : "repository",
          "participants" : [ {
            "type" : "Required string",
            "approved" : "boolean",
            "role" : "string. Possible values: PARTICIPANT | REVIEWER",
            "state" : "string. Possible values: approved | changes_requested",
            "user" : {
              "type" : "Required string",
              "website" : "string",
              "created_on" : "date-time",
              "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
              "links" : {
                "followers" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "repositories" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "following" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "self" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "html" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "avatar" : {
                  "name" : "string",
                  "href" : "uri"
                }
              },
              "has_2fa_enabled" : "boolean",
              "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
              "display_name" : "string",
              "uuid" : "string",
              "username" : "string",
              "account_id" : "The user's Atlassian account ID.",
              "is_staff" : "boolean"
            },
            "participated_on" : "The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented."
          } ]
        },
        "default_merge_strategy" : "The default merge strategy for pull requests targeting this branch.",
        "merge_strategies" : [ "string. Possible values: merge_commit | squash | fast_forward" ]
      },
      "full_name" : "The concatenation of the repository owner's username and the slugified name, e.g. \"evzijst/interruptingcow\". This is the same string used in Bitbucket URLs.",
      "has_wiki" : "boolean",
      "size" : "integer",
      "created_on" : "date-time",
      "name" : "string",
      "links" : {
        "forks" : {
          "name" : "string",
          "href" : "uri"
        },
        "downloads" : {
          "name" : "string",
          "href" : "uri"
        },
        "clone" : [ {
          "name" : "string",
          "href" : "uri"
        } ],
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "commits" : {
          "name" : "string",
          "href" : "uri"
        },
        "watchers" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        },
        "hooks" : {
          "name" : "string",
          "href" : "uri"
        },
        "pullrequests" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "scm" : "string. Possible values: git"
    },
    "title" : "string",
    "priority" : "string. Possible values: trivial | minor | major | critical | blocker",
    "version" : {
      "type" : "Required string",
      "name" : "string",
      "links" : {
        "self" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "id" : "integer"
    },
    "content" : {
      "markup" : "The type of markup language the raw content is to be interpreted in.",
      "raw" : "The text as it was typed by a user.",
      "html" : "The user's content rendered as HTML."
    },
    "component" : {
      "type" : "Required string",
      "name" : "string",
      "links" : {
        "self" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "id" : "integer"
    },
    "milestone" : {
      "type" : "Required string",
      "name" : "string",
      "links" : {
        "self" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "id" : "integer"
    },
    "created_on" : "date-time",
    "links" : {
      "comments" : {
        "name" : "string",
        "href" : "uri"
      },
      "attachments" : {
        "name" : "string",
        "href" : "uri"
      },
      "watch" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "vote" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "votes" : "integer",
    "id" : "integer",
    "assignee" : {
      "type" : "Required string",
      "website" : "string",
      "created_on" : "date-time",
      "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
      "links" : {
        "followers" : {
          "name" : "string",
          "href" : "uri"
        },
        "repositories" : {
          "name" : "string",
          "href" : "uri"
        },
        "following" : {
          "name" : "string",
          "href" : "uri"
        },
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "has_2fa_enabled" : "boolean",
      "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
      "display_name" : "string",
      "uuid" : "string",
      "username" : "string",
      "account_id" : "The user's Atlassian account ID.",
      "is_staff" : "boolean"
    },
    "state" : "string. Possible values: new | open | resolved | on hold | invalid | duplicate | wontfix | closed"
  }
}

create_or_update_commit_report

Creates or updates a report for the specified commit.

To upload a report, make sure to generate an ID that is unique across all reports for that commit. If you want to use an existing id from your own system, we recommend prefixing it with your system's name to avoid collisions, for example, mySystem-001.

Please refer to the Code Insights documentation for more information.

Parameters

commit (required)

The commit the report belongs to.

Type: string

repo_slug (required)

The repository.

Type: string

reportId (required)

Either the uuid or external-id of the report.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

$body

The report to create or update

Type: object

{
  "type" : "Required string",
  "updated_on" : "The timestamp when the report was updated.",
  "data" : [ {
    "type" : "The type of data contained in the value field. If not provided, then the value will be detected as a boolean, number or string.",
    "title" : "A string describing what this data field represents.",
    "value" : { }
  } ],
  "logo_url" : "A URL to the report logo. If none is provided, the default insights logo will be used.",
  "remote_link_enabled" : "If enabled, a remote link is created in Jira for the issue associated with the commit the report belongs to.",
  "link" : "A URL linking to the results of the report in an external tool.",
  "external_id" : "ID of the report provided by the report creator. It can be used to identify the report as an alternative to it's generated uuid. It is not used by Bitbucket, but only by the report creator for updating or deleting this specific report. Needs to be unique.",
  "reporter" : "A string to describe the tool or company who created the report.",
  "report_type" : "The type of the report.",
  "title" : "The title of the report.",
  "uuid" : "The UUID that can be used to identify the report.",
  "result" : "The state of the report. May be set to PENDING and later updated.",
  "created_on" : "The timestamp when the report was created.",
  "details" : "A string to describe the purpose of the report."
}

create_pipeline_known_host

Create a repository level known host.

Parameters

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

$body

The known host to create.

Type: object

{
  "type" : "Required string",
  "public_key" : {
    "type" : "Required string",
    "key_type" : "The type of the public key.",
    "md5_fingerprint" : "The MD5 fingerprint of the public key.",
    "sha256_fingerprint" : "The SHA-256 fingerprint of the public key.",
    "key" : "The base64 encoded public key."
  },
  "hostname" : "The hostname of the known host.",
  "uuid" : "The UUID identifying the known host."
}

create_pipeline_schedule

Create a schedule for the given repository.

Parameters

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

$body

The schedule to create.

Type: object

{
  "type" : "Required string",
  "updated_on" : "The timestamp when the schedule was updated.",
  "created_on" : "The timestamp when the schedule was created.",
  "selector" : {
    "type" : "The type of selector.",
    "pattern" : "The name of the matching pipeline definition."
  },
  "uuid" : "The UUID identifying the schedule.",
  "cron_pattern" : "The cron expression that the schedule applies.",
  "enabled" : "Whether the schedule is enabled.",
  "target" : {
    "type" : "Required string"
  }
}

create_pipeline_variable

Create a repository level variable.

Parameters

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

$body

The variable to create.

Type: object

{
  "type" : "Required string",
  "uuid" : "The UUID identifying the variable.",
  "value" : "The value of the variable. If the variable is secured, this will be empty.",
  "secured" : "If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.",
  "key" : "The unique name of the variable."
}

create_project

Creates a new project.

Note that the avatar has to be embedded as either a data-url or a URL to an external image.

Parameters

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

$body

Type: object

{
  "type" : "Required string",
  "owner" : {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string"
  },
  "is_private" : "\nIndicates whether the project is publicly accessible, or whether it is\nprivate to the team and consequently only visible to team members.\nNote that private projects cannot contain public repositories.",
  "updated_on" : "date-time",
  "created_on" : "date-time",
  "name" : "The name of the project.",
  "description" : "string",
  "links" : {
    "html" : {
      "name" : "string",
      "href" : "uri"
    },
    "avatar" : {
      "name" : "string",
      "href" : "uri"
    }
  },
  "has_publicly_visible_repos" : "\nIndicates whether the project contains publicly visible repositories.\nNote that private projects cannot contain public repositories.",
  "uuid" : "The project's immutable id.",
  "key" : "The project's key."
}

create_pull_request

Creates a new pull request where the destination repository is this repository and the author is the authenticated user.

The minimum required fields to create a pull request are title and source, specified by a branch name.

If the pull request's destination is not specified, it will default to the repository.mainbranch. To open a pull request to a different branch, say from a feature branch to a staging branch, specify a destination (same format as the source):

Reviewers can be specified by adding an array of user objects as the reviewers property.

Other fields:

  • description - a string
  • close_source_branch - boolean that specifies if the source branch should be closed upon merging
Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

$body

The new pull request.

The request URL you POST to becomes the destination repository URL. For this reason, you must specify an explicit source repository in the request object if you want to pull from a different repository (fork).

Since not all elements are required or even mutable, you only need to include the elements you want to initialize, such as the source branch and the title.

Type: object

{
  "type" : "Required string",
  "summary" : {
    "markup" : "The type of markup language the raw content is to be interpreted in.",
    "raw" : "The text as it was typed by a user.",
    "html" : "The user's content rendered as HTML."
  },
  "comment_count" : "The number of comments for a specific pull request.",
  "updated_on" : "The ISO8601 timestamp the request was last updated.",
  "reason" : "Explains why a pull request was declined. This field is only applicable to pull requests in rejected state.",
  "author" : {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string"
  },
  "destination" : {
    "commit" : {
      "hash" : "string"
    },
    "repository" : {
      "type" : "Required string",
      "is_private" : "boolean",
      "owner" : {
        "type" : "Required string",
        "website" : "string",
        "created_on" : "date-time",
        "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
        "links" : {
          "followers" : {
            "name" : "string",
            "href" : "uri"
          },
          "repositories" : {
            "name" : "string",
            "href" : "uri"
          },
          "following" : {
            "name" : "string",
            "href" : "uri"
          },
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_2fa_enabled" : "boolean",
        "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
        "display_name" : "string",
        "uuid" : "string",
        "username" : "string"
      },
      "updated_on" : "date-time",
      "parent" : "repository",
      "fork_policy" : "\nControls the rules for forking this repository.\n\n* **allow_forks**: unrestricted forking\n* **no_public_forks**: restrict forking to private forks (forks cannot\n  be made public later)\n* **no_forks**: deny all forking\n",
      "description" : "string",
      "project" : {
        "type" : "Required string",
        "owner" : {
          "type" : "Required string",
          "website" : "string",
          "created_on" : "date-time",
          "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
          "links" : {
            "followers" : {
              "name" : "string",
              "href" : "uri"
            },
            "repositories" : {
              "name" : "string",
              "href" : "uri"
            },
            "following" : {
              "name" : "string",
              "href" : "uri"
            },
            "self" : {
              "name" : "string",
              "href" : "uri"
            },
            "html" : {
              "name" : "string",
              "href" : "uri"
            },
            "avatar" : {
              "name" : "string",
              "href" : "uri"
            }
          },
          "has_2fa_enabled" : "boolean",
          "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
          "display_name" : "string",
          "uuid" : "string",
          "username" : "string"
        },
        "is_private" : "\nIndicates whether the project is publicly accessible, or whether it is\nprivate to the team and consequently only visible to team members.\nNote that private projects cannot contain public repositories.",
        "updated_on" : "date-time",
        "created_on" : "date-time",
        "name" : "The name of the project.",
        "description" : "string",
        "links" : {
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_publicly_visible_repos" : "\nIndicates whether the project contains publicly visible repositories.\nNote that private projects cannot contain public repositories.",
        "uuid" : "The project's immutable id.",
        "key" : "The project's key."
      },
      "language" : "string",
      "uuid" : "The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.",
      "has_issues" : "boolean",
      "mainbranch" : {
        "name" : "The name of the ref.",
        "links" : {
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "commits" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "type" : "Required string",
        "target" : {
          "type" : "Required string",
          "date" : "date-time",
          "summary" : {
            "markup" : "The type of markup language the raw content is to be interpreted in.",
            "raw" : "The text as it was typed by a user.",
            "html" : "The user's content rendered as HTML."
          },
          "author" : {
            "type" : "Required string",
            "raw" : "The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.",
            "user" : {
              "type" : "Required string",
              "website" : "string",
              "created_on" : "date-time",
              "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
              "links" : {
                "followers" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "repositories" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "following" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "self" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "html" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "avatar" : {
                  "name" : "string",
                  "href" : "uri"
                }
              },
              "has_2fa_enabled" : "boolean",
              "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
              "display_name" : "string",
              "uuid" : "string",
              "username" : "string"
            }
          },
          "message" : "string",
          "hash" : "string",
          "parents" : [ "base_commit" ],
          "repository" : "repository",
          "participants" : [ {
            "type" : "Required string",
            "approved" : "boolean",
            "role" : "string. Possible values: PARTICIPANT | REVIEWER",
            "state" : "string. Possible values: approved | changes_requested",
            "user" : {
              "type" : "Required string",
              "website" : "string",
              "created_on" : "date-time",
              "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
              "links" : {
                "followers" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "repositories" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "following" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "self" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "html" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "avatar" : {
                  "name" : "string",
                  "href" : "uri"
                }
              },
              "has_2fa_enabled" : "boolean",
              "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
              "display_name" : "string",
              "uuid" : "string",
              "username" : "string",
              "account_id" : "The user's Atlassian account ID.",
              "is_staff" : "boolean"
            },
            "participated_on" : "The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented."
          } ]
        },
        "default_merge_strategy" : "The default merge strategy for pull requests targeting this branch.",
        "merge_strategies" : [ "string. Possible values: merge_commit | squash | fast_forward" ]
      },
      "full_name" : "The concatenation of the repository owner's username and the slugified name, e.g. \"evzijst/interruptingcow\". This is the same string used in Bitbucket URLs.",
      "has_wiki" : "boolean",
      "size" : "integer",
      "created_on" : "date-time",
      "name" : "string",
      "links" : {
        "forks" : {
          "name" : "string",
          "href" : "uri"
        },
        "downloads" : {
          "name" : "string",
          "href" : "uri"
        },
        "clone" : [ {
          "name" : "string",
          "href" : "uri"
        } ],
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "commits" : {
          "name" : "string",
          "href" : "uri"
        },
        "watchers" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        },
        "hooks" : {
          "name" : "string",
          "href" : "uri"
        },
        "pullrequests" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "scm" : "string. Possible values: git"
    },
    "branch" : {
      "default_merge_strategy" : "The default merge strategy, when this endpoint is the destination of the pull request.",
      "name" : "string",
      "merge_strategies" : [ "string. Possible values: merge_commit | squash | fast_forward" ]
    }
  },
  "source" : {
    "commit" : {
      "hash" : "string"
    },
    "repository" : {
      "type" : "Required string",
      "is_private" : "boolean",
      "owner" : {
        "type" : "Required string",
        "website" : "string",
        "created_on" : "date-time",
        "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
        "links" : {
          "followers" : {
            "name" : "string",
            "href" : "uri"
          },
          "repositories" : {
            "name" : "string",
            "href" : "uri"
          },
          "following" : {
            "name" : "string",
            "href" : "uri"
          },
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_2fa_enabled" : "boolean",
        "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
        "display_name" : "string",
        "uuid" : "string",
        "username" : "string"
      },
      "updated_on" : "date-time",
      "parent" : "repository",
      "fork_policy" : "\nControls the rules for forking this repository.\n\n* **allow_forks**: unrestricted forking\n* **no_public_forks**: restrict forking to private forks (forks cannot\n  be made public later)\n* **no_forks**: deny all forking\n",
      "description" : "string",
      "project" : {
        "type" : "Required string",
        "owner" : {
          "type" : "Required string",
          "website" : "string",
          "created_on" : "date-time",
          "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
          "links" : {
            "followers" : {
              "name" : "string",
              "href" : "uri"
            },
            "repositories" : {
              "name" : "string",
              "href" : "uri"
            },
            "following" : {
              "name" : "string",
              "href" : "uri"
            },
            "self" : {
              "name" : "string",
              "href" : "uri"
            },
            "html" : {
              "name" : "string",
              "href" : "uri"
            },
            "avatar" : {
              "name" : "string",
              "href" : "uri"
            }
          },
          "has_2fa_enabled" : "boolean",
          "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
          "display_name" : "string",
          "uuid" : "string",
          "username" : "string"
        },
        "is_private" : "\nIndicates whether the project is publicly accessible, or whether it is\nprivate to the team and consequently only visible to team members.\nNote that private projects cannot contain public repositories.",
        "updated_on" : "date-time",
        "created_on" : "date-time",
        "name" : "The name of the project.",
        "description" : "string",
        "links" : {
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_publicly_visible_repos" : "\nIndicates whether the project contains publicly visible repositories.\nNote that private projects cannot contain public repositories.",
        "uuid" : "The project's immutable id.",
        "key" : "The project's key."
      },
      "language" : "string",
      "uuid" : "The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.",
      "has_issues" : "boolean",
      "mainbranch" : {
        "name" : "The name of the ref.",
        "links" : {
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "commits" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "type" : "Required string",
        "target" : {
          "type" : "Required string",
          "date" : "date-time",
          "summary" : {
            "markup" : "The type of markup language the raw content is to be interpreted in.",
            "raw" : "The text as it was typed by a user.",
            "html" : "The user's content rendered as HTML."
          },
          "author" : {
            "type" : "Required string",
            "raw" : "The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.",
            "user" : {
              "type" : "Required string",
              "website" : "string",
              "created_on" : "date-time",
              "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
              "links" : {
                "followers" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "repositories" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "following" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "self" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "html" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "avatar" : {
                  "name" : "string",
                  "href" : "uri"
                }
              },
              "has_2fa_enabled" : "boolean",
              "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
              "display_name" : "string",
              "uuid" : "string",
              "username" : "string"
            }
          },
          "message" : "string",
          "hash" : "string",
          "parents" : [ "base_commit" ],
          "repository" : "repository",
          "participants" : [ {
            "type" : "Required string",
            "approved" : "boolean",
            "role" : "string. Possible values: PARTICIPANT | REVIEWER",
            "state" : "string. Possible values: approved | changes_requested",
            "user" : {
              "type" : "Required string",
              "website" : "string",
              "created_on" : "date-time",
              "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
              "links" : {
                "followers" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "repositories" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "following" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "self" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "html" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "avatar" : {
                  "name" : "string",
                  "href" : "uri"
                }
              },
              "has_2fa_enabled" : "boolean",
              "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
              "display_name" : "string",
              "uuid" : "string",
              "username" : "string",
              "account_id" : "The user's Atlassian account ID.",
              "is_staff" : "boolean"
            },
            "participated_on" : "The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented."
          } ]
        },
        "default_merge_strategy" : "The default merge strategy for pull requests targeting this branch.",
        "merge_strategies" : [ "string. Possible values: merge_commit | squash | fast_forward" ]
      },
      "full_name" : "The concatenation of the repository owner's username and the slugified name, e.g. \"evzijst/interruptingcow\". This is the same string used in Bitbucket URLs.",
      "has_wiki" : "boolean",
      "size" : "integer",
      "created_on" : "date-time",
      "name" : "string",
      "links" : {
        "forks" : {
          "name" : "string",
          "href" : "uri"
        },
        "downloads" : {
          "name" : "string",
          "href" : "uri"
        },
        "clone" : [ {
          "name" : "string",
          "href" : "uri"
        } ],
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "commits" : {
          "name" : "string",
          "href" : "uri"
        },
        "watchers" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        },
        "hooks" : {
          "name" : "string",
          "href" : "uri"
        },
        "pullrequests" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "scm" : "string. Possible values: git"
    },
    "branch" : {
      "default_merge_strategy" : "The default merge strategy, when this endpoint is the destination of the pull request.",
      "name" : "string",
      "merge_strategies" : [ "string. Possible values: merge_commit | squash | fast_forward" ]
    }
  },
  "title" : "Title of the pull request.",
  "reviewers" : [ {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string"
  } ],
  "task_count" : "The number of open tasks for a specific pull request.",
  "closed_by" : {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string"
  },
  "rendered" : {
    "reason" : {
      "markup" : "The type of markup language the raw content is to be interpreted in.",
      "raw" : "The text as it was typed by a user.",
      "html" : "The user's content rendered as HTML."
    },
    "description" : {
      "markup" : "The type of markup language the raw content is to be interpreted in.",
      "raw" : "The text as it was typed by a user.",
      "html" : "The user's content rendered as HTML."
    },
    "title" : {
      "markup" : "The type of markup language the raw content is to be interpreted in.",
      "raw" : "The text as it was typed by a user.",
      "html" : "The user's content rendered as HTML."
    }
  },
  "created_on" : "The ISO8601 timestamp the request was created.",
  "links" : {
    "comments" : {
      "name" : "string",
      "href" : "uri"
    },
    "activity" : {
      "name" : "string",
      "href" : "uri"
    },
    "approve" : {
      "name" : "string",
      "href" : "uri"
    },
    "merge" : {
      "name" : "string",
      "href" : "uri"
    },
    "decline" : {
      "name" : "string",
      "href" : "uri"
    },
    "self" : {
      "name" : "string",
      "href" : "uri"
    },
    "commits" : {
      "name" : "string",
      "href" : "uri"
    },
    "html" : {
      "name" : "string",
      "href" : "uri"
    },
    "diff" : {
      "name" : "string",
      "href" : "uri"
    },
    "diffstat" : {
      "name" : "string",
      "href" : "uri"
    }
  },
  "close_source_branch" : "A boolean flag indicating if merging the pull request closes the source branch.",
  "id" : "The pull request's unique ID. Note that pull request IDs are only unique within their associated repository.",
  "state" : "The pull request's current status.",
  "merge_commit" : {
    "hash" : "string"
  },
  "participants" : [ {
    "type" : "Required string",
    "approved" : "boolean",
    "role" : "string. Possible values: PARTICIPANT | REVIEWER",
    "state" : "string. Possible values: approved | changes_requested",
    "user" : {
      "type" : "Required string",
      "website" : "string",
      "created_on" : "date-time",
      "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
      "links" : {
        "followers" : {
          "name" : "string",
          "href" : "uri"
        },
        "repositories" : {
          "name" : "string",
          "href" : "uri"
        },
        "following" : {
          "name" : "string",
          "href" : "uri"
        },
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "has_2fa_enabled" : "boolean",
      "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
      "display_name" : "string",
      "uuid" : "string",
      "username" : "string",
      "account_id" : "The user's Atlassian account ID.",
      "is_staff" : "boolean"
    },
    "participated_on" : "The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented."
  } ]
}

create_pull_request_comment

Creates a new pull request comment.

Returns the newly created pull request comment.

Parameters

pull_request_id (required)

The id of the pull request.

Type: integer

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

$body

The comment object.

Type: object

{
  "type" : "Required string",
  "updated_on" : "date-time",
  "parent" : "comment",
  "deleted" : "boolean",
  "inline" : {
    "path" : "The path of the file this comment is anchored to.",
    "from" : "The comment's anchor line in the old version of the file.",
    "to" : "The comment's anchor line in the new version of the file. If the 'from' line is also provided, this value will be removed."
  },
  "created_on" : "date-time",
  "links" : {
    "code" : {
      "name" : "string",
      "href" : "uri"
    },
    "self" : {
      "name" : "string",
      "href" : "uri"
    },
    "html" : {
      "name" : "string",
      "href" : "uri"
    }
  },
  "id" : "integer",
  "user" : {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string",
    "account_id" : "The user's Atlassian account ID.",
    "is_staff" : "boolean"
  },
  "content" : {
    "markup" : "The type of markup language the raw content is to be interpreted in.",
    "raw" : "The text as it was typed by a user.",
    "html" : "The user's content rendered as HTML."
  },
  "pullrequest" : {
    "type" : "Required string",
    "summary" : {
      "markup" : "The type of markup language the raw content is to be interpreted in.",
      "raw" : "The text as it was typed by a user.",
      "html" : "The user's content rendered as HTML."
    },
    "comment_count" : "The number of comments for a specific pull request.",
    "updated_on" : "The ISO8601 timestamp the request was last updated.",
    "reason" : "Explains why a pull request was declined. This field is only applicable to pull requests in rejected state.",
    "author" : {
      "type" : "Required string",
      "website" : "string",
      "created_on" : "date-time",
      "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
      "links" : {
        "followers" : {
          "name" : "string",
          "href" : "uri"
        },
        "repositories" : {
          "name" : "string",
          "href" : "uri"
        },
        "following" : {
          "name" : "string",
          "href" : "uri"
        },
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "has_2fa_enabled" : "boolean",
      "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
      "display_name" : "string",
      "uuid" : "string",
      "username" : "string"
    },
    "destination" : {
      "commit" : {
        "hash" : "string"
      },
      "repository" : {
        "type" : "Required string",
        "is_private" : "boolean",
        "owner" : {
          "type" : "Required string",
          "website" : "string",
          "created_on" : "date-time",
          "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
          "links" : {
            "followers" : {
              "name" : "string",
              "href" : "uri"
            },
            "repositories" : {
              "name" : "string",
              "href" : "uri"
            },
            "following" : {
              "name" : "string",
              "href" : "uri"
            },
            "self" : {
              "name" : "string",
              "href" : "uri"
            },
            "html" : {
              "name" : "string",
              "href" : "uri"
            },
            "avatar" : {
              "name" : "string",
              "href" : "uri"
            }
          },
          "has_2fa_enabled" : "boolean",
          "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
          "display_name" : "string",
          "uuid" : "string",
          "username" : "string"
        },
        "updated_on" : "date-time",
        "parent" : "repository",
        "fork_policy" : "\nControls the rules for forking this repository.\n\n* **allow_forks**: unrestricted forking\n* **no_public_forks**: restrict forking to private forks (forks cannot\n  be made public later)\n* **no_forks**: deny all forking\n",
        "description" : "string",
        "project" : {
          "type" : "Required string",
          "owner" : {
            "type" : "Required string",
            "website" : "string",
            "created_on" : "date-time",
            "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
            "links" : {
              "followers" : {
                "name" : "string",
                "href" : "uri"
              },
              "repositories" : {
                "name" : "string",
                "href" : "uri"
              },
              "following" : {
                "name" : "string",
                "href" : "uri"
              },
              "self" : {
                "name" : "string",
                "href" : "uri"
              },
              "html" : {
                "name" : "string",
                "href" : "uri"
              },
              "avatar" : {
                "name" : "string",
                "href" : "uri"
              }
            },
            "has_2fa_enabled" : "boolean",
            "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
            "display_name" : "string",
            "uuid" : "string",
            "username" : "string"
          },
          "is_private" : "\nIndicates whether the project is publicly accessible, or whether it is\nprivate to the team and consequently only visible to team members.\nNote that private projects cannot contain public repositories.",
          "updated_on" : "date-time",
          "created_on" : "date-time",
          "name" : "The name of the project.",
          "description" : "string",
          "links" : {
            "html" : {
              "name" : "string",
              "href" : "uri"
            },
            "avatar" : {
              "name" : "string",
              "href" : "uri"
            }
          },
          "has_publicly_visible_repos" : "\nIndicates whether the project contains publicly visible repositories.\nNote that private projects cannot contain public repositories.",
          "uuid" : "The project's immutable id.",
          "key" : "The project's key."
        },
        "language" : "string",
        "uuid" : "The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.",
        "has_issues" : "boolean",
        "mainbranch" : {
          "name" : "The name of the ref.",
          "links" : {
            "self" : {
              "name" : "string",
              "href" : "uri"
            },
            "commits" : {
              "name" : "string",
              "href" : "uri"
            },
            "html" : {
              "name" : "string",
              "href" : "uri"
            }
          },
          "type" : "Required string",
          "target" : {
            "type" : "Required string",
            "date" : "date-time",
            "summary" : {
              "markup" : "The type of markup language the raw content is to be interpreted in.",
              "raw" : "The text as it was typed by a user.",
              "html" : "The user's content rendered as HTML."
            },
            "author" : {
              "type" : "Required string",
              "raw" : "The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.",
              "user" : {
                "type" : "Required string",
                "website" : "string",
                "created_on" : "date-time",
                "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
                "links" : {
                  "followers" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "repositories" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "following" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "self" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "html" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "avatar" : {
                    "name" : "string",
                    "href" : "uri"
                  }
                },
                "has_2fa_enabled" : "boolean",
                "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
                "display_name" : "string",
                "uuid" : "string",
                "username" : "string"
              }
            },
            "message" : "string",
            "hash" : "string",
            "parents" : [ "base_commit" ],
            "repository" : "repository",
            "participants" : [ {
              "type" : "Required string",
              "approved" : "boolean",
              "role" : "string. Possible values: PARTICIPANT | REVIEWER",
              "state" : "string. Possible values: approved | changes_requested",
              "user" : {
                "type" : "Required string",
                "website" : "string",
                "created_on" : "date-time",
                "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
                "links" : {
                  "followers" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "repositories" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "following" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "self" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "html" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "avatar" : {
                    "name" : "string",
                    "href" : "uri"
                  }
                },
                "has_2fa_enabled" : "boolean",
                "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
                "display_name" : "string",
                "uuid" : "string",
                "username" : "string",
                "account_id" : "The user's Atlassian account ID.",
                "is_staff" : "boolean"
              },
              "participated_on" : "The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented."
            } ]
          },
          "default_merge_strategy" : "The default merge strategy for pull requests targeting this branch.",
          "merge_strategies" : [ "string. Possible values: merge_commit | squash | fast_forward" ]
        },
        "full_name" : "The concatenation of the repository owner's username and the slugified name, e.g. \"evzijst/interruptingcow\". This is the same string used in Bitbucket URLs.",
        "has_wiki" : "boolean",
        "size" : "integer",
        "created_on" : "date-time",
        "name" : "string",
        "links" : {
          "forks" : {
            "name" : "string",
            "href" : "uri"
          },
          "downloads" : {
            "name" : "string",
            "href" : "uri"
          },
          "clone" : [ {
            "name" : "string",
            "href" : "uri"
          } ],
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "commits" : {
            "name" : "string",
            "href" : "uri"
          },
          "watchers" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          },
          "hooks" : {
            "name" : "string",
            "href" : "uri"
          },
          "pullrequests" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "scm" : "string. Possible values: git"
      },
      "branch" : {
        "default_merge_strategy" : "The default merge strategy, when this endpoint is the destination of the pull request.",
        "name" : "string",
        "merge_strategies" : [ "string. Possible values: merge_commit | squash | fast_forward" ]
      }
    },
    "source" : {
      "commit" : {
        "hash" : "string"
      },
      "repository" : {
        "type" : "Required string",
        "is_private" : "boolean",
        "owner" : {
          "type" : "Required string",
          "website" : "string",
          "created_on" : "date-time",
          "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
          "links" : {
            "followers" : {
              "name" : "string",
              "href" : "uri"
            },
            "repositories" : {
              "name" : "string",
              "href" : "uri"
            },
            "following" : {
              "name" : "string",
              "href" : "uri"
            },
            "self" : {
              "name" : "string",
              "href" : "uri"
            },
            "html" : {
              "name" : "string",
              "href" : "uri"
            },
            "avatar" : {
              "name" : "string",
              "href" : "uri"
            }
          },
          "has_2fa_enabled" : "boolean",
          "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
          "display_name" : "string",
          "uuid" : "string",
          "username" : "string"
        },
        "updated_on" : "date-time",
        "parent" : "repository",
        "fork_policy" : "\nControls the rules for forking this repository.\n\n* **allow_forks**: unrestricted forking\n* **no_public_forks**: restrict forking to private forks (forks cannot\n  be made public later)\n* **no_forks**: deny all forking\n",
        "description" : "string",
        "project" : {
          "type" : "Required string",
          "owner" : {
            "type" : "Required string",
            "website" : "string",
            "created_on" : "date-time",
            "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
            "links" : {
              "followers" : {
                "name" : "string",
                "href" : "uri"
              },
              "repositories" : {
                "name" : "string",
                "href" : "uri"
              },
              "following" : {
                "name" : "string",
                "href" : "uri"
              },
              "self" : {
                "name" : "string",
                "href" : "uri"
              },
              "html" : {
                "name" : "string",
                "href" : "uri"
              },
              "avatar" : {
                "name" : "string",
                "href" : "uri"
              }
            },
            "has_2fa_enabled" : "boolean",
            "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
            "display_name" : "string",
            "uuid" : "string",
            "username" : "string"
          },
          "is_private" : "\nIndicates whether the project is publicly accessible, or whether it is\nprivate to the team and consequently only visible to team members.\nNote that private projects cannot contain public repositories.",
          "updated_on" : "date-time",
          "created_on" : "date-time",
          "name" : "The name of the project.",
          "description" : "string",
          "links" : {
            "html" : {
              "name" : "string",
              "href" : "uri"
            },
            "avatar" : {
              "name" : "string",
              "href" : "uri"
            }
          },
          "has_publicly_visible_repos" : "\nIndicates whether the project contains publicly visible repositories.\nNote that private projects cannot contain public repositories.",
          "uuid" : "The project's immutable id.",
          "key" : "The project's key."
        },
        "language" : "string",
        "uuid" : "The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.",
        "has_issues" : "boolean",
        "mainbranch" : {
          "name" : "The name of the ref.",
          "links" : {
            "self" : {
              "name" : "string",
              "href" : "uri"
            },
            "commits" : {
              "name" : "string",
              "href" : "uri"
            },
            "html" : {
              "name" : "string",
              "href" : "uri"
            }
          },
          "type" : "Required string",
          "target" : {
            "type" : "Required string",
            "date" : "date-time",
            "summary" : {
              "markup" : "The type of markup language the raw content is to be interpreted in.",
              "raw" : "The text as it was typed by a user.",
              "html" : "The user's content rendered as HTML."
            },
            "author" : {
              "type" : "Required string",
              "raw" : "The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.",
              "user" : {
                "type" : "Required string",
                "website" : "string",
                "created_on" : "date-time",
                "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
                "links" : {
                  "followers" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "repositories" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "following" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "self" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "html" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "avatar" : {
                    "name" : "string",
                    "href" : "uri"
                  }
                },
                "has_2fa_enabled" : "boolean",
                "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
                "display_name" : "string",
                "uuid" : "string",
                "username" : "string"
              }
            },
            "message" : "string",
            "hash" : "string",
            "parents" : [ "base_commit" ],
            "repository" : "repository",
            "participants" : [ {
              "type" : "Required string",
              "approved" : "boolean",
              "role" : "string. Possible values: PARTICIPANT | REVIEWER",
              "state" : "string. Possible values: approved | changes_requested",
              "user" : {
                "type" : "Required string",
                "website" : "string",
                "created_on" : "date-time",
                "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
                "links" : {
                  "followers" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "repositories" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "following" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "self" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "html" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "avatar" : {
                    "name" : "string",
                    "href" : "uri"
                  }
                },
                "has_2fa_enabled" : "boolean",
                "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
                "display_name" : "string",
                "uuid" : "string",
                "username" : "string",
                "account_id" : "The user's Atlassian account ID.",
                "is_staff" : "boolean"
              },
              "participated_on" : "The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented."
            } ]
          },
          "default_merge_strategy" : "The default merge strategy for pull requests targeting this branch.",
          "merge_strategies" : [ "string. Possible values: merge_commit | squash | fast_forward" ]
        },
        "full_name" : "The concatenation of the repository owner's username and the slugified name, e.g. \"evzijst/interruptingcow\". This is the same string used in Bitbucket URLs.",
        "has_wiki" : "boolean",
        "size" : "integer",
        "created_on" : "date-time",
        "name" : "string",
        "links" : {
          "forks" : {
            "name" : "string",
            "href" : "uri"
          },
          "downloads" : {
            "name" : "string",
            "href" : "uri"
          },
          "clone" : [ {
            "name" : "string",
            "href" : "uri"
          } ],
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "commits" : {
            "name" : "string",
            "href" : "uri"
          },
          "watchers" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          },
          "hooks" : {
            "name" : "string",
            "href" : "uri"
          },
          "pullrequests" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "scm" : "string. Possible values: git"
      },
      "branch" : {
        "default_merge_strategy" : "The default merge strategy, when this endpoint is the destination of the pull request.",
        "name" : "string",
        "merge_strategies" : [ "string. Possible values: merge_commit | squash | fast_forward" ]
      }
    },
    "title" : "Title of the pull request.",
    "reviewers" : [ {
      "type" : "Required string",
      "website" : "string",
      "created_on" : "date-time",
      "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
      "links" : {
        "followers" : {
          "name" : "string",
          "href" : "uri"
        },
        "repositories" : {
          "name" : "string",
          "href" : "uri"
        },
        "following" : {
          "name" : "string",
          "href" : "uri"
        },
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "has_2fa_enabled" : "boolean",
      "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
      "display_name" : "string",
      "uuid" : "string",
      "username" : "string"
    } ],
    "task_count" : "The number of open tasks for a specific pull request.",
    "closed_by" : {
      "type" : "Required string",
      "website" : "string",
      "created_on" : "date-time",
      "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
      "links" : {
        "followers" : {
          "name" : "string",
          "href" : "uri"
        },
        "repositories" : {
          "name" : "string",
          "href" : "uri"
        },
        "following" : {
          "name" : "string",
          "href" : "uri"
        },
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "has_2fa_enabled" : "boolean",
      "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
      "display_name" : "string",
      "uuid" : "string",
      "username" : "string"
    },
    "rendered" : {
      "reason" : {
        "markup" : "The type of markup language the raw content is to be interpreted in.",
        "raw" : "The text as it was typed by a user.",
        "html" : "The user's content rendered as HTML."
      },
      "description" : {
        "markup" : "The type of markup language the raw content is to be interpreted in.",
        "raw" : "The text as it was typed by a user.",
        "html" : "The user's content rendered as HTML."
      },
      "title" : {
        "markup" : "The type of markup language the raw content is to be interpreted in.",
        "raw" : "The text as it was typed by a user.",
        "html" : "The user's content rendered as HTML."
      }
    },
    "created_on" : "The ISO8601 timestamp the request was created.",
    "links" : {
      "comments" : {
        "name" : "string",
        "href" : "uri"
      },
      "activity" : {
        "name" : "string",
        "href" : "uri"
      },
      "approve" : {
        "name" : "string",
        "href" : "uri"
      },
      "merge" : {
        "name" : "string",
        "href" : "uri"
      },
      "decline" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "commits" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "diff" : {
        "name" : "string",
        "href" : "uri"
      },
      "diffstat" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "close_source_branch" : "A boolean flag indicating if merging the pull request closes the source branch.",
    "id" : "The pull request's unique ID. Note that pull request IDs are only unique within their associated repository.",
    "state" : "The pull request's current status.",
    "merge_commit" : {
      "hash" : "string"
    },
    "participants" : [ {
      "type" : "Required string",
      "approved" : "boolean",
      "role" : "string. Possible values: PARTICIPANT | REVIEWER",
      "state" : "string. Possible values: approved | changes_requested",
      "user" : {
        "type" : "Required string",
        "website" : "string",
        "created_on" : "date-time",
        "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
        "links" : {
          "followers" : {
            "name" : "string",
            "href" : "uri"
          },
          "repositories" : {
            "name" : "string",
            "href" : "uri"
          },
          "following" : {
            "name" : "string",
            "href" : "uri"
          },
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_2fa_enabled" : "boolean",
        "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
        "display_name" : "string",
        "uuid" : "string",
        "username" : "string",
        "account_id" : "The user's Atlassian account ID.",
        "is_staff" : "boolean"
      },
      "participated_on" : "The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented."
    } ]
  }
}

create_repository

Creates a new repository.

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 as shown in the examples below:

The project must be assigned for all repositories. If the project is not provided, the repository is automatically assigned to the oldest project in the workspace.

Note: In the examples above, the workspace ID teamsinspace, and/or the repository name hablanding can be replaced by UUIDs.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

$body

The repository that is to be created. Note that most object elements are optional. Elements "owner" and "full_name" are ignored as the URL implies them.

Type: object

{
  "type" : "Required string",
  "is_private" : "boolean",
  "owner" : {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string"
  },
  "updated_on" : "date-time",
  "parent" : "repository",
  "fork_policy" : "\nControls the rules for forking this repository.\n\n* **allow_forks**: unrestricted forking\n* **no_public_forks**: restrict forking to private forks (forks cannot\n  be made public later)\n* **no_forks**: deny all forking\n",
  "description" : "string",
  "project" : {
    "type" : "Required string",
    "owner" : {
      "type" : "Required string",
      "website" : "string",
      "created_on" : "date-time",
      "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
      "links" : {
        "followers" : {
          "name" : "string",
          "href" : "uri"
        },
        "repositories" : {
          "name" : "string",
          "href" : "uri"
        },
        "following" : {
          "name" : "string",
          "href" : "uri"
        },
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "has_2fa_enabled" : "boolean",
      "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
      "display_name" : "string",
      "uuid" : "string",
      "username" : "string"
    },
    "is_private" : "\nIndicates whether the project is publicly accessible, or whether it is\nprivate to the team and consequently only visible to team members.\nNote that private projects cannot contain public repositories.",
    "updated_on" : "date-time",
    "created_on" : "date-time",
    "name" : "The name of the project.",
    "description" : "string",
    "links" : {
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_publicly_visible_repos" : "\nIndicates whether the project contains publicly visible repositories.\nNote that private projects cannot contain public repositories.",
    "uuid" : "The project's immutable id.",
    "key" : "The project's key."
  },
  "language" : "string",
  "uuid" : "The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.",
  "has_issues" : "boolean",
  "mainbranch" : {
    "name" : "The name of the ref.",
    "links" : {
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "commits" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "type" : "Required string",
    "target" : {
      "type" : "Required string",
      "date" : "date-time",
      "summary" : {
        "markup" : "The type of markup language the raw content is to be interpreted in.",
        "raw" : "The text as it was typed by a user.",
        "html" : "The user's content rendered as HTML."
      },
      "author" : {
        "type" : "Required string",
        "raw" : "The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.",
        "user" : {
          "type" : "Required string",
          "website" : "string",
          "created_on" : "date-time",
          "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
          "links" : {
            "followers" : {
              "name" : "string",
              "href" : "uri"
            },
            "repositories" : {
              "name" : "string",
              "href" : "uri"
            },
            "following" : {
              "name" : "string",
              "href" : "uri"
            },
            "self" : {
              "name" : "string",
              "href" : "uri"
            },
            "html" : {
              "name" : "string",
              "href" : "uri"
            },
            "avatar" : {
              "name" : "string",
              "href" : "uri"
            }
          },
          "has_2fa_enabled" : "boolean",
          "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
          "display_name" : "string",
          "uuid" : "string",
          "username" : "string"
        }
      },
      "message" : "string",
      "hash" : "string",
      "parents" : [ "base_commit" ],
      "repository" : "repository",
      "participants" : [ {
        "type" : "Required string",
        "approved" : "boolean",
        "role" : "string. Possible values: PARTICIPANT | REVIEWER",
        "state" : "string. Possible values: approved | changes_requested",
        "user" : {
          "type" : "Required string",
          "website" : "string",
          "created_on" : "date-time",
          "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
          "links" : {
            "followers" : {
              "name" : "string",
              "href" : "uri"
            },
            "repositories" : {
              "name" : "string",
              "href" : "uri"
            },
            "following" : {
              "name" : "string",
              "href" : "uri"
            },
            "self" : {
              "name" : "string",
              "href" : "uri"
            },
            "html" : {
              "name" : "string",
              "href" : "uri"
            },
            "avatar" : {
              "name" : "string",
              "href" : "uri"
            }
          },
          "has_2fa_enabled" : "boolean",
          "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
          "display_name" : "string",
          "uuid" : "string",
          "username" : "string",
          "account_id" : "The user's Atlassian account ID.",
          "is_staff" : "boolean"
        },
        "participated_on" : "The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented."
      } ]
    },
    "default_merge_strategy" : "The default merge strategy for pull requests targeting this branch.",
    "merge_strategies" : [ "string. Possible values: merge_commit | squash | fast_forward" ]
  },
  "full_name" : "The concatenation of the repository owner's username and the slugified name, e.g. \"evzijst/interruptingcow\". This is the same string used in Bitbucket URLs.",
  "has_wiki" : "boolean",
  "size" : "integer",
  "created_on" : "date-time",
  "name" : "string",
  "links" : {
    "forks" : {
      "name" : "string",
      "href" : "uri"
    },
    "downloads" : {
      "name" : "string",
      "href" : "uri"
    },
    "clone" : [ {
      "name" : "string",
      "href" : "uri"
    } ],
    "self" : {
      "name" : "string",
      "href" : "uri"
    },
    "commits" : {
      "name" : "string",
      "href" : "uri"
    },
    "watchers" : {
      "name" : "string",
      "href" : "uri"
    },
    "html" : {
      "name" : "string",
      "href" : "uri"
    },
    "avatar" : {
      "name" : "string",
      "href" : "uri"
    },
    "hooks" : {
      "name" : "string",
      "href" : "uri"
    },
    "pullrequests" : {
      "name" : "string",
      "href" : "uri"
    }
  },
  "scm" : "string. Possible values: git"
}

create_repository_webhook

Creates a new webhook on the specified repository.

Note that this call requires the webhook scope, as well as any scope that applies to the events that the webhook subscribes to. In the example above that means: webhook, repository and issue.

Also note that the url must properly resolve and cannot be an internal, non-routed address.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

create_snippet

Creates a new snippet under the authenticated user's account.

Snippets can contain multiple files. Both text and binary files are supported.

Snippets are created with a multipart POST. Both multipart/form-data and multipart/related are supported. Both allow the creation of snippets with both meta data (title, etc), as well as multiple text and binary files.

The main difference is that multipart/related can use rich encoding for the meta data (currently JSON).

Parameters

$body

The new snippet object.

Type: object

{
  "type" : "Required string",
  "updated_on" : "date-time",
  "owner" : {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string"
  },
  "is_private" : "boolean",
  "creator" : {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string"
  },
  "created_on" : "date-time",
  "id" : "integer",
  "title" : "string",
  "scm" : "The DVCS used to store the snippet."
}

create_snippet_comment

Creates a new comment.

The only required field in the body is content.raw.

To create a threaded reply to an existing comment, include parent.id.

Parameters

encoded_id (required)

The snippet id.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

$body

The contents of the new comment.

Type: object

{
  "type" : "Required string",
  "updated_on" : "date-time",
  "owner" : {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string"
  },
  "is_private" : "boolean",
  "creator" : {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string"
  },
  "created_on" : "date-time",
  "id" : "integer",
  "title" : "string",
  "scm" : "The DVCS used to store the snippet."
}

create_tag

Creates a new tag in the specified repository.

The payload of the POST should consist of a JSON document that contains the name of the tag and the target hash.

This endpoint does support using short hash prefixes for the commit hash, but it may return a 400 response if the provided prefix is ambiguous. Using a full commit hash is the preferred approach.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

$body

Type: object

{
  "name" : "The name of the ref.",
  "links" : {
    "self" : {
      "name" : "string",
      "href" : "uri"
    },
    "commits" : {
      "name" : "string",
      "href" : "uri"
    },
    "html" : {
      "name" : "string",
      "href" : "uri"
    }
  },
  "type" : "Required string",
  "target" : {
    "type" : "Required string",
    "date" : "date-time",
    "summary" : {
      "markup" : "The type of markup language the raw content is to be interpreted in.",
      "raw" : "The text as it was typed by a user.",
      "html" : "The user's content rendered as HTML."
    },
    "author" : {
      "type" : "Required string",
      "raw" : "The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.",
      "user" : {
        "type" : "Required string",
        "website" : "string",
        "created_on" : "date-time",
        "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
        "links" : {
          "followers" : {
            "name" : "string",
            "href" : "uri"
          },
          "repositories" : {
            "name" : "string",
            "href" : "uri"
          },
          "following" : {
            "name" : "string",
            "href" : "uri"
          },
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_2fa_enabled" : "boolean",
        "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
        "display_name" : "string",
        "uuid" : "string",
        "username" : "string"
      }
    },
    "message" : "string",
    "hash" : "string",
    "parents" : [ "base_commit" ],
    "repository" : {
      "type" : "Required string",
      "is_private" : "boolean",
      "owner" : {
        "type" : "Required string",
        "website" : "string",
        "created_on" : "date-time",
        "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
        "links" : {
          "followers" : {
            "name" : "string",
            "href" : "uri"
          },
          "repositories" : {
            "name" : "string",
            "href" : "uri"
          },
          "following" : {
            "name" : "string",
            "href" : "uri"
          },
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_2fa_enabled" : "boolean",
        "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
        "display_name" : "string",
        "uuid" : "string",
        "username" : "string"
      },
      "updated_on" : "date-time",
      "parent" : "repository",
      "fork_policy" : "\nControls the rules for forking this repository.\n\n* **allow_forks**: unrestricted forking\n* **no_public_forks**: restrict forking to private forks (forks cannot\n  be made public later)\n* **no_forks**: deny all forking\n",
      "description" : "string",
      "project" : {
        "type" : "Required string",
        "owner" : {
          "type" : "Required string",
          "website" : "string",
          "created_on" : "date-time",
          "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
          "links" : {
            "followers" : {
              "name" : "string",
              "href" : "uri"
            },
            "repositories" : {
              "name" : "string",
              "href" : "uri"
            },
            "following" : {
              "name" : "string",
              "href" : "uri"
            },
            "self" : {
              "name" : "string",
              "href" : "uri"
            },
            "html" : {
              "name" : "string",
              "href" : "uri"
            },
            "avatar" : {
              "name" : "string",
              "href" : "uri"
            }
          },
          "has_2fa_enabled" : "boolean",
          "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
          "display_name" : "string",
          "uuid" : "string",
          "username" : "string"
        },
        "is_private" : "\nIndicates whether the project is publicly accessible, or whether it is\nprivate to the team and consequently only visible to team members.\nNote that private projects cannot contain public repositories.",
        "updated_on" : "date-time",
        "created_on" : "date-time",
        "name" : "The name of the project.",
        "description" : "string",
        "links" : {
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_publicly_visible_repos" : "\nIndicates whether the project contains publicly visible repositories.\nNote that private projects cannot contain public repositories.",
        "uuid" : "The project's immutable id.",
        "key" : "The project's key."
      },
      "language" : "string",
      "uuid" : "The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.",
      "has_issues" : "boolean",
      "mainbranch" : {
        "default_merge_strategy" : "The default merge strategy for pull requests targeting this branch.",
        "merge_strategies" : [ "string. Possible values: merge_commit | squash | fast_forward" ]
      },
      "full_name" : "The concatenation of the repository owner's username and the slugified name, e.g. \"evzijst/interruptingcow\". This is the same string used in Bitbucket URLs.",
      "has_wiki" : "boolean",
      "size" : "integer",
      "created_on" : "date-time",
      "name" : "string",
      "links" : {
        "forks" : {
          "name" : "string",
          "href" : "uri"
        },
        "downloads" : {
          "name" : "string",
          "href" : "uri"
        },
        "clone" : [ {
          "name" : "string",
          "href" : "uri"
        } ],
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "commits" : {
          "name" : "string",
          "href" : "uri"
        },
        "watchers" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        },
        "hooks" : {
          "name" : "string",
          "href" : "uri"
        },
        "pullrequests" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "scm" : "string. Possible values: git"
    },
    "participants" : [ {
      "type" : "Required string",
      "approved" : "boolean",
      "role" : "string. Possible values: PARTICIPANT | REVIEWER",
      "state" : "string. Possible values: approved | changes_requested",
      "user" : {
        "type" : "Required string",
        "website" : "string",
        "created_on" : "date-time",
        "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
        "links" : {
          "followers" : {
            "name" : "string",
            "href" : "uri"
          },
          "repositories" : {
            "name" : "string",
            "href" : "uri"
          },
          "following" : {
            "name" : "string",
            "href" : "uri"
          },
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_2fa_enabled" : "boolean",
        "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
        "display_name" : "string",
        "uuid" : "string",
        "username" : "string",
        "account_id" : "The user's Atlassian account ID.",
        "is_staff" : "boolean"
      },
      "participated_on" : "The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented."
    } ]
  },
  "date" : "The date that the tag was created, if available",
  "tagger" : {
    "type" : "Required string",
    "raw" : "The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.",
    "user" : {
      "type" : "Required string",
      "website" : "string",
      "created_on" : "date-time",
      "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
      "links" : {
        "followers" : {
          "name" : "string",
          "href" : "uri"
        },
        "repositories" : {
          "name" : "string",
          "href" : "uri"
        },
        "following" : {
          "name" : "string",
          "href" : "uri"
        },
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "has_2fa_enabled" : "boolean",
      "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
      "display_name" : "string",
      "uuid" : "string",
      "username" : "string"
    }
  },
  "message" : "The message associated with the tag, if available."
}

create_workspace_snippet

Identical to /snippets, except that the new snippet will be created under the workspace specified in the path parameter {workspace}.

Parameters

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

$body

The new snippet object.

Type: object

{
  "type" : "Required string",
  "updated_on" : "date-time",
  "owner" : {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string"
  },
  "is_private" : "boolean",
  "creator" : {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string"
  },
  "created_on" : "date-time",
  "id" : "integer",
  "title" : "string",
  "scm" : "The DVCS used to store the snippet."
}

create_workspace_variable

Create a workspace level variable.

Parameters

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

$body

The variable to create.

Type: object

{
  "type" : "Required string",
  "uuid" : "The UUID identifying the variable.",
  "value" : "The value of the variable. If the variable is secured, this will be empty.",
  "secured" : "If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.",
  "key" : "The unique name of the variable."
}

create_workspace_webhook

Creates a new webhook on the specified workspace.

Workspace webhooks are fired for events from all repositories contained by that workspace.

Note that only owners can install webhooks on workspaces.

Parameters

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

decline_pull_request

Declines the pull request.

Parameters

pull_request_id (required)

The id of the pull request.

Type: integer

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

delete_application_property_value

Delete an application property value stored against a repository.

Parameters

app_key (required)

The key of the Connect app.

Type: string

property_name (required)

The name of the property.

Type: string

repo_slug (required)

The repository.

Type: string

workspace (required)

The repository container; either the workspace slug or the UUID in curly braces.

Type: string

delete_branch

Delete a branch in the specified repository.

The main branch is not allowed to be deleted and will return a 400 response.

The branch name should not include any prefixes (e.g. refs/heads).

Parameters

name (required)

The name of the branch.

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

delete_branch_restriction

Deletes an existing branch restriction rule.

Parameters

id (required)

The restriction rule's id

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

delete_cache

Delete a repository cache.

Parameters

cache_uuid (required)

The UUID of the cache to delete.

Type: string

repo_slug (required)

The repository.

Type: string

workspace (required)

The account.

Type: string

delete_commit_application_property_value

Delete an application property value stored against a commit.

Parameters

app_key (required)

The key of the Connect app.

Type: string

commit (required)

The commit.

Type: string

property_name (required)

The name of the property.

Type: string

repo_slug (required)

The repository.

Type: string

workspace (required)

The repository container; either the workspace slug or the UUID in curly braces.

Type: string

delete_commit_report

Deletes a single Report matching the provided ID.

Parameters

commit (required)

The commit the report belongs to.

Type: string

repo_slug (required)

The repository.

Type: string

reportId (required)

Either the uuid or external-id of the report.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

delete_commit_report_annotation

Deletes a single Annotation matching the provided ID.

Parameters

annotationId (required)

Either the uuid or external-id of the annotation.

Type: string

commit (required)

The commit the annotation belongs to.

Type: string

repo_slug (required)

The repository.

Type: string

reportId (required)

Either the uuid or external-id of the annotation.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

delete_deploy_key

This deletes a deploy key from a repository.

Parameters

key_id (required)

The key ID matching the deploy key.

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

delete_deployment_variable

Delete a deployment environment level variable.

Parameters

environment_uuid (required)

The environment.

Type: string

repo_slug (required)

The repository.

Type: string

variable_uuid (required)

The UUID of the variable to delete.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

delete_download_artifact

Deletes the specified download artifact from the repository.

Parameters

filename (required)

Name of the file.

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

delete_environment

Delete an environment

Parameters

environment_uuid (required)

The environment UUID.

Type: string

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

delete_issue

Deletes the specified issue. This requires write access to the repository.

Parameters

issue_id (required)

The issue id

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

delete_issue_attachment

Delete an attachment for an issue

Parameters

issue_id (required)

The issue id

Type: string

path (required)

Path to the file.

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

delete_issue_comment

Deletes the specified comment.

Parameters

comment_id (required)

The id of the comment.

Type: integer

issue_id (required)

The issue id

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

$body

The updated comment.

Type: object

{
  "type" : "Required string",
  "updated_on" : "date-time",
  "parent" : "comment",
  "deleted" : "boolean",
  "inline" : {
    "path" : "The path of the file this comment is anchored to.",
    "from" : "The comment's anchor line in the old version of the file.",
    "to" : "The comment's anchor line in the new version of the file. If the 'from' line is also provided, this value will be removed."
  },
  "created_on" : "date-time",
  "links" : {
    "code" : {
      "name" : "string",
      "href" : "uri"
    },
    "self" : {
      "name" : "string",
      "href" : "uri"
    },
    "html" : {
      "name" : "string",
      "href" : "uri"
    }
  },
  "id" : "integer",
  "user" : {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string",
    "account_id" : "The user's Atlassian account ID.",
    "is_staff" : "boolean"
  },
  "content" : {
    "markup" : "The type of markup language the raw content is to be interpreted in.",
    "raw" : "The text as it was typed by a user.",
    "html" : "The user's content rendered as HTML."
  },
  "issue" : {
    "type" : "Required string",
    "updated_on" : "date-time",
    "edited_on" : "date-time",
    "kind" : "string. Possible values: bug | enhancement | proposal | task",
    "reporter" : {
      "type" : "Required string",
      "website" : "string",
      "created_on" : "date-time",
      "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
      "links" : {
        "followers" : {
          "name" : "string",
          "href" : "uri"
        },
        "repositories" : {
          "name" : "string",
          "href" : "uri"
        },
        "following" : {
          "name" : "string",
          "href" : "uri"
        },
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "has_2fa_enabled" : "boolean",
      "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
      "display_name" : "string",
      "uuid" : "string",
      "username" : "string",
      "account_id" : "The user's Atlassian account ID.",
      "is_staff" : "boolean"
    },
    "repository" : {
      "type" : "Required string",
      "is_private" : "boolean",
      "owner" : {
        "type" : "Required string",
        "website" : "string",
        "created_on" : "date-time",
        "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
        "links" : {
          "followers" : {
            "name" : "string",
            "href" : "uri"
          },
          "repositories" : {
            "name" : "string",
            "href" : "uri"
          },
          "following" : {
            "name" : "string",
            "href" : "uri"
          },
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_2fa_enabled" : "boolean",
        "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
        "display_name" : "string",
        "uuid" : "string",
        "username" : "string"
      },
      "updated_on" : "date-time",
      "parent" : "repository",
      "fork_policy" : "\nControls the rules for forking this repository.\n\n* **allow_forks**: unrestricted forking\n* **no_public_forks**: restrict forking to private forks (forks cannot\n  be made public later)\n* **no_forks**: deny all forking\n",
      "description" : "string",
      "project" : {
        "type" : "Required string",
        "owner" : {
          "type" : "Required string",
          "website" : "string",
          "created_on" : "date-time",
          "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
          "links" : {
            "followers" : {
              "name" : "string",
              "href" : "uri"
            },
            "repositories" : {
              "name" : "string",
              "href" : "uri"
            },
            "following" : {
              "name" : "string",
              "href" : "uri"
            },
            "self" : {
              "name" : "string",
              "href" : "uri"
            },
            "html" : {
              "name" : "string",
              "href" : "uri"
            },
            "avatar" : {
              "name" : "string",
              "href" : "uri"
            }
          },
          "has_2fa_enabled" : "boolean",
          "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
          "display_name" : "string",
          "uuid" : "string",
          "username" : "string"
        },
        "is_private" : "\nIndicates whether the project is publicly accessible, or whether it is\nprivate to the team and consequently only visible to team members.\nNote that private projects cannot contain public repositories.",
        "updated_on" : "date-time",
        "created_on" : "date-time",
        "name" : "The name of the project.",
        "description" : "string",
        "links" : {
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_publicly_visible_repos" : "\nIndicates whether the project contains publicly visible repositories.\nNote that private projects cannot contain public repositories.",
        "uuid" : "The project's immutable id.",
        "key" : "The project's key."
      },
      "language" : "string",
      "uuid" : "The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.",
      "has_issues" : "boolean",
      "mainbranch" : {
        "name" : "The name of the ref.",
        "links" : {
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "commits" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "type" : "Required string",
        "target" : {
          "type" : "Required string",
          "date" : "date-time",
          "summary" : {
            "markup" : "The type of markup language the raw content is to be interpreted in.",
            "raw" : "The text as it was typed by a user.",
            "html" : "The user's content rendered as HTML."
          },
          "author" : {
            "type" : "Required string",
            "raw" : "The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.",
            "user" : {
              "type" : "Required string",
              "website" : "string",
              "created_on" : "date-time",
              "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
              "links" : {
                "followers" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "repositories" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "following" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "self" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "html" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "avatar" : {
                  "name" : "string",
                  "href" : "uri"
                }
              },
              "has_2fa_enabled" : "boolean",
              "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
              "display_name" : "string",
              "uuid" : "string",
              "username" : "string"
            }
          },
          "message" : "string",
          "hash" : "string",
          "parents" : [ "base_commit" ],
          "repository" : "repository",
          "participants" : [ {
            "type" : "Required string",
            "approved" : "boolean",
            "role" : "string. Possible values: PARTICIPANT | REVIEWER",
            "state" : "string. Possible values: approved | changes_requested",
            "user" : {
              "type" : "Required string",
              "website" : "string",
              "created_on" : "date-time",
              "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
              "links" : {
                "followers" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "repositories" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "following" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "self" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "html" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "avatar" : {
                  "name" : "string",
                  "href" : "uri"
                }
              },
              "has_2fa_enabled" : "boolean",
              "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
              "display_name" : "string",
              "uuid" : "string",
              "username" : "string",
              "account_id" : "The user's Atlassian account ID.",
              "is_staff" : "boolean"
            },
            "participated_on" : "The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented."
          } ]
        },
        "default_merge_strategy" : "The default merge strategy for pull requests targeting this branch.",
        "merge_strategies" : [ "string. Possible values: merge_commit | squash | fast_forward" ]
      },
      "full_name" : "The concatenation of the repository owner's username and the slugified name, e.g. \"evzijst/interruptingcow\". This is the same string used in Bitbucket URLs.",
      "has_wiki" : "boolean",
      "size" : "integer",
      "created_on" : "date-time",
      "name" : "string",
      "links" : {
        "forks" : {
          "name" : "string",
          "href" : "uri"
        },
        "downloads" : {
          "name" : "string",
          "href" : "uri"
        },
        "clone" : [ {
          "name" : "string",
          "href" : "uri"
        } ],
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "commits" : {
          "name" : "string",
          "href" : "uri"
        },
        "watchers" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        },
        "hooks" : {
          "name" : "string",
          "href" : "uri"
        },
        "pullrequests" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "scm" : "string. Possible values: git"
    },
    "title" : "string",
    "priority" : "string. Possible values: trivial | minor | major | critical | blocker",
    "version" : {
      "type" : "Required string",
      "name" : "string",
      "links" : {
        "self" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "id" : "integer"
    },
    "content" : {
      "markup" : "The type of markup language the raw content is to be interpreted in.",
      "raw" : "The text as it was typed by a user.",
      "html" : "The user's content rendered as HTML."
    },
    "component" : {
      "type" : "Required string",
      "name" : "string",
      "links" : {
        "self" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "id" : "integer"
    },
    "milestone" : {
      "type" : "Required string",
      "name" : "string",
      "links" : {
        "self" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "id" : "integer"
    },
    "created_on" : "date-time",
    "links" : {
      "comments" : {
        "name" : "string",
        "href" : "uri"
      },
      "attachments" : {
        "name" : "string",
        "href" : "uri"
      },
      "watch" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "vote" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "votes" : "integer",
    "id" : "integer",
    "assignee" : {
      "type" : "Required string",
      "website" : "string",
      "created_on" : "date-time",
      "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
      "links" : {
        "followers" : {
          "name" : "string",
          "href" : "uri"
        },
        "repositories" : {
          "name" : "string",
          "href" : "uri"
        },
        "following" : {
          "name" : "string",
          "href" : "uri"
        },
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "has_2fa_enabled" : "boolean",
      "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
      "display_name" : "string",
      "uuid" : "string",
      "username" : "string",
      "account_id" : "The user's Atlassian account ID.",
      "is_staff" : "boolean"
    },
    "state" : "string. Possible values: new | open | resolved | on hold | invalid | duplicate | wontfix | closed"
  }
}

delete_pipeline_known_host

Delete a repository level known host.

Parameters

known_host_uuid (required)

The UUID of the known host to delete.

Type: string

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

delete_pipeline_schedule

Delete a schedule.

Parameters

repo_slug (required)

The repository.

Type: string

schedule_uuid (required)

The uuid of the schedule.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

delete_pipeline_ssh_key_pair

Delete the repository SSH key pair.

Parameters

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

delete_pipeline_variable

Delete a repository level variable.

Parameters

repo_slug (required)

The repository.

Type: string

variable_uuid (required)

The UUID of the variable to delete.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

delete_project

Deletes this project. This is an irreversible operation.

You cannot delete a project that still contains repositories. To delete the project, delete or transfer the repositories first.

Parameters

project_key (required)

The project in question. This is the actual key assigned to the project.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

delete_pull_request_application_property_value

Delete an application property value stored against a pull request.

Parameters

app_key (required)

The key of the Connect app.

Type: string

property_name (required)

The name of the property.

Type: string

pullrequest_id (required)

The pull request ID.

Type: string

repo_slug (required)

The repository.

Type: string

workspace (required)

The repository container; either the workspace slug or the UUID in curly braces.

Type: string

delete_pull_request_comment

Deletes a specific pull request comment.

Parameters

comment_id (required)

The id of the comment.

Type: integer

pull_request_id (required)

The id of the pull request.

Type: integer

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

delete_repository

Deletes the repository. This is an irreversible operation.

This does not affect its forks.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

redirect_to

If a repository has been moved to a new location, use this parameter to show users a friendly message in the Bitbucket UI that the repository has moved to a new location. However, a GET to this endpoint will still return a 404.

Type: string

delete_repository_webhook

Deletes the specified webhook subscription from the given repository.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

uid (required)

Installed webhook's ID

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

delete_snippet

Deletes a snippet and returns an empty response.

Parameters

encoded_id (required)

The snippet id.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

delete_snippet_comment

Deletes a snippet comment.

Comments can only be removed by their author.

Parameters

comment_id (required)

The id of the comment.

Type: integer

encoded_id (required)

The snippet id.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

delete_snippet_revision

Deletes the snippet.

Note that this only works for versioned URLs that point to the latest commit of the snippet. Pointing to an older commit results in a 405 status code.

To delete a snippet, regardless of whether or not concurrent changes are being made to it, use DELETE /snippets/{encoded_id} instead.

Parameters

encoded_id (required)

The snippet id.

Type: string

node_id (required)

A commit revision (SHA1).

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

delete_ssh_key

Deletes a specific SSH public key from a user's account

Parameters

key_id (required)

The SSH key's UUID value.

Type: string

selected_user (required)

This can either be the UUID of the account, surrounded by curly-braces, for example: {account UUID}, OR an Atlassian Account ID.

Type: string

delete_tag

Delete a tag in the specified repository.

For Git, the tag name should not include any prefixes (e.g. refs/tags). For Mercurial, this adds a commit to the main branch that removes the specified tag.

Parameters

name (required)

The name of the tag.

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

delete_user_application_property_value

Delete an application property value stored against a user.

Parameters

app_key (required)

The key of the Connect app.

Type: string

property_name (required)

The name of the property.

Type: string

selected_user (required)

Either the UUID of the account surrounded by curly-braces, for example {account UUID}, OR an Atlassian Account ID.

Type: string

delete_workspace_variable

Delete a workspace level variable.

Parameters

variable_uuid (required)

The UUID of the variable to delete.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

delete_workspace_webhook

Deletes the specified webhook subscription from the given workspace.

Parameters

uid (required)

Installed webhook's ID

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

export_issues

A POST request to this endpoint initiates a new background celery task that archives the repo's issues.

When the job has been accepted, it will return a 202 (Accepted) along with a unique url to this job in the 'Location' response header. This url is the endpoint for where the user can obtain their zip files."

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

$body

The options to apply to the export. Available options include project_key and project_name which, if specified, are used as the project key and name in the exported Jira json format. Option send_email specifies whether an email should be sent upon export result. Option include_attachments specifies whether attachments are included in the export.

Type: object

{
  "project_key" : "string",
  "send_email" : "boolean",
  "type" : "Required string",
  "project_name" : "string",
  "include_attachments" : "boolean"
}

fork_repository

Creates a new fork of the specified repository.

Forking a repository

To create a fork, specify the workspace explicitly as part of the request body

To fork a repository into the same workspace, also specify a new name.

When you specify a value for name, it will also affect the slug. The slug is reflected in the repository URL of the new fork. It is derived from name by substituting non-ASCII characters, removes whitespace, and changes characters to lower case. For example, My repo would turn into my_repo.

You need contributor access to create new forks within a workspace.

Change the properties of a new fork

By default the fork inherits most of its properties from the parent. However, since the optional POST body document follows the normal repository JSON schema and you can override the new fork's properties.

Properties that can be overridden include:

  • description
  • fork_policy
  • language
  • mainbranch
  • is_private (note that a private repo's fork_policy might prohibit the creation of public forks, in which is_private=False would fail)
  • has_issues (to initialize or disable the new repo's issue tracker -- note that the actual contents of the parent repository's issue tracker are not copied during forking)
  • has_wiki (to initialize or disable the new repo's wiki -- note that the actual contents of the parent repository's wiki are not copied during forking)
  • project (when forking into a private project, the fork's is_private must be true)

Properties that cannot be modified include:

  • scm
  • parent
  • full_name
Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

$body

A repository object. This can be left blank.

Type: object

{
  "type" : "Required string",
  "is_private" : "boolean",
  "owner" : {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string"
  },
  "updated_on" : "date-time",
  "parent" : "repository",
  "fork_policy" : "\nControls the rules for forking this repository.\n\n* **allow_forks**: unrestricted forking\n* **no_public_forks**: restrict forking to private forks (forks cannot\n  be made public later)\n* **no_forks**: deny all forking\n",
  "description" : "string",
  "project" : {
    "type" : "Required string",
    "owner" : {
      "type" : "Required string",
      "website" : "string",
      "created_on" : "date-time",
      "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
      "links" : {
        "followers" : {
          "name" : "string",
          "href" : "uri"
        },
        "repositories" : {
          "name" : "string",
          "href" : "uri"
        },
        "following" : {
          "name" : "string",
          "href" : "uri"
        },
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "has_2fa_enabled" : "boolean",
      "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
      "display_name" : "string",
      "uuid" : "string",
      "username" : "string"
    },
    "is_private" : "\nIndicates whether the project is publicly accessible, or whether it is\nprivate to the team and consequently only visible to team members.\nNote that private projects cannot contain public repositories.",
    "updated_on" : "date-time",
    "created_on" : "date-time",
    "name" : "The name of the project.",
    "description" : "string",
    "links" : {
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_publicly_visible_repos" : "\nIndicates whether the project contains publicly visible repositories.\nNote that private projects cannot contain public repositories.",
    "uuid" : "The project's immutable id.",
    "key" : "The project's key."
  },
  "language" : "string",
  "uuid" : "The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.",
  "has_issues" : "boolean",
  "mainbranch" : {
    "name" : "The name of the ref.",
    "links" : {
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "commits" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "type" : "Required string",
    "target" : {
      "type" : "Required string",
      "date" : "date-time",
      "summary" : {
        "markup" : "The type of markup language the raw content is to be interpreted in.",
        "raw" : "The text as it was typed by a user.",
        "html" : "The user's content rendered as HTML."
      },
      "author" : {
        "type" : "Required string",
        "raw" : "The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.",
        "user" : {
          "type" : "Required string",
          "website" : "string",
          "created_on" : "date-time",
          "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
          "links" : {
            "followers" : {
              "name" : "string",
              "href" : "uri"
            },
            "repositories" : {
              "name" : "string",
              "href" : "uri"
            },
            "following" : {
              "name" : "string",
              "href" : "uri"
            },
            "self" : {
              "name" : "string",
              "href" : "uri"
            },
            "html" : {
              "name" : "string",
              "href" : "uri"
            },
            "avatar" : {
              "name" : "string",
              "href" : "uri"
            }
          },
          "has_2fa_enabled" : "boolean",
          "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
          "display_name" : "string",
          "uuid" : "string",
          "username" : "string"
        }
      },
      "message" : "string",
      "hash" : "string",
      "parents" : [ "base_commit" ],
      "repository" : "repository",
      "participants" : [ {
        "type" : "Required string",
        "approved" : "boolean",
        "role" : "string. Possible values: PARTICIPANT | REVIEWER",
        "state" : "string. Possible values: approved | changes_requested",
        "user" : {
          "type" : "Required string",
          "website" : "string",
          "created_on" : "date-time",
          "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
          "links" : {
            "followers" : {
              "name" : "string",
              "href" : "uri"
            },
            "repositories" : {
              "name" : "string",
              "href" : "uri"
            },
            "following" : {
              "name" : "string",
              "href" : "uri"
            },
            "self" : {
              "name" : "string",
              "href" : "uri"
            },
            "html" : {
              "name" : "string",
              "href" : "uri"
            },
            "avatar" : {
              "name" : "string",
              "href" : "uri"
            }
          },
          "has_2fa_enabled" : "boolean",
          "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
          "display_name" : "string",
          "uuid" : "string",
          "username" : "string",
          "account_id" : "The user's Atlassian account ID.",
          "is_staff" : "boolean"
        },
        "participated_on" : "The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented."
      } ]
    },
    "default_merge_strategy" : "The default merge strategy for pull requests targeting this branch.",
    "merge_strategies" : [ "string. Possible values: merge_commit | squash | fast_forward" ]
  },
  "full_name" : "The concatenation of the repository owner's username and the slugified name, e.g. \"evzijst/interruptingcow\". This is the same string used in Bitbucket URLs.",
  "has_wiki" : "boolean",
  "size" : "integer",
  "created_on" : "date-time",
  "name" : "string",
  "links" : {
    "forks" : {
      "name" : "string",
      "href" : "uri"
    },
    "downloads" : {
      "name" : "string",
      "href" : "uri"
    },
    "clone" : [ {
      "name" : "string",
      "href" : "uri"
    } ],
    "self" : {
      "name" : "string",
      "href" : "uri"
    },
    "commits" : {
      "name" : "string",
      "href" : "uri"
    },
    "watchers" : {
      "name" : "string",
      "href" : "uri"
    },
    "html" : {
      "name" : "string",
      "href" : "uri"
    },
    "avatar" : {
      "name" : "string",
      "href" : "uri"
    },
    "hooks" : {
      "name" : "string",
      "href" : "uri"
    },
    "pullrequests" : {
      "name" : "string",
      "href" : "uri"
    }
  },
  "scm" : "string. Possible values: git"
}

get_application_property_value

Retrieve an application property value stored against a repository.

Parameters

app_key (required)

The key of the Connect app.

Type: string

property_name (required)

The name of the property.

Type: string

repo_slug (required)

The repository.

Type: string

workspace (required)

The repository container; either the workspace slug or the UUID in curly braces.

Type: string

get_branch

Returns a branch object within the specified repository.

This call requires authentication. Private repositories require the caller to authenticate with an account that has appropriate authorization.

For Git, the branch name should not include any prefixes (e.g. refs/heads).

Parameters

name (required)

The name of the branch.

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_branch_restriction

Returns a specific branch restriction rule.

Parameters

id (required)

The restriction rule's id

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_branching_model

Return the branching model as applied to the repository. This view is read-only. The branching model settings can be changed using the settings API.

The returned object:

  1. Always has a development property. development.branch contains the actual repository branch object that is considered to be the development branch. development.branch will not be present if it does not exist.
  2. Might have a production property. production will not be present when production is disabled. production.branch contains the actual branch object that is considered to be the production branch. production.branch will not be present if it does not exist.
  3. Always has a branch_types array which contains all enabled branch types.
Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_branching_model_config

Return the branching model configuration for a repository. The returned object:

  1. Always has a development property for the development branch.
  2. Always a production property for the production branch. The production branch can be disabled.
  3. The branch_types contains all the branch types.

This is the raw configuration for the branching model. A client wishing to see the branching model with its actual current branches may find the active model API more useful.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_build_status_for_commit

Returns the specified build status for a commit.

Parameters

commit (required)

The commit's SHA1.

Type: string

key (required)

The build status' unique key

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_cache_content_URI

Retrieve the URI of the content of the specified cache.

Parameters

cache_uuid (required)

The UUID of the cache.

Type: string

repo_slug (required)

The repository.

Type: string

workspace (required)

The account.

Type: string

get_commit

Returns the specified commit.

Parameters

commit (required)

The commit's SHA1.

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_commit_application_property_value

Retrieve an application property value stored against a commit.

Parameters

app_key (required)

The key of the Connect app.

Type: string

commit (required)

The commit.

Type: string

property_name (required)

The name of the property.

Type: string

repo_slug (required)

The repository.

Type: string

workspace (required)

The repository container; either the workspace slug or the UUID in curly braces.

Type: string

get_commit_comment

Returns the specified commit comment.

Parameters

comment_id (required)

The id of the comment.

Type: integer

commit (required)

The commit's SHA1.

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_commit_report

Returns a single Report matching the provided ID.

Parameters

commit (required)

The commit the report belongs to.

Type: string

repo_slug (required)

The repository.

Type: string

reportId (required)

Either the uuid or external-id of the report.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

get_commit_report_annotation

Returns a single Annotation matching the provided ID.

Parameters

annotationId (required)

Either the uuid or external-id of the annotation.

Type: string

commit (required)

The commit the report belongs to.

Type: string

repo_slug (required)

The repository.

Type: string

reportId (required)

Either the uuid or external-id of the report.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

get_common_ancestor_for_commits

Returns the best common ancestor between two commits, specified in a revspec of 2 commits (e.g. 3a8b42..9ff173).

If more than one best common ancestor exists, only one will be returned. It is unspecified which will be returned.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

revspec (required)

A commit range using double dot notation (e.g. 3a8b42..9ff173).

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_component

Returns the specified issue tracker component object.

Parameters

component_id (required)

The component's id

Type: integer

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_current_user

This operation has no parameters

get_current_user_email

Returns details about a specific one of the authenticated user's email addresses.

Details describe whether the address has been confirmed by the user and whether it is the user's primary address or not.

Parameters

email (required)

Email address of the user.

Type: string

get_default_reviewer

Returns the specified reviewer.

This can be used to test whether a user is among the repository's default reviewers list. A 404 indicates that that specified user is not a default reviewer.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

target_username (required)

This can either be the username or the UUID of the default reviewer, surrounded by curly-braces, for example: {account UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_deploy_key

Returns the deploy key belonging to a specific key.

Parameters

key_id (required)

The key ID matching the deploy key.

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_deployment

Retrieve a deployment

Parameters

deployment_uuid (required)

The deployment UUID.

Type: string

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

get_download_artifact

Return a redirect to the contents of a download artifact.

This endpoint returns the actual file contents and not the artifact's metadata.

Parameters

filename (required)

Name of the file.

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_environment

Retrieve an environment

Parameters

environment_uuid (required)

The environment UUID.

Type: string

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

get_file_or_directory_contents

This endpoints is used to retrieve the contents of a single file, or the contents of a directory at a specified revision.

Raw file contents

When path points to a file, this endpoint returns the raw contents. The response's Content-Type is derived from the filename extension (not from the contents). The file contents are not processed and no character encoding/recoding is performed and as a result no character encoding is included as part of the Content-Type.

The Content-Disposition header will be "attachment" to prevent browsers from running executable files.

If the file is managed by LFS, then a 301 redirect pointing to Atlassian's media services platform is returned.

The response includes an ETag that is based on the contents of the file and its attributes. This means that an empty __init__.py always returns the same ETag, regardless on the directory it lives in, or the commit it is on.

File meta data

When the request for a file path includes the query parameter ?format=meta, instead of returning the file's raw contents, Bitbucket instead returns the JSON object describing the file's properties:

File objects contain an attributes element that contains a list of possible modifiers. Currently defined values are:

  • link -- indicates that the entry is a symbolic link. The contents of the file represent the path the link points to.
  • executable -- indicates that the file has the executable bit set.
  • subrepository -- indicates that the entry points to a submodule or subrepo. The contents of the file is the SHA1 of the repository pointed to.
  • binary -- indicates whether Bitbucket thinks the file is binary.

This endpoint can provide an alternative to how a HEAD request can be used to check for the existence of a file, or a file's size without incurring the overhead of receiving its full contents.

Directory listings

When path points to a directory instead of a file, the response is a paginated list of directory and file objects in the same order as the underlying SCM system would return them.

When listing the contents of the repo's root directory, the use of a trailing slash at the end of the URL is required.

The response by default is not recursive, meaning that only the direct contents of a path are returned. The response does not recurse down into subdirectories. In order to "walk" the entire directory tree, the client can either parse each response and follow the self links of each commit_directory object, or can specify a max_depth to recurse to.

The max_depth parameter will do a breadth-first search to return the contents of the subdirectories up to the depth specified. Breadth-first search was chosen as it leads to the least amount of file system operations for git. If the max_depth parameter is specified to be too large, the call will time out and return a 555.

Each returned object is either a commit_file, or a commit_directory, both of which contain a path element. This path is the absolute path from the root of the repository. Each object also contains a commit object which embeds the commit the file is on. Note that this is merely the commit that was used in the URL. It is not the commit that last modified the file.

Directory objects have 2 representations. Their self link returns the paginated contents of the directory. The meta link on the other hand returns the actual directory object itself

Querying, filtering and sorting

Like most API endpoints, this API supports the Bitbucket querying/filtering syntax and so you could filter a directory listing to only include entries that match certain criteria. For instance, to list all binary files over 1kb use the expression:

size > 1024 and attributes = "binary"

which after urlencoding yields the query string:

?q=size%3E1024+and+attributes%3D%22binary%22

To change the ordering of the response, use the ?sort parameter:

.../src/eefd5ef/?sort=-size

See filtering and sorting for more details.

Parameters

commit (required)

The commit's SHA1.

Type: string

path (required)

Path to the file.

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

format

If 'meta' is provided, returns the (json) meta data for the contents of the file. If 'rendered' is provided, returns the contents of a non-binary file in HTML-formatted rendered markup. Since Git does not generally track what text encoding scheme is used, this endpoint attempts to detect the most appropriate character encoding. While usually correct, determining the character encoding can be ambiguous which in exceptional cases can lead to misinterpretation of the characters. As such, the raw element in the response object should not be treated as equivalent to the file's actual contents.

Type: string

Potential values: meta, rendered

max_depth

If provided, returns the contents of the repository and its subdirectories recursively until the specified max_depth of nested directories. When omitted, this defaults to 1.

Type: integer

q

Optional filter expression as per filtering and sorting.

Type: string

sort

Optional sorting parameter as per filtering and sorting.

Type: string

get_issue

Returns the specified issue.

Parameters

issue_id (required)

The issue id

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_issue_attachment

Returns the contents of the specified file attachment.

Note that this endpoint does not return a JSON response, but instead returns a redirect pointing to the actual file that in turn will return the raw contents.

The redirect URL contains a one-time token that has a limited lifetime. As a result, the link should not be persisted, stored, or shared.

Parameters

issue_id (required)

The issue id

Type: string

path (required)

Path to the file.

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_issue_change_object

Returns the specified issue change object.

This resource is only available on repositories that have the issue tracker enabled.

Parameters

change_id (required)

The issue change id

Type: string

issue_id (required)

The issue id

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_issue_comment

Returns the specified issue comment object.

Parameters

comment_id (required)

The id of the comment.

Type: integer

issue_id (required)

The issue id

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_issue_version

Returns the specified issue tracker version object.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

version_id (required)

The version's id

Type: integer

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_milestone

Returns the specified issue tracker milestone object.

Parameters

milestone_id (required)

The milestone's id

Type: integer

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_patch_for_commits

Produces a raw patch for a single commit (diffed against its first parent), or a patch-series for a revspec of 2 commits (e.g. 3a8b42..9ff173 where the first commit represents the source and the second commit the destination).

In case of the latter (diffing a revspec), a patch series is returned for the commits on the source branch (3a8b42 and its ancestors in our example). For Mercurial, a single patch is returned that combines the changes of all commits on the source branch.

While similar to diffs, patches:

  • Have a commit header (username, commit message, etc)
  • Do not support the path=foo/bar.py query parameter

The raw patch is returned as-is, in whatever encoding the files in the repository use. It is not decoded into unicode. As such, the content-type is text/plain.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

spec (required)

A commit SHA (e.g. 3a8b42) or a commit range using double dot notation (e.g. 3a8b42..9ff173).

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_pipeline

Retrieve a specified pipeline

Parameters

pipeline_uuid (required)

The pipeline UUID.

Type: string

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

get_pipeline_configuration

Retrieve the repository pipelines configuration.

Parameters

repo_slug (required)

The repository.

Type: string

workspace (required)

The account.

Type: string

get_pipeline_known_host

Retrieve a repository level known host.

Parameters

known_host_uuid (required)

The UUID of the known host to retrieve.

Type: string

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

get_pipeline_schedule

Retrieve a schedule by its UUID.

Parameters

repo_slug (required)

The repository.

Type: string

schedule_uuid (required)

The uuid of the schedule.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

get_pipeline_ssh_key_pair

Retrieve the repository SSH key pair excluding the SSH private key. The private key is a write only field and will never be exposed in the logs or the REST API.

Parameters

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

get_pipeline_step

Retrieve a given step of a pipeline.

Parameters

pipeline_uuid (required)

The UUID of the pipeline.

Type: string

repo_slug (required)

The repository.

Type: string

step_uuid (required)

The UUID of the step.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

get_pipeline_step_log

Retrieve the log file for a given step of a pipeline.

This endpoint supports (and encourages!) the use of HTTP Range requests to deal with potentially very large log files.

Parameters

pipeline_uuid (required)

The UUID of the pipeline.

Type: string

repo_slug (required)

The repository.

Type: string

step_uuid (required)

The UUID of the step.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

get_pipeline_variable

Retrieve a repository level variable.

Parameters

repo_slug (required)

The repository.

Type: string

variable_uuid (required)

The UUID of the variable to retrieve.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

get_project

Returns the requested project.

Parameters

project_key (required)

The project in question. This is the actual key assigned to the project.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_pull_request

Returns the specified pull request.

Parameters

pull_request_id (required)

The id of the pull request.

Type: integer

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_pull_request_activity_log

Returns a paginated list of the pull request's activity log.

This handler serves both a v20 and internal endpoint. The v20 endpoint returns reviewer comments, updates, approvals and request changes. The internal endpoint includes those plus tasks and attachments.

Comments created on a file or a line of code have an inline property.

Updates include a state property of OPEN, MERGED, or DECLINED.

Parameters

pull_request_id (required)

The id of the pull request.

Type: integer

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_pull_request_application_property_value

Retrieve an application property value stored against a pull request.

Parameters

app_key (required)

The key of the Connect app.

Type: string

property_name (required)

The name of the property.

Type: string

pullrequest_id (required)

The pull request ID.

Type: string

repo_slug (required)

The repository.

Type: string

workspace (required)

The repository container; either the workspace slug or the UUID in curly braces.

Type: string

get_pull_request_comment

Returns a specific pull request comment.

Parameters

comment_id (required)

The id of the comment.

Type: integer

pull_request_id (required)

The id of the pull request.

Type: integer

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_pull_request_diff_stat

Redirects to the repository diffstat with the revspec that corresponds to the pull request.

Parameters

pull_request_id (required)

The id of the pull request.

Type: integer

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_pull_request_merge_task_status

When merging a pull request takes too long, the client receives a task ID along with a 202 status code. The task ID can be used in a call to this endpoint to check the status of a merge task.

If the merge task is not yet finished, a PENDING status will be returned.

If the merge was successful, a SUCCESS status will be returned.

If the merge task failed, an error will be returned.

Parameters

pull_request_id (required)

The id of the pull request.

Type: integer

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

task_id (required)

ID of the merge task

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_pull_request_patch

Redirects to the repository patch with the revspec that corresponds to pull request.

Parameters

pull_request_id (required)

The id of the pull request.

Type: integer

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_repository

Returns the object describing this repository.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_repository_webhook

Returns the webhook with the specified id installed on the specified repository.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

uid (required)

Installed webhook's ID

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_root_directory

This endpoint redirects the client to the directory listing of the root directory on the main branch.

This is equivalent to directly hitting /2.0/repositories/{username}/{repo_slug}/src/{commit}/{path} without having to know the name or SHA1 of the repo's main branch.

To create new commits, POST to this endpoint

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

format

Instead of returning the file's contents, return the (json) meta data for it.

Type: string

Potential values: meta

get_snippet

Retrieves a single snippet.

Snippets support multiple content types:

  • application/json
  • multipart/related
  • multipart/form-data

application/json


The default content type of the response is application/json. Since JSON is always utf-8, it cannot reliably contain file contents for files that are not text. Therefore, JSON snippet documents only contain the filename and links to the file contents.

This means that in order to retrieve all parts of a snippet, N+1 requests need to be made (where N is the number of files in the snippet).

multipart/related


Parameters

encoded_id (required)

The snippet id.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_snippet_change

Returns the changes made on this snippet in this commit.

Parameters

encoded_id (required)

The snippet id.

Type: string

revision (required)

The commit's SHA1.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_snippet_changes_between_versions

Returns the diff of the specified commit against its first parent.

Note that this resource is different in functionality from the patch resource.

The differences between a diff and a patch are:

  • patches have a commit header with the username, message, etc
  • diffs support the optional path=foo/bar.py query param to filter the diff to just that one file diff (not supported for patches)
  • for a merge, the diff will show the diff between the merge commit and its first parent (identical to how PRs work), while patch returns a response containing separate patches for each commit on the second parent's ancestry, up to the oldest common ancestor (identical to its reachability).

Note that the character encoding of the contents of the diff is unspecified as Git does not track this, making it hard for Bitbucket to reliably determine this.

Parameters

encoded_id (required)

The snippet id.

Type: string

revision (required)

A revspec expression. This can simply be a commit SHA1, a ref name, or a compare expression like staging..production.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

path

When used, only one the diff of the specified file will be returned.

Type: string

get_snippet_comment

Returns the specific snippet comment.

Parameters

comment_id (required)

The id of the comment.

Type: integer

encoded_id (required)

The snippet id.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_snippet_patch_between_versions

Returns the patch of the specified commit against its first parent.

Note that this resource is different in functionality from the diff resource.

The differences between a diff and a patch are:

  • patches have a commit header with the username, message, etc
  • diffs support the optional path=foo/bar.py query param to filter the diff to just that one file diff (not supported for patches)
  • for a merge, the diff will show the diff between the merge commit and its first parent (identical to how PRs work), while patch returns a response containing separate patches for each commit on the second parent's ancestry, up to the oldest common ancestor (identical to its reachability).

Note that the character encoding of the contents of the patch is unspecified as Git does not track this, making it hard for Bitbucket to reliably determine this.

Parameters

encoded_id (required)

The snippet id.

Type: string

revision (required)

A revspec expression. This can simply be a commit SHA1, a ref name, or a compare expression like staging..production.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_snippet_raw_files

Retrieves the raw contents of a specific file in the snippet. The Content-Disposition header will be "attachment" to avoid issues with malevolent executable files.

The file's mime type is derived from its filename and returned in the Content-Type header.

Note that for text files, no character encoding is included as part of the content type.

Parameters

encoded_id (required)

The snippet id.

Type: string

node_id (required)

A commit revision (SHA1).

Type: string

path (required)

Path to the file.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_snippet_raw_files_at_head

Convenience resource for getting to a snippet's raw files without the need for first having to retrieve the snippet itself and having to pull out the versioned file links.

Parameters

encoded_id (required)

The snippet id.

Type: string

path (required)

Path to the file.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_snippet_revision

Identical to GET /snippets/encoded_id, except that this endpoint can be used to retrieve the contents of the snippet as it was at an older revision, while /snippets/encoded_id always returns the snippet's current revision.

Note that only the snippet's file contents are versioned, not its meta data properties like the title.

Other than that, the two endpoints are identical in behavior.

Parameters

encoded_id (required)

The snippet id.

Type: string

node_id (required)

A commit revision (SHA1).

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_ssh_key

Returns a specific SSH public key belonging to a user.

Parameters

key_id (required)

The SSH key's UUID value.

Type: string

selected_user (required)

This can either be the UUID of the account, surrounded by curly-braces, for example: {account UUID}, OR an Atlassian Account ID.

Type: string

get_tag

Returns the specified tag.

Parameters

name (required)

The name of the tag.

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_user

Gets the public information associated with a user account.

If the user's profile is private, location, website and created_on elements are omitted.

Note that the user object returned by this operation is changing significantly, due to privacy changes. See the announcement for details.

Parameters

selected_user (required)

This can either be the UUID of the account, surrounded by curly-braces, for example: {account UUID}, OR an Atlassian Account ID.

Type: string

get_user_application_property_value

Retrieve an application property value stored against a user.

Parameters

app_key (required)

The key of the Connect app.

Type: string

property_name (required)

The name of the property.

Type: string

selected_user (required)

Either the UUID of the account surrounded by curly-braces, for example {account UUID}, OR an Atlassian Account ID.

Type: string

get_vote_for_issue_status

Check whether the authenticated user has voted for this issue. A 204 status code indicates that the user has voted, while a 404 implies they haven't.

Parameters

issue_id (required)

The issue id

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_watching_issue_status

Indicated whether or not the authenticated user is watching this issue.

Parameters

issue_id (required)

The issue id

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_watching_snippet_status

Used to check if the current user is watching a specific snippet.

Returns 204 (No Content) if the user is watching the snippet and 404 if not.

Hitting this endpoint anonymously always returns a 404.

Parameters

encoded_id (required)

The snippet id.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_webhook_resource

This operation has no parameters

get_workspace

Returns the requested workspace.

Parameters

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_workspace_repository_permissions

Returns an object for the repository permission of each user in the requested repository.

Permissions returned are effective permissions: the highest level of permission the user has. This does not distinguish between direct and indirect (group) privileges.

Only users with admin permission for the repository may access this resource.

Permissions can be:

  • admin
  • write
  • read

Results may be further filtered or sorted by user, or permission by adding the following query string parameters:

  • q=permission>"read"
  • sort=user.display_name

Note that the query parameter values need to be URL escaped so that = would become %3D.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

q

Query string to narrow down the response as per filtering and sorting.

Type: string

sort

Name of a response property sort the result by as per filtering and sorting.

Type: string

get_workspace_user_membership

Returns the workspace membership, which includes a User object for the member and a Workspace object for the requested workspace.

Parameters

member (required)

Member's UUID or Atlassian ID.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

get_workspace_variable

Retrieve a workspace level variable.

Parameters

variable_uuid (required)

The UUID of the variable to retrieve.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

get_workspace_webhook

Returns the webhook with the specified id installed on the given workspace.

Parameters

uid (required)

Installed webhook's ID

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

import_issues

A POST request to this endpoint will import the zip file given by the archive parameter into the repository. All existing issues will be deleted and replaced by the contents of the imported zip file.

When the import job is accepted, here is example output:

< HTTP/1.1 202 Accepted

{
    "type": "issue_job_status",
    "status": "ACCEPTED",
    "phase": "Attachments",
    "total": 15,
    "count": 0,
    "percent": 0
}
Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

list_branch_restrictions

Returns a paginated list of all branch restrictions on the repository.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

kind

Branch restrictions of this type

Type: string

pattern

Branch restrictions applied to branches of this pattern

Type: string

list_branches_and_tags

Returns the branches and tags in the repository.

By default, results will be in the order the underlying source control system returns them and identical to the ordering one sees when running "$ git show-ref". Note that this follows simple lexical ordering of the ref names.

This can be undesirable as it does apply any natural sorting semantics, meaning for instance that refs are sorted ["branch1", "branch10", "branch2", "v10", "v11", "v9"] instead of ["branch1", "branch2", "branch10", "v9", "v10", "v11"].

Sorting can be changed using the ?sort= query parameter. When using ?sort=name to explicitly sort on ref name, Bitbucket will apply natural sorting and interpret numerical values as numbers instead of strings.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

q

Query string to narrow down the response as per filtering and sorting.

Type: string

sort

Field by which the results should be sorted as per filtering and sorting. The name field is handled specially for refs in that, if specified as the sort field, it uses a natural sort order instead of the default lexicographical sort order. For example, it will return ['1.1', '1.2', '1.10'] instead of ['1.1', '1.10', '1.2'].

Type: string

list_caches

Retrieve the repository pipelines caches.

Parameters

repo_slug (required)

The repository.

Type: string

workspace (required)

The account.

Type: string

list_commit_comments

Returns the commit's comments.

This includes both global and inline comments.

The default sorting is oldest to newest and can be overridden with the sort query parameter.

Parameters

commit (required)

The commit's SHA1.

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

q

Query string to narrow down the response as per filtering and sorting.

Type: string

sort

Field by which the results should be sorted as per filtering and sorting.

Type: string

list_commit_report_annotations

Returns a paginated list of Annotations for a specified report.

Parameters

commit (required)

The commit for which to retrieve reports.

Type: string

repo_slug (required)

The repository.

Type: string

reportId (required)

Uuid or external-if of the report for which to get annotations for.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

list_commit_reports

Returns a paginated list of Reports linked to this commit.

Parameters

commit (required)

The commit for which to retrieve reports.

Type: string

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

list_commit_statuses_for_commit

Returns all statuses (e.g. build results) for a specific commit.

Parameters

commit (required)

The commit's SHA1.

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

q

Query string to narrow down the response as per filtering and sorting.

Type: string

sort

Field by which the results should be sorted as per filtering and sorting. Defaults to created_on.

Type: string

list_commit_statuses_for_pull_request

Returns all statuses (e.g. build results) for the given pull request.

Parameters

pull_request_id (required)

The id of the pull request.

Type: integer

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

q

Query string to narrow down the response as per filtering and sorting.

Type: string

sort

Field by which the results should be sorted as per filtering and sorting. Defaults to created_on.

Type: string

list_commits

These are the repository's commits. They are paginated and returned in reverse chronological order, similar to the output of git log. Like these tools, the DAG can be filtered.

GET /repositories/{workspace}/{repo_slug}/commits/

Returns all commits in the repo in topological order (newest commit first). All branches and tags are included (similar to git log --all).

GET /repositories/{workspace}/{repo_slug}/commits/?exclude=master

Returns all commits in the repo that are not on master (similar to git log --all ^master).

GET /repositories/{workspace}/{repo_slug}/commits/?include=foo&include=bar&exclude=fu&exclude=fubar

Returns all commits that are on refs foo or bar, but not on fu or fubar (similar to git log foo bar ^fu ^fubar).

An optional path parameter can be specified that will limit the results to commits that affect that path. path can either be a file or a directory. If a directory is specified, commits are returned that have modified any file in the directory tree rooted by path. It is important to note that if the path parameter is specified, the commits returned by this endpoint may no longer be a DAG, parent commits that do not modify the path will be omitted from the response.

GET /repositories/{workspace}/{repo_slug}/commits/?path=README.md&include=foo&include=bar&exclude=master

Returns all commits that are on refs foo or bar, but not on master that changed the file README.md.

GET /repositories/{workspace}/{repo_slug}/commits/?path=src/&include=foo&include=bar&exclude=master

Returns all commits that are on refs foo or bar, but not on master that changed to a file in any file in the directory src or its children.

Because the response could include a very large number of commits, it is paginated. Follow the 'next' link in the response to navigate to the next page of commits. As with other paginated resources, do not construct your own links.

When the include and exclude parameters are more than can fit in a query string, clients can use a x-www-form-urlencoded POST instead.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

list_commits_by_post

Identical to GET /repositories/{workspace}/{repo_slug}/commits, except that POST allows clients to place the include and exclude parameters in the request body to avoid URL length issues.

Note that this resource does NOT support new commit creation.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

list_commits_for_file

Returns a paginated list of commits that modified the specified file.

Commits are returned in reverse chronological order. This is roughly equivalent to the following commands:

$ git log --follow --date-order

$ hg log --follow

By default, Bitbucket will follow renames and the path name in the returned entries reflects that. This can be turned off using the ?renames=false query parameter.

Results are returned in descending chronological order by default, and like most endpoints you can filter and sort the response to only provide exactly the data you want.

Parameters

commit (required)

The commit's SHA1.

Type: string

path (required)

Path to the file.

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

q

Query string to narrow down the response as per filtering and sorting.

Type: string

renames

When true, Bitbucket will follow the history of the file across renames (this is the default behavior). This can be turned off by specifying false.

Type: string

sort

Name of a response property sort the result by as per filtering and sorting.

Type: string

list_commits_for_revision

These are the repository's commits. They are paginated and returned in reverse chronological order, similar to the output of git log. Like these tools, the DAG can be filtered.

GET /repositories/{workspace}/{repo_slug}/commits/master

Returns all commits on rev master (similar to git log master).

GET /repositories/{workspace}/{repo_slug}/commits/dev?include=foo&exclude=master

Returns all commits on ref dev or foo, except those that are reachable on master (similar to git log dev foo ^master).

An optional path parameter can be specified that will limit the results to commits that affect that path. path can either be a file or a directory. If a directory is specified, commits are returned that have modified any file in the directory tree rooted by path. It is important to note that if the path parameter is specified, the commits returned by this endpoint may no longer be a DAG, parent commits that do not modify the path will be omitted from the response.

GET /repositories/{workspace}/{repo_slug}/commits/dev?path=README.md&include=foo&include=bar&exclude=master

Returns all commits that are on refs dev or foo or bar, but not on master that changed the file README.md.

GET /repositories/{workspace}/{repo_slug}/commits/dev?path=src/&include=foo&exclude=master

Returns all commits that are on refs dev or foo, but not on master that changed to a file in any file in the directory src or its children.

Because the response could include a very large number of commits, it is paginated. Follow the 'next' link in the response to navigate to the next page of commits. As with other paginated resources, do not construct your own links.

When the include and exclude parameters are more than can fit in a query string, clients can use a x-www-form-urlencoded POST instead.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

revision (required)

The commit's SHA1.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

list_commits_for_revision_by_post

Identical to GET /repositories/{workspace}/{repo_slug}/commits/{revision}, except that POST allows clients to place the include and exclude parameters in the request body to avoid URL length issues.

Note that this resource does NOT support new commit creation.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

revision (required)

The commit's SHA1.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

list_components

Returns the components that have been defined in the issue tracker.

This resource is only available on repositories that have the issue tracker enabled.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

list_current_user_emails

This operation has no parameters

list_default_reviewers

Returns the repository's default reviewers.

These are the users that are automatically added as reviewers on every new pull request that is created.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

list_deploy_keys

Returns all deploy-keys belonging to a repository.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

list_deployment_variables

Find deployment environment level variables.

Parameters

environment_uuid (required)

The environment.

Type: string

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

list_deployments

Find deployments

Parameters

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

list_download_artifacts

Returns a list of download links associated with the repository.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

list_environments

Find environments

Parameters

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

list_issue_attachments

Returns all attachments for this issue.

This returns the files' meta data. This does not return the files' actual contents.

The files are always ordered by their upload date.

Parameters

issue_id (required)

The issue id

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

list_issue_changes

Returns the list of all changes that have been made to the specified issue. Changes are returned in chronological order with the oldest change first.

Each time an issue is edited in the UI or through the API, an immutable change record is created under the /issues/123/changes endpoint. It also has a comment associated with the change.

Note that this operation is changing significantly, due to privacy changes. See the announcement for details.

Changes support filtering and sorting that can be used to search for specific changes.

This resource is only available on repositories that have the issue tracker enabled.

N.B.

The changes.assignee and changes.assignee_account_id fields are not a user object. Instead, they contain the raw username and account_id of the user. This is to protect the integrity of the audit log even after a user account gets deleted.

The changes.assignee field is deprecated will disappear in the future. Use changes.assignee_account_id instead.

Parameters

issue_id (required)

The issue id

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

q

Query string to narrow down the response. See filtering and sorting for details.

Type: string

sort

Name of a response property to sort results. See filtering and sorting for details.

Type: string

list_issue_comments

Returns a paginated list of all comments that were made on the specified issue.

The default sorting is oldest to newest and can be overridden with the sort query parameter.

This endpoint also supports filtering and sorting of the results. See filtering and sorting for more details.

Parameters

issue_id (required)

The issue id

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

q

Query string to narrow down the response as per filtering and sorting.

Type: string

list_issue_versions

Returns the versions that have been defined in the issue tracker.

This resource is only available on repositories that have the issue tracker enabled.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

list_issues

Returns the issues in the issue tracker.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

list_milestones

Returns the milestones that have been defined in the issue tracker.

This resource is only available on repositories that have the issue tracker enabled.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

list_open_branches

Returns a list of all open branches within the specified repository. Results will be in the order the source control manager returns them.

Branches support filtering and sorting that can be used to search for specific branches.

By default, results will be in the order the underlying source control system returns them and identical to the ordering one sees when running "$ hg branches" or "$ git branch --list". Note that this follows simple lexical ordering of the ref names.

This can be undesirable as it does apply any natural sorting semantics, meaning for instance that tags are sorted ["v10", "v11", "v9"] instead of ["v9", "v10", "v11"].

Sorting can be changed using the ?q= query parameter. When using ?q=name to explicitly sort on ref name, Bitbucket will apply natural sorting and interpret numerical values as numbers instead of strings.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

q

Query string to narrow down the response as per filtering and sorting.

Type: string

sort

Field by which the results should be sorted as per filtering and sorting. The name field is handled specially for branches in that, if specified as the sort field, it uses a natural sort order instead of the default lexicographical sort order. For example, it will return ['branch1', 'branch2', 'branch10'] instead of ['branch1', 'branch10', 'branch2'].

Type: string

list_pipeline_known_hosts

Find repository level known hosts.

Parameters

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

list_pipeline_schedule_executions

Retrieve the executions of a given schedule.

Parameters

repo_slug (required)

The repository.

Type: string

schedule_uuid (required)

The uuid of the schedule.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

list_pipeline_schedules

Retrieve the configured schedules for the given repository.

Parameters

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

list_pipeline_steps

Find steps for the given pipeline.

Parameters

pipeline_uuid (required)

The UUID of the pipeline.

Type: string

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

list_pipeline_variables

Find repository level variables.

Parameters

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

list_pipelines

Find pipelines

Parameters

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

list_public_repositories

Returns a paginated list of all public repositories.

This endpoint also supports filtering and sorting of the results. See filtering and sorting for more details.

Parameters

after

Filter the results to include only repositories created on or after this ISO-8601 timestamp. Example: YYYY-MM-DDTHH:mm:ss.sssZ

Type: string

q

Query string to narrow down the response as per filtering and sorting. role parameter must also be specified.

Type: string

role

Filters the result based on the authenticated user's role on each repository.

  • member: returns repositories to which the user has explicit read access
  • contributor: returns repositories to which the user has explicit write access
  • admin: returns repositories to which the user has explicit administrator access
  • owner: returns all repositories owned by the current user

Type: string

Potential values: admin, contributor, member, owner

sort

Field by which the results should be sorted as per filtering and sorting.

Type: string

list_pull_request_activity_logs

Returns a paginated list of the pull request's activity log.

This handler serves both a v20 and internal endpoint. The v20 endpoint returns reviewer comments, updates, approvals and request changes. The internal endpoint includes those plus tasks and attachments.

Comments created on a file or a line of code have an inline property.

Updates include a state property of OPEN, MERGED, or DECLINED.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

list_pull_request_changes

Redirects to the repository diff with the revspec that corresponds to the pull request.

Parameters

pull_request_id (required)

The id of the pull request.

Type: integer

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

list_pull_request_comments

Returns a paginated list of the pull request's comments.

This includes both global, inline comments and replies.

The default sorting is oldest to newest and can be overridden with the sort query parameter.

This endpoint also supports filtering and sorting of the results. See filtering and sorting for more details.

Parameters

pull_request_id (required)

The id of the pull request.

Type: integer

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

list_pull_request_commits

Returns a paginated list of the pull request's commits.

These are the commits that are being merged into the destination branch when the pull requests gets accepted.

Parameters

pull_request_id (required)

The id of the pull request.

Type: integer

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

list_pull_requests

Returns all pull requests on the specified repository.

By default only open pull requests are returned. This can be controlled using the state query parameter. To retrieve pull requests that are in one of multiple states, repeat the state parameter for each individual state.

This endpoint also supports filtering and sorting of the results. See filtering and sorting for more details.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

state

Only return pull requests that are in this state. This parameter can be repeated.

Type: string

Potential values: MERGED, SUPERSEDED, OPEN, DECLINED

list_pull_requests_for_commit

Returns a paginated list of all pull requests as part of which this commit was reviewed. Pull Request Commit Links app must be installed first before using this API; installation automatically occurs when 'Go to pull request' is clicked from the web interface for a commit's details.

Parameters

commit (required)

The SHA1 of the commit

Type: string

repo_slug (required)

The repository; either the UUID in curly braces, or the slug

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces

Type: string

list_pull_requests_for_user

Returns all pull requests authored by the specified user.

By default only open pull requests are returned. This can be controlled using the state query parameter. To retrieve pull requests that are in one of multiple states, repeat the state parameter for each individual state.

This endpoint also supports filtering and sorting of the results. See filtering and sorting for more details.

Parameters

selected_user (required)

This can either be the username of the pull request author, the author's UUID surrounded by curly-braces, for example: {account UUID}, or the author's Atlassian ID.

Type: string

state

Only return pull requests that are in this state. This parameter can be repeated.

Type: string

Potential values: MERGED, SUPERSEDED, OPEN, DECLINED

list_repositories

Returns a paginated list of all repositories owned by the specified account or UUID.

The result can be narrowed down based on the authenticated user's role.

E.g. with ?role=contributor, only those repositories that the authenticated user has write access to are returned (this includes any repo the user is an admin on, as that implies write access).

This endpoint also supports filtering and sorting of the results. See filtering and sorting for more details.

Parameters

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

q

Query string to narrow down the response as per filtering and sorting.

Type: string

role

Filters the result based on the authenticated user's role on each repository.

  • member: returns repositories to which the user has explicit read access
  • contributor: returns repositories to which the user has explicit write access
  • admin: returns repositories to which the user has explicit administrator access
  • owner: returns all repositories owned by the current user

Type: string

Potential values: admin, contributor, member, owner

sort

Field by which the results should be sorted as per filtering and sorting.

Type: string

list_repository_forks

Returns a paginated list of all the forks of the specified repository.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

q

Query string to narrow down the response as per filtering and sorting.

Type: string

role

Filters the result based on the authenticated user's role on each repository.

  • member: returns repositories to which the user has explicit read access
  • contributor: returns repositories to which the user has explicit write access
  • admin: returns repositories to which the user has explicit administrator access
  • owner: returns all repositories owned by the current user

Type: string

Potential values: admin, contributor, member, owner

sort

Field by which the results should be sorted as per filtering and sorting.

Type: string

list_repository_permissions_for_user

Returns an object for each repository the caller has explicit access to and their effective permission — the highest level of permission the caller has. This does not return public repositories that the user was not granted any specific permission in, and does not distinguish between direct and indirect privileges.

Permissions can be:

  • admin
  • write
  • read

Results may be further filtered or sorted by repository or permission by adding the following query string parameters:

  • q=repository.name="geordi" or q=permission>"read"
  • sort=repository.name

Note that the query parameter values need to be URL escaped so that = would become %3D.

Parameters

q

Query string to narrow down the response as per filtering and sorting.

Type: string

sort

Name of a response property sort the result by as per filtering and sorting.

Type: string

list_repository_watchers

Returns a paginated list of all the watchers on the specified repository.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

list_repository_webhooks

Returns a paginated list of webhooks installed on this repository.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

list_snippet_changes

Returns the changes (commits) made on this snippet.

Parameters

encoded_id (required)

The snippet id.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

list_snippet_comments

Used to retrieve a paginated list of all comments for a specific snippet.

This resource works identical to commit and pull request comments.

The default sorting is oldest to newest and can be overridden with the sort query parameter.

Parameters

encoded_id (required)

The snippet id.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

list_snippets

Returns all snippets. Like pull requests, repositories and workspaces, the full set of snippets is defined by what the current user has access to.

This includes all snippets owned by any of the workspaces the user is a member of, or snippets by other users that the current user is either watching or has collaborated on (for instance by commenting on it).

To limit the set of returned snippets, apply the ?role=[owner|contributor|member] query parameter where the roles are defined as follows:

  • owner: all snippets owned by the current user
  • contributor: all snippets owned by, or watched by the current user
  • member: created in a workspaces or watched by the current user

When no role is specified, all public snippets are returned, as well as all privately owned snippets watched or commented on.

The returned response is a normal paginated JSON list. This endpoint only supports application/json responses and no multipart/form-data or multipart/related. As a result, it is not possible to include the file contents.

Parameters

role

Filter down the result based on the authenticated user's role (owner, contributor, or member).

Type: string

Potential values: owner, contributor, member

list_snippets_for_user

Identical to /snippets, except that the result is further filtered by the snippet owner and only those that are owned by {workspace} are returned.

Parameters

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

role

Filter down the result based on the authenticated user's role (owner, contributor, or member).

Type: string

Potential values: owner, contributor, member

list_ssh_keys

Returns a paginated list of the user's SSH public keys.

Parameters

selected_user (required)

This can either be the UUID of the account, surrounded by curly-braces, for example: {account UUID}, OR an Atlassian Account ID.

Type: string

list_subscribable_webhook_types

Returns a paginated list of all valid webhook events for the specified entity. The team and user webhooks are deprecated, and you should use workspace instead. For more information, see the announcement.

This is public data that does not require any scopes or authentication.

Parameters

subject_type (required)

A resource or subject type.

Type: string

Potential values: workspace, user, repository, team

list_tags

Returns the tags in the repository.

By default, results will be in the order the underlying source control system returns them and identical to the ordering one sees when running "$ hg tags" or "$ git tag --list". Note that this follows simple lexical ordering of the ref names.

This can be undesirable as it does apply any natural sorting semantics, meaning for instance that tags are sorted ["v10", "v11", "v9"] instead of ["v9", "v10", "v11"].

Sorting can be changed using the ?sort= query parameter. When using ?sort=name to explicitly sort on ref name, Bitbucket will apply natural sorting and interpret numerical values as numbers instead of strings.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

q

Query string to narrow down the response as per filtering and sorting.

Type: string

sort

Field by which the results should be sorted as per filtering and sorting. The name field is handled specially for tags in that, if specified as the sort field, it uses a natural sort order instead of the default lexicographical sort order. For example, it will return ['1.1', '1.2', '1.10'] instead of ['1.1', '1.10', '1.2'].

Type: string

list_workspace_permissions

Returns the list of members in a workspace and their permission levels. Permission can be:

  • owner
  • collaborator
  • member

Results may be further filtered by permission by adding the following query string parameters:

  • q=permission="owner"
Parameters

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

q

Query string to narrow down the response as per filtering and sorting.

Type: string

list_workspace_projects

Returns the list of projects in this workspace.

Parameters

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

list_workspace_repository_permissions

Returns an object for each repository permission for all of a workspace's repositories.

Permissions returned are effective permissions: the highest level of permission the user has. This does not distinguish between direct and indirect (group) privileges.

Only users with admin permission for the team may access this resource.

Permissions can be:

  • admin
  • write
  • read

Results may be further filtered or sorted by repository, user, or permission by adding the following query string parameters:

  • q=repository.name="geordi" or q=permission>"read"
  • sort=user.display_name

Note that the query parameter values need to be URL escaped so that = would become %3D.

Parameters

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

q

Query string to narrow down the response as per filtering and sorting.

Type: string

sort

Name of a response property sort the result by as per filtering and sorting.

Type: string

list_workspace_users

Returns all members of the requested workspace.

Parameters

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

list_workspace_variables

Find workspace level variables.

Parameters

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

list_workspace_webhooks

Returns a paginated list of webhooks installed on this workspace.

Parameters

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

list_workspaces

Returns a list of workspaces accessible by the authenticated user.

Results may be further filtered or sorted by workspace or permission by adding the following query string parameters:

  • q=slug="bbworkspace1" or q=is_private=true
  • sort=created_on

Note that the query parameter values need to be URL escaped so that = would become %3D.

Parameters

q

Query string to narrow down the response. See filtering and sorting for details.

Type: string

role

Filters the workspaces based on the authenticated user's role on each workspace.

  • member: returns a list of all the workspaces which the caller is a member of at least one workspace group or repository
  • collaborator: returns a list of workspaces which the caller has write access to at least one repository in the workspace
  • owner: returns a list of workspaces which the caller has administrator access

Type: string

Potential values: owner, collaborator, member

sort

Name of a response property to sort results. See filtering and sorting for details.

Type: string

list_workspaces_for_current_user

Returns an object for each workspace the caller is a member of, and their effective role - the highest level of privilege the caller has. If a user is a member of multiple groups with distinct roles, only the highest level is returned.

Permissions can be:

  • owner
  • collaborator
  • member

Results may be further filtered or sorted by workspace or permission by adding the following query string parameters:

  • q=workspace.slug="bbworkspace1" or q=permission="owner"
  • sort=workspace.slug

Note that the query parameter values need to be URL escaped so that = would become %3D.

Parameters

q

Query string to narrow down the response. See filtering and sorting for details.

Type: string

sort

Name of a response property to sort results. See filtering and sorting for details.

Type: string

merge_pull_request

Merges the pull request.

Parameters

pull_request_id (required)

The id of the pull request.

Type: integer

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

$body

The metadata that describes a pull request merge.

Type: object

{
  "merge_strategy" : "The merge strategy that will be used to merge the pull request.",
  "close_source_branch" : "Whether the source branch should be deleted. If this is not provided, we fallback to the value used when the pull request was created, which defaults to False",
  "type" : "Required string",
  "message" : "The commit message that will be used on the resulting commit."
}

async

Default value is false.

When set to true, runs merge asynchronously and immediately returns a 202 with polling link to the task-status API in the Location header.

When set to false, runs merge and waits for it to complete, returning 200 when it succeeds. If the duration of the merge exceeds a timeout threshold, the API returns a 202 with polling link to the task-status API in the Location header.

Type: boolean

remove_default_reviewer

Removes a default reviewer from the repository.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

target_username (required)

This can either be the username or the UUID of the default reviewer, surrounded by curly-braces, for example: {account UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

remove_pull_request_change_request

Remove change request for a pull request

Parameters

pull_request_id (required)

The id of the pull request.

Type: integer

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

remove_vote_for_issue

Remove vote for an issue

Parameters

issue_id (required)

The issue id

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

request_pull_request_changes

Request changes for a pull request

Parameters

pull_request_id (required)

The id of the pull request.

Type: integer

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

run_pipeline

Endpoint to create and initiate a pipeline. There are a couple of different options to initiate a pipeline, where the payload of the request will determine which type of pipeline will be instantiated.

Trigger a Pipeline for a branch

One way to trigger pipelines is by specifying the branch for which you want to trigger a pipeline. The specified branch will be used to determine which pipeline definition from the bitbucket-pipelines.yml file will be applied to initiate the pipeline. The pipeline will then do a clone of the repository and checkout the latest revision of the specified branch.

Trigger a Pipeline for a commit on a branch or tag

You can initiate a pipeline for a specific commit and in the context of a specified reference (e.g. a branch, tag or bookmark). The specified reference will be used to determine which pipeline definition from the bitbucket-pipelines.yml file will be applied to initiate the pipeline. The pipeline will clone the repository and then do a checkout the specified reference.

The following reference types are supported:

  • branch
  • named_branch
  • bookmark
  • tag

Trigger a specific pipeline definition for a commit

You can trigger a specific pipeline that is defined in your bitbucket-pipelines.yml file for a specific commit. In addition to the commit revision, you specify the type and pattern of the selector that identifies the pipeline definition. The resulting pipeline will then clone the repository and checkout the specified revision.

Trigger a specific pipeline definition for a commit on a branch or tag

You can trigger a specific pipeline that is defined in your bitbucket-pipelines.yml file for a specific commit in the context of a specified reference. In addition to the commit revision, you specify the type and pattern of the selector that identifies the pipeline definition, as well as the reference information. The resulting pipeline will then clone the repository a checkout the specified reference.

Trigger a custom pipeline with variables

In addition to triggering a custom pipeline that is defined in your bitbucket-pipelines.yml file as shown in the examples above, you can specify variables that will be available for your build. In the request, provide a list of variables, specifying the following for each variable: key, value, and whether it should be secured or not (this field is optional and defaults to not secured).

Trigger a pull request pipeline

You can also initiate a pipeline for a specific pull request.

Parameters

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

$body

The pipeline to initiate.

Type: object

{
  "type" : "Required string",
  "creator" : {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string"
  },
  "build_seconds_used" : "The number of build seconds used by this pipeline.",
  "created_on" : "The timestamp when the pipeline was created.",
  "completed_on" : "The timestamp when the Pipeline was completed. This is not set if the pipeline is still in progress.",
  "build_number" : "The build number of the pipeline.",
  "trigger" : {
    "type" : "Required string"
  },
  "state" : {
    "type" : "Required string"
  },
  "repository" : {
    "type" : "Required string",
    "is_private" : "boolean",
    "owner" : {
      "type" : "Required string",
      "website" : "string",
      "created_on" : "date-time",
      "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
      "links" : {
        "followers" : {
          "name" : "string",
          "href" : "uri"
        },
        "repositories" : {
          "name" : "string",
          "href" : "uri"
        },
        "following" : {
          "name" : "string",
          "href" : "uri"
        },
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "has_2fa_enabled" : "boolean",
      "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
      "display_name" : "string",
      "uuid" : "string",
      "username" : "string"
    },
    "updated_on" : "date-time",
    "parent" : "repository",
    "fork_policy" : "\nControls the rules for forking this repository.\n\n* **allow_forks**: unrestricted forking\n* **no_public_forks**: restrict forking to private forks (forks cannot\n  be made public later)\n* **no_forks**: deny all forking\n",
    "description" : "string",
    "project" : {
      "type" : "Required string",
      "owner" : {
        "type" : "Required string",
        "website" : "string",
        "created_on" : "date-time",
        "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
        "links" : {
          "followers" : {
            "name" : "string",
            "href" : "uri"
          },
          "repositories" : {
            "name" : "string",
            "href" : "uri"
          },
          "following" : {
            "name" : "string",
            "href" : "uri"
          },
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_2fa_enabled" : "boolean",
        "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
        "display_name" : "string",
        "uuid" : "string",
        "username" : "string"
      },
      "is_private" : "\nIndicates whether the project is publicly accessible, or whether it is\nprivate to the team and consequently only visible to team members.\nNote that private projects cannot contain public repositories.",
      "updated_on" : "date-time",
      "created_on" : "date-time",
      "name" : "The name of the project.",
      "description" : "string",
      "links" : {
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "has_publicly_visible_repos" : "\nIndicates whether the project contains publicly visible repositories.\nNote that private projects cannot contain public repositories.",
      "uuid" : "The project's immutable id.",
      "key" : "The project's key."
    },
    "language" : "string",
    "uuid" : "The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.",
    "has_issues" : "boolean",
    "mainbranch" : {
      "name" : "The name of the ref.",
      "links" : {
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "commits" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "type" : "Required string",
      "target" : {
        "type" : "Required string",
        "date" : "date-time",
        "summary" : {
          "markup" : "The type of markup language the raw content is to be interpreted in.",
          "raw" : "The text as it was typed by a user.",
          "html" : "The user's content rendered as HTML."
        },
        "author" : {
          "type" : "Required string",
          "raw" : "The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.",
          "user" : {
            "type" : "Required string",
            "website" : "string",
            "created_on" : "date-time",
            "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
            "links" : {
              "followers" : {
                "name" : "string",
                "href" : "uri"
              },
              "repositories" : {
                "name" : "string",
                "href" : "uri"
              },
              "following" : {
                "name" : "string",
                "href" : "uri"
              },
              "self" : {
                "name" : "string",
                "href" : "uri"
              },
              "html" : {
                "name" : "string",
                "href" : "uri"
              },
              "avatar" : {
                "name" : "string",
                "href" : "uri"
              }
            },
            "has_2fa_enabled" : "boolean",
            "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
            "display_name" : "string",
            "uuid" : "string",
            "username" : "string"
          }
        },
        "message" : "string",
        "hash" : "string",
        "parents" : [ "base_commit" ],
        "repository" : "repository",
        "participants" : [ {
          "type" : "Required string",
          "approved" : "boolean",
          "role" : "string. Possible values: PARTICIPANT | REVIEWER",
          "state" : "string. Possible values: approved | changes_requested",
          "user" : {
            "type" : "Required string",
            "website" : "string",
            "created_on" : "date-time",
            "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
            "links" : {
              "followers" : {
                "name" : "string",
                "href" : "uri"
              },
              "repositories" : {
                "name" : "string",
                "href" : "uri"
              },
              "following" : {
                "name" : "string",
                "href" : "uri"
              },
              "self" : {
                "name" : "string",
                "href" : "uri"
              },
              "html" : {
                "name" : "string",
                "href" : "uri"
              },
              "avatar" : {
                "name" : "string",
                "href" : "uri"
              }
            },
            "has_2fa_enabled" : "boolean",
            "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
            "display_name" : "string",
            "uuid" : "string",
            "username" : "string",
            "account_id" : "The user's Atlassian account ID.",
            "is_staff" : "boolean"
          },
          "participated_on" : "The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented."
        } ]
      },
      "default_merge_strategy" : "The default merge strategy for pull requests targeting this branch.",
      "merge_strategies" : [ "string. Possible values: merge_commit | squash | fast_forward" ]
    },
    "full_name" : "The concatenation of the repository owner's username and the slugified name, e.g. \"evzijst/interruptingcow\". This is the same string used in Bitbucket URLs.",
    "has_wiki" : "boolean",
    "size" : "integer",
    "created_on" : "date-time",
    "name" : "string",
    "links" : {
      "forks" : {
        "name" : "string",
        "href" : "uri"
      },
      "downloads" : {
        "name" : "string",
        "href" : "uri"
      },
      "clone" : [ {
        "name" : "string",
        "href" : "uri"
      } ],
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "commits" : {
        "name" : "string",
        "href" : "uri"
      },
      "watchers" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      },
      "hooks" : {
        "name" : "string",
        "href" : "uri"
      },
      "pullrequests" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "scm" : "string. Possible values: git"
  },
  "uuid" : "The UUID identifying the pipeline.",
  "target" : {
    "type" : "Required string"
  }
}

search_code_in_team

Search for code in the repositories of the specified team.

Note that searches can match in the file's text (content_matches), the path (path_matches), or both.

You can use the same syntax for the search query as in the UI, e.g. to only search within a specific repository:

Similar to other APIs, you can request more fields using a fields query parameter.

Try fields=%2Bvalues.*.*.*.* to get an idea what's possible.

Parameters

search_query (required)

The search query

Type: string

username (required)

The account to search in; either the username or the UUID in curly braces

Type: string

search_code_in_user

Search for code in the repositories of the specified user.

Note that searches can match in the file's text (content_matches), the path (path_matches), or both.

You can use the same syntax for the search query as in the UI, e.g. to only search within a specific repository:

Similar to other APIs, you can request more fields using a fields query parameter. E.g. to get some more information about the repository of matched files (the %2B is a URL-encoded +):

Try fields=%2Bvalues.*.*.*.* to get an idea what's possible.

Parameters

search_query (required)

The search query

Type: string

selected_user (required)

Either the UUID of the account surrounded by curly-braces, for example {account UUID}, OR an Atlassian Account ID.

Type: string

search_code_in_workspace

Search for code in the repositories of the specified workspace.

Note that searches can match in the file's text (content_matches), the path (path_matches), or both.

You can use the same syntax for the search query as in the UI, e.g. to only search within a specific repository:

Similar to other APIs, you can request more fields using a fields query parameter. E.g. to get some more information about the repository of matched files (the %2B is a URL-encoded +):

Try fields=%2Bvalues.*.*.*.* to get an idea what's possible.

Parameters

search_query (required)

The search query

Type: string

workspace (required)

The workspace to search in; either the slug or the UUID in curly braces

Type: string

stop_pipeline

Signal the stop of a pipeline and all of its steps that not have completed yet.

Parameters

pipeline_uuid (required)

The UUID of the pipeline.

Type: string

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

stop_watching_issue

Stop watching this issue.

Parameters

issue_id (required)

The issue id

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

stop_watching_snippet

Used to stop watching a specific snippet. Returns 204 (No Content) to indicate success.

Parameters

encoded_id (required)

The snippet id.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

unapprove_commit

Redact the authenticated user's approval of the specified commit.

This operation is only available to users that have explicit access to the repository. In contrast, just the fact that a repository is publicly accessible to users does not give them the ability to approve commits.

Parameters

commit (required)

The commit's SHA1.

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

unapprove_pull_request

Redact the authenticated user's approval of the specified pull request.

Parameters

pull_request_id (required)

The id of the pull request.

Type: integer

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

update_application_property_value

Update an application property value stored against a repository.

Parameters

app_key (required)

The key of the Connect app.

Type: string

property_name (required)

The name of the property.

Type: string

repo_slug (required)

The repository.

Type: string

workspace (required)

The repository container; either the workspace slug or the UUID in curly braces.

Type: string

update_branch_restriction

Updates an existing branch restriction rule.

Fields not present in the request body are ignored.

See POST for details.

Parameters

id (required)

The restriction rule's id

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

$body

The new version of the existing rule

Type: object

{
  "type" : "Required string",
  "branch_match_kind" : "Indicates how the restriction is matched against a branch. The default is `glob`.",
  "branch_type" : "Apply the restriction to branches of this type. Active when `branch_match_kind` is `branching_model`. The branch type will be calculated using the branching model configured for the repository.",
  "kind" : "The type of restriction that is being applied.",
  "pattern" : "Apply the restriction to branches that match this pattern. Active when `branch_match_kind` is `glob`. Will be empty when `branch_match_kind` is `branching_model`.",
  "groups" : [ {
    "type" : "Required string",
    "owner" : {
      "type" : "Required string",
      "website" : "string",
      "created_on" : "date-time",
      "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
      "links" : {
        "followers" : {
          "name" : "string",
          "href" : "uri"
        },
        "repositories" : {
          "name" : "string",
          "href" : "uri"
        },
        "following" : {
          "name" : "string",
          "href" : "uri"
        },
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "has_2fa_enabled" : "boolean",
      "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
      "display_name" : "string",
      "uuid" : "string",
      "username" : "string"
    },
    "full_slug" : "The concatenation of the workspace's slug and the group's slug,\nseparated with a colon (e.g. `acme:developers`)\n",
    "workspace" : {
      "type" : "Required string",
      "is_private" : "Indicates whether the workspace is publicly accessible, or whether it is\nprivate to the members and consequently only visible to members.\nNote that private workspaces cannot contain public repositories.",
      "updated_on" : "date-time",
      "created_on" : "date-time",
      "name" : "The name of the workspace.",
      "links" : {
        "projects" : {
          "name" : "string",
          "href" : "uri"
        },
        "repositories" : {
          "name" : "string",
          "href" : "uri"
        },
        "snippets" : {
          "name" : "string",
          "href" : "uri"
        },
        "members" : {
          "name" : "string",
          "href" : "uri"
        },
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "owners" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "uuid" : "The workspace's immutable id.",
      "slug" : "The short label that identifies this workspace."
    },
    "name" : "string",
    "links" : {
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "slug" : "The \"sluggified\" version of the group's name. This contains only ASCII\ncharacters and can therefore be slightly different than the name"
  } ],
  "links" : {
    "self" : {
      "name" : "string",
      "href" : "uri"
    }
  },
  "id" : "The branch restriction status' id.",
  "value" : "integer",
  "users" : [ {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string"
  } ]
}

update_branching_model_config

Update the branching model configuration for a repository.

The development branch can be configured to a specific branch or to track the main branch. When set to a specific branch it must currently exist. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a development property will leave the development branch unchanged.

It is possible for the development branch to be invalid. This happens when it points at a specific branch that has been deleted. This is indicated in the is_valid field for the branch. It is not possible to update the settings for development if that would leave the branch in an invalid state. Such a request will be rejected.

The production branch can be a specific branch, the main branch or disabled. When set to a specific branch it must currently exist. The enabled property can be used to enable (true) or disable (false) it. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a production property will leave the production branch unchanged.

It is possible for the production branch to be invalid. This happens when it points at a specific branch that has been deleted. This is indicated in the is_valid field for the branch. A request that would leave production enabled and invalid will be rejected. It is possible to update production and make it invalid if it would also be left disabled.

The branch_types property contains the branch types to be updated. Only the branch types passed will be updated. All updates will be rejected if it would leave the branching model in an invalid state. For branch types this means that:

  1. The prefixes for all enabled branch types are valid. For example, it is not possible to use '*' inside a Git prefix.
  2. A prefix of an enabled branch type must not be a prefix of another enabled branch type. This is to ensure that a branch can be easily classified by its prefix unambiguously.

It is possible to store an invalid prefix if that branch type would be left disabled. Only the passed properties will be updated. The properties not passed will be left unchanged. Each branch type must have a kind property to identify it.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

update_build_status_for_commit

Used to update the current status of a build status object on the specific commit.

This operation can also be used to change other properties of the build status:

  • state
  • name
  • description
  • url
  • refname

The key cannot be changed.

Parameters

commit (required)

The commit's SHA1.

Type: string

key (required)

The build status' unique key

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

$body

The updated build status object

Type: object

{
  "type" : "Required string",
  "updated_on" : "date-time",
  "created_on" : "date-time",
  "name" : "An identifier for the build itself, e.g. BB-DEPLOY-1",
  "description" : "A description of the build (e.g. \"Unit tests in Bamboo\")",
  "links" : {
    "commit" : {
      "name" : "string",
      "href" : "uri"
    },
    "self" : {
      "name" : "string",
      "href" : "uri"
    }
  },
  "state" : "Provides some indication of the status of this commit",
  "uuid" : "The commit status' id.",
  "key" : "An identifier for the status that's unique to\n        its type (current \"build\" is the only supported type) and the vendor,\n        e.g. BB-DEPLOY",
  "refname" : "\nThe name of the ref that pointed to this commit at the time the status\nobject was created. Note that this the ref may since have moved off of\nthe commit. This optional field can be useful for build systems whose\nbuild triggers and configuration are branch-dependent (e.g. a Pipeline\nbuild).\nIt is legitimate for this field to not be set, or even apply (e.g. a\nstatic linting job).",
  "url" : "A URL linking back to the vendor or build system, for providing more information about whatever process produced this status. Accepts context variables `repository` and `commit` that Bitbucket will evaluate at runtime whenever at runtime. For example, one could use https://foo.com/builds/{repository.full_name} which Bitbucket will turn into https://foo.com/builds/foo/bar at render time."
}

update_commit_application_property_value

Update an application property value stored against a commit.

Parameters

app_key (required)

The key of the Connect app.

Type: string

commit (required)

The commit.

Type: string

property_name (required)

The name of the property.

Type: string

repo_slug (required)

The repository.

Type: string

workspace (required)

The repository container; either the workspace slug or the UUID in curly braces.

Type: string

update_deploy_key

Create a new deploy key in a repository.

The same key needs to be passed in but the comment and label can change.

Parameters

key_id (required)

The key ID matching the deploy key.

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

update_deployment_variable

Update a deployment environment level variable.

Parameters

environment_uuid (required)

The environment.

Type: string

repo_slug (required)

The repository.

Type: string

variable_uuid (required)

The UUID of the variable to update.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

$body

The updated deployment variable.

Type: object

{
  "type" : "Required string",
  "uuid" : "The UUID identifying the variable.",
  "value" : "The value of the variable. If the variable is secured, this will be empty.",
  "secured" : "If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.",
  "key" : "The unique name of the variable."
}

update_environment

Update an environment

Parameters

environment_uuid (required)

The environment UUID.

Type: string

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

update_issue

Modifies the issue.

Any field not present keeps its existing value.

Each time an issue is edited in the UI or through the API, an immutable change record is created under the /issues/123/changes endpoint. It also has a comment associated with the change.

Parameters

issue_id (required)

The issue id

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

update_issue_comment

Updates the content of the specified issue comment. Note that only the content.raw field can be modified.

Parameters

comment_id (required)

The id of the comment.

Type: integer

issue_id (required)

The issue id

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

$body

The updated comment.

Type: object

{
  "type" : "Required string",
  "updated_on" : "date-time",
  "parent" : "comment",
  "deleted" : "boolean",
  "inline" : {
    "path" : "The path of the file this comment is anchored to.",
    "from" : "The comment's anchor line in the old version of the file.",
    "to" : "The comment's anchor line in the new version of the file. If the 'from' line is also provided, this value will be removed."
  },
  "created_on" : "date-time",
  "links" : {
    "code" : {
      "name" : "string",
      "href" : "uri"
    },
    "self" : {
      "name" : "string",
      "href" : "uri"
    },
    "html" : {
      "name" : "string",
      "href" : "uri"
    }
  },
  "id" : "integer",
  "user" : {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string",
    "account_id" : "The user's Atlassian account ID.",
    "is_staff" : "boolean"
  },
  "content" : {
    "markup" : "The type of markup language the raw content is to be interpreted in.",
    "raw" : "The text as it was typed by a user.",
    "html" : "The user's content rendered as HTML."
  },
  "issue" : {
    "type" : "Required string",
    "updated_on" : "date-time",
    "edited_on" : "date-time",
    "kind" : "string. Possible values: bug | enhancement | proposal | task",
    "reporter" : {
      "type" : "Required string",
      "website" : "string",
      "created_on" : "date-time",
      "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
      "links" : {
        "followers" : {
          "name" : "string",
          "href" : "uri"
        },
        "repositories" : {
          "name" : "string",
          "href" : "uri"
        },
        "following" : {
          "name" : "string",
          "href" : "uri"
        },
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "has_2fa_enabled" : "boolean",
      "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
      "display_name" : "string",
      "uuid" : "string",
      "username" : "string",
      "account_id" : "The user's Atlassian account ID.",
      "is_staff" : "boolean"
    },
    "repository" : {
      "type" : "Required string",
      "is_private" : "boolean",
      "owner" : {
        "type" : "Required string",
        "website" : "string",
        "created_on" : "date-time",
        "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
        "links" : {
          "followers" : {
            "name" : "string",
            "href" : "uri"
          },
          "repositories" : {
            "name" : "string",
            "href" : "uri"
          },
          "following" : {
            "name" : "string",
            "href" : "uri"
          },
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_2fa_enabled" : "boolean",
        "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
        "display_name" : "string",
        "uuid" : "string",
        "username" : "string"
      },
      "updated_on" : "date-time",
      "parent" : "repository",
      "fork_policy" : "\nControls the rules for forking this repository.\n\n* **allow_forks**: unrestricted forking\n* **no_public_forks**: restrict forking to private forks (forks cannot\n  be made public later)\n* **no_forks**: deny all forking\n",
      "description" : "string",
      "project" : {
        "type" : "Required string",
        "owner" : {
          "type" : "Required string",
          "website" : "string",
          "created_on" : "date-time",
          "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
          "links" : {
            "followers" : {
              "name" : "string",
              "href" : "uri"
            },
            "repositories" : {
              "name" : "string",
              "href" : "uri"
            },
            "following" : {
              "name" : "string",
              "href" : "uri"
            },
            "self" : {
              "name" : "string",
              "href" : "uri"
            },
            "html" : {
              "name" : "string",
              "href" : "uri"
            },
            "avatar" : {
              "name" : "string",
              "href" : "uri"
            }
          },
          "has_2fa_enabled" : "boolean",
          "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
          "display_name" : "string",
          "uuid" : "string",
          "username" : "string"
        },
        "is_private" : "\nIndicates whether the project is publicly accessible, or whether it is\nprivate to the team and consequently only visible to team members.\nNote that private projects cannot contain public repositories.",
        "updated_on" : "date-time",
        "created_on" : "date-time",
        "name" : "The name of the project.",
        "description" : "string",
        "links" : {
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_publicly_visible_repos" : "\nIndicates whether the project contains publicly visible repositories.\nNote that private projects cannot contain public repositories.",
        "uuid" : "The project's immutable id.",
        "key" : "The project's key."
      },
      "language" : "string",
      "uuid" : "The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.",
      "has_issues" : "boolean",
      "mainbranch" : {
        "name" : "The name of the ref.",
        "links" : {
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "commits" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "type" : "Required string",
        "target" : {
          "type" : "Required string",
          "date" : "date-time",
          "summary" : {
            "markup" : "The type of markup language the raw content is to be interpreted in.",
            "raw" : "The text as it was typed by a user.",
            "html" : "The user's content rendered as HTML."
          },
          "author" : {
            "type" : "Required string",
            "raw" : "The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.",
            "user" : {
              "type" : "Required string",
              "website" : "string",
              "created_on" : "date-time",
              "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
              "links" : {
                "followers" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "repositories" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "following" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "self" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "html" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "avatar" : {
                  "name" : "string",
                  "href" : "uri"
                }
              },
              "has_2fa_enabled" : "boolean",
              "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
              "display_name" : "string",
              "uuid" : "string",
              "username" : "string"
            }
          },
          "message" : "string",
          "hash" : "string",
          "parents" : [ "base_commit" ],
          "repository" : "repository",
          "participants" : [ {
            "type" : "Required string",
            "approved" : "boolean",
            "role" : "string. Possible values: PARTICIPANT | REVIEWER",
            "state" : "string. Possible values: approved | changes_requested",
            "user" : {
              "type" : "Required string",
              "website" : "string",
              "created_on" : "date-time",
              "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
              "links" : {
                "followers" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "repositories" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "following" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "self" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "html" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "avatar" : {
                  "name" : "string",
                  "href" : "uri"
                }
              },
              "has_2fa_enabled" : "boolean",
              "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
              "display_name" : "string",
              "uuid" : "string",
              "username" : "string",
              "account_id" : "The user's Atlassian account ID.",
              "is_staff" : "boolean"
            },
            "participated_on" : "The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented."
          } ]
        },
        "default_merge_strategy" : "The default merge strategy for pull requests targeting this branch.",
        "merge_strategies" : [ "string. Possible values: merge_commit | squash | fast_forward" ]
      },
      "full_name" : "The concatenation of the repository owner's username and the slugified name, e.g. \"evzijst/interruptingcow\". This is the same string used in Bitbucket URLs.",
      "has_wiki" : "boolean",
      "size" : "integer",
      "created_on" : "date-time",
      "name" : "string",
      "links" : {
        "forks" : {
          "name" : "string",
          "href" : "uri"
        },
        "downloads" : {
          "name" : "string",
          "href" : "uri"
        },
        "clone" : [ {
          "name" : "string",
          "href" : "uri"
        } ],
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "commits" : {
          "name" : "string",
          "href" : "uri"
        },
        "watchers" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        },
        "hooks" : {
          "name" : "string",
          "href" : "uri"
        },
        "pullrequests" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "scm" : "string. Possible values: git"
    },
    "title" : "string",
    "priority" : "string. Possible values: trivial | minor | major | critical | blocker",
    "version" : {
      "type" : "Required string",
      "name" : "string",
      "links" : {
        "self" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "id" : "integer"
    },
    "content" : {
      "markup" : "The type of markup language the raw content is to be interpreted in.",
      "raw" : "The text as it was typed by a user.",
      "html" : "The user's content rendered as HTML."
    },
    "component" : {
      "type" : "Required string",
      "name" : "string",
      "links" : {
        "self" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "id" : "integer"
    },
    "milestone" : {
      "type" : "Required string",
      "name" : "string",
      "links" : {
        "self" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "id" : "integer"
    },
    "created_on" : "date-time",
    "links" : {
      "comments" : {
        "name" : "string",
        "href" : "uri"
      },
      "attachments" : {
        "name" : "string",
        "href" : "uri"
      },
      "watch" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "vote" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "votes" : "integer",
    "id" : "integer",
    "assignee" : {
      "type" : "Required string",
      "website" : "string",
      "created_on" : "date-time",
      "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
      "links" : {
        "followers" : {
          "name" : "string",
          "href" : "uri"
        },
        "repositories" : {
          "name" : "string",
          "href" : "uri"
        },
        "following" : {
          "name" : "string",
          "href" : "uri"
        },
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "has_2fa_enabled" : "boolean",
      "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
      "display_name" : "string",
      "uuid" : "string",
      "username" : "string",
      "account_id" : "The user's Atlassian account ID.",
      "is_staff" : "boolean"
    },
    "state" : "string. Possible values: new | open | resolved | on hold | invalid | duplicate | wontfix | closed"
  }
}

update_pipeline_build_number

Update the next build number that should be assigned to a pipeline. The next build number that will be configured has to be strictly higher than the current latest build number for this repository.

Parameters

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

$body

The build number to update.

Type: object

{
  "type" : "Required string",
  "next" : "The next number that will be used as build number."
}

update_pipeline_configuration

Update the pipelines configuration for a repository.

Parameters

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

$body

The updated repository pipelines configuration.

Type: object

{
  "type" : "Required string",
  "repository" : {
    "type" : "Required string",
    "is_private" : "boolean",
    "owner" : {
      "type" : "Required string",
      "website" : "string",
      "created_on" : "date-time",
      "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
      "links" : {
        "followers" : {
          "name" : "string",
          "href" : "uri"
        },
        "repositories" : {
          "name" : "string",
          "href" : "uri"
        },
        "following" : {
          "name" : "string",
          "href" : "uri"
        },
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "has_2fa_enabled" : "boolean",
      "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
      "display_name" : "string",
      "uuid" : "string",
      "username" : "string"
    },
    "updated_on" : "date-time",
    "parent" : "repository",
    "fork_policy" : "\nControls the rules for forking this repository.\n\n* **allow_forks**: unrestricted forking\n* **no_public_forks**: restrict forking to private forks (forks cannot\n  be made public later)\n* **no_forks**: deny all forking\n",
    "description" : "string",
    "project" : {
      "type" : "Required string",
      "owner" : {
        "type" : "Required string",
        "website" : "string",
        "created_on" : "date-time",
        "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
        "links" : {
          "followers" : {
            "name" : "string",
            "href" : "uri"
          },
          "repositories" : {
            "name" : "string",
            "href" : "uri"
          },
          "following" : {
            "name" : "string",
            "href" : "uri"
          },
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_2fa_enabled" : "boolean",
        "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
        "display_name" : "string",
        "uuid" : "string",
        "username" : "string"
      },
      "is_private" : "\nIndicates whether the project is publicly accessible, or whether it is\nprivate to the team and consequently only visible to team members.\nNote that private projects cannot contain public repositories.",
      "updated_on" : "date-time",
      "created_on" : "date-time",
      "name" : "The name of the project.",
      "description" : "string",
      "links" : {
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "has_publicly_visible_repos" : "\nIndicates whether the project contains publicly visible repositories.\nNote that private projects cannot contain public repositories.",
      "uuid" : "The project's immutable id.",
      "key" : "The project's key."
    },
    "language" : "string",
    "uuid" : "The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.",
    "has_issues" : "boolean",
    "mainbranch" : {
      "name" : "The name of the ref.",
      "links" : {
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "commits" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "type" : "Required string",
      "target" : {
        "type" : "Required string",
        "date" : "date-time",
        "summary" : {
          "markup" : "The type of markup language the raw content is to be interpreted in.",
          "raw" : "The text as it was typed by a user.",
          "html" : "The user's content rendered as HTML."
        },
        "author" : {
          "type" : "Required string",
          "raw" : "The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.",
          "user" : {
            "type" : "Required string",
            "website" : "string",
            "created_on" : "date-time",
            "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
            "links" : {
              "followers" : {
                "name" : "string",
                "href" : "uri"
              },
              "repositories" : {
                "name" : "string",
                "href" : "uri"
              },
              "following" : {
                "name" : "string",
                "href" : "uri"
              },
              "self" : {
                "name" : "string",
                "href" : "uri"
              },
              "html" : {
                "name" : "string",
                "href" : "uri"
              },
              "avatar" : {
                "name" : "string",
                "href" : "uri"
              }
            },
            "has_2fa_enabled" : "boolean",
            "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
            "display_name" : "string",
            "uuid" : "string",
            "username" : "string"
          }
        },
        "message" : "string",
        "hash" : "string",
        "parents" : [ "base_commit" ],
        "repository" : "repository",
        "participants" : [ {
          "type" : "Required string",
          "approved" : "boolean",
          "role" : "string. Possible values: PARTICIPANT | REVIEWER",
          "state" : "string. Possible values: approved | changes_requested",
          "user" : {
            "type" : "Required string",
            "website" : "string",
            "created_on" : "date-time",
            "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
            "links" : {
              "followers" : {
                "name" : "string",
                "href" : "uri"
              },
              "repositories" : {
                "name" : "string",
                "href" : "uri"
              },
              "following" : {
                "name" : "string",
                "href" : "uri"
              },
              "self" : {
                "name" : "string",
                "href" : "uri"
              },
              "html" : {
                "name" : "string",
                "href" : "uri"
              },
              "avatar" : {
                "name" : "string",
                "href" : "uri"
              }
            },
            "has_2fa_enabled" : "boolean",
            "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
            "display_name" : "string",
            "uuid" : "string",
            "username" : "string",
            "account_id" : "The user's Atlassian account ID.",
            "is_staff" : "boolean"
          },
          "participated_on" : "The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented."
        } ]
      },
      "default_merge_strategy" : "The default merge strategy for pull requests targeting this branch.",
      "merge_strategies" : [ "string. Possible values: merge_commit | squash | fast_forward" ]
    },
    "full_name" : "The concatenation of the repository owner's username and the slugified name, e.g. \"evzijst/interruptingcow\". This is the same string used in Bitbucket URLs.",
    "has_wiki" : "boolean",
    "size" : "integer",
    "created_on" : "date-time",
    "name" : "string",
    "links" : {
      "forks" : {
        "name" : "string",
        "href" : "uri"
      },
      "downloads" : {
        "name" : "string",
        "href" : "uri"
      },
      "clone" : [ {
        "name" : "string",
        "href" : "uri"
      } ],
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "commits" : {
        "name" : "string",
        "href" : "uri"
      },
      "watchers" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      },
      "hooks" : {
        "name" : "string",
        "href" : "uri"
      },
      "pullrequests" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "scm" : "string. Possible values: git"
  },
  "enabled" : "Whether Pipelines is enabled for the repository."
}

update_pipeline_known_host

Update a repository level known host.

Parameters

known_host_uuid (required)

The UUID of the known host to update.

Type: string

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

$body

The updated known host.

Type: object

{
  "type" : "Required string",
  "public_key" : {
    "type" : "Required string",
    "key_type" : "The type of the public key.",
    "md5_fingerprint" : "The MD5 fingerprint of the public key.",
    "sha256_fingerprint" : "The SHA-256 fingerprint of the public key.",
    "key" : "The base64 encoded public key."
  },
  "hostname" : "The hostname of the known host.",
  "uuid" : "The UUID identifying the known host."
}

update_pipeline_schedule

Update a schedule.

Parameters

repo_slug (required)

The repository.

Type: string

schedule_uuid (required)

The uuid of the schedule.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

$body

The schedule to update.

Type: object

{
  "type" : "Required string",
  "updated_on" : "The timestamp when the schedule was updated.",
  "created_on" : "The timestamp when the schedule was created.",
  "selector" : {
    "type" : "The type of selector.",
    "pattern" : "The name of the matching pipeline definition."
  },
  "uuid" : "The UUID identifying the schedule.",
  "cron_pattern" : "The cron expression that the schedule applies.",
  "enabled" : "Whether the schedule is enabled.",
  "target" : {
    "type" : "Required string"
  }
}

update_pipeline_ssh_key_pair

Create or update the repository SSH key pair. The private key will be set as a default SSH identity in your build container.

Parameters

repo_slug (required)

The repository.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

$body

The created or updated SSH key pair.

Type: object

{
  "type" : "Required string",
  "public_key" : "The SSH public key.",
  "private_key" : "The SSH private key. This value will be empty when retrieving the SSH key pair."
}

update_pipeline_variable

Update a repository level variable.

Parameters

repo_slug (required)

The repository.

Type: string

variable_uuid (required)

The UUID of the variable to update.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

$body

The updated variable

Type: object

{
  "type" : "Required string",
  "uuid" : "The UUID identifying the variable.",
  "value" : "The value of the variable. If the variable is secured, this will be empty.",
  "secured" : "If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.",
  "key" : "The unique name of the variable."
}

update_project

Since this endpoint can be used to both update and to create a project, the request body depends on the intent.

Creation

See the POST documentation for the project collection for an example of the request body.

Note: The key should not be specified in the body of request (since it is already present in the URL). The name is required, everything else is optional.

Update

See the POST documentation for the project collection for an example of the request body.

Note: The key is not required in the body (since it is already in the URL). The key may be specified in the body, if the intent is to change the key itself. In such a scenario, the location of the project is changed and is returned in the Location header of the response.

Parameters

project_key (required)

The project in question. This is the actual key assigned to the project.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

$body

Type: object

{
  "type" : "Required string",
  "owner" : {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string"
  },
  "is_private" : "\nIndicates whether the project is publicly accessible, or whether it is\nprivate to the team and consequently only visible to team members.\nNote that private projects cannot contain public repositories.",
  "updated_on" : "date-time",
  "created_on" : "date-time",
  "name" : "The name of the project.",
  "description" : "string",
  "links" : {
    "html" : {
      "name" : "string",
      "href" : "uri"
    },
    "avatar" : {
      "name" : "string",
      "href" : "uri"
    }
  },
  "has_publicly_visible_repos" : "\nIndicates whether the project contains publicly visible repositories.\nNote that private projects cannot contain public repositories.",
  "uuid" : "The project's immutable id.",
  "key" : "The project's key."
}

update_pull_request

Mutates the specified pull request.

This can be used to change the pull request's branches or description.

Only open pull requests can be mutated.

Parameters

pull_request_id (required)

The id of the pull request.

Type: integer

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

$body

The pull request that is to be updated.

Type: object

{
  "type" : "Required string",
  "summary" : {
    "markup" : "The type of markup language the raw content is to be interpreted in.",
    "raw" : "The text as it was typed by a user.",
    "html" : "The user's content rendered as HTML."
  },
  "comment_count" : "The number of comments for a specific pull request.",
  "updated_on" : "The ISO8601 timestamp the request was last updated.",
  "reason" : "Explains why a pull request was declined. This field is only applicable to pull requests in rejected state.",
  "author" : {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string"
  },
  "destination" : {
    "commit" : {
      "hash" : "string"
    },
    "repository" : {
      "type" : "Required string",
      "is_private" : "boolean",
      "owner" : {
        "type" : "Required string",
        "website" : "string",
        "created_on" : "date-time",
        "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
        "links" : {
          "followers" : {
            "name" : "string",
            "href" : "uri"
          },
          "repositories" : {
            "name" : "string",
            "href" : "uri"
          },
          "following" : {
            "name" : "string",
            "href" : "uri"
          },
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_2fa_enabled" : "boolean",
        "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
        "display_name" : "string",
        "uuid" : "string",
        "username" : "string"
      },
      "updated_on" : "date-time",
      "parent" : "repository",
      "fork_policy" : "\nControls the rules for forking this repository.\n\n* **allow_forks**: unrestricted forking\n* **no_public_forks**: restrict forking to private forks (forks cannot\n  be made public later)\n* **no_forks**: deny all forking\n",
      "description" : "string",
      "project" : {
        "type" : "Required string",
        "owner" : {
          "type" : "Required string",
          "website" : "string",
          "created_on" : "date-time",
          "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
          "links" : {
            "followers" : {
              "name" : "string",
              "href" : "uri"
            },
            "repositories" : {
              "name" : "string",
              "href" : "uri"
            },
            "following" : {
              "name" : "string",
              "href" : "uri"
            },
            "self" : {
              "name" : "string",
              "href" : "uri"
            },
            "html" : {
              "name" : "string",
              "href" : "uri"
            },
            "avatar" : {
              "name" : "string",
              "href" : "uri"
            }
          },
          "has_2fa_enabled" : "boolean",
          "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
          "display_name" : "string",
          "uuid" : "string",
          "username" : "string"
        },
        "is_private" : "\nIndicates whether the project is publicly accessible, or whether it is\nprivate to the team and consequently only visible to team members.\nNote that private projects cannot contain public repositories.",
        "updated_on" : "date-time",
        "created_on" : "date-time",
        "name" : "The name of the project.",
        "description" : "string",
        "links" : {
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_publicly_visible_repos" : "\nIndicates whether the project contains publicly visible repositories.\nNote that private projects cannot contain public repositories.",
        "uuid" : "The project's immutable id.",
        "key" : "The project's key."
      },
      "language" : "string",
      "uuid" : "The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.",
      "has_issues" : "boolean",
      "mainbranch" : {
        "name" : "The name of the ref.",
        "links" : {
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "commits" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "type" : "Required string",
        "target" : {
          "type" : "Required string",
          "date" : "date-time",
          "summary" : {
            "markup" : "The type of markup language the raw content is to be interpreted in.",
            "raw" : "The text as it was typed by a user.",
            "html" : "The user's content rendered as HTML."
          },
          "author" : {
            "type" : "Required string",
            "raw" : "The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.",
            "user" : {
              "type" : "Required string",
              "website" : "string",
              "created_on" : "date-time",
              "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
              "links" : {
                "followers" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "repositories" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "following" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "self" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "html" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "avatar" : {
                  "name" : "string",
                  "href" : "uri"
                }
              },
              "has_2fa_enabled" : "boolean",
              "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
              "display_name" : "string",
              "uuid" : "string",
              "username" : "string"
            }
          },
          "message" : "string",
          "hash" : "string",
          "parents" : [ "base_commit" ],
          "repository" : "repository",
          "participants" : [ {
            "type" : "Required string",
            "approved" : "boolean",
            "role" : "string. Possible values: PARTICIPANT | REVIEWER",
            "state" : "string. Possible values: approved | changes_requested",
            "user" : {
              "type" : "Required string",
              "website" : "string",
              "created_on" : "date-time",
              "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
              "links" : {
                "followers" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "repositories" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "following" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "self" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "html" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "avatar" : {
                  "name" : "string",
                  "href" : "uri"
                }
              },
              "has_2fa_enabled" : "boolean",
              "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
              "display_name" : "string",
              "uuid" : "string",
              "username" : "string",
              "account_id" : "The user's Atlassian account ID.",
              "is_staff" : "boolean"
            },
            "participated_on" : "The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented."
          } ]
        },
        "default_merge_strategy" : "The default merge strategy for pull requests targeting this branch.",
        "merge_strategies" : [ "string. Possible values: merge_commit | squash | fast_forward" ]
      },
      "full_name" : "The concatenation of the repository owner's username and the slugified name, e.g. \"evzijst/interruptingcow\". This is the same string used in Bitbucket URLs.",
      "has_wiki" : "boolean",
      "size" : "integer",
      "created_on" : "date-time",
      "name" : "string",
      "links" : {
        "forks" : {
          "name" : "string",
          "href" : "uri"
        },
        "downloads" : {
          "name" : "string",
          "href" : "uri"
        },
        "clone" : [ {
          "name" : "string",
          "href" : "uri"
        } ],
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "commits" : {
          "name" : "string",
          "href" : "uri"
        },
        "watchers" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        },
        "hooks" : {
          "name" : "string",
          "href" : "uri"
        },
        "pullrequests" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "scm" : "string. Possible values: git"
    },
    "branch" : {
      "default_merge_strategy" : "The default merge strategy, when this endpoint is the destination of the pull request.",
      "name" : "string",
      "merge_strategies" : [ "string. Possible values: merge_commit | squash | fast_forward" ]
    }
  },
  "source" : {
    "commit" : {
      "hash" : "string"
    },
    "repository" : {
      "type" : "Required string",
      "is_private" : "boolean",
      "owner" : {
        "type" : "Required string",
        "website" : "string",
        "created_on" : "date-time",
        "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
        "links" : {
          "followers" : {
            "name" : "string",
            "href" : "uri"
          },
          "repositories" : {
            "name" : "string",
            "href" : "uri"
          },
          "following" : {
            "name" : "string",
            "href" : "uri"
          },
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_2fa_enabled" : "boolean",
        "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
        "display_name" : "string",
        "uuid" : "string",
        "username" : "string"
      },
      "updated_on" : "date-time",
      "parent" : "repository",
      "fork_policy" : "\nControls the rules for forking this repository.\n\n* **allow_forks**: unrestricted forking\n* **no_public_forks**: restrict forking to private forks (forks cannot\n  be made public later)\n* **no_forks**: deny all forking\n",
      "description" : "string",
      "project" : {
        "type" : "Required string",
        "owner" : {
          "type" : "Required string",
          "website" : "string",
          "created_on" : "date-time",
          "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
          "links" : {
            "followers" : {
              "name" : "string",
              "href" : "uri"
            },
            "repositories" : {
              "name" : "string",
              "href" : "uri"
            },
            "following" : {
              "name" : "string",
              "href" : "uri"
            },
            "self" : {
              "name" : "string",
              "href" : "uri"
            },
            "html" : {
              "name" : "string",
              "href" : "uri"
            },
            "avatar" : {
              "name" : "string",
              "href" : "uri"
            }
          },
          "has_2fa_enabled" : "boolean",
          "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
          "display_name" : "string",
          "uuid" : "string",
          "username" : "string"
        },
        "is_private" : "\nIndicates whether the project is publicly accessible, or whether it is\nprivate to the team and consequently only visible to team members.\nNote that private projects cannot contain public repositories.",
        "updated_on" : "date-time",
        "created_on" : "date-time",
        "name" : "The name of the project.",
        "description" : "string",
        "links" : {
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_publicly_visible_repos" : "\nIndicates whether the project contains publicly visible repositories.\nNote that private projects cannot contain public repositories.",
        "uuid" : "The project's immutable id.",
        "key" : "The project's key."
      },
      "language" : "string",
      "uuid" : "The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.",
      "has_issues" : "boolean",
      "mainbranch" : {
        "name" : "The name of the ref.",
        "links" : {
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "commits" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "type" : "Required string",
        "target" : {
          "type" : "Required string",
          "date" : "date-time",
          "summary" : {
            "markup" : "The type of markup language the raw content is to be interpreted in.",
            "raw" : "The text as it was typed by a user.",
            "html" : "The user's content rendered as HTML."
          },
          "author" : {
            "type" : "Required string",
            "raw" : "The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.",
            "user" : {
              "type" : "Required string",
              "website" : "string",
              "created_on" : "date-time",
              "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
              "links" : {
                "followers" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "repositories" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "following" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "self" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "html" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "avatar" : {
                  "name" : "string",
                  "href" : "uri"
                }
              },
              "has_2fa_enabled" : "boolean",
              "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
              "display_name" : "string",
              "uuid" : "string",
              "username" : "string"
            }
          },
          "message" : "string",
          "hash" : "string",
          "parents" : [ "base_commit" ],
          "repository" : "repository",
          "participants" : [ {
            "type" : "Required string",
            "approved" : "boolean",
            "role" : "string. Possible values: PARTICIPANT | REVIEWER",
            "state" : "string. Possible values: approved | changes_requested",
            "user" : {
              "type" : "Required string",
              "website" : "string",
              "created_on" : "date-time",
              "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
              "links" : {
                "followers" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "repositories" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "following" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "self" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "html" : {
                  "name" : "string",
                  "href" : "uri"
                },
                "avatar" : {
                  "name" : "string",
                  "href" : "uri"
                }
              },
              "has_2fa_enabled" : "boolean",
              "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
              "display_name" : "string",
              "uuid" : "string",
              "username" : "string",
              "account_id" : "The user's Atlassian account ID.",
              "is_staff" : "boolean"
            },
            "participated_on" : "The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented."
          } ]
        },
        "default_merge_strategy" : "The default merge strategy for pull requests targeting this branch.",
        "merge_strategies" : [ "string. Possible values: merge_commit | squash | fast_forward" ]
      },
      "full_name" : "The concatenation of the repository owner's username and the slugified name, e.g. \"evzijst/interruptingcow\". This is the same string used in Bitbucket URLs.",
      "has_wiki" : "boolean",
      "size" : "integer",
      "created_on" : "date-time",
      "name" : "string",
      "links" : {
        "forks" : {
          "name" : "string",
          "href" : "uri"
        },
        "downloads" : {
          "name" : "string",
          "href" : "uri"
        },
        "clone" : [ {
          "name" : "string",
          "href" : "uri"
        } ],
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "commits" : {
          "name" : "string",
          "href" : "uri"
        },
        "watchers" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        },
        "hooks" : {
          "name" : "string",
          "href" : "uri"
        },
        "pullrequests" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "scm" : "string. Possible values: git"
    },
    "branch" : {
      "default_merge_strategy" : "The default merge strategy, when this endpoint is the destination of the pull request.",
      "name" : "string",
      "merge_strategies" : [ "string. Possible values: merge_commit | squash | fast_forward" ]
    }
  },
  "title" : "Title of the pull request.",
  "reviewers" : [ {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string"
  } ],
  "task_count" : "The number of open tasks for a specific pull request.",
  "closed_by" : {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string"
  },
  "rendered" : {
    "reason" : {
      "markup" : "The type of markup language the raw content is to be interpreted in.",
      "raw" : "The text as it was typed by a user.",
      "html" : "The user's content rendered as HTML."
    },
    "description" : {
      "markup" : "The type of markup language the raw content is to be interpreted in.",
      "raw" : "The text as it was typed by a user.",
      "html" : "The user's content rendered as HTML."
    },
    "title" : {
      "markup" : "The type of markup language the raw content is to be interpreted in.",
      "raw" : "The text as it was typed by a user.",
      "html" : "The user's content rendered as HTML."
    }
  },
  "created_on" : "The ISO8601 timestamp the request was created.",
  "links" : {
    "comments" : {
      "name" : "string",
      "href" : "uri"
    },
    "activity" : {
      "name" : "string",
      "href" : "uri"
    },
    "approve" : {
      "name" : "string",
      "href" : "uri"
    },
    "merge" : {
      "name" : "string",
      "href" : "uri"
    },
    "decline" : {
      "name" : "string",
      "href" : "uri"
    },
    "self" : {
      "name" : "string",
      "href" : "uri"
    },
    "commits" : {
      "name" : "string",
      "href" : "uri"
    },
    "html" : {
      "name" : "string",
      "href" : "uri"
    },
    "diff" : {
      "name" : "string",
      "href" : "uri"
    },
    "diffstat" : {
      "name" : "string",
      "href" : "uri"
    }
  },
  "close_source_branch" : "A boolean flag indicating if merging the pull request closes the source branch.",
  "id" : "The pull request's unique ID. Note that pull request IDs are only unique within their associated repository.",
  "state" : "The pull request's current status.",
  "merge_commit" : {
    "hash" : "string"
  },
  "participants" : [ {
    "type" : "Required string",
    "approved" : "boolean",
    "role" : "string. Possible values: PARTICIPANT | REVIEWER",
    "state" : "string. Possible values: approved | changes_requested",
    "user" : {
      "type" : "Required string",
      "website" : "string",
      "created_on" : "date-time",
      "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
      "links" : {
        "followers" : {
          "name" : "string",
          "href" : "uri"
        },
        "repositories" : {
          "name" : "string",
          "href" : "uri"
        },
        "following" : {
          "name" : "string",
          "href" : "uri"
        },
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "has_2fa_enabled" : "boolean",
      "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
      "display_name" : "string",
      "uuid" : "string",
      "username" : "string",
      "account_id" : "The user's Atlassian account ID.",
      "is_staff" : "boolean"
    },
    "participated_on" : "The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented."
  } ]
}

update_pull_request_application_property_value

Update an application property value stored against a pull request.

Parameters

app_key (required)

The key of the Connect app.

Type: string

property_name (required)

The name of the property.

Type: string

pullrequest_id (required)

The pull request ID.

Type: string

repo_slug (required)

The repository.

Type: string

workspace (required)

The repository container; either the workspace slug or the UUID in curly braces.

Type: string

update_pull_request_comment

Updates a specific pull request comment.

Parameters

comment_id (required)

The id of the comment.

Type: integer

pull_request_id (required)

The id of the pull request.

Type: integer

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

$body

The contents of the updated comment.

Type: object

{
  "type" : "Required string",
  "updated_on" : "date-time",
  "parent" : "comment",
  "deleted" : "boolean",
  "inline" : {
    "path" : "The path of the file this comment is anchored to.",
    "from" : "The comment's anchor line in the old version of the file.",
    "to" : "The comment's anchor line in the new version of the file. If the 'from' line is also provided, this value will be removed."
  },
  "created_on" : "date-time",
  "links" : {
    "code" : {
      "name" : "string",
      "href" : "uri"
    },
    "self" : {
      "name" : "string",
      "href" : "uri"
    },
    "html" : {
      "name" : "string",
      "href" : "uri"
    }
  },
  "id" : "integer",
  "user" : {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string",
    "account_id" : "The user's Atlassian account ID.",
    "is_staff" : "boolean"
  },
  "content" : {
    "markup" : "The type of markup language the raw content is to be interpreted in.",
    "raw" : "The text as it was typed by a user.",
    "html" : "The user's content rendered as HTML."
  },
  "pullrequest" : {
    "type" : "Required string",
    "summary" : {
      "markup" : "The type of markup language the raw content is to be interpreted in.",
      "raw" : "The text as it was typed by a user.",
      "html" : "The user's content rendered as HTML."
    },
    "comment_count" : "The number of comments for a specific pull request.",
    "updated_on" : "The ISO8601 timestamp the request was last updated.",
    "reason" : "Explains why a pull request was declined. This field is only applicable to pull requests in rejected state.",
    "author" : {
      "type" : "Required string",
      "website" : "string",
      "created_on" : "date-time",
      "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
      "links" : {
        "followers" : {
          "name" : "string",
          "href" : "uri"
        },
        "repositories" : {
          "name" : "string",
          "href" : "uri"
        },
        "following" : {
          "name" : "string",
          "href" : "uri"
        },
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "has_2fa_enabled" : "boolean",
      "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
      "display_name" : "string",
      "uuid" : "string",
      "username" : "string"
    },
    "destination" : {
      "commit" : {
        "hash" : "string"
      },
      "repository" : {
        "type" : "Required string",
        "is_private" : "boolean",
        "owner" : {
          "type" : "Required string",
          "website" : "string",
          "created_on" : "date-time",
          "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
          "links" : {
            "followers" : {
              "name" : "string",
              "href" : "uri"
            },
            "repositories" : {
              "name" : "string",
              "href" : "uri"
            },
            "following" : {
              "name" : "string",
              "href" : "uri"
            },
            "self" : {
              "name" : "string",
              "href" : "uri"
            },
            "html" : {
              "name" : "string",
              "href" : "uri"
            },
            "avatar" : {
              "name" : "string",
              "href" : "uri"
            }
          },
          "has_2fa_enabled" : "boolean",
          "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
          "display_name" : "string",
          "uuid" : "string",
          "username" : "string"
        },
        "updated_on" : "date-time",
        "parent" : "repository",
        "fork_policy" : "\nControls the rules for forking this repository.\n\n* **allow_forks**: unrestricted forking\n* **no_public_forks**: restrict forking to private forks (forks cannot\n  be made public later)\n* **no_forks**: deny all forking\n",
        "description" : "string",
        "project" : {
          "type" : "Required string",
          "owner" : {
            "type" : "Required string",
            "website" : "string",
            "created_on" : "date-time",
            "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
            "links" : {
              "followers" : {
                "name" : "string",
                "href" : "uri"
              },
              "repositories" : {
                "name" : "string",
                "href" : "uri"
              },
              "following" : {
                "name" : "string",
                "href" : "uri"
              },
              "self" : {
                "name" : "string",
                "href" : "uri"
              },
              "html" : {
                "name" : "string",
                "href" : "uri"
              },
              "avatar" : {
                "name" : "string",
                "href" : "uri"
              }
            },
            "has_2fa_enabled" : "boolean",
            "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
            "display_name" : "string",
            "uuid" : "string",
            "username" : "string"
          },
          "is_private" : "\nIndicates whether the project is publicly accessible, or whether it is\nprivate to the team and consequently only visible to team members.\nNote that private projects cannot contain public repositories.",
          "updated_on" : "date-time",
          "created_on" : "date-time",
          "name" : "The name of the project.",
          "description" : "string",
          "links" : {
            "html" : {
              "name" : "string",
              "href" : "uri"
            },
            "avatar" : {
              "name" : "string",
              "href" : "uri"
            }
          },
          "has_publicly_visible_repos" : "\nIndicates whether the project contains publicly visible repositories.\nNote that private projects cannot contain public repositories.",
          "uuid" : "The project's immutable id.",
          "key" : "The project's key."
        },
        "language" : "string",
        "uuid" : "The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.",
        "has_issues" : "boolean",
        "mainbranch" : {
          "name" : "The name of the ref.",
          "links" : {
            "self" : {
              "name" : "string",
              "href" : "uri"
            },
            "commits" : {
              "name" : "string",
              "href" : "uri"
            },
            "html" : {
              "name" : "string",
              "href" : "uri"
            }
          },
          "type" : "Required string",
          "target" : {
            "type" : "Required string",
            "date" : "date-time",
            "summary" : {
              "markup" : "The type of markup language the raw content is to be interpreted in.",
              "raw" : "The text as it was typed by a user.",
              "html" : "The user's content rendered as HTML."
            },
            "author" : {
              "type" : "Required string",
              "raw" : "The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.",
              "user" : {
                "type" : "Required string",
                "website" : "string",
                "created_on" : "date-time",
                "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
                "links" : {
                  "followers" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "repositories" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "following" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "self" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "html" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "avatar" : {
                    "name" : "string",
                    "href" : "uri"
                  }
                },
                "has_2fa_enabled" : "boolean",
                "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
                "display_name" : "string",
                "uuid" : "string",
                "username" : "string"
              }
            },
            "message" : "string",
            "hash" : "string",
            "parents" : [ "base_commit" ],
            "repository" : "repository",
            "participants" : [ {
              "type" : "Required string",
              "approved" : "boolean",
              "role" : "string. Possible values: PARTICIPANT | REVIEWER",
              "state" : "string. Possible values: approved | changes_requested",
              "user" : {
                "type" : "Required string",
                "website" : "string",
                "created_on" : "date-time",
                "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
                "links" : {
                  "followers" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "repositories" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "following" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "self" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "html" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "avatar" : {
                    "name" : "string",
                    "href" : "uri"
                  }
                },
                "has_2fa_enabled" : "boolean",
                "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
                "display_name" : "string",
                "uuid" : "string",
                "username" : "string",
                "account_id" : "The user's Atlassian account ID.",
                "is_staff" : "boolean"
              },
              "participated_on" : "The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented."
            } ]
          },
          "default_merge_strategy" : "The default merge strategy for pull requests targeting this branch.",
          "merge_strategies" : [ "string. Possible values: merge_commit | squash | fast_forward" ]
        },
        "full_name" : "The concatenation of the repository owner's username and the slugified name, e.g. \"evzijst/interruptingcow\". This is the same string used in Bitbucket URLs.",
        "has_wiki" : "boolean",
        "size" : "integer",
        "created_on" : "date-time",
        "name" : "string",
        "links" : {
          "forks" : {
            "name" : "string",
            "href" : "uri"
          },
          "downloads" : {
            "name" : "string",
            "href" : "uri"
          },
          "clone" : [ {
            "name" : "string",
            "href" : "uri"
          } ],
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "commits" : {
            "name" : "string",
            "href" : "uri"
          },
          "watchers" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          },
          "hooks" : {
            "name" : "string",
            "href" : "uri"
          },
          "pullrequests" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "scm" : "string. Possible values: git"
      },
      "branch" : {
        "default_merge_strategy" : "The default merge strategy, when this endpoint is the destination of the pull request.",
        "name" : "string",
        "merge_strategies" : [ "string. Possible values: merge_commit | squash | fast_forward" ]
      }
    },
    "source" : {
      "commit" : {
        "hash" : "string"
      },
      "repository" : {
        "type" : "Required string",
        "is_private" : "boolean",
        "owner" : {
          "type" : "Required string",
          "website" : "string",
          "created_on" : "date-time",
          "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
          "links" : {
            "followers" : {
              "name" : "string",
              "href" : "uri"
            },
            "repositories" : {
              "name" : "string",
              "href" : "uri"
            },
            "following" : {
              "name" : "string",
              "href" : "uri"
            },
            "self" : {
              "name" : "string",
              "href" : "uri"
            },
            "html" : {
              "name" : "string",
              "href" : "uri"
            },
            "avatar" : {
              "name" : "string",
              "href" : "uri"
            }
          },
          "has_2fa_enabled" : "boolean",
          "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
          "display_name" : "string",
          "uuid" : "string",
          "username" : "string"
        },
        "updated_on" : "date-time",
        "parent" : "repository",
        "fork_policy" : "\nControls the rules for forking this repository.\n\n* **allow_forks**: unrestricted forking\n* **no_public_forks**: restrict forking to private forks (forks cannot\n  be made public later)\n* **no_forks**: deny all forking\n",
        "description" : "string",
        "project" : {
          "type" : "Required string",
          "owner" : {
            "type" : "Required string",
            "website" : "string",
            "created_on" : "date-time",
            "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
            "links" : {
              "followers" : {
                "name" : "string",
                "href" : "uri"
              },
              "repositories" : {
                "name" : "string",
                "href" : "uri"
              },
              "following" : {
                "name" : "string",
                "href" : "uri"
              },
              "self" : {
                "name" : "string",
                "href" : "uri"
              },
              "html" : {
                "name" : "string",
                "href" : "uri"
              },
              "avatar" : {
                "name" : "string",
                "href" : "uri"
              }
            },
            "has_2fa_enabled" : "boolean",
            "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
            "display_name" : "string",
            "uuid" : "string",
            "username" : "string"
          },
          "is_private" : "\nIndicates whether the project is publicly accessible, or whether it is\nprivate to the team and consequently only visible to team members.\nNote that private projects cannot contain public repositories.",
          "updated_on" : "date-time",
          "created_on" : "date-time",
          "name" : "The name of the project.",
          "description" : "string",
          "links" : {
            "html" : {
              "name" : "string",
              "href" : "uri"
            },
            "avatar" : {
              "name" : "string",
              "href" : "uri"
            }
          },
          "has_publicly_visible_repos" : "\nIndicates whether the project contains publicly visible repositories.\nNote that private projects cannot contain public repositories.",
          "uuid" : "The project's immutable id.",
          "key" : "The project's key."
        },
        "language" : "string",
        "uuid" : "The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.",
        "has_issues" : "boolean",
        "mainbranch" : {
          "name" : "The name of the ref.",
          "links" : {
            "self" : {
              "name" : "string",
              "href" : "uri"
            },
            "commits" : {
              "name" : "string",
              "href" : "uri"
            },
            "html" : {
              "name" : "string",
              "href" : "uri"
            }
          },
          "type" : "Required string",
          "target" : {
            "type" : "Required string",
            "date" : "date-time",
            "summary" : {
              "markup" : "The type of markup language the raw content is to be interpreted in.",
              "raw" : "The text as it was typed by a user.",
              "html" : "The user's content rendered as HTML."
            },
            "author" : {
              "type" : "Required string",
              "raw" : "The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.",
              "user" : {
                "type" : "Required string",
                "website" : "string",
                "created_on" : "date-time",
                "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
                "links" : {
                  "followers" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "repositories" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "following" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "self" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "html" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "avatar" : {
                    "name" : "string",
                    "href" : "uri"
                  }
                },
                "has_2fa_enabled" : "boolean",
                "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
                "display_name" : "string",
                "uuid" : "string",
                "username" : "string"
              }
            },
            "message" : "string",
            "hash" : "string",
            "parents" : [ "base_commit" ],
            "repository" : "repository",
            "participants" : [ {
              "type" : "Required string",
              "approved" : "boolean",
              "role" : "string. Possible values: PARTICIPANT | REVIEWER",
              "state" : "string. Possible values: approved | changes_requested",
              "user" : {
                "type" : "Required string",
                "website" : "string",
                "created_on" : "date-time",
                "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
                "links" : {
                  "followers" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "repositories" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "following" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "self" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "html" : {
                    "name" : "string",
                    "href" : "uri"
                  },
                  "avatar" : {
                    "name" : "string",
                    "href" : "uri"
                  }
                },
                "has_2fa_enabled" : "boolean",
                "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
                "display_name" : "string",
                "uuid" : "string",
                "username" : "string",
                "account_id" : "The user's Atlassian account ID.",
                "is_staff" : "boolean"
              },
              "participated_on" : "The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented."
            } ]
          },
          "default_merge_strategy" : "The default merge strategy for pull requests targeting this branch.",
          "merge_strategies" : [ "string. Possible values: merge_commit | squash | fast_forward" ]
        },
        "full_name" : "The concatenation of the repository owner's username and the slugified name, e.g. \"evzijst/interruptingcow\". This is the same string used in Bitbucket URLs.",
        "has_wiki" : "boolean",
        "size" : "integer",
        "created_on" : "date-time",
        "name" : "string",
        "links" : {
          "forks" : {
            "name" : "string",
            "href" : "uri"
          },
          "downloads" : {
            "name" : "string",
            "href" : "uri"
          },
          "clone" : [ {
            "name" : "string",
            "href" : "uri"
          } ],
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "commits" : {
            "name" : "string",
            "href" : "uri"
          },
          "watchers" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          },
          "hooks" : {
            "name" : "string",
            "href" : "uri"
          },
          "pullrequests" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "scm" : "string. Possible values: git"
      },
      "branch" : {
        "default_merge_strategy" : "The default merge strategy, when this endpoint is the destination of the pull request.",
        "name" : "string",
        "merge_strategies" : [ "string. Possible values: merge_commit | squash | fast_forward" ]
      }
    },
    "title" : "Title of the pull request.",
    "reviewers" : [ {
      "type" : "Required string",
      "website" : "string",
      "created_on" : "date-time",
      "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
      "links" : {
        "followers" : {
          "name" : "string",
          "href" : "uri"
        },
        "repositories" : {
          "name" : "string",
          "href" : "uri"
        },
        "following" : {
          "name" : "string",
          "href" : "uri"
        },
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "has_2fa_enabled" : "boolean",
      "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
      "display_name" : "string",
      "uuid" : "string",
      "username" : "string"
    } ],
    "task_count" : "The number of open tasks for a specific pull request.",
    "closed_by" : {
      "type" : "Required string",
      "website" : "string",
      "created_on" : "date-time",
      "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
      "links" : {
        "followers" : {
          "name" : "string",
          "href" : "uri"
        },
        "repositories" : {
          "name" : "string",
          "href" : "uri"
        },
        "following" : {
          "name" : "string",
          "href" : "uri"
        },
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "has_2fa_enabled" : "boolean",
      "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
      "display_name" : "string",
      "uuid" : "string",
      "username" : "string"
    },
    "rendered" : {
      "reason" : {
        "markup" : "The type of markup language the raw content is to be interpreted in.",
        "raw" : "The text as it was typed by a user.",
        "html" : "The user's content rendered as HTML."
      },
      "description" : {
        "markup" : "The type of markup language the raw content is to be interpreted in.",
        "raw" : "The text as it was typed by a user.",
        "html" : "The user's content rendered as HTML."
      },
      "title" : {
        "markup" : "The type of markup language the raw content is to be interpreted in.",
        "raw" : "The text as it was typed by a user.",
        "html" : "The user's content rendered as HTML."
      }
    },
    "created_on" : "The ISO8601 timestamp the request was created.",
    "links" : {
      "comments" : {
        "name" : "string",
        "href" : "uri"
      },
      "activity" : {
        "name" : "string",
        "href" : "uri"
      },
      "approve" : {
        "name" : "string",
        "href" : "uri"
      },
      "merge" : {
        "name" : "string",
        "href" : "uri"
      },
      "decline" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "commits" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "diff" : {
        "name" : "string",
        "href" : "uri"
      },
      "diffstat" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "close_source_branch" : "A boolean flag indicating if merging the pull request closes the source branch.",
    "id" : "The pull request's unique ID. Note that pull request IDs are only unique within their associated repository.",
    "state" : "The pull request's current status.",
    "merge_commit" : {
      "hash" : "string"
    },
    "participants" : [ {
      "type" : "Required string",
      "approved" : "boolean",
      "role" : "string. Possible values: PARTICIPANT | REVIEWER",
      "state" : "string. Possible values: approved | changes_requested",
      "user" : {
        "type" : "Required string",
        "website" : "string",
        "created_on" : "date-time",
        "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
        "links" : {
          "followers" : {
            "name" : "string",
            "href" : "uri"
          },
          "repositories" : {
            "name" : "string",
            "href" : "uri"
          },
          "following" : {
            "name" : "string",
            "href" : "uri"
          },
          "self" : {
            "name" : "string",
            "href" : "uri"
          },
          "html" : {
            "name" : "string",
            "href" : "uri"
          },
          "avatar" : {
            "name" : "string",
            "href" : "uri"
          }
        },
        "has_2fa_enabled" : "boolean",
        "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
        "display_name" : "string",
        "uuid" : "string",
        "username" : "string",
        "account_id" : "The user's Atlassian account ID.",
        "is_staff" : "boolean"
      },
      "participated_on" : "The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented."
    } ]
  }
}

update_repository

Since this endpoint can be used to both update and to create a repository, the request body depends on the intent.

Creation

See the POST documentation for the repository endpoint for an example of the request body.

Update

Note: Changing the name of the repository will cause the location to be changed. This is because the URL of the repo is derived from the name (a process called slugification). In such a scenario, it is possible for the request to fail if the newly created slug conflicts with an existing repository's slug. But if there is no conflict, the new location will be returned in the Location header of the response.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

$body

The repository that is to be updated.

Note that the elements "owner" and "full_name" are ignored since the URL implies them.

Type: object

{
  "type" : "Required string",
  "is_private" : "boolean",
  "owner" : {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string"
  },
  "updated_on" : "date-time",
  "parent" : "repository",
  "fork_policy" : "\nControls the rules for forking this repository.\n\n* **allow_forks**: unrestricted forking\n* **no_public_forks**: restrict forking to private forks (forks cannot\n  be made public later)\n* **no_forks**: deny all forking\n",
  "description" : "string",
  "project" : {
    "type" : "Required string",
    "owner" : {
      "type" : "Required string",
      "website" : "string",
      "created_on" : "date-time",
      "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
      "links" : {
        "followers" : {
          "name" : "string",
          "href" : "uri"
        },
        "repositories" : {
          "name" : "string",
          "href" : "uri"
        },
        "following" : {
          "name" : "string",
          "href" : "uri"
        },
        "self" : {
          "name" : "string",
          "href" : "uri"
        },
        "html" : {
          "name" : "string",
          "href" : "uri"
        },
        "avatar" : {
          "name" : "string",
          "href" : "uri"
        }
      },
      "has_2fa_enabled" : "boolean",
      "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
      "display_name" : "string",
      "uuid" : "string",
      "username" : "string"
    },
    "is_private" : "\nIndicates whether the project is publicly accessible, or whether it is\nprivate to the team and consequently only visible to team members.\nNote that private projects cannot contain public repositories.",
    "updated_on" : "date-time",
    "created_on" : "date-time",
    "name" : "The name of the project.",
    "description" : "string",
    "links" : {
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_publicly_visible_repos" : "\nIndicates whether the project contains publicly visible repositories.\nNote that private projects cannot contain public repositories.",
    "uuid" : "The project's immutable id.",
    "key" : "The project's key."
  },
  "language" : "string",
  "uuid" : "The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.",
  "has_issues" : "boolean",
  "mainbranch" : {
    "name" : "The name of the ref.",
    "links" : {
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "commits" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "type" : "Required string",
    "target" : {
      "type" : "Required string",
      "date" : "date-time",
      "summary" : {
        "markup" : "The type of markup language the raw content is to be interpreted in.",
        "raw" : "The text as it was typed by a user.",
        "html" : "The user's content rendered as HTML."
      },
      "author" : {
        "type" : "Required string",
        "raw" : "The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.",
        "user" : {
          "type" : "Required string",
          "website" : "string",
          "created_on" : "date-time",
          "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
          "links" : {
            "followers" : {
              "name" : "string",
              "href" : "uri"
            },
            "repositories" : {
              "name" : "string",
              "href" : "uri"
            },
            "following" : {
              "name" : "string",
              "href" : "uri"
            },
            "self" : {
              "name" : "string",
              "href" : "uri"
            },
            "html" : {
              "name" : "string",
              "href" : "uri"
            },
            "avatar" : {
              "name" : "string",
              "href" : "uri"
            }
          },
          "has_2fa_enabled" : "boolean",
          "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
          "display_name" : "string",
          "uuid" : "string",
          "username" : "string"
        }
      },
      "message" : "string",
      "hash" : "string",
      "parents" : [ "base_commit" ],
      "repository" : "repository",
      "participants" : [ {
        "type" : "Required string",
        "approved" : "boolean",
        "role" : "string. Possible values: PARTICIPANT | REVIEWER",
        "state" : "string. Possible values: approved | changes_requested",
        "user" : {
          "type" : "Required string",
          "website" : "string",
          "created_on" : "date-time",
          "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
          "links" : {
            "followers" : {
              "name" : "string",
              "href" : "uri"
            },
            "repositories" : {
              "name" : "string",
              "href" : "uri"
            },
            "following" : {
              "name" : "string",
              "href" : "uri"
            },
            "self" : {
              "name" : "string",
              "href" : "uri"
            },
            "html" : {
              "name" : "string",
              "href" : "uri"
            },
            "avatar" : {
              "name" : "string",
              "href" : "uri"
            }
          },
          "has_2fa_enabled" : "boolean",
          "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
          "display_name" : "string",
          "uuid" : "string",
          "username" : "string",
          "account_id" : "The user's Atlassian account ID.",
          "is_staff" : "boolean"
        },
        "participated_on" : "The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented."
      } ]
    },
    "default_merge_strategy" : "The default merge strategy for pull requests targeting this branch.",
    "merge_strategies" : [ "string. Possible values: merge_commit | squash | fast_forward" ]
  },
  "full_name" : "The concatenation of the repository owner's username and the slugified name, e.g. \"evzijst/interruptingcow\". This is the same string used in Bitbucket URLs.",
  "has_wiki" : "boolean",
  "size" : "integer",
  "created_on" : "date-time",
  "name" : "string",
  "links" : {
    "forks" : {
      "name" : "string",
      "href" : "uri"
    },
    "downloads" : {
      "name" : "string",
      "href" : "uri"
    },
    "clone" : [ {
      "name" : "string",
      "href" : "uri"
    } ],
    "self" : {
      "name" : "string",
      "href" : "uri"
    },
    "commits" : {
      "name" : "string",
      "href" : "uri"
    },
    "watchers" : {
      "name" : "string",
      "href" : "uri"
    },
    "html" : {
      "name" : "string",
      "href" : "uri"
    },
    "avatar" : {
      "name" : "string",
      "href" : "uri"
    },
    "hooks" : {
      "name" : "string",
      "href" : "uri"
    },
    "pullrequests" : {
      "name" : "string",
      "href" : "uri"
    }
  },
  "scm" : "string. Possible values: git"
}

update_repository_wehook

Updates the specified webhook subscription.

The following properties can be mutated:

  • description
  • url
  • active
  • events
Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

uid (required)

Installed webhook's ID

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

update_snippet

Used to update a snippet. Use this to add and delete files and to change a snippet's title.

To update a snippet, one can either PUT a full snapshot, or only the parts that need to be changed.

The contract for PUT on this API is that properties missing from the request remain untouched so that snippets can be efficiently manipulated with differential payloads.

To delete a property (e.g. the title, or a file), include its name in the request, but omit its value (use null).

As in Git, explicit renaming of files is not supported. Instead, to rename a file, delete it and add it again under another name. This can be done atomically in a single request. Rename detection is left to the SCM.

PUT supports three different content types for both request and response bodies:

  • application/json
  • multipart/related
  • multipart/form-data

The content type used for the request body can be different than that used for the response. Content types are specified using standard HTTP headers.

Use the Content-Type and Accept headers to select the desired request and response format.

Parameters

encoded_id (required)

The snippet id.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

update_snippet_comment

Updates a comment.

Comments can only be updated by their author.

Parameters

comment_id (required)

The id of the comment.

Type: integer

encoded_id (required)

The snippet id.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

update_snippet_revision

Identical to UPDATE /snippets/encoded_id, except that this endpoint takes an explicit commit revision. Only the snippet's "HEAD"/"tip" (most recent) version can be updated and requests on all other, older revisions fail by returning a 405 status.

Usage of this endpoint over the unrestricted /snippets/encoded_id could be desired if the caller wants to be sure no concurrent modifications have taken place between the moment of the UPDATE request and the original GET.

This can be considered a so-called "Compare And Swap", or CAS operation.

Other than that, the two endpoints are identical in behavior.

Parameters

encoded_id (required)

The snippet id.

Type: string

node_id (required)

A commit revision (SHA1).

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

update_ssh_key

Updates a specific SSH public key on a user's account

Note: Only the 'comment' field can be updated using this API. To modify the key or comment values, you must delete and add the key again.

Parameters

key_id (required)

The SSH key's UUID value.

Type: string

selected_user (required)

This can either be the UUID of the account, surrounded by curly-braces, for example: {account UUID}, OR an Atlassian Account ID.

Type: string

$body

The updated SSH key object

Type: object

{
  "type" : "Required string",
  "created_on" : "date-time",
  "last_used" : "date-time",
  "comment" : "The comment parsed from the SSH key (if present)",
  "links" : {
    "self" : {
      "name" : "string",
      "href" : "uri"
    }
  },
  "label" : "The user-defined label for the SSH key",
  "uuid" : "The SSH key's immutable ID.",
  "key" : "The SSH public key value in OpenSSH format.",
  "owner" : {
    "type" : "Required string",
    "website" : "string",
    "created_on" : "date-time",
    "nickname" : "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique.",
    "links" : {
      "followers" : {
        "name" : "string",
        "href" : "uri"
      },
      "repositories" : {
        "name" : "string",
        "href" : "uri"
      },
      "following" : {
        "name" : "string",
        "href" : "uri"
      },
      "self" : {
        "name" : "string",
        "href" : "uri"
      },
      "html" : {
        "name" : "string",
        "href" : "uri"
      },
      "avatar" : {
        "name" : "string",
        "href" : "uri"
      }
    },
    "has_2fa_enabled" : "boolean",
    "account_status" : "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future.",
    "display_name" : "string",
    "uuid" : "string",
    "username" : "string"
  }
}

update_user_application_property_value

Update an application property value stored against a user.

Parameters

app_key (required)

The key of the Connect app.

Type: string

property_name (required)

The name of the property.

Type: string

selected_user (required)

Either the UUID of the account surrounded by curly-braces, for example {account UUID}, OR an Atlassian Account ID.

Type: string

update_workspace_variable

Update a workspace level variable.

Parameters

variable_uuid (required)

The UUID of the variable.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

Type: string

$body

The updated variable.

Type: object

{
  "type" : "Required string",
  "uuid" : "The UUID identifying the variable.",
  "value" : "The value of the variable. If the variable is secured, this will be empty.",
  "secured" : "If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.",
  "key" : "The unique name of the variable."
}

update_workspace_webhook

Updates the specified webhook subscription.

The following properties can be mutated:

  • description
  • url
  • active
  • events
Parameters

uid (required)

Installed webhook's ID

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

upload_download_artifact

Upload new download artifacts.

To upload files, perform a multipart/form-data POST containing one or more files fields:

When a file is uploaded with the same name as an existing artifact, then the existing file will be replaced.

Parameters

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

upload_issue_attachment

Upload new issue attachments.

To upload files, perform a multipart/form-data POST containing one or more file fields.

When a file is uploaded with the same name as an existing attachment, then the existing file will be replaced.

Parameters

issue_id (required)

The issue id

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

vote_for_issue

Vote for this issue.

To cast your vote, do an empty PUT. The 204 status code indicates that the operation was successful.

Parameters

issue_id (required)

The issue id

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

watch_issue

Start watching this issue.

To start watching this issue, do an empty PUT. The 204 status code indicates that the operation was successful.

Parameters

issue_id (required)

The issue id

Type: string

repo_slug (required)

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string

watch_snippet

Used to start watching a specific snippet. Returns 204 (No Content).

Parameters

encoded_id (required)

The snippet id.

Type: string

workspace (required)

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Type: string