All URIs are relative to https://api.bitbucket.org/2.0
Method | HTTP request | Description |
---|---|---|
RepositoriesWorkspaceRepoSlugCommitCommitStatusesBuildKeyGet | Get /repositories/{workspace}/{repo_slug}/commit/{commit}/statuses/build/{key} | Get a build status for a commit |
RepositoriesWorkspaceRepoSlugCommitCommitStatusesBuildKeyPut | Put /repositories/{workspace}/{repo_slug}/commit/{commit}/statuses/build/{key} | Update a build status for a commit |
RepositoriesWorkspaceRepoSlugCommitCommitStatusesBuildPost | Post /repositories/{workspace}/{repo_slug}/commit/{commit}/statuses/build | Create a build status for a commit |
RepositoriesWorkspaceRepoSlugCommitCommitStatusesGet | Get /repositories/{workspace}/{repo_slug}/commit/{commit}/statuses | List commit statuses for a commit |
RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdStatusesGet | Get /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/statuses | List commit statuses for a pull request |
Commitstatus RepositoriesWorkspaceRepoSlugCommitCommitStatusesBuildKeyGet(ctx, commit, key, repoSlug, workspace) Get a build status for a commit
Returns the specified build status for a commit.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
commit | string | The commit's SHA1. | |
key | string | The build status' unique key | |
repoSlug | string | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. | |
workspace | string | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Commitstatus RepositoriesWorkspaceRepoSlugCommitCommitStatusesBuildKeyPut(ctx, commit, key, repoSlug, workspace, optional) Update a build status for a commit
Used to update the current status of a build status object on the specific commit. This operation can also be used to change other properties of the build status: * state
* name
* description
* url
* refname
The key
cannot be changed.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
commit | string | The commit's SHA1. | |
key | string | The build status' unique key | |
repoSlug | string | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. | |
workspace | string | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. | |
optional | *CommitStatusesApiRepositoriesWorkspaceRepoSlugCommitCommitStatusesBuildKeyPutOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a CommitStatusesApiRepositoriesWorkspaceRepoSlugCommitCommitStatusesBuildKeyPutOpts struct
Name | Type | Description | Notes |
---|
body | optional.Interface of Commitstatus| The updated build status object |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Commitstatus RepositoriesWorkspaceRepoSlugCommitCommitStatusesBuildPost(ctx, commit, repoSlug, workspace, optional) Create a build status for a commit
Creates a new build status against the specified commit. If the specified key already exists, the existing status object will be overwritten. Example: curl https://api.bitbucket.org/2.0/repositories/my-workspace/my-repo/commit/e10dae226959c2194f2b07b077c07762d93821cf/statuses/build/ -X POST -u jdoe -H 'Content-Type: application/json' -d '{ \"key\": \"MY-BUILD\", \"state\": \"SUCCESSFUL\", \"description\": \"42 tests passed\", \"url\": \"https://www.example.org/my-build-result\" }'
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
.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
commit | 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}`. | |
workspace | string | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. | |
optional | *CommitStatusesApiRepositoriesWorkspaceRepoSlugCommitCommitStatusesBuildPostOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a CommitStatusesApiRepositoriesWorkspaceRepoSlugCommitCommitStatusesBuildPostOpts struct
Name | Type | Description | Notes |
---|
body | optional.Interface of Commitstatus| The new commit status object. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedCommitstatuses RepositoriesWorkspaceRepoSlugCommitCommitStatusesGet(ctx, commit, repoSlug, workspace, optional) List commit statuses for a commit
Returns all statuses (e.g. build results) for a specific commit.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
commit | 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}`. | |
workspace | string | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. | |
optional | *CommitStatusesApiRepositoriesWorkspaceRepoSlugCommitCommitStatusesGetOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a CommitStatusesApiRepositoriesWorkspaceRepoSlugCommitCommitStatusesGetOpts struct
Name | Type | Description | Notes |
---|
q | optional.String| Query string to narrow down the response as per filtering and sorting. | sort | optional.String| Field by which the results should be sorted as per filtering and sorting. Defaults to `created_on`. | page | optional.Int32| page |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedCommitstatuses RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdStatusesGet(ctx, pullRequestId, repoSlug, workspace, optional) List commit statuses for a pull request
Returns all statuses (e.g. build results) for the given pull request.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
pullRequestId | int32 | The id of the pull request. | |
repoSlug | string | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. | |
workspace | string | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. | |
optional | *CommitStatusesApiRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdStatusesGetOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a CommitStatusesApiRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdStatusesGetOpts struct
Name | Type | Description | Notes |
---|
q | optional.String| Query string to narrow down the response as per filtering and sorting. | sort | optional.String| Field by which the results should be sorted as per filtering and sorting. Defaults to `created_on`. | page | optional.Int32| page |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]