All URIs are relative to https://api.bitbucket.org/2.0
Method | HTTP request | Description |
---|---|---|
RepositoriesUsernameRepoSlugCommitNodeApproveDelete | Delete /repositories/{username}/{repo_slug}/commit/{node}/approve | |
RepositoriesUsernameRepoSlugCommitNodeApprovePost | Post /repositories/{username}/{repo_slug}/commit/{node}/approve | |
RepositoriesUsernameRepoSlugCommitNodeCommentsCommentIdGet | Get /repositories/{username}/{repo_slug}/commit/{node}/comments/{comment_id} | |
RepositoriesUsernameRepoSlugCommitNodeCommentsGet | Get /repositories/{username}/{repo_slug}/commit/{node}/comments | |
RepositoriesUsernameRepoSlugCommitNodeCommentsPost | Post /repositories/{username}/{repo_slug}/commit/{node}/comments | |
RepositoriesUsernameRepoSlugCommitNodeGet | Get /repositories/{username}/{repo_slug}/commit/{node} | |
RepositoriesUsernameRepoSlugCommitsGet | Get /repositories/{username}/{repo_slug}/commits | |
RepositoriesUsernameRepoSlugCommitsPost | Post /repositories/{username}/{repo_slug}/commits | |
RepositoriesUsernameRepoSlugCommitsRevisionGet | Get /repositories/{username}/{repo_slug}/commits/{revision} | |
RepositoriesUsernameRepoSlugCommitsRevisionPost | Post /repositories/{username}/{repo_slug}/commits/{revision} | |
RepositoriesUsernameRepoSlugDiffSpecGet | Get /repositories/{username}/{repo_slug}/diff/{spec} | |
RepositoriesUsernameRepoSlugPatchSpecGet | Get /repositories/{username}/{repo_slug}/patch/{spec} |
RepositoriesUsernameRepoSlugCommitNodeApproveDelete(ctx, username, node, repoSlug)
Redact the authenticated user's approval of the specified commit. This operation is only available to users that have explicit access to the repository. In contrast, just the fact that a repository is publicly accessible to users does not give them the ability to approve commits.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
username | string | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. | |
node | string | The commit's SHA1. | |
repoSlug | string | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Participant RepositoriesUsernameRepoSlugCommitNodeApprovePost(ctx, username, node, repoSlug)
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.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
username | string | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. | |
node | string | The commit's SHA1. | |
repoSlug | string | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CommitComment RepositoriesUsernameRepoSlugCommitNodeCommentsCommentIdGet(ctx, username, node, commentId, repoSlug)
Returns the specified commit comment.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
username | string | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. | |
node | string | The commit's SHA1. | |
commentId | int32 | The id of the comment. | |
repoSlug | string | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedCommitComments RepositoriesUsernameRepoSlugCommitNodeCommentsGet(ctx, username, node, repoSlug)
Returns the commit's comments. This includes both global and inline comments. The default sorting is oldest to newest and can be overridden with the sort
query parameter.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
username | string | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. | |
node | string | The commit's SHA1. | |
repoSlug | string | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RepositoriesUsernameRepoSlugCommitNodeCommentsPost(ctx, node, username, repoSlug, body)
Creates new comment on the specified commit. To post a reply to an existing comment, include the parent.id
field: $ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/commit/db9ba1e031d07a02603eae0e559a7adc010257fc/comments/ \\ -X POST -u evzijst \\ -H 'Content-Type: application/json' \\ -d '{\"content\": {\"raw\": \"One more thing!\"}, \"parent\": {\"id\": 5728901}}'
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
node | string | The commit's SHA1. | |
username | string | This can either be the username or the UUID of the user, surrounded by curly-braces, for example: `{user UUID}`. | |
repoSlug | string | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. | |
body | CommitComment | The specified comment. |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Commit RepositoriesUsernameRepoSlugCommitNodeGet(ctx, username, node, repoSlug)
Returns the specified commit.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
username | string | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. | |
node | string | The commit's SHA1. | |
repoSlug | string | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ModelError RepositoriesUsernameRepoSlugCommitsGet(ctx, username, repoSlug)
These are the repository's commits. They are paginated and returned in reverse chronological order, similar to the output of git log
and hg log
. Like these tools, the DAG can be filtered. ## GET /repositories/{username}/{repo_slug}/commits/ Returns all commits in the repo in topological order (newest commit first). All branches and tags are included (similar to git log --all
and hg log
). ## GET /repositories/{username}/{repo_slug}/commits/master Returns all commits on rev master
(similar to git log master
, hg log master
). ## GET /repositories/{username}/{repo_slug}/commits/dev?exclude=master Returns all commits on ref dev
, except those that are reachable on master
(similar to git log dev ^master
). ## GET /repositories/{username}/{repo_slug}/commits/?exclude=master Returns all commits in the repo that are not on master (similar to git log --all ^master
). ## GET /repositories/{username}/{repo_slug}/commits/?include=foo&include=bar&exclude=fu&exclude=fubar Returns all commits that are on refs foo
or bar
, but not on fu
or fubar
(similar to git log foo bar ^fu ^fubar
). Because the response could include a very large number of commits, it is paginated. Follow the 'next' link in the response to navigate to the next page of commits. As with other paginated resources, do not construct your own links. When the include and exclude parameters are more than can fit in a query string, clients can use a x-www-form-urlencoded
POST instead.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
username | string | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. | |
repoSlug | string | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ModelError RepositoriesUsernameRepoSlugCommitsPost(ctx, username, repoSlug)
Identical to GET /repositories/{username}/{repo_slug}/commits
, except that POST allows clients to place the include and exclude parameters in the request body to avoid URL length issues. Note that this resource does NOT support new commit creation.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
username | string | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. | |
repoSlug | string | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ModelError RepositoriesUsernameRepoSlugCommitsRevisionGet(ctx, username, revision, repoSlug)
These are the repository's commits. They are paginated and returned in reverse chronological order, similar to the output of git log
and hg log
. Like these tools, the DAG can be filtered. ## GET /repositories/{username}/{repo_slug}/commits/ Returns all commits in the repo in topological order (newest commit first). All branches and tags are included (similar to git log --all
and hg log
). ## GET /repositories/{username}/{repo_slug}/commits/master Returns all commits on rev master
(similar to git log master
, hg log master
). ## GET /repositories/{username}/{repo_slug}/commits/dev?exclude=master Returns all commits on ref dev
, except those that are reachable on master
(similar to git log dev ^master
). ## GET /repositories/{username}/{repo_slug}/commits/?exclude=master Returns all commits in the repo that are not on master (similar to git log --all ^master
). ## GET /repositories/{username}/{repo_slug}/commits/?include=foo&include=bar&exclude=fu&exclude=fubar Returns all commits that are on refs foo
or bar
, but not on fu
or fubar
(similar to git log foo bar ^fu ^fubar
). Because the response could include a very large number of commits, it is paginated. Follow the 'next' link in the response to navigate to the next page of commits. As with other paginated resources, do not construct your own links. When the include and exclude parameters are more than can fit in a query string, clients can use a x-www-form-urlencoded
POST instead.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
username | string | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. | |
revision | string | ||
repoSlug | string | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ModelError RepositoriesUsernameRepoSlugCommitsRevisionPost(ctx, username, revision, repoSlug)
Identical to GET /repositories/{username}/{repo_slug}/commits
, except that POST allows clients to place the include and exclude parameters in the request body to avoid URL length issues. Note that this resource does NOT support new commit creation.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
username | string | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. | |
revision | string | ||
repoSlug | string | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RepositoriesUsernameRepoSlugDiffSpecGet(ctx, username, spec, repoSlug, optional)
Produces a raw, git-style diff for either a single commit (diffed against its first parent), or a revspec of 2 commits (e.g. 3a8b42..9ff173
where the first commit represents the source and the second commit the destination). In case of the latter (diffing a revspec), a 3-way diff, or merge diff, is computed. This shows the changes introduced by the left branch (3a8b42
in our example) as compared againt the right branch (9ff173
). 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). This follows the same behavior as pull requests that also show this style of 3-way, or merge diff. 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 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
.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
username | string | ||
spec | string | ||
repoSlug | string | ||
optional | map[string]interface{} | optional parameters | nil if no parameters |
Optional parameters are passed through a map[string]interface{}.
Name | Type | Description | Notes |
---|---|---|---|
username | string | ||
spec | string | ||
repoSlug | string | ||
context | int32 | Generate diffs with <n> lines of context instead of the usual three | |
path | string | Limit the diff to a particular file (this parameter can be repeated for multiple paths) | |
ignoreWhitespace | bool | Generate diffs that ignore whitespace | |
binary | bool | Generate diffs that include binary files,true if omitted. |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RepositoriesUsernameRepoSlugPatchSpecGet(ctx, username, spec, repoSlug)
Produces a raw patch for a single commit (diffed against its first parent), or a patch-series for a revspec of 2 commits (e.g. 3a8b42..9ff173
where the first commit represents the source and the second commit the destination). In case of the latter (diffing a revspec), a patch series is returned for the commits on the source branch (3a8b42
and its ancestors in our example). For Mercurial, a single patch is returned that combines the changes of all commits on the source branch. While similar to diffs, patches: * Have a commit header (username, commit message, etc) * Do not support the path=foo/bar.py
query parameter The raw patch is returned as-is, in whatever encoding the files in the repository use. It is not decoded into unicode. As such, the content-type is text/plain
.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
username | string | ||
spec | string | ||
repoSlug | string |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]