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"