Skip to content

Latest commit

 

History

History
3677 lines (3058 loc) · 176 KB

PullrequestsApi.md

File metadata and controls

3677 lines (3058 loc) · 176 KB

bitbucketopenapi.PullrequestsApi

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

Method HTTP request Description
create_repositories_by_username_by_repo_slug_pullrequests POST /repositories/{username}/{repo_slug}/pullrequests
create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_approve POST /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/approve
create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments POST /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/comments
create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_decline POST /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/decline
create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_merge POST /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/merge
delete_repositories_by_username_by_repo_slug_defaultreviewers_by_target_username DELETE /repositories/{username}/{repo_slug}/default-reviewers/{target_username}
delete_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_approve DELETE /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/approve
delete_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments_by_comment_id DELETE /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}
get_pullrequests_by_target_user GET /pullrequests/{target_user}
get_pullrequests_for_commit GET /repositories/{workspace}/{repo_slug}/commit/{commit}/pullrequests Returns a paginated list of all pull requests as part of which this commit was reviewed.
get_repositories_by_username_by_repo_slug_defaultreviewers GET /repositories/{username}/{repo_slug}/default-reviewers
get_repositories_by_username_by_repo_slug_defaultreviewers_by_target_username GET /repositories/{username}/{repo_slug}/default-reviewers/{target_username}
get_repositories_by_username_by_repo_slug_pullrequests GET /repositories/{username}/{repo_slug}/pullrequests
get_repositories_by_username_by_repo_slug_pullrequests_activity GET /repositories/{username}/{repo_slug}/pullrequests/activity
get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id GET /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}
get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_activity GET /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/activity
get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments GET /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/comments
get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments_by_comment_id GET /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}
get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_commits GET /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/commits
get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_diff GET /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/diff
get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_diffstat GET /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/diffstat
get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_patch GET /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/patch
get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_statuses GET /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/statuses
update_repositories_by_username_by_repo_slug_defaultreviewers_by_target_username PUT /repositories/{username}/{repo_slug}/default-reviewers/{target_username}
update_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id PUT /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}
update_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments_by_comment_id PUT /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}

create_repositories_by_username_by_repo_slug_pullrequests

Pullrequest create_repositories_by_username_by_repo_slug_pullrequests(username, repo_slug, body=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

  • Api Key Authentication (api_key):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
body = bitbucketopenapi.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:
    api_response = api_instance.create_repositories_by_username_by_repo_slug_pullrequests(username, repo_slug, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->create_repositories_by_username_by_repo_slug_pullrequests: %s\n" % e)
  • Basic Authentication (basic):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
body = bitbucketopenapi.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:
    api_response = api_instance.create_repositories_by_username_by_repo_slug_pullrequests(username, repo_slug, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->create_repositories_by_username_by_repo_slug_pullrequests: %s\n" % e)
  • OAuth Authentication (oauth2):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
body = bitbucketopenapi.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:
    api_response = api_instance.create_repositories_by_username_by_repo_slug_pullrequests(username, repo_slug, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->create_repositories_by_username_by_repo_slug_pullrequests: %s\n" % e)

Parameters

Name Type Description Notes
username str 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 str 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

HTTP response details

Status code Description Response headers
201 The newly created pull request. * Location - The URL of new newly created pull request.
400 If the input document was invalid, or if the caller lacks the privilege to create repositories under the targeted account. -
401 If the request was not authenticated. -

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

create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_approve

Participant create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_approve(username, pull_request_id, repo_slug)

Approve the specified pull request as the authenticated user.

Example

  • Api Key Authentication (api_key):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 

try:
    api_response = api_instance.create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_approve(username, pull_request_id, repo_slug)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_approve: %s\n" % e)
  • Basic Authentication (basic):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 

try:
    api_response = api_instance.create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_approve(username, pull_request_id, repo_slug)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_approve: %s\n" % e)
  • OAuth Authentication (oauth2):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 

try:
    api_response = api_instance.create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_approve(username, pull_request_id, repo_slug)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_approve: %s\n" % e)

Parameters

Name Type Description Notes
username str
pull_request_id str
repo_slug str

Return type

Participant

Authorization

api_key, basic, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The `participant` object recording that the authenticated user approved the pull request. -
404 The specified pull request or the repository does not exist. -

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

create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments

PullrequestComment create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments(username, repo_slug, pull_request_id, body)

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

Example

  • Api Key Authentication (api_key):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
pull_request_id = 56 # int | The id of the pull request.
body = bitbucketopenapi.PullrequestComment() # PullrequestComment | The comment object.

try:
    api_response = api_instance.create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments(username, repo_slug, pull_request_id, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments: %s\n" % e)
  • Basic Authentication (basic):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
pull_request_id = 56 # int | The id of the pull request.
body = bitbucketopenapi.PullrequestComment() # PullrequestComment | The comment object.

try:
    api_response = api_instance.create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments(username, repo_slug, pull_request_id, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments: %s\n" % e)
  • OAuth Authentication (oauth2):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
pull_request_id = 56 # int | The id of the pull request.
body = bitbucketopenapi.PullrequestComment() # PullrequestComment | The comment object.

try:
    api_response = api_instance.create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments(username, repo_slug, pull_request_id, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments: %s\n" % e)

Parameters

Name Type Description Notes
username str 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 str 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

HTTP response details

Status code Description Response headers
201 The newly created comment. * Location - The URL of the new comment
403 If the authenticated user does not have access to the pull request. -
404 If the pull request does not exist. -

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

create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_decline

Pullrequest create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_decline(username, pull_request_id, repo_slug)

Declines the pull request.

Example

  • Api Key Authentication (api_key):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 

try:
    api_response = api_instance.create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_decline(username, pull_request_id, repo_slug)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_decline: %s\n" % e)
  • Basic Authentication (basic):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 

try:
    api_response = api_instance.create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_decline(username, pull_request_id, repo_slug)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_decline: %s\n" % e)
  • OAuth Authentication (oauth2):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 

try:
    api_response = api_instance.create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_decline(username, pull_request_id, repo_slug)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_decline: %s\n" % e)

Parameters

Name Type Description Notes
username str
pull_request_id str
repo_slug str

Return type

Pullrequest

Authorization

api_key, basic, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The pull request object. -
555 If the decline took too long and timed out. In this case the caller should retry the request later. -

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

create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_merge

Pullrequest create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_merge(username, pull_request_id, repo_slug, body=body)

Merges the pull request.

Example

  • Api Key Authentication (api_key):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 
body = bitbucketopenapi.PullrequestMergeParameters() # PullrequestMergeParameters |  (optional)

try:
    api_response = api_instance.create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_merge(username, pull_request_id, repo_slug, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_merge: %s\n" % e)
  • Basic Authentication (basic):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 
body = bitbucketopenapi.PullrequestMergeParameters() # PullrequestMergeParameters |  (optional)

try:
    api_response = api_instance.create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_merge(username, pull_request_id, repo_slug, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_merge: %s\n" % e)
  • OAuth Authentication (oauth2):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 
body = bitbucketopenapi.PullrequestMergeParameters() # PullrequestMergeParameters |  (optional)

try:
    api_response = api_instance.create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_merge(username, pull_request_id, repo_slug, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->create_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_merge: %s\n" % e)

Parameters

Name Type Description Notes
username str
pull_request_id str
repo_slug str
body PullrequestMergeParameters [optional]

Return type

Pullrequest

Authorization

api_key, basic, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The pull request object. -
555 If the merge took too long and timed out. In this case the caller should retry the request later -

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

delete_repositories_by_username_by_repo_slug_defaultreviewers_by_target_username

Error delete_repositories_by_username_by_repo_slug_defaultreviewers_by_target_username(username, target_username, repo_slug)

Removes a default reviewer from the repository.

Example

  • Api Key Authentication (api_key):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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. 
target_username = 'target_username_example' # str | This can either be the username or the UUID of the default reviewer, surrounded by curly-braces, for example: `{account UUID}`. 
repo_slug = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 

try:
    api_response = api_instance.delete_repositories_by_username_by_repo_slug_defaultreviewers_by_target_username(username, target_username, repo_slug)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->delete_repositories_by_username_by_repo_slug_defaultreviewers_by_target_username: %s\n" % e)
  • Basic Authentication (basic):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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. 
target_username = 'target_username_example' # str | This can either be the username or the UUID of the default reviewer, surrounded by curly-braces, for example: `{account UUID}`. 
repo_slug = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 

try:
    api_response = api_instance.delete_repositories_by_username_by_repo_slug_defaultreviewers_by_target_username(username, target_username, repo_slug)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->delete_repositories_by_username_by_repo_slug_defaultreviewers_by_target_username: %s\n" % e)
  • OAuth Authentication (oauth2):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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. 
target_username = 'target_username_example' # str | This can either be the username or the UUID of the default reviewer, surrounded by curly-braces, for example: `{account UUID}`. 
repo_slug = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 

try:
    api_response = api_instance.delete_repositories_by_username_by_repo_slug_defaultreviewers_by_target_username(username, target_username, repo_slug)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->delete_repositories_by_username_by_repo_slug_defaultreviewers_by_target_username: %s\n" % e)

Parameters

Name Type Description Notes
username str 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.
target_username str This can either be the username or the UUID of the default reviewer, surrounded by curly-braces, for example: `{account UUID}`.
repo_slug str This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.

Return type

Error

Authorization

api_key, basic, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
0 Unexpected error. -

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

delete_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_approve

delete_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_approve(username, pull_request_id, repo_slug)

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

Example

  • Api Key Authentication (api_key):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 

try:
    api_instance.delete_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_approve(username, pull_request_id, repo_slug)
except ApiException as e:
    print("Exception when calling PullrequestsApi->delete_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_approve: %s\n" % e)
  • Basic Authentication (basic):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 

try:
    api_instance.delete_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_approve(username, pull_request_id, repo_slug)
except ApiException as e:
    print("Exception when calling PullrequestsApi->delete_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_approve: %s\n" % e)
  • OAuth Authentication (oauth2):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 

try:
    api_instance.delete_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_approve(username, pull_request_id, repo_slug)
except ApiException as e:
    print("Exception when calling PullrequestsApi->delete_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_approve: %s\n" % e)

Parameters

Name Type Description Notes
username str
pull_request_id str
repo_slug str

Return type

void (empty response body)

Authorization

api_key, basic, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 An empty response indicating the authenticated user's approval has been withdrawn. -
404 The specified pull request or the repository does not exist. -

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

delete_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments_by_comment_id

delete_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments_by_comment_id(username, pull_request_id, comment_id, repo_slug)

Deletes a specific pull request comment.

Example

  • Api Key Authentication (api_key):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
comment_id = 'comment_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 

try:
    api_instance.delete_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments_by_comment_id(username, pull_request_id, comment_id, repo_slug)
except ApiException as e:
    print("Exception when calling PullrequestsApi->delete_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments_by_comment_id: %s\n" % e)
  • Basic Authentication (basic):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
comment_id = 'comment_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 

try:
    api_instance.delete_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments_by_comment_id(username, pull_request_id, comment_id, repo_slug)
except ApiException as e:
    print("Exception when calling PullrequestsApi->delete_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments_by_comment_id: %s\n" % e)
  • OAuth Authentication (oauth2):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
comment_id = 'comment_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 

try:
    api_instance.delete_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments_by_comment_id(username, pull_request_id, comment_id, repo_slug)
except ApiException as e:
    print("Exception when calling PullrequestsApi->delete_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments_by_comment_id: %s\n" % e)

Parameters

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

Return type

void (empty response body)

Authorization

api_key, basic, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 Successful deletion. -
403 If the authenticated user does not have access to delete the pull request. -
404 If the pull request does not exist. -

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

get_pullrequests_by_target_user

PaginatedPullrequests get_pullrequests_by_target_user(target_user, username, state=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

  • Api Key Authentication (api_key):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
target_user = 'target_user_example' # str | 
username = 'username_example' # str | 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 = 'state_example' # str | Only return pull requests that are in this state. This parameter can be repeated. (optional)

try:
    api_response = api_instance.get_pullrequests_by_target_user(target_user, username, state=state)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_pullrequests_by_target_user: %s\n" % e)
  • Basic Authentication (basic):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
target_user = 'target_user_example' # str | 
username = 'username_example' # str | 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 = 'state_example' # str | Only return pull requests that are in this state. This parameter can be repeated. (optional)

try:
    api_response = api_instance.get_pullrequests_by_target_user(target_user, username, state=state)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_pullrequests_by_target_user: %s\n" % e)
  • OAuth Authentication (oauth2):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
target_user = 'target_user_example' # str | 
username = 'username_example' # str | 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 = 'state_example' # str | Only return pull requests that are in this state. This parameter can be repeated. (optional)

try:
    api_response = api_instance.get_pullrequests_by_target_user(target_user, username, state=state)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_pullrequests_by_target_user: %s\n" % e)

Parameters

Name Type Description Notes
target_user str
username str 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 str 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: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 All pull requests authored by the specified user. -
404 If the specified user does not exist. -

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

get_pullrequests_for_commit

PaginatedPullrequests get_pullrequests_for_commit(username, repo_slug, commit, page=page, pagelen=pagelen)

Returns a paginated list of all pull requests as part of which this commit was reviewed.

Example

from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi()
username = 'username_example' # str | The account; either the UUID in curly braces, or the account_id
repo_slug = 'repo_slug_example' # str | The repository; either the UUID in curly braces, or the slug
commit = 'commit_example' # str | The SHA1 of the commit
page = 1 # int | Which page to retrieve (optional) (default to 1)
pagelen = 30 # int | How many pull requests to retrieve per page (optional) (default to 30)

try:
    # Returns a paginated list of all pull requests as part of which this commit was reviewed.
    api_response = api_instance.get_pullrequests_for_commit(username, repo_slug, commit, page=page, pagelen=pagelen)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_pullrequests_for_commit: %s\n" % e)

Parameters

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

Return type

PaginatedPullrequests

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The paginated list of pull requests. -
202 The repository's pull requests are still being indexed. -
404 Either the repository does not exist, or pull request commit links have not yet been indexed. -

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

get_repositories_by_username_by_repo_slug_defaultreviewers

get_repositories_by_username_by_repo_slug_defaultreviewers(username, 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

  • Api Key Authentication (api_key):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 

try:
    api_instance.get_repositories_by_username_by_repo_slug_defaultreviewers(username, repo_slug)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_defaultreviewers: %s\n" % e)
  • Basic Authentication (basic):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 

try:
    api_instance.get_repositories_by_username_by_repo_slug_defaultreviewers(username, repo_slug)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_defaultreviewers: %s\n" % e)
  • OAuth Authentication (oauth2):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 

try:
    api_instance.get_repositories_by_username_by_repo_slug_defaultreviewers(username, repo_slug)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_defaultreviewers: %s\n" % e)

Parameters

Name Type Description Notes
username str 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 str 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: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 The paginated list of default reviewers -

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

get_repositories_by_username_by_repo_slug_defaultreviewers_by_target_username

Error get_repositories_by_username_by_repo_slug_defaultreviewers_by_target_username(username, target_username, repo_slug)

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

  • Api Key Authentication (api_key):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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. 
target_username = 'target_username_example' # str | This can either be the username or the UUID of the default reviewer, surrounded by curly-braces, for example: `{account UUID}`. 
repo_slug = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 

try:
    api_response = api_instance.get_repositories_by_username_by_repo_slug_defaultreviewers_by_target_username(username, target_username, repo_slug)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_defaultreviewers_by_target_username: %s\n" % e)
  • Basic Authentication (basic):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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. 
target_username = 'target_username_example' # str | This can either be the username or the UUID of the default reviewer, surrounded by curly-braces, for example: `{account UUID}`. 
repo_slug = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 

try:
    api_response = api_instance.get_repositories_by_username_by_repo_slug_defaultreviewers_by_target_username(username, target_username, repo_slug)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_defaultreviewers_by_target_username: %s\n" % e)
  • OAuth Authentication (oauth2):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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. 
target_username = 'target_username_example' # str | This can either be the username or the UUID of the default reviewer, surrounded by curly-braces, for example: `{account UUID}`. 
repo_slug = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 

try:
    api_response = api_instance.get_repositories_by_username_by_repo_slug_defaultreviewers_by_target_username(username, target_username, repo_slug)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_defaultreviewers_by_target_username: %s\n" % e)

Parameters

Name Type Description Notes
username str 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.
target_username str This can either be the username or the UUID of the default reviewer, surrounded by curly-braces, for example: `{account UUID}`.
repo_slug str This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.

Return type

Error

Authorization

api_key, basic, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
0 Unexpected error. -

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

get_repositories_by_username_by_repo_slug_pullrequests

PaginatedPullrequests get_repositories_by_username_by_repo_slug_pullrequests(username, repo_slug, state=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

  • Api Key Authentication (api_key):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
state = 'state_example' # str | Only return pull requests that are in this state. This parameter can be repeated. (optional)

try:
    api_response = api_instance.get_repositories_by_username_by_repo_slug_pullrequests(username, repo_slug, state=state)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests: %s\n" % e)
  • Basic Authentication (basic):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
state = 'state_example' # str | Only return pull requests that are in this state. This parameter can be repeated. (optional)

try:
    api_response = api_instance.get_repositories_by_username_by_repo_slug_pullrequests(username, repo_slug, state=state)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests: %s\n" % e)
  • OAuth Authentication (oauth2):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
state = 'state_example' # str | Only return pull requests that are in this state. This parameter can be repeated. (optional)

try:
    api_response = api_instance.get_repositories_by_username_by_repo_slug_pullrequests(username, repo_slug, state=state)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests: %s\n" % e)

Parameters

Name Type Description Notes
username str 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 str This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.
state str 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: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 All pull requests on the specified repository. -
401 If the repository is private and the request was not authenticated. -
404 If the specified repository does not exist. -

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

get_repositories_by_username_by_repo_slug_pullrequests_activity

get_repositories_by_username_by_repo_slug_pullrequests_activity(username, repo_slug, 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

  • Api Key Authentication (api_key):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
pull_request_id = 56 # int | The id of the pull request.

try:
    api_instance.get_repositories_by_username_by_repo_slug_pullrequests_activity(username, repo_slug, pull_request_id)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_activity: %s\n" % e)
  • Basic Authentication (basic):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
pull_request_id = 56 # int | The id of the pull request.

try:
    api_instance.get_repositories_by_username_by_repo_slug_pullrequests_activity(username, repo_slug, pull_request_id)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_activity: %s\n" % e)
  • OAuth Authentication (oauth2):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
pull_request_id = 56 # int | The id of the pull request.

try:
    api_instance.get_repositories_by_username_by_repo_slug_pullrequests_activity(username, repo_slug, pull_request_id)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_activity: %s\n" % e)

Parameters

Name Type Description Notes
username str 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 str 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: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 The pull request activity log -
401 If the repository is private and the request was not authenticated. -
404 If the specified repository does not exist. -

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

get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id

Pullrequest get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id(username, repo_slug, pull_request_id)

Returns the specified pull request.

Example

  • Api Key Authentication (api_key):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
pull_request_id = 56 # int | The id of the pull request.

try:
    api_response = api_instance.get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id(username, repo_slug, pull_request_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id: %s\n" % e)
  • Basic Authentication (basic):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
pull_request_id = 56 # int | The id of the pull request.

try:
    api_response = api_instance.get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id(username, repo_slug, pull_request_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id: %s\n" % e)
  • OAuth Authentication (oauth2):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
pull_request_id = 56 # int | The id of the pull request.

try:
    api_response = api_instance.get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id(username, repo_slug, pull_request_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id: %s\n" % e)

Parameters

Name Type Description Notes
username str 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 str 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: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 The pull request object -
401 If the repository is private and the request was not authenticated. -
404 If the repository or pull request does not exist -

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

get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_activity

get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_activity(username, repo_slug, 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

  • Api Key Authentication (api_key):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
pull_request_id = 56 # int | The id of the pull request.

try:
    api_instance.get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_activity(username, repo_slug, pull_request_id)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_activity: %s\n" % e)
  • Basic Authentication (basic):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
pull_request_id = 56 # int | The id of the pull request.

try:
    api_instance.get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_activity(username, repo_slug, pull_request_id)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_activity: %s\n" % e)
  • OAuth Authentication (oauth2):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
pull_request_id = 56 # int | The id of the pull request.

try:
    api_instance.get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_activity(username, repo_slug, pull_request_id)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_activity: %s\n" % e)

Parameters

Name Type Description Notes
username str 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 str 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: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 The pull request activity log -
401 If the repository is private and the request was not authenticated. -
404 If the specified repository does not exist. -

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

get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments

PaginatedPullrequestComments get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments(username, repo_slug, 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

  • Api Key Authentication (api_key):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
pull_request_id = 56 # int | The id of the pull request.

try:
    api_response = api_instance.get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments(username, repo_slug, pull_request_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments: %s\n" % e)
  • Basic Authentication (basic):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
pull_request_id = 56 # int | The id of the pull request.

try:
    api_response = api_instance.get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments(username, repo_slug, pull_request_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments: %s\n" % e)
  • OAuth Authentication (oauth2):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
pull_request_id = 56 # int | The id of the pull request.

try:
    api_response = api_instance.get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments(username, repo_slug, pull_request_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments: %s\n" % e)

Parameters

Name Type Description Notes
username str 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 str 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: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 A paginated list of comments made on the given pull request, in reverse chronological order. -
403 If the authenticated user does not have access to the pull request. -
404 If the pull request does not exist. -

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

get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments_by_comment_id

PullrequestComment get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments_by_comment_id(username, pull_request_id, comment_id, repo_slug)

Returns a specific pull request comment.

Example

  • Api Key Authentication (api_key):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
comment_id = 'comment_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 

try:
    api_response = api_instance.get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments_by_comment_id(username, pull_request_id, comment_id, repo_slug)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments_by_comment_id: %s\n" % e)
  • Basic Authentication (basic):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
comment_id = 'comment_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 

try:
    api_response = api_instance.get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments_by_comment_id(username, pull_request_id, comment_id, repo_slug)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments_by_comment_id: %s\n" % e)
  • OAuth Authentication (oauth2):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
comment_id = 'comment_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 

try:
    api_response = api_instance.get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments_by_comment_id(username, pull_request_id, comment_id, repo_slug)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments_by_comment_id: %s\n" % e)

Parameters

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

Return type

PullrequestComment

Authorization

api_key, basic, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The comment. -
403 If the authenticated user does not have access to the pull request. -
404 If the pull request does not exist. -

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

get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_commits

Error get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_commits(username, pull_request_id, 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

  • Api Key Authentication (api_key):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 

try:
    api_response = api_instance.get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_commits(username, pull_request_id, repo_slug)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_commits: %s\n" % e)
  • Basic Authentication (basic):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 

try:
    api_response = api_instance.get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_commits(username, pull_request_id, repo_slug)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_commits: %s\n" % e)
  • OAuth Authentication (oauth2):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 

try:
    api_response = api_instance.get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_commits(username, pull_request_id, repo_slug)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_commits: %s\n" % e)

Parameters

Name Type Description Notes
username str
pull_request_id str
repo_slug str

Return type

Error

Authorization

api_key, basic, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
0 Unexpected error. -

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

get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_diff

get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_diff(username, pull_request_id, repo_slug)

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

Example

  • Api Key Authentication (api_key):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 

try:
    api_instance.get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_diff(username, pull_request_id, repo_slug)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_diff: %s\n" % e)
  • Basic Authentication (basic):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 

try:
    api_instance.get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_diff(username, pull_request_id, repo_slug)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_diff: %s\n" % e)
  • OAuth Authentication (oauth2):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 

try:
    api_instance.get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_diff(username, pull_request_id, repo_slug)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_diff: %s\n" % e)

Parameters

Name Type Description Notes
username str
pull_request_id str
repo_slug str

Return type

void (empty response body)

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
302 Redirects to the repository diff with the revspec that corresponds to the pull request. -

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

get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_diffstat

get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_diffstat(username, pull_request_id, repo_slug)

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

Example

  • Api Key Authentication (api_key):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 

try:
    api_instance.get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_diffstat(username, pull_request_id, repo_slug)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_diffstat: %s\n" % e)
  • Basic Authentication (basic):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 

try:
    api_instance.get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_diffstat(username, pull_request_id, repo_slug)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_diffstat: %s\n" % e)
  • OAuth Authentication (oauth2):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 

try:
    api_instance.get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_diffstat(username, pull_request_id, repo_slug)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_diffstat: %s\n" % e)

Parameters

Name Type Description Notes
username str
pull_request_id str
repo_slug str

Return type

void (empty response body)

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
302 Redirects to the repository diffstat with the revspec that corresponds to pull request. -

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

get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_patch

Error get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_patch(username, pull_request_id, repo_slug)

Example

  • Api Key Authentication (api_key):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 

try:
    api_response = api_instance.get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_patch(username, pull_request_id, repo_slug)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_patch: %s\n" % e)
  • Basic Authentication (basic):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 

try:
    api_response = api_instance.get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_patch(username, pull_request_id, repo_slug)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_patch: %s\n" % e)
  • OAuth Authentication (oauth2):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 

try:
    api_response = api_instance.get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_patch(username, pull_request_id, repo_slug)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_patch: %s\n" % e)

Parameters

Name Type Description Notes
username str
pull_request_id str
repo_slug str

Return type

Error

Authorization

api_key, basic, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
0 Unexpected error. -

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

get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_statuses

PaginatedCommitstatuses get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_statuses(username, pull_request_id, repo_slug)

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

Example

  • Api Key Authentication (api_key):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 56 # int | The id of the pull request.
repo_slug = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 

try:
    api_response = api_instance.get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_statuses(username, pull_request_id, repo_slug)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_statuses: %s\n" % e)
  • Basic Authentication (basic):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 56 # int | The id of the pull request.
repo_slug = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 

try:
    api_response = api_instance.get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_statuses(username, pull_request_id, repo_slug)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_statuses: %s\n" % e)
  • OAuth Authentication (oauth2):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 56 # int | The id of the pull request.
repo_slug = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 

try:
    api_response = api_instance.get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_statuses(username, pull_request_id, repo_slug)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->get_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_statuses: %s\n" % e)

Parameters

Name Type Description Notes
username str 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 str 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: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 A paginated list of all commit statuses for this pull request. -
401 If the repository is private and the request was not authenticated. -
404 If the specified repository or pull request does not exist. -

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

update_repositories_by_username_by_repo_slug_defaultreviewers_by_target_username

Error update_repositories_by_username_by_repo_slug_defaultreviewers_by_target_username(username, target_username, repo_slug)

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

  • Api Key Authentication (api_key):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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. 
target_username = 'target_username_example' # str | This can either be the username or the UUID of the default reviewer, surrounded by curly-braces, for example: `{account UUID}`. 
repo_slug = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 

try:
    api_response = api_instance.update_repositories_by_username_by_repo_slug_defaultreviewers_by_target_username(username, target_username, repo_slug)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->update_repositories_by_username_by_repo_slug_defaultreviewers_by_target_username: %s\n" % e)
  • Basic Authentication (basic):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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. 
target_username = 'target_username_example' # str | This can either be the username or the UUID of the default reviewer, surrounded by curly-braces, for example: `{account UUID}`. 
repo_slug = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 

try:
    api_response = api_instance.update_repositories_by_username_by_repo_slug_defaultreviewers_by_target_username(username, target_username, repo_slug)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->update_repositories_by_username_by_repo_slug_defaultreviewers_by_target_username: %s\n" % e)
  • OAuth Authentication (oauth2):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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. 
target_username = 'target_username_example' # str | This can either be the username or the UUID of the default reviewer, surrounded by curly-braces, for example: `{account UUID}`. 
repo_slug = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 

try:
    api_response = api_instance.update_repositories_by_username_by_repo_slug_defaultreviewers_by_target_username(username, target_username, repo_slug)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->update_repositories_by_username_by_repo_slug_defaultreviewers_by_target_username: %s\n" % e)

Parameters

Name Type Description Notes
username str 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.
target_username str This can either be the username or the UUID of the default reviewer, surrounded by curly-braces, for example: `{account UUID}`.
repo_slug str This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.

Return type

Error

Authorization

api_key, basic, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
0 Unexpected error. -

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

update_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id

Pullrequest update_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id(username, repo_slug, pull_request_id, body=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

  • Api Key Authentication (api_key):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
pull_request_id = 56 # int | The id of the pull request.
body = bitbucketopenapi.Pullrequest() # Pullrequest | The pull request that is to be updated. (optional)

try:
    api_response = api_instance.update_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id(username, repo_slug, pull_request_id, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->update_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id: %s\n" % e)
  • Basic Authentication (basic):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
pull_request_id = 56 # int | The id of the pull request.
body = bitbucketopenapi.Pullrequest() # Pullrequest | The pull request that is to be updated. (optional)

try:
    api_response = api_instance.update_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id(username, repo_slug, pull_request_id, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->update_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id: %s\n" % e)
  • OAuth Authentication (oauth2):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 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 = 'repo_slug_example' # str | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
pull_request_id = 56 # int | The id of the pull request.
body = bitbucketopenapi.Pullrequest() # Pullrequest | The pull request that is to be updated. (optional)

try:
    api_response = api_instance.update_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id(username, repo_slug, pull_request_id, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->update_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id: %s\n" % e)

Parameters

Name Type Description Notes
username str 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 str 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

HTTP response details

Status code Description Response headers
200 The updated pull request -
400 If the input document was invalid. -
401 If the request was not authenticated. -
404 If the repository or pull request id does not exist -

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

update_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments_by_comment_id

PullrequestComment update_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments_by_comment_id(username, pull_request_id, comment_id, repo_slug, body)

Updates a specific pull request comment.

Example

  • Api Key Authentication (api_key):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
comment_id = 'comment_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 
body = bitbucketopenapi.PullrequestComment() # PullrequestComment | The contents of the updated comment.

try:
    api_response = api_instance.update_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments_by_comment_id(username, pull_request_id, comment_id, repo_slug, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->update_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments_by_comment_id: %s\n" % e)
  • Basic Authentication (basic):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
comment_id = 'comment_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 
body = bitbucketopenapi.PullrequestComment() # PullrequestComment | The contents of the updated comment.

try:
    api_response = api_instance.update_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments_by_comment_id(username, pull_request_id, comment_id, repo_slug, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->update_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments_by_comment_id: %s\n" % e)
  • OAuth Authentication (oauth2):
from __future__ import print_function
import time
import bitbucketopenapi
from bitbucketopenapi.rest import ApiException
from pprint import pprint
configuration = bitbucketopenapi.Configuration()
# Configure API key authorization: api_key
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
configuration = bitbucketopenapi.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
configuration = bitbucketopenapi.Configuration()
# Configure OAuth2 access token for authorization: oauth2
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Defining host is optional and default to https://api.bitbucket.org/2.0
configuration.host = "https://api.bitbucket.org/2.0"
# Create an instance of the API class
api_instance = bitbucketopenapi.PullrequestsApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
pull_request_id = 'pull_request_id_example' # str | 
comment_id = 'comment_id_example' # str | 
repo_slug = 'repo_slug_example' # str | 
body = bitbucketopenapi.PullrequestComment() # PullrequestComment | The contents of the updated comment.

try:
    api_response = api_instance.update_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments_by_comment_id(username, pull_request_id, comment_id, repo_slug, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PullrequestsApi->update_repositories_by_username_by_repo_slug_pullrequests_by_pull_request_id_comments_by_comment_id: %s\n" % e)

Parameters

Name Type Description Notes
username str
pull_request_id str
comment_id str
repo_slug str
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

HTTP response details

Status code Description Response headers
200 The updated comment. -
403 If the authenticated user does not have access to the pull request. -
404 If the pull request does not exist. -

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