Skip to content

Latest commit

 

History

History
1773 lines (1459 loc) · 67.8 KB

UsersApi.md

File metadata and controls

1773 lines (1459 loc) · 67.8 KB

bitbucketopenapi.UsersApi

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

Method HTTP request Description
create_users_by_username_hooks POST /users/{username}/hooks
delete_users_by_username_hooks_by_uid DELETE /users/{username}/hooks/{uid}
get_teams_by_username_repositories GET /teams/{username}/repositories
get_user GET /user
get_user_emails GET /user/emails
get_user_emails_by_email GET /user/emails/{email}
get_users_by_username GET /users/{username}
get_users_by_username_followers GET /users/{username}/followers
get_users_by_username_following GET /users/{username}/following
get_users_by_username_hooks GET /users/{username}/hooks
get_users_by_username_hooks_by_uid GET /users/{username}/hooks/{uid}
get_users_by_username_repositories GET /users/{username}/repositories
update_users_by_username_hooks_by_uid PUT /users/{username}/hooks/{uid}

create_users_by_username_hooks

WebhookSubscription create_users_by_username_hooks(username)

Creates a new webhook on the specified user account. Account-level webhooks are fired for events from all repositories belonging to that account. Note that one can only register webhooks on one's own account, not that of others. Also, note that the username path parameter has been deprecated due to privacy changes. Use the account's UUID or account_id instead.

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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 

try:
    api_response = api_instance.create_users_by_username_hooks(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->create_users_by_username_hooks: %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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 

try:
    api_response = api_instance.create_users_by_username_hooks(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->create_users_by_username_hooks: %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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 

try:
    api_response = api_instance.create_users_by_username_hooks(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->create_users_by_username_hooks: %s\n" % e)

Parameters

Name Type Description Notes
username str

Return type

WebhookSubscription

Authorization

api_key, basic, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 The newly installed webhook. * Location - The URL of new newly created webhook.
403 If the authenticated user is accessing an account other than their own. -
404 If the specified account does not exist. -

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

delete_users_by_username_hooks_by_uid

delete_users_by_username_hooks_by_uid(username, uid)

Deletes the specified webhook subscription from the given user account. Note that the username path parameter has been deprecated due to privacy changes. Use the account's UUID or account_id instead.

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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
uid = 'uid_example' # str | The installed webhook's id

try:
    api_instance.delete_users_by_username_hooks_by_uid(username, uid)
except ApiException as e:
    print("Exception when calling UsersApi->delete_users_by_username_hooks_by_uid: %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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
uid = 'uid_example' # str | The installed webhook's id

try:
    api_instance.delete_users_by_username_hooks_by_uid(username, uid)
except ApiException as e:
    print("Exception when calling UsersApi->delete_users_by_username_hooks_by_uid: %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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
uid = 'uid_example' # str | The installed webhook's id

try:
    api_instance.delete_users_by_username_hooks_by_uid(username, uid)
except ApiException as e:
    print("Exception when calling UsersApi->delete_users_by_username_hooks_by_uid: %s\n" % e)

Parameters

Name Type Description Notes
username str
uid str The installed webhook's id

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 When the webhook was deleted successfully -
403 If the authenticated user does not have permission to delete the webhook. -
404 If the webhook or user does not exist. -

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

get_teams_by_username_repositories

Error get_teams_by_username_repositories(username)

All repositories owned by a user/team. This includes private repositories, but filtered down to the ones that the calling user has access to.

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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 

try:
    api_response = api_instance.get_teams_by_username_repositories(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_teams_by_username_repositories: %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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 

try:
    api_response = api_instance.get_teams_by_username_repositories(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_teams_by_username_repositories: %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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 

try:
    api_response = api_instance.get_teams_by_username_repositories(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_teams_by_username_repositories: %s\n" % e)

Parameters

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

User get_user()

Returns the currently logged in 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.UsersApi(bitbucketopenapi.ApiClient(configuration))

try:
    api_response = api_instance.get_user()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_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.UsersApi(bitbucketopenapi.ApiClient(configuration))

try:
    api_response = api_instance.get_user()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_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.UsersApi(bitbucketopenapi.ApiClient(configuration))

try:
    api_response = api_instance.get_user()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_user: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

User

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 current user. -
401 When the request wasn't authenticated. -

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

get_user_emails

Error get_user_emails()

Returns all the authenticated user's email addresses. Both confirmed and unconfirmed.

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.UsersApi(bitbucketopenapi.ApiClient(configuration))

try:
    api_response = api_instance.get_user_emails()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_user_emails: %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.UsersApi(bitbucketopenapi.ApiClient(configuration))

try:
    api_response = api_instance.get_user_emails()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_user_emails: %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.UsersApi(bitbucketopenapi.ApiClient(configuration))

try:
    api_response = api_instance.get_user_emails()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_user_emails: %s\n" % e)

Parameters

This endpoint does not need any parameter.

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_user_emails_by_email

Error get_user_emails_by_email(email)

Returns details about a specific one of the authenticated user's email addresses. Details describe whether the address has been confirmed by the user and whether it is the user's primary address or not.

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.UsersApi(bitbucketopenapi.ApiClient(configuration))
email = 'email_example' # str | 

try:
    api_response = api_instance.get_user_emails_by_email(email)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_user_emails_by_email: %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.UsersApi(bitbucketopenapi.ApiClient(configuration))
email = 'email_example' # str | 

try:
    api_response = api_instance.get_user_emails_by_email(email)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_user_emails_by_email: %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.UsersApi(bitbucketopenapi.ApiClient(configuration))
email = 'email_example' # str | 

try:
    api_response = api_instance.get_user_emails_by_email(email)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_user_emails_by_email: %s\n" % e)

Parameters

Name Type Description Notes
email 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_users_by_username

User get_users_by_username(username)

Gets the public information associated with a user account. If the user's profile is private, location, website and created_on elements are omitted. Note that the user object returned by this operation is changing significantly, due to privacy changes. See the announcement for 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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | The account's UUID, account_id, or username. Note that username has been deprecated due to [privacy changes](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#removal-of-usernames-from-user-referencing-apis).

try:
    api_response = api_instance.get_users_by_username(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_users_by_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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | The account's UUID, account_id, or username. Note that username has been deprecated due to [privacy changes](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#removal-of-usernames-from-user-referencing-apis).

try:
    api_response = api_instance.get_users_by_username(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_users_by_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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | The account's UUID, account_id, or username. Note that username has been deprecated due to [privacy changes](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#removal-of-usernames-from-user-referencing-apis).

try:
    api_response = api_instance.get_users_by_username(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_users_by_username: %s\n" % e)

Parameters

Name Type Description Notes
username str The account's UUID, account_id, or username. Note that username has been deprecated due to privacy changes.

Return type

User

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 user object -
404 If no user exists for the specified name or UUID, or if the specified account is a team account, not a personal account. -

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

get_users_by_username_followers

PaginatedUsers get_users_by_username_followers(username)

Returns the list of accounts that are following this user. This operation has been deprecated due to privacy changes. See the announcement for 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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | The account's username

try:
    api_response = api_instance.get_users_by_username_followers(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_users_by_username_followers: %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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | The account's username

try:
    api_response = api_instance.get_users_by_username_followers(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_users_by_username_followers: %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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | The account's username

try:
    api_response = api_instance.get_users_by_username_followers(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_users_by_username_followers: %s\n" % e)

Parameters

Name Type Description Notes
username str The account's username

Return type

PaginatedUsers

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 user objects. -
404 If no account exists for the specified name, or if the specified account is a team account, not a personal account. -

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

get_users_by_username_following

PaginatedUsers get_users_by_username_following(username)

Returns the list of accounts this user is following. This operation has been deprecated due to privacy changes. See the announcement for 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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | The user's username

try:
    api_response = api_instance.get_users_by_username_following(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_users_by_username_following: %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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | The user's username

try:
    api_response = api_instance.get_users_by_username_following(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_users_by_username_following: %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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | The user's username

try:
    api_response = api_instance.get_users_by_username_following(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_users_by_username_following: %s\n" % e)

Parameters

Name Type Description Notes
username str The user's username

Return type

PaginatedUsers

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 user objects. -
404 If no user exists for the specified name, or if the specified account is a team account, not a personal account. -

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

get_users_by_username_hooks

PaginatedWebhookSubscriptions get_users_by_username_hooks(username)

Returns a paginated list of webhooks installed on this user account. Note that the username path parameter has been deprecated due to privacy changes. Use the account's UUID or account_id instead.

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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 

try:
    api_response = api_instance.get_users_by_username_hooks(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_users_by_username_hooks: %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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 

try:
    api_response = api_instance.get_users_by_username_hooks(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_users_by_username_hooks: %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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 

try:
    api_response = api_instance.get_users_by_username_hooks(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_users_by_username_hooks: %s\n" % e)

Parameters

Name Type Description Notes
username str

Return type

PaginatedWebhookSubscriptions

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 paginated list of installed webhooks. -
403 If the authenticated user is accessing an account other than their own. -
404 If the specified account does not exist. -

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

get_users_by_username_hooks_by_uid

WebhookSubscription get_users_by_username_hooks_by_uid(username, uid)

Returns the webhook with the specified id installed on the given user account. Note that the username path parameter has been deprecated due to privacy changes. Use the account's UUID or account_id instead.

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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
uid = 'uid_example' # str | The installed webhook's id.

try:
    api_response = api_instance.get_users_by_username_hooks_by_uid(username, uid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_users_by_username_hooks_by_uid: %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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
uid = 'uid_example' # str | The installed webhook's id.

try:
    api_response = api_instance.get_users_by_username_hooks_by_uid(username, uid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_users_by_username_hooks_by_uid: %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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
uid = 'uid_example' # str | The installed webhook's id.

try:
    api_response = api_instance.get_users_by_username_hooks_by_uid(username, uid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_users_by_username_hooks_by_uid: %s\n" % e)

Parameters

Name Type Description Notes
username str
uid str The installed webhook's id.

Return type

WebhookSubscription

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 webhook subscription object. -
404 If the webhook or user does not exist. -

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

get_users_by_username_repositories

Error get_users_by_username_repositories(username)

All repositories owned by a user/team. This includes private repositories, but filtered down to the ones that the calling user has access to.

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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 

try:
    api_response = api_instance.get_users_by_username_repositories(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_users_by_username_repositories: %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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 

try:
    api_response = api_instance.get_users_by_username_repositories(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_users_by_username_repositories: %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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 

try:
    api_response = api_instance.get_users_by_username_repositories(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_users_by_username_repositories: %s\n" % e)

Parameters

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

update_users_by_username_hooks_by_uid

WebhookSubscription update_users_by_username_hooks_by_uid(username, uid)

Updates the specified webhook subscription. The following properties can be mutated: * description * url * active * events Note that the username path parameter has been deprecated due to privacy changes. Use the account's UUID or account_id instead.

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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
uid = 'uid_example' # str | The installed webhook's id

try:
    api_response = api_instance.update_users_by_username_hooks_by_uid(username, uid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->update_users_by_username_hooks_by_uid: %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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
uid = 'uid_example' # str | The installed webhook's id

try:
    api_response = api_instance.update_users_by_username_hooks_by_uid(username, uid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->update_users_by_username_hooks_by_uid: %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.UsersApi(bitbucketopenapi.ApiClient(configuration))
username = 'username_example' # str | 
uid = 'uid_example' # str | The installed webhook's id

try:
    api_response = api_instance.update_users_by_username_hooks_by_uid(username, uid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->update_users_by_username_hooks_by_uid: %s\n" % e)

Parameters

Name Type Description Notes
username str
uid str The installed webhook's id

Return type

WebhookSubscription

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 webhook subscription object. -
403 If the authenticated user does not have permission to update the webhook. -
404 If the webhook or user does not exist. -

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