Skip to content

Latest commit

 

History

History
1913 lines (1458 loc) · 84.8 KB

PullrequestsApi.md

File metadata and controls

1913 lines (1458 loc) · 84.8 KB

Itofinity.Bitbucket.Rest.Api.PullrequestsApi

All URIs are relative to https://api.localhost:8000/2.0

Method HTTP request Description
PullrequestsTargetUserGet Get /pullrequests/{target_user}
RepositoriesUsernameRepoSlugDefaultReviewersGet Get /repositories/{username}/{repo_slug}/default-reviewers
RepositoriesUsernameRepoSlugDefaultReviewersTargetUsernameDelete Delete /repositories/{username}/{repo_slug}/default-reviewers/{target_username}
RepositoriesUsernameRepoSlugDefaultReviewersTargetUsernameGet Get /repositories/{username}/{repo_slug}/default-reviewers/{target_username}
RepositoriesUsernameRepoSlugDefaultReviewersTargetUsernamePut Put /repositories/{username}/{repo_slug}/default-reviewers/{target_username}
RepositoriesUsernameRepoSlugPullrequestsActivityGet Get /repositories/{username}/{repo_slug}/pullrequests/activity
RepositoriesUsernameRepoSlugPullrequestsGet Get /repositories/{username}/{repo_slug}/pullrequests
RepositoriesUsernameRepoSlugPullrequestsPost Post /repositories/{username}/{repo_slug}/pullrequests
RepositoriesUsernameRepoSlugPullrequestsPullRequestIdActivityGet Get /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/activity
RepositoriesUsernameRepoSlugPullrequestsPullRequestIdApproveDelete Delete /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/approve
RepositoriesUsernameRepoSlugPullrequestsPullRequestIdApprovePost Post /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/approve
RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsCommentIdDelete Delete /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}
RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsCommentIdGet Get /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}
RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut Put /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}
RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsGet Get /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/comments
RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsPost Post /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/comments
RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommitsGet Get /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/commits
RepositoriesUsernameRepoSlugPullrequestsPullRequestIdDeclinePost Post /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/decline
RepositoriesUsernameRepoSlugPullrequestsPullRequestIdDiffGet Get /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/diff
RepositoriesUsernameRepoSlugPullrequestsPullRequestIdDiffstatGet Get /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/diffstat
RepositoriesUsernameRepoSlugPullrequestsPullRequestIdGet Get /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}
RepositoriesUsernameRepoSlugPullrequestsPullRequestIdMergePost Post /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/merge
RepositoriesUsernameRepoSlugPullrequestsPullRequestIdPatchGet Get /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/patch
RepositoriesUsernameRepoSlugPullrequestsPullRequestIdPut Put /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}
RepositoriesUsernameRepoSlugPullrequestsPullRequestIdStatusesGet Get /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/statuses

PullrequestsTargetUserGet

PaginatedPullrequests PullrequestsTargetUserGet (string target_user, string username, string state = null)

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

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class PullrequestsTargetUserGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PullrequestsApi();
            var target_user = target_user_example;  // string | 
            var username = username_example;  // string | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. 
            var state = state_example;  // string | Only return pull requests that are in this state. This parameter can be repeated. (optional) 

            try
            {
                PaginatedPullrequests result = apiInstance.PullrequestsTargetUserGet(target_user, username, state);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PullrequestsApi.PullrequestsTargetUserGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
target_user string
username string This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user.
state string Only return pull requests that are in this state. This parameter can be repeated. [optional]

Return type

PaginatedPullrequests

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RepositoriesUsernameRepoSlugDefaultReviewersGet

void RepositoriesUsernameRepoSlugDefaultReviewersGet (string username, string repo_slug)

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

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class RepositoriesUsernameRepoSlugDefaultReviewersGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PullrequestsApi();
            var username = username_example;  // string | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. 
            var repo_slug = repo_slug_example;  // string | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 

            try
            {
                apiInstance.RepositoriesUsernameRepoSlugDefaultReviewersGet(username, repo_slug);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PullrequestsApi.RepositoriesUsernameRepoSlugDefaultReviewersGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
username string This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user.
repo_slug string This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.

Return type

void (empty response body)

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RepositoriesUsernameRepoSlugDefaultReviewersTargetUsernameDelete

Error RepositoriesUsernameRepoSlugDefaultReviewersTargetUsernameDelete (string username, string repo_slug, string target_username)

Removes a default reviewer from the repository.

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class RepositoriesUsernameRepoSlugDefaultReviewersTargetUsernameDeleteExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PullrequestsApi();
            var username = username_example;  // string | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. 
            var repo_slug = repo_slug_example;  // string | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
            var target_username = target_username_example;  // string | This can either be the username or the UUID of the default reviewer, surrounded by curly-braces, for example: `{account UUID}`. 

            try
            {
                Error result = apiInstance.RepositoriesUsernameRepoSlugDefaultReviewersTargetUsernameDelete(username, repo_slug, target_username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PullrequestsApi.RepositoriesUsernameRepoSlugDefaultReviewersTargetUsernameDelete: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
username string This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user.
repo_slug string This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.
target_username string This can either be the username or the UUID of the default reviewer, surrounded by curly-braces, for example: `{account UUID}`.

Return type

Error

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RepositoriesUsernameRepoSlugDefaultReviewersTargetUsernameGet

Error RepositoriesUsernameRepoSlugDefaultReviewersTargetUsernameGet (string username, string repo_slug, string target_username)

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

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class RepositoriesUsernameRepoSlugDefaultReviewersTargetUsernameGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PullrequestsApi();
            var username = username_example;  // string | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. 
            var repo_slug = repo_slug_example;  // string | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
            var target_username = target_username_example;  // string | This can either be the username or the UUID of the default reviewer, surrounded by curly-braces, for example: `{account UUID}`. 

            try
            {
                Error result = apiInstance.RepositoriesUsernameRepoSlugDefaultReviewersTargetUsernameGet(username, repo_slug, target_username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PullrequestsApi.RepositoriesUsernameRepoSlugDefaultReviewersTargetUsernameGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
username string This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user.
repo_slug string This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.
target_username string This can either be the username or the UUID of the default reviewer, surrounded by curly-braces, for example: `{account UUID}`.

Return type

Error

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RepositoriesUsernameRepoSlugDefaultReviewersTargetUsernamePut

Error RepositoriesUsernameRepoSlugDefaultReviewersTargetUsernamePut (string username, string repo_slug, string target_username)

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

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class RepositoriesUsernameRepoSlugDefaultReviewersTargetUsernamePutExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PullrequestsApi();
            var username = username_example;  // string | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. 
            var repo_slug = repo_slug_example;  // string | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
            var target_username = target_username_example;  // string | This can either be the username or the UUID of the default reviewer, surrounded by curly-braces, for example: `{account UUID}`. 

            try
            {
                Error result = apiInstance.RepositoriesUsernameRepoSlugDefaultReviewersTargetUsernamePut(username, repo_slug, target_username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PullrequestsApi.RepositoriesUsernameRepoSlugDefaultReviewersTargetUsernamePut: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
username string This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user.
repo_slug string This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.
target_username string This can either be the username or the UUID of the default reviewer, surrounded by curly-braces, for example: `{account UUID}`.

Return type

Error

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RepositoriesUsernameRepoSlugPullrequestsActivityGet

void RepositoriesUsernameRepoSlugPullrequestsActivityGet (string username, string repo_slug, int? pull_request_id)

Returns a paginated list of the pull request's activity log. This includes comments that were made by the reviewers, updates and approvals.

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class RepositoriesUsernameRepoSlugPullrequestsActivityGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PullrequestsApi();
            var username = username_example;  // string | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. 
            var repo_slug = repo_slug_example;  // string | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
            var pull_request_id = 56;  // int? | The id of the pull request.

            try
            {
                apiInstance.RepositoriesUsernameRepoSlugPullrequestsActivityGet(username, repo_slug, pull_request_id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PullrequestsApi.RepositoriesUsernameRepoSlugPullrequestsActivityGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
username string This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user.
repo_slug string This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.
pull_request_id int? The id of the pull request.

Return type

void (empty response body)

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RepositoriesUsernameRepoSlugPullrequestsGet

PaginatedPullrequests RepositoriesUsernameRepoSlugPullrequestsGet (string username, string repo_slug, string state = null)

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

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class RepositoriesUsernameRepoSlugPullrequestsGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PullrequestsApi();
            var username = username_example;  // string | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. 
            var repo_slug = repo_slug_example;  // string | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
            var state = state_example;  // string | Only return pull requests that are in this state. This parameter can be repeated. (optional) 

            try
            {
                PaginatedPullrequests result = apiInstance.RepositoriesUsernameRepoSlugPullrequestsGet(username, repo_slug, state);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PullrequestsApi.RepositoriesUsernameRepoSlugPullrequestsGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
username string This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user.
repo_slug string This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.
state string Only return pull requests that are in this state. This parameter can be repeated. [optional]

Return type

PaginatedPullrequests

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RepositoriesUsernameRepoSlugPullrequestsPost

Pullrequest RepositoriesUsernameRepoSlugPullrequestsPost (string username, string repo_slug, Pullrequest _body = null)

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

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class RepositoriesUsernameRepoSlugPullrequestsPostExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PullrequestsApi();
            var username = username_example;  // string | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. 
            var repo_slug = repo_slug_example;  // string | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
            var _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. (optional) 

            try
            {
                Pullrequest result = apiInstance.RepositoriesUsernameRepoSlugPullrequestsPost(username, repo_slug, _body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PullrequestsApi.RepositoriesUsernameRepoSlugPullrequestsPost: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
username string This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user.
repo_slug string This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository 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_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RepositoriesUsernameRepoSlugPullrequestsPullRequestIdActivityGet

void RepositoriesUsernameRepoSlugPullrequestsPullRequestIdActivityGet (string username, string repo_slug, int? pull_request_id)

Returns a paginated list of the pull request's activity log. This includes comments that were made by the reviewers, updates and approvals.

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class RepositoriesUsernameRepoSlugPullrequestsPullRequestIdActivityGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PullrequestsApi();
            var username = username_example;  // string | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. 
            var repo_slug = repo_slug_example;  // string | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
            var pull_request_id = 56;  // int? | The id of the pull request.

            try
            {
                apiInstance.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdActivityGet(username, repo_slug, pull_request_id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PullrequestsApi.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdActivityGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
username string This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user.
repo_slug string This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.
pull_request_id int? The id of the pull request.

Return type

void (empty response body)

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RepositoriesUsernameRepoSlugPullrequestsPullRequestIdApproveDelete

void RepositoriesUsernameRepoSlugPullrequestsPullRequestIdApproveDelete (string username, string pull_request_id, string repo_slug)

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

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class RepositoriesUsernameRepoSlugPullrequestsPullRequestIdApproveDeleteExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PullrequestsApi();
            var username = username_example;  // string | 
            var pull_request_id = pull_request_id_example;  // string | 
            var repo_slug = repo_slug_example;  // string | 

            try
            {
                apiInstance.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdApproveDelete(username, pull_request_id, repo_slug);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PullrequestsApi.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdApproveDelete: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
username string
pull_request_id string
repo_slug string

Return type

void (empty response body)

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RepositoriesUsernameRepoSlugPullrequestsPullRequestIdApprovePost

Participant RepositoriesUsernameRepoSlugPullrequestsPullRequestIdApprovePost (string username, string pull_request_id, string repo_slug)

Approve the specified pull request as the authenticated user.

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class RepositoriesUsernameRepoSlugPullrequestsPullRequestIdApprovePostExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PullrequestsApi();
            var username = username_example;  // string | 
            var pull_request_id = pull_request_id_example;  // string | 
            var repo_slug = repo_slug_example;  // string | 

            try
            {
                Participant result = apiInstance.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdApprovePost(username, pull_request_id, repo_slug);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PullrequestsApi.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdApprovePost: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
username string
pull_request_id string
repo_slug string

Return type

Participant

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsCommentIdDelete

void RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsCommentIdDelete (string username, string pull_request_id, string comment_id, string repo_slug)

Deletes a specific pull request comment.

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsCommentIdDeleteExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PullrequestsApi();
            var username = username_example;  // string | 
            var pull_request_id = pull_request_id_example;  // string | 
            var comment_id = comment_id_example;  // string | 
            var repo_slug = repo_slug_example;  // string | 

            try
            {
                apiInstance.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsCommentIdDelete(username, pull_request_id, comment_id, repo_slug);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PullrequestsApi.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsCommentIdDelete: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
username string
pull_request_id string
comment_id string
repo_slug string

Return type

void (empty response body)

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsCommentIdGet

PullrequestComment RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsCommentIdGet (string username, string pull_request_id, string comment_id, string repo_slug)

Returns a specific pull request comment.

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsCommentIdGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PullrequestsApi();
            var username = username_example;  // string | 
            var pull_request_id = pull_request_id_example;  // string | 
            var comment_id = comment_id_example;  // string | 
            var repo_slug = repo_slug_example;  // string | 

            try
            {
                PullrequestComment result = apiInstance.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsCommentIdGet(username, pull_request_id, comment_id, repo_slug);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PullrequestsApi.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsCommentIdGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
username string
pull_request_id string
comment_id string
repo_slug string

Return type

PullrequestComment

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut

PullrequestComment RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut (string username, string pull_request_id, string comment_id, string repo_slug, PullrequestComment _body)

Updates a specific pull request comment.

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsCommentIdPutExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PullrequestsApi();
            var username = username_example;  // string | 
            var pull_request_id = pull_request_id_example;  // string | 
            var comment_id = comment_id_example;  // string | 
            var repo_slug = repo_slug_example;  // string | 
            var _body = new PullrequestComment(); // PullrequestComment | The contents of the updated comment.

            try
            {
                PullrequestComment result = apiInstance.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut(username, pull_request_id, comment_id, repo_slug, _body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PullrequestsApi.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
username string
pull_request_id string
comment_id string
repo_slug string
_body PullrequestComment The contents of the updated comment.

Return type

PullrequestComment

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsGet

PaginatedPullrequestComments RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsGet (string username, string repo_slug, int? pull_request_id)

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

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PullrequestsApi();
            var username = username_example;  // string | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. 
            var repo_slug = repo_slug_example;  // string | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
            var pull_request_id = 56;  // int? | The id of the pull request.

            try
            {
                PaginatedPullrequestComments result = apiInstance.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsGet(username, repo_slug, pull_request_id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PullrequestsApi.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
username string This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user.
repo_slug string This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.
pull_request_id int? The id of the pull request.

Return type

PaginatedPullrequestComments

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsPost

PullrequestComment RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsPost (string username, string repo_slug, int? pull_request_id, PullrequestComment _body)

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

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsPostExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PullrequestsApi();
            var username = username_example;  // string | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. 
            var repo_slug = repo_slug_example;  // string | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
            var pull_request_id = 56;  // int? | The id of the pull request.
            var _body = new PullrequestComment(); // PullrequestComment | The comment object.

            try
            {
                PullrequestComment result = apiInstance.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsPost(username, repo_slug, pull_request_id, _body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PullrequestsApi.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsPost: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
username string This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user.
repo_slug string This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.
pull_request_id int? The id of the pull request.
_body PullrequestComment The comment object.

Return type

PullrequestComment

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommitsGet

Error RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommitsGet (string username, string pull_request_id, string repo_slug)

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

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommitsGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PullrequestsApi();
            var username = username_example;  // string | 
            var pull_request_id = pull_request_id_example;  // string | 
            var repo_slug = repo_slug_example;  // string | 

            try
            {
                Error result = apiInstance.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommitsGet(username, pull_request_id, repo_slug);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PullrequestsApi.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommitsGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
username string
pull_request_id string
repo_slug string

Return type

Error

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RepositoriesUsernameRepoSlugPullrequestsPullRequestIdDeclinePost

Pullrequest RepositoriesUsernameRepoSlugPullrequestsPullRequestIdDeclinePost (string username, string pull_request_id, string repo_slug)

Declines the pull request.

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class RepositoriesUsernameRepoSlugPullrequestsPullRequestIdDeclinePostExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PullrequestsApi();
            var username = username_example;  // string | 
            var pull_request_id = pull_request_id_example;  // string | 
            var repo_slug = repo_slug_example;  // string | 

            try
            {
                Pullrequest result = apiInstance.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdDeclinePost(username, pull_request_id, repo_slug);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PullrequestsApi.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdDeclinePost: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
username string
pull_request_id string
repo_slug string

Return type

Pullrequest

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RepositoriesUsernameRepoSlugPullrequestsPullRequestIdDiffGet

void RepositoriesUsernameRepoSlugPullrequestsPullRequestIdDiffGet (string username, string pull_request_id, string repo_slug)

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

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class RepositoriesUsernameRepoSlugPullrequestsPullRequestIdDiffGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PullrequestsApi();
            var username = username_example;  // string | 
            var pull_request_id = pull_request_id_example;  // string | 
            var repo_slug = repo_slug_example;  // string | 

            try
            {
                apiInstance.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdDiffGet(username, pull_request_id, repo_slug);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PullrequestsApi.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdDiffGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
username string
pull_request_id string
repo_slug string

Return type

void (empty response body)

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RepositoriesUsernameRepoSlugPullrequestsPullRequestIdDiffstatGet

void RepositoriesUsernameRepoSlugPullrequestsPullRequestIdDiffstatGet (string username, string pull_request_id, string repo_slug)

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

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class RepositoriesUsernameRepoSlugPullrequestsPullRequestIdDiffstatGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PullrequestsApi();
            var username = username_example;  // string | 
            var pull_request_id = pull_request_id_example;  // string | 
            var repo_slug = repo_slug_example;  // string | 

            try
            {
                apiInstance.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdDiffstatGet(username, pull_request_id, repo_slug);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PullrequestsApi.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdDiffstatGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
username string
pull_request_id string
repo_slug string

Return type

void (empty response body)

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RepositoriesUsernameRepoSlugPullrequestsPullRequestIdGet

Pullrequest RepositoriesUsernameRepoSlugPullrequestsPullRequestIdGet (string username, string repo_slug, int? pull_request_id)

Returns the specified pull request.

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class RepositoriesUsernameRepoSlugPullrequestsPullRequestIdGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PullrequestsApi();
            var username = username_example;  // string | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. 
            var repo_slug = repo_slug_example;  // string | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
            var pull_request_id = 56;  // int? | The id of the pull request.

            try
            {
                Pullrequest result = apiInstance.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdGet(username, repo_slug, pull_request_id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PullrequestsApi.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
username string This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user.
repo_slug string This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.
pull_request_id int? The id of the pull request.

Return type

Pullrequest

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RepositoriesUsernameRepoSlugPullrequestsPullRequestIdMergePost

Pullrequest RepositoriesUsernameRepoSlugPullrequestsPullRequestIdMergePost (string username, string pull_request_id, string repo_slug, PullrequestMergeParameters _body = null)

Merges the pull request.

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class RepositoriesUsernameRepoSlugPullrequestsPullRequestIdMergePostExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PullrequestsApi();
            var username = username_example;  // string | 
            var pull_request_id = pull_request_id_example;  // string | 
            var repo_slug = repo_slug_example;  // string | 
            var _body = new PullrequestMergeParameters(); // PullrequestMergeParameters |  (optional) 

            try
            {
                Pullrequest result = apiInstance.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdMergePost(username, pull_request_id, repo_slug, _body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PullrequestsApi.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdMergePost: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
username string
pull_request_id string
repo_slug string
_body PullrequestMergeParameters [optional]

Return type

Pullrequest

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RepositoriesUsernameRepoSlugPullrequestsPullRequestIdPatchGet

Error RepositoriesUsernameRepoSlugPullrequestsPullRequestIdPatchGet (string username, string pull_request_id, string repo_slug)

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class RepositoriesUsernameRepoSlugPullrequestsPullRequestIdPatchGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PullrequestsApi();
            var username = username_example;  // string | 
            var pull_request_id = pull_request_id_example;  // string | 
            var repo_slug = repo_slug_example;  // string | 

            try
            {
                Error result = apiInstance.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdPatchGet(username, pull_request_id, repo_slug);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PullrequestsApi.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdPatchGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
username string
pull_request_id string
repo_slug string

Return type

Error

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RepositoriesUsernameRepoSlugPullrequestsPullRequestIdPut

Pullrequest RepositoriesUsernameRepoSlugPullrequestsPullRequestIdPut (string username, string repo_slug, int? pull_request_id, Pullrequest _body = null)

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

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class RepositoriesUsernameRepoSlugPullrequestsPullRequestIdPutExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PullrequestsApi();
            var username = username_example;  // string | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. 
            var repo_slug = repo_slug_example;  // string | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
            var pull_request_id = 56;  // int? | The id of the pull request.
            var _body = new Pullrequest(); // Pullrequest | The pull request that is to be updated. (optional) 

            try
            {
                Pullrequest result = apiInstance.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdPut(username, repo_slug, pull_request_id, _body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PullrequestsApi.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdPut: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
username string This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user.
repo_slug string This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.
pull_request_id int? The id of the pull request.
_body Pullrequest The pull request that is to be updated. [optional]

Return type

Pullrequest

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RepositoriesUsernameRepoSlugPullrequestsPullRequestIdStatusesGet

PaginatedCommitstatuses RepositoriesUsernameRepoSlugPullrequestsPullRequestIdStatusesGet (string username, int? pull_request_id, string repo_slug)

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

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class RepositoriesUsernameRepoSlugPullrequestsPullRequestIdStatusesGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PullrequestsApi();
            var username = username_example;  // string | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. 
            var pull_request_id = 56;  // int? | The id of the pull request.
            var repo_slug = repo_slug_example;  // string | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 

            try
            {
                PaginatedCommitstatuses result = apiInstance.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdStatusesGet(username, pull_request_id, repo_slug);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PullrequestsApi.RepositoriesUsernameRepoSlugPullrequestsPullRequestIdStatusesGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
username string This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user.
pull_request_id int? The id of the pull request.
repo_slug string This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.

Return type

PaginatedCommitstatuses

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]