bitbucket-api-client-lib

PullrequestsApi

All URIs are relative to https://api.bitbucket.org/2.0

Method HTTP request Description
getPullrequestsForCommit GET /repositories/{workspace}/{repo_slug}/commit/{commit}/pullrequests Returns a paginated list of all pull requests as part of which this commit was reviewed. Pull Request Commit Links app must be installed first before using this API; installation automatically occurs when 'Go to pull request' is clicked from the web interface for a commit's details.
pullrequestsSelectedUserGet GET /pullrequests/{selected_user}  
repositoriesWorkspaceRepoSlugDefaultReviewersGet GET /repositories/{workspace}/{repo_slug}/default-reviewers  
repositoriesWorkspaceRepoSlugDefaultReviewersTargetUsernameDelete DELETE /repositories/{workspace}/{repo_slug}/default-reviewers/{target_username}  
repositoriesWorkspaceRepoSlugDefaultReviewersTargetUsernameGet GET /repositories/{workspace}/{repo_slug}/default-reviewers/{target_username}  
repositoriesWorkspaceRepoSlugDefaultReviewersTargetUsernamePut PUT /repositories/{workspace}/{repo_slug}/default-reviewers/{target_username}  
repositoriesWorkspaceRepoSlugPullrequestsActivityGet GET /repositories/{workspace}/{repo_slug}/pullrequests/activity  
repositoriesWorkspaceRepoSlugPullrequestsGet GET /repositories/{workspace}/{repo_slug}/pullrequests  
repositoriesWorkspaceRepoSlugPullrequestsPost POST /repositories/{workspace}/{repo_slug}/pullrequests  
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdActivityGet GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/activity  
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdApproveDelete DELETE /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/approve  
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdApprovePost POST /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/approve  
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdDelete DELETE /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}  
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdGet GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}  
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut PUT /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}  
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsGet GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments  
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsPost POST /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments  
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommitsGet GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/commits  
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdDeclinePost POST /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/decline  
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdDiffGet GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/diff  
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdDiffstatGet GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/diffstat  
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdGet GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}  
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergePost POST /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/merge  
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeTaskStatusTaskIdGet GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/merge/task-status/{task_id}  
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdPatchGet GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/patch  
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdPut PUT /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}  
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdRequestChangesDelete DELETE /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/request-changes  
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdRequestChangesPost POST /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/request-changes  
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdStatusesGet GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/statuses  

getPullrequestsForCommit

PaginatedPullrequests getPullrequestsForCommit(username, repoSlug, commit, page, pagelen)

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

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.api.PullrequestsApi;


PullrequestsApi apiInstance = new PullrequestsApi();
String username = "username_example"; // String | The account; either the UUID in curly braces, or the account_id
String repoSlug = "repoSlug_example"; // String | The repository; either the UUID in curly braces, or the slug
String commit = "commit_example"; // String | The SHA1 of the commit
Integer page = 1; // Integer | Which page to retrieve
Integer pagelen = 30; // Integer | How many pull requests to retrieve per page
try {
    PaginatedPullrequests result = apiInstance.getPullrequestsForCommit(username, repoSlug, commit, page, pagelen);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#getPullrequestsForCommit");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
username String The account; either the UUID in curly braces, or the account_id  
repoSlug String The repository; either the UUID in curly braces, or the slug  
commit String The SHA1 of the commit  
page Integer Which page to retrieve [optional] [default to 1]
pagelen Integer How many pull requests to retrieve per page [optional] [default to 30]

Return type

PaginatedPullrequests

Authorization

No authorization required

HTTP request headers

pullrequestsSelectedUserGet

PaginatedPullrequests pullrequestsSelectedUserGet(selectedUser, state)

Returns all pull requests authored by the specified user. By default only open pull requests are returned. This can be controlled using the `state` query parameter. To retrieve pull requests that are in one of multiple states, repeat the `state` parameter for each individual state. This endpoint also supports filtering and sorting of the results. See filtering and sorting for more details.

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.PullrequestsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

PullrequestsApi apiInstance = new PullrequestsApi();
String selectedUser = "selectedUser_example"; // String | This can either be the username of the pull request author, the author's UUID surrounded by curly-braces, for example: `{account UUID}`, or the author's Atlassian ID. 
String state = "state_example"; // String | Only return pull requests that are in this state. This parameter can be repeated.
try {
    PaginatedPullrequests result = apiInstance.pullrequestsSelectedUserGet(selectedUser, state);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#pullrequestsSelectedUserGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
selectedUser String This can either be the username of the pull request author, the author's UUID surrounded by curly-braces, for example: `{account UUID}`, or the author's Atlassian ID.  
state String Only return pull requests that are in this state. This parameter can be repeated. [optional] [enum: MERGED, SUPERSEDED, OPEN, DECLINED]

Return type

PaginatedPullrequests

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugDefaultReviewersGet

repositoriesWorkspaceRepoSlugDefaultReviewersGet(repoSlug, workspace)

Returns the repository's default reviewers. These are the users that are automatically added as reviewers on every new pull request that is created.

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.PullrequestsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

PullrequestsApi apiInstance = new PullrequestsApi();
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
try {
    apiInstance.repositoriesWorkspaceRepoSlugDefaultReviewersGet(repoSlug, workspace);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#repositoriesWorkspaceRepoSlugDefaultReviewersGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
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}`.  

Return type

null (empty response body)

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugDefaultReviewersTargetUsernameDelete

Error repositoriesWorkspaceRepoSlugDefaultReviewersTargetUsernameDelete(repoSlug, targetUsername, workspace)

Removes a default reviewer from the repository.

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.PullrequestsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

PullrequestsApi apiInstance = new PullrequestsApi();
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String targetUsername = "targetUsername_example"; // String | This can either be the username or the UUID of the default reviewer, surrounded by curly-braces, for example: `{account UUID}`. 
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
try {
    Error result = apiInstance.repositoriesWorkspaceRepoSlugDefaultReviewersTargetUsernameDelete(repoSlug, targetUsername, workspace);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#repositoriesWorkspaceRepoSlugDefaultReviewersTargetUsernameDelete");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
repoSlug String This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.  
targetUsername String This can either be the username or the UUID of the default reviewer, surrounded by curly-braces, for example: `{account UUID}`.  
workspace String This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`.  

Return type

Error

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugDefaultReviewersTargetUsernameGet

Error repositoriesWorkspaceRepoSlugDefaultReviewersTargetUsernameGet(repoSlug, targetUsername, workspace)

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

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.PullrequestsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

PullrequestsApi apiInstance = new PullrequestsApi();
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String targetUsername = "targetUsername_example"; // String | This can either be the username or the UUID of the default reviewer, surrounded by curly-braces, for example: `{account UUID}`. 
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
try {
    Error result = apiInstance.repositoriesWorkspaceRepoSlugDefaultReviewersTargetUsernameGet(repoSlug, targetUsername, workspace);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#repositoriesWorkspaceRepoSlugDefaultReviewersTargetUsernameGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
repoSlug String This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.  
targetUsername String This can either be the username or the UUID of the default reviewer, surrounded by curly-braces, for example: `{account UUID}`.  
workspace String This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`.  

Return type

Error

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugDefaultReviewersTargetUsernamePut

Error repositoriesWorkspaceRepoSlugDefaultReviewersTargetUsernamePut(repoSlug, targetUsername, workspace)

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.

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.PullrequestsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

PullrequestsApi apiInstance = new PullrequestsApi();
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String targetUsername = "targetUsername_example"; // String | This can either be the username or the UUID of the default reviewer, surrounded by curly-braces, for example: `{account UUID}`. 
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
try {
    Error result = apiInstance.repositoriesWorkspaceRepoSlugDefaultReviewersTargetUsernamePut(repoSlug, targetUsername, workspace);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#repositoriesWorkspaceRepoSlugDefaultReviewersTargetUsernamePut");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
repoSlug String This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.  
targetUsername String This can either be the username or the UUID of the default reviewer, surrounded by curly-braces, for example: `{account UUID}`.  
workspace String This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`.  

Return type

Error

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugPullrequestsActivityGet

repositoriesWorkspaceRepoSlugPullrequestsActivityGet(repoSlug, workspace)

Returns a paginated list of the pull request's activity log. This handler serves both a v20 and internal endpoint. The v20 endpoint returns reviewer comments, updates, and approvals. The internal endpoint includes those plus tasks and attachments. Comments created on a file or a line of code have an inline property. Comment example: ``` { \"pagelen\": 20, \"values\": [ { \"comment\": { \"links\": { \"self\": { \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695/comments/118571088\" }, \"html\": { \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695/_/diff#comment-118571088\" } }, \"deleted\": false, \"pullrequest\": { \"type\": \"pullrequest\", \"id\": 5695, \"links\": { \"self\": { \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\" }, \"html\": { \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\" } }, \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\" }, \"content\": { \"raw\": \"inline with to a dn from lines\", \"markup\": \"markdown\", \"html\": \"<p>inline with to a dn from lines</p>\", \"type\": \"rendered\" }, \"created_on\": \"2019-09-27T00:33:46.039178+00:00\", \"user\": { \"display_name\": \"Name Lastname\", \"uuid\": \"{}\", \"links\": { \"self\": { \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\" }, \"html\": { \"href\": \"https://bitbucket.org/%7B%7D/\" }, \"avatar\": { \"href\": \"https://avatar-management–avatars.us-west-2.prod.public.atl-paas.net/:/128\" } }, \"type\": \"user\", \"nickname\": \"Name\", \"account_id\": \"\" }, \"created_on\": \"2019-09-27T00:33:46.039178+00:00\", \"user\": { \"display_name\": \"Name Lastname\", \"uuid\": \"{}\", \"links\": { \"self\": { \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\" }, \"html\": { \"href\": \"https://bitbucket.org/%7B%7D/\" }, \"avatar\": { \"href\": \"https://avatar-management–avatars.us-west-2.prod.public.atl-paas.net/:/128\" } }, \"type\": \"user\", \"nickname\": \"Name\", \"account_id\": \"\" }, \"updated_on\": \"2019-09-27T00:33:46.055384+00:00\", \"inline\": { \"context_lines\": \"\", \"to\": null, \"path\": \"\", \"outdated\": false, \"from\": 211 }, \"type\": \"pullrequest_comment\", \"id\": 118571088 }, \"pull_request\": { \"type\": \"pullrequest\", \"id\": 5695, \"links\": { \"self\": { \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\" }, \"html\": { \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\" } }, \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\" } } ] } ``` Updates include a state property of OPEN, MERGED, or DECLINED. Update example: ``` { \"pagelen\": 20, \"values\": [ { \"update\": { \"description\": \"\", \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\", \"destination\": { \"commit\": { \"type\": \"commit\", \"hash\": \"6a2c16e4a152\", \"links\": { \"self\": { \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/commit/6a2c16e4a152\" }, \"html\": { \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/commits/6a2c16e4a152\" } } }, \"branch\": { \"name\": \"master\" }, \"repository\": { \"name\": \"Atlaskit-MK-2\", \"type\": \"repository\", \"full_name\": \"atlassian/atlaskit-mk-2\", \"links\": { \"self\": { \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2\" }, \"html\": { \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2\" }, \"avatar\": { \"href\": \"https://bytebucket.org/ravatar/%7B%7D?ts=js\" } }, \"uuid\": \"{}\" } }, \"reason\": \"\", \"source\": { \"commit\": { \"type\": \"commit\", \"hash\": \"728c8bad1813\", \"links\": { \"self\": { \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/commit/728c8bad1813\" }, \"html\": { \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/commits/728c8bad1813\" } } }, \"branch\": { \"name\": \"username/NONE-add-onClick-prop-for-accessibility\" }, \"repository\": { \"name\": \"Atlaskit-MK-2\", \"type\": \"repository\", \"full_name\": \"atlassian/atlaskit-mk-2\", \"links\": { \"self\": { \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2\" }, \"html\": { \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2\" }, \"avatar\": { \"href\": \"https://bytebucket.org/ravatar/%7B%7D?ts=js\" } }, \"uuid\": \"{}\" } }, \"state\": \"OPEN\", \"author\": { \"display_name\": \"Name Lastname\", \"uuid\": \"{}\", \"links\": { \"self\": { \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\" }, \"html\": { \"href\": \"https://bitbucket.org/%7B%7D/\" }, \"avatar\": { \"href\": \"https://avatar-management–avatars.us-west-2.prod.public.atl-paas.net/:/128\" } }, \"type\": \"user\", \"nickname\": \"Name\", \"account_id\": \"\" }, \"date\": \"2019-05-10T06:48:25.305565+00:00\" }, \"pull_request\": { \"type\": \"pullrequest\", \"id\": 5695, \"links\": { \"self\": { \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\" }, \"html\": { \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\" } }, \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\" } } ] } ``` Approval example: ``` { \"pagelen\": 20, \"values\": [ { \"approval\": { \"date\": \"2019-09-27T00:37:19.849534+00:00\", \"pullrequest\": { \"type\": \"pullrequest\", \"id\": 5695, \"links\": { \"self\": { \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\" }, \"html\": { \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\" } }, \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\" }, \"user\": { \"display_name\": \"Name Lastname\", \"uuid\": \"{}\", \"links\": { \"self\": { \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\" }, \"html\": { \"href\": \"https://bitbucket.org/%7B%7D/\" }, \"avatar\": { \"href\": \"https://avatar-management–avatars.us-west-2.prod.public.atl-paas.net/:/128\" } }, \"type\": \"user\", \"nickname\": \"Name\", \"account_id\": \"\" } }, \"pull_request\": { \"type\": \"pullrequest\", \"id\": 5695, \"links\": { \"self\": { \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\" }, \"html\": { \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\" } }, \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\" } } ] } ```

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.PullrequestsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

PullrequestsApi apiInstance = new PullrequestsApi();
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
try {
    apiInstance.repositoriesWorkspaceRepoSlugPullrequestsActivityGet(repoSlug, workspace);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#repositoriesWorkspaceRepoSlugPullrequestsActivityGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
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}`.  

Return type

null (empty response body)

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugPullrequestsGet

PaginatedPullrequests repositoriesWorkspaceRepoSlugPullrequestsGet(repoSlug, workspace, state)

Returns all pull requests on the specified repository. By default only open pull requests are returned. This can be controlled using the `state` query parameter. To retrieve pull requests that are in one of multiple states, repeat the `state` parameter for each individual state. This endpoint also supports filtering and sorting of the results. See filtering and sorting for more details.

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.PullrequestsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

PullrequestsApi apiInstance = new PullrequestsApi();
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
String state = "state_example"; // String | Only return pull requests that are in this state. This parameter can be repeated.
try {
    PaginatedPullrequests result = apiInstance.repositoriesWorkspaceRepoSlugPullrequestsGet(repoSlug, workspace, state);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#repositoriesWorkspaceRepoSlugPullrequestsGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
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}`.  
state String Only return pull requests that are in this state. This parameter can be repeated. [optional] [enum: MERGED, SUPERSEDED, OPEN, DECLINED]

Return type

PaginatedPullrequests

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugPullrequestsPost

Pullrequest repositoriesWorkspaceRepoSlugPullrequestsPost(repoSlug, workspace, body)

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. ``` curl https://api.bitbucket.org/2.0/repositories/my-username/my-repository/pullrequests \ -u my-username:my-password \ –request POST \ –header 'Content-Type: application/json' \ –data '{ \"title\": \"My Title\", \"source\": { \"branch\": { \"name\": \"staging\" } } }' ``` 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`): ``` { \"title\": \"My Title\", \"source\": { \"branch\": { \"name\": \"my-feature-branch\" } }, \"destination\": { \"branch\": { \"name\": \"staging\" } } } ``` Reviewers can be specified by adding an array of user objects as the `reviewers` property. ``` { \"title\": \"My Title\", \"source\": { \"branch\": { \"name\": \"my-feature-branch\" } }, \"reviewers\": [ { \"uuid\": \"{504c3b62-8120-4f0c-a7bc-87800b9d6f70}\" } ] } ``` Other fields: * `description` - a string * `close_source_branch` - boolean that specifies if the source branch should be closed upon merging

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.PullrequestsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

PullrequestsApi apiInstance = new PullrequestsApi();
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
Pullrequest body = new Pullrequest(); // Pullrequest | 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.
try {
    Pullrequest result = apiInstance.repositoriesWorkspaceRepoSlugPullrequestsPost(repoSlug, workspace, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#repositoriesWorkspaceRepoSlugPullrequestsPost");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
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}`.  
body Pullrequest 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. [optional]

Return type

Pullrequest

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdActivityGet

repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdActivityGet(pullRequestId, repoSlug, workspace)

Returns a paginated list of the pull request's activity log. This handler serves both a v20 and internal endpoint. The v20 endpoint returns reviewer comments, updates, and approvals. The internal endpoint includes those plus tasks and attachments. Comments created on a file or a line of code have an inline property. Comment example: ``` { \"pagelen\": 20, \"values\": [ { \"comment\": { \"links\": { \"self\": { \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695/comments/118571088\" }, \"html\": { \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695/_/diff#comment-118571088\" } }, \"deleted\": false, \"pullrequest\": { \"type\": \"pullrequest\", \"id\": 5695, \"links\": { \"self\": { \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\" }, \"html\": { \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\" } }, \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\" }, \"content\": { \"raw\": \"inline with to a dn from lines\", \"markup\": \"markdown\", \"html\": \"<p>inline with to a dn from lines</p>\", \"type\": \"rendered\" }, \"created_on\": \"2019-09-27T00:33:46.039178+00:00\", \"user\": { \"display_name\": \"Name Lastname\", \"uuid\": \"{}\", \"links\": { \"self\": { \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\" }, \"html\": { \"href\": \"https://bitbucket.org/%7B%7D/\" }, \"avatar\": { \"href\": \"https://avatar-management–avatars.us-west-2.prod.public.atl-paas.net/:/128\" } }, \"type\": \"user\", \"nickname\": \"Name\", \"account_id\": \"\" }, \"created_on\": \"2019-09-27T00:33:46.039178+00:00\", \"user\": { \"display_name\": \"Name Lastname\", \"uuid\": \"{}\", \"links\": { \"self\": { \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\" }, \"html\": { \"href\": \"https://bitbucket.org/%7B%7D/\" }, \"avatar\": { \"href\": \"https://avatar-management–avatars.us-west-2.prod.public.atl-paas.net/:/128\" } }, \"type\": \"user\", \"nickname\": \"Name\", \"account_id\": \"\" }, \"updated_on\": \"2019-09-27T00:33:46.055384+00:00\", \"inline\": { \"context_lines\": \"\", \"to\": null, \"path\": \"\", \"outdated\": false, \"from\": 211 }, \"type\": \"pullrequest_comment\", \"id\": 118571088 }, \"pull_request\": { \"type\": \"pullrequest\", \"id\": 5695, \"links\": { \"self\": { \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\" }, \"html\": { \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\" } }, \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\" } } ] } ``` Updates include a state property of OPEN, MERGED, or DECLINED. Update example: ``` { \"pagelen\": 20, \"values\": [ { \"update\": { \"description\": \"\", \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\", \"destination\": { \"commit\": { \"type\": \"commit\", \"hash\": \"6a2c16e4a152\", \"links\": { \"self\": { \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/commit/6a2c16e4a152\" }, \"html\": { \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/commits/6a2c16e4a152\" } } }, \"branch\": { \"name\": \"master\" }, \"repository\": { \"name\": \"Atlaskit-MK-2\", \"type\": \"repository\", \"full_name\": \"atlassian/atlaskit-mk-2\", \"links\": { \"self\": { \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2\" }, \"html\": { \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2\" }, \"avatar\": { \"href\": \"https://bytebucket.org/ravatar/%7B%7D?ts=js\" } }, \"uuid\": \"{}\" } }, \"reason\": \"\", \"source\": { \"commit\": { \"type\": \"commit\", \"hash\": \"728c8bad1813\", \"links\": { \"self\": { \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/commit/728c8bad1813\" }, \"html\": { \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/commits/728c8bad1813\" } } }, \"branch\": { \"name\": \"username/NONE-add-onClick-prop-for-accessibility\" }, \"repository\": { \"name\": \"Atlaskit-MK-2\", \"type\": \"repository\", \"full_name\": \"atlassian/atlaskit-mk-2\", \"links\": { \"self\": { \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2\" }, \"html\": { \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2\" }, \"avatar\": { \"href\": \"https://bytebucket.org/ravatar/%7B%7D?ts=js\" } }, \"uuid\": \"{}\" } }, \"state\": \"OPEN\", \"author\": { \"display_name\": \"Name Lastname\", \"uuid\": \"{}\", \"links\": { \"self\": { \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\" }, \"html\": { \"href\": \"https://bitbucket.org/%7B%7D/\" }, \"avatar\": { \"href\": \"https://avatar-management–avatars.us-west-2.prod.public.atl-paas.net/:/128\" } }, \"type\": \"user\", \"nickname\": \"Name\", \"account_id\": \"\" }, \"date\": \"2019-05-10T06:48:25.305565+00:00\" }, \"pull_request\": { \"type\": \"pullrequest\", \"id\": 5695, \"links\": { \"self\": { \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\" }, \"html\": { \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\" } }, \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\" } } ] } ``` Approval example: ``` { \"pagelen\": 20, \"values\": [ { \"approval\": { \"date\": \"2019-09-27T00:37:19.849534+00:00\", \"pullrequest\": { \"type\": \"pullrequest\", \"id\": 5695, \"links\": { \"self\": { \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\" }, \"html\": { \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\" } }, \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\" }, \"user\": { \"display_name\": \"Name Lastname\", \"uuid\": \"{}\", \"links\": { \"self\": { \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\" }, \"html\": { \"href\": \"https://bitbucket.org/%7B%7D/\" }, \"avatar\": { \"href\": \"https://avatar-management–avatars.us-west-2.prod.public.atl-paas.net/:/128\" } }, \"type\": \"user\", \"nickname\": \"Name\", \"account_id\": \"\" } }, \"pull_request\": { \"type\": \"pullrequest\", \"id\": 5695, \"links\": { \"self\": { \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\" }, \"html\": { \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\" } }, \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\" } } ] } ```

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.PullrequestsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

PullrequestsApi apiInstance = new PullrequestsApi();
Integer pullRequestId = 56; // Integer | The id of the pull request.
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
try {
    apiInstance.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdActivityGet(pullRequestId, repoSlug, workspace);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdActivityGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
pullRequestId Integer 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}`.  

Return type

null (empty response body)

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdApproveDelete

repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdApproveDelete(pullRequestId, repoSlug, workspace)

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

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.PullrequestsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

PullrequestsApi apiInstance = new PullrequestsApi();
Integer pullRequestId = 56; // Integer | The id of the pull request.
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
try {
    apiInstance.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdApproveDelete(pullRequestId, repoSlug, workspace);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdApproveDelete");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
pullRequestId Integer 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}`.  

Return type

null (empty response body)

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdApprovePost

Participant repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdApprovePost(pullRequestId, repoSlug, workspace)

Approve the specified pull request as the authenticated user.

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.PullrequestsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

PullrequestsApi apiInstance = new PullrequestsApi();
Integer pullRequestId = 56; // Integer | The id of the pull request.
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
try {
    Participant result = apiInstance.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdApprovePost(pullRequestId, repoSlug, workspace);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdApprovePost");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
pullRequestId Integer 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}`.  

Return type

Participant

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdDelete

repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdDelete(commentId, pullRequestId, repoSlug, workspace)

Deletes a specific pull request comment.

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.PullrequestsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

PullrequestsApi apiInstance = new PullrequestsApi();
String commentId = "commentId_example"; // String | 
Integer pullRequestId = 56; // Integer | The id of the pull request.
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
try {
    apiInstance.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdDelete(commentId, pullRequestId, repoSlug, workspace);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdDelete");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
commentId String    
pullRequestId Integer 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}`.  

Return type

null (empty response body)

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdGet

PullrequestComment repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdGet(commentId, pullRequestId, repoSlug, workspace)

Returns a specific pull request comment.

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.PullrequestsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

PullrequestsApi apiInstance = new PullrequestsApi();
String commentId = "commentId_example"; // String | 
Integer pullRequestId = 56; // Integer | The id of the pull request.
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
try {
    PullrequestComment result = apiInstance.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdGet(commentId, pullRequestId, repoSlug, workspace);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
commentId String    
pullRequestId Integer 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}`.  

Return type

PullrequestComment

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut

PullrequestComment repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut(body, commentId, pullRequestId, repoSlug, workspace)

Updates a specific pull request comment.

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.PullrequestsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

PullrequestsApi apiInstance = new PullrequestsApi();
PullrequestComment body = new PullrequestComment(); // PullrequestComment | The contents of the updated comment.
String commentId = "commentId_example"; // String | 
Integer pullRequestId = 56; // Integer | The id of the pull request.
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
try {
    PullrequestComment result = apiInstance.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut(body, commentId, pullRequestId, repoSlug, workspace);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body PullrequestComment The contents of the updated comment.  
commentId String    
pullRequestId Integer 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}`.  

Return type

PullrequestComment

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsGet

PaginatedPullrequestComments repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsGet(pullRequestId, repoSlug, workspace)

Returns a paginated list of the pull request's comments. This includes both global, inline comments and replies. The default sorting is oldest to newest and can be overridden with the `sort` query parameter. This endpoint also supports filtering and sorting of the results. See filtering and sorting for more details.

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.PullrequestsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

PullrequestsApi apiInstance = new PullrequestsApi();
Integer pullRequestId = 56; // Integer | The id of the pull request.
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
try {
    PaginatedPullrequestComments result = apiInstance.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsGet(pullRequestId, repoSlug, workspace);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
pullRequestId Integer 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}`.  

Return type

PaginatedPullrequestComments

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsPost

PullrequestComment repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsPost(body, pullRequestId, repoSlug, workspace)

Creates a new pull request comment. Returns the newly created pull request comment.

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.PullrequestsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

PullrequestsApi apiInstance = new PullrequestsApi();
PullrequestComment body = new PullrequestComment(); // PullrequestComment | The comment object.
Integer pullRequestId = 56; // Integer | The id of the pull request.
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
try {
    PullrequestComment result = apiInstance.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsPost(body, pullRequestId, repoSlug, workspace);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsPost");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body PullrequestComment The comment object.  
pullRequestId Integer 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}`.  

Return type

PullrequestComment

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommitsGet

Error repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommitsGet(pullRequestId, repoSlug, workspace)

Returns a paginated list of the pull request's commits. These are the commits that are being merged into the destination branch when the pull requests gets accepted.

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.PullrequestsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

PullrequestsApi apiInstance = new PullrequestsApi();
Integer pullRequestId = 56; // Integer | The id of the pull request.
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
try {
    Error result = apiInstance.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommitsGet(pullRequestId, repoSlug, workspace);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommitsGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
pullRequestId Integer 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}`.  

Return type

Error

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdDeclinePost

Pullrequest repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdDeclinePost(pullRequestId, repoSlug, workspace)

Declines the pull request.

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.PullrequestsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

PullrequestsApi apiInstance = new PullrequestsApi();
Integer pullRequestId = 56; // Integer | The id of the pull request.
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
try {
    Pullrequest result = apiInstance.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdDeclinePost(pullRequestId, repoSlug, workspace);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdDeclinePost");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
pullRequestId Integer 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}`.  

Return type

Pullrequest

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdDiffGet

repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdDiffGet(pullRequestId, repoSlug, workspace)

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

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.PullrequestsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

PullrequestsApi apiInstance = new PullrequestsApi();
Integer pullRequestId = 56; // Integer | The id of the pull request.
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
try {
    apiInstance.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdDiffGet(pullRequestId, repoSlug, workspace);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdDiffGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
pullRequestId Integer 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}`.  

Return type

null (empty response body)

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdDiffstatGet

repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdDiffstatGet(pullRequestId, repoSlug, workspace)

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

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.PullrequestsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

PullrequestsApi apiInstance = new PullrequestsApi();
Integer pullRequestId = 56; // Integer | The id of the pull request.
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
try {
    apiInstance.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdDiffstatGet(pullRequestId, repoSlug, workspace);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdDiffstatGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
pullRequestId Integer 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}`.  

Return type

null (empty response body)

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdGet

Pullrequest repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdGet(pullRequestId, repoSlug, workspace)

Returns the specified pull request.

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.PullrequestsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

PullrequestsApi apiInstance = new PullrequestsApi();
Integer pullRequestId = 56; // Integer | The id of the pull request.
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
try {
    Pullrequest result = apiInstance.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdGet(pullRequestId, repoSlug, workspace);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
pullRequestId Integer 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}`.  

Return type

Pullrequest

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergePost

Pullrequest repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergePost(pullRequestId, repoSlug, workspace, body)

Merges the pull request.

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.PullrequestsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

PullrequestsApi apiInstance = new PullrequestsApi();
Integer pullRequestId = 56; // Integer | The id of the pull request.
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
PullrequestMergeParameters body = new PullrequestMergeParameters(); // PullrequestMergeParameters | 
try {
    Pullrequest result = apiInstance.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergePost(pullRequestId, repoSlug, workspace, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergePost");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
pullRequestId Integer 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}`.  
body PullrequestMergeParameters   [optional]

Return type

Pullrequest

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeTaskStatusTaskIdGet

repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeTaskStatusTaskIdGet(pullRequestId, repoSlug, taskId, workspace)

When merging a pull request takes too long, the client receives a task ID along with a 202 status code. The task ID can be used in a call to this endpoint to check the status of a merge task. ``` curl -X GET https://api.bitbucket.org/2.0/repositories/atlassian/bitbucket/pullrequests/2286/merge/task-status/<task_id> ``` If the merge task is not yet finished, a PENDING status will be returned. ``` HTTP/2 200 { \"task_status\": \"PENDING\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bitbucket/pullrequests/2286/merge/task-status/<task_id>\" } } } ``` If the merge was successful, a SUCCESS status will be returned. ``` HTTP/2 200 { \"task_status\": \"SUCCESS\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bitbucket/pullrequests/2286/merge/task-status/<task_id>\" } }, \"merge_result\": <the merged pull request object> } ``` If the merge task failed, an error will be returned. ``` { \"type\": \"error\", \"error\": { \"message\": \"<error message>\" } } ```

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.PullrequestsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

PullrequestsApi apiInstance = new PullrequestsApi();
Integer pullRequestId = 56; // Integer | The id of the pull request.
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String taskId = "taskId_example"; // String | ID of the merge task
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
try {
    apiInstance.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeTaskStatusTaskIdGet(pullRequestId, repoSlug, taskId, workspace);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeTaskStatusTaskIdGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
pullRequestId Integer 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}`.  
taskId String ID of the merge task  
workspace String This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`.  

Return type

null (empty response body)

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdPatchGet

repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdPatchGet(pullRequestId, repoSlug, workspace)

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

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.PullrequestsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

PullrequestsApi apiInstance = new PullrequestsApi();
Integer pullRequestId = 56; // Integer | The id of the pull request.
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
try {
    apiInstance.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdPatchGet(pullRequestId, repoSlug, workspace);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdPatchGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
pullRequestId Integer 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}`.  

Return type

null (empty response body)

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdPut

Pullrequest repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdPut(pullRequestId, repoSlug, workspace, body)

Mutates the specified pull request. This can be used to change the pull request's branches or description. Only open pull requests can be mutated.

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.PullrequestsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

PullrequestsApi apiInstance = new PullrequestsApi();
Integer pullRequestId = 56; // Integer | The id of the pull request.
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
Pullrequest body = new Pullrequest(); // Pullrequest | The pull request that is to be updated.
try {
    Pullrequest result = apiInstance.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdPut(pullRequestId, repoSlug, workspace, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdPut");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
pullRequestId Integer 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}`.  
body Pullrequest The pull request that is to be updated. [optional]

Return type

Pullrequest

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdRequestChangesDelete

repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdRequestChangesDelete(pullRequestId, repoSlug, workspace)

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.PullrequestsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

PullrequestsApi apiInstance = new PullrequestsApi();
Integer pullRequestId = 56; // Integer | The id of the pull request.
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
try {
    apiInstance.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdRequestChangesDelete(pullRequestId, repoSlug, workspace);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdRequestChangesDelete");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
pullRequestId Integer 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}`.  

Return type

null (empty response body)

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdRequestChangesPost

Participant repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdRequestChangesPost(pullRequestId, repoSlug, workspace)

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.PullrequestsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

PullrequestsApi apiInstance = new PullrequestsApi();
Integer pullRequestId = 56; // Integer | The id of the pull request.
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
try {
    Participant result = apiInstance.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdRequestChangesPost(pullRequestId, repoSlug, workspace);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdRequestChangesPost");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
pullRequestId Integer 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}`.  

Return type

Participant

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdStatusesGet

PaginatedCommitstatuses repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdStatusesGet(pullRequestId, repoSlug, workspace, q, sort)

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

Example

// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.PullrequestsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

PullrequestsApi apiInstance = new PullrequestsApi();
Integer pullRequestId = 56; // Integer | The id of the pull request.
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
String q = "q_example"; // String | Query string to narrow down the response as per [filtering and sorting](../../../../../../meta/filtering). 
String sort = "sort_example"; // String | Field by which the results should be sorted as per [filtering and sorting](../../../../../../meta/filtering). Defaults to `created_on`. 
try {
    PaginatedCommitstatuses result = apiInstance.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdStatusesGet(pullRequestId, repoSlug, workspace, q, sort);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PullrequestsApi#repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdStatusesGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
pullRequestId Integer 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}`.  
q String Query string to narrow down the response as per filtering and sorting. [optional]
sort String Field by which the results should be sorted as per filtering and sorting. Defaults to `created_on`. [optional]

Return type

PaginatedCommitstatuses

Authorization

api_keybasicoauth2

HTTP request headers