bitbucket-api-client-lib

WebhooksApi

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

Method HTTP request Description
hookEventsGet GET /hook_events  
hookEventsSubjectTypeGet GET /hook_events/{subject_type}  
repositoriesWorkspaceRepoSlugHooksGet GET /repositories/{workspace}/{repo_slug}/hooks  
repositoriesWorkspaceRepoSlugHooksPost POST /repositories/{workspace}/{repo_slug}/hooks  
repositoriesWorkspaceRepoSlugHooksUidDelete DELETE /repositories/{workspace}/{repo_slug}/hooks/{uid}  
repositoriesWorkspaceRepoSlugHooksUidGet GET /repositories/{workspace}/{repo_slug}/hooks/{uid}  
repositoriesWorkspaceRepoSlugHooksUidPut PUT /repositories/{workspace}/{repo_slug}/hooks/{uid}  
teamsUsernameHooksGet GET /teams/{username}/hooks  
teamsUsernameHooksPost POST /teams/{username}/hooks  
teamsUsernameHooksUidDelete DELETE /teams/{username}/hooks/{uid}  
teamsUsernameHooksUidGet GET /teams/{username}/hooks/{uid}  
teamsUsernameHooksUidPut PUT /teams/{username}/hooks/{uid}  
usersSelectedUserHooksGet GET /users/{selected_user}/hooks  
usersSelectedUserHooksPost POST /users/{selected_user}/hooks  
usersSelectedUserHooksUidDelete DELETE /users/{selected_user}/hooks/{uid}  
usersSelectedUserHooksUidGet GET /users/{selected_user}/hooks/{uid}  
usersSelectedUserHooksUidPut PUT /users/{selected_user}/hooks/{uid}  
workspacesWorkspaceHooksGet GET /workspaces/{workspace}/hooks  
workspacesWorkspaceHooksPost POST /workspaces/{workspace}/hooks  
workspacesWorkspaceHooksUidDelete DELETE /workspaces/{workspace}/hooks/{uid}  
workspacesWorkspaceHooksUidGet GET /workspaces/{workspace}/hooks/{uid}  
workspacesWorkspaceHooksUidPut PUT /workspaces/{workspace}/hooks/{uid}  

hookEventsGet

SubjectTypes hookEventsGet()

Returns the webhook resource or subject types on which webhooks can be registered. Each resource/subject type contains an `events` link that returns the paginated list of specific events each individual subject type can emit. This endpoint is publicly accessible and does not require authentication or scopes. Example: ``` $ curl https://api.bitbucket.org/2.0/hook_events { \"repository\": { \"links\": { \"events\": { \"href\": \"https://api.bitbucket.org/2.0/hook_events/repository\" } } }, \"team\": { \"links\": { \"events\": { \"href\": \"https://api.bitbucket.org/2.0/hook_events/team\" } } }, \"user\": { \"links\": { \"events\": { \"href\": \"https://api.bitbucket.org/2.0/hook_events/user\" } } } } ```

Example

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

WebhooksApi apiInstance = new WebhooksApi();
try {
    SubjectTypes result = apiInstance.hookEventsGet();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling WebhooksApi#hookEventsGet");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

SubjectTypes

Authorization

api_keybasicoauth2

HTTP request headers

hookEventsSubjectTypeGet

PaginatedHookEvents hookEventsSubjectTypeGet(subjectType)

Returns a paginated list of all valid webhook events for the specified entity. This is public data that does not require any scopes or authentication. Example: NOTE: The following example is a truncated response object for the `team` `subject_type`. We return the same structure for the other `subject_type` objects. ``` $ curl https://api.bitbucket.org/2.0/hook_events/team { \"page\": 1, \"pagelen\": 30, \"size\": 21, \"values\": [ { \"category\": \"Repository\", \"description\": \"Whenever a repository push occurs\", \"event\": \"repo:push\", \"label\": \"Push\" }, { \"category\": \"Repository\", \"description\": \"Whenever a repository fork occurs\", \"event\": \"repo:fork\", \"label\": \"Fork\" }, … { \"category\": \"Repository\", \"description\": \"Whenever a repository import occurs\", \"event\": \"repo:imported\", \"label\": \"Import\" } ] } ```

Example

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

WebhooksApi apiInstance = new WebhooksApi();
String subjectType = "subjectType_example"; // String | A resource or subject type.
try {
    PaginatedHookEvents result = apiInstance.hookEventsSubjectTypeGet(subjectType);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling WebhooksApi#hookEventsSubjectTypeGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
subjectType String A resource or subject type. [enum: workspace, user, repository, team]

Return type

PaginatedHookEvents

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugHooksGet

PaginatedWebhookSubscriptions repositoriesWorkspaceRepoSlugHooksGet(repoSlug, workspace)

Returns a paginated list of webhooks installed on this repository. The teams endpoint for projects has been deprecated, and you should ensure you are using the workspaces endpoint. For more information, see the announcement.

Example

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

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

Parameters

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

Return type

PaginatedWebhookSubscriptions

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugHooksPost

WebhookSubscription repositoriesWorkspaceRepoSlugHooksPost(repoSlug, workspace)

Creates a new webhook on the specified repository. The teams endpoint for projects has been deprecated, and you should ensure you are using the workspaces endpoint. For more information, see the announcement. Example: ``` $ curl -X POST -u credentials -H 'Content-Type: application/json' https://api.bitbucket.org/2.0/repositories/username/slug/hooks -d ' { \"description\": \"Webhook Description\", \"url\": \"https://example.com/\", \"active\": true, \"events\": [ \"repo:push\", \"issue:created\", \"issue:updated\" ] }' ``` Note that this call requires the webhook scope, as well as any scope that applies to the events that the webhook subscribes to. In the example above that means: `webhook`, `repository` and `issue`. Also note that the `url` must properly resolve and cannot be an internal, non-routed address.

Example

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

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

Parameters

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

Return type

WebhookSubscription

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugHooksUidDelete

repositoriesWorkspaceRepoSlugHooksUidDelete(repoSlug, workspace, uid)

Deletes the specified webhook subscription from the given repository.

Example

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

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

Parameters

Name Type Description Notes
repoSlug String This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.  
workspace String This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`.  
uid String The installed webhook's id  

Return type

null (empty response body)

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugHooksUidGet

WebhookSubscription repositoriesWorkspaceRepoSlugHooksUidGet(repoSlug, workspace, uid)

Returns the webhook with the specified id installed on the specified repository.

Example

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

WebhooksApi apiInstance = new WebhooksApi();
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
String uid = "uid_example"; // String | The installed webhook's id.
try {
    WebhookSubscription result = apiInstance.repositoriesWorkspaceRepoSlugHooksUidGet(repoSlug, workspace, uid);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling WebhooksApi#repositoriesWorkspaceRepoSlugHooksUidGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
repoSlug String This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.  
workspace String This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`.  
uid String The installed webhook's id.  

Return type

WebhookSubscription

Authorization

api_keybasicoauth2

HTTP request headers

repositoriesWorkspaceRepoSlugHooksUidPut

WebhookSubscription repositoriesWorkspaceRepoSlugHooksUidPut(repoSlug, workspace, uid)

Updates the specified webhook subscription. The following properties can be mutated: * `description` * `url` * `active` * `events`

Example

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

WebhooksApi apiInstance = new WebhooksApi();
String repoSlug = "repoSlug_example"; // String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. 
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
String uid = "uid_example"; // String | The installed webhook's id
try {
    WebhookSubscription result = apiInstance.repositoriesWorkspaceRepoSlugHooksUidPut(repoSlug, workspace, uid);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling WebhooksApi#repositoriesWorkspaceRepoSlugHooksUidPut");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
repoSlug String This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.  
workspace String This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`.  
uid String The installed webhook's id  

Return type

WebhookSubscription

Authorization

api_keybasicoauth2

HTTP request headers

teamsUsernameHooksGet

PaginatedWebhookSubscriptions teamsUsernameHooksGet(username)

Returns a paginated list of webhooks installed on this team.

Example

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

WebhooksApi apiInstance = new WebhooksApi();
String username = "username_example"; // String | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. 
try {
    PaginatedWebhookSubscriptions result = apiInstance.teamsUsernameHooksGet(username);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling WebhooksApi#teamsUsernameHooksGet");
    e.printStackTrace();
}

Parameters

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

Return type

PaginatedWebhookSubscriptions

Authorization

api_keybasicoauth2

HTTP request headers

teamsUsernameHooksPost

WebhookSubscription teamsUsernameHooksPost(username)

Creates a new webhook on the specified team. Team webhooks are fired for events from all repositories belonging to that team account. Note that only admins can install webhooks on teams.

Example

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

WebhooksApi apiInstance = new WebhooksApi();
String username = "username_example"; // String | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. 
try {
    WebhookSubscription result = apiInstance.teamsUsernameHooksPost(username);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling WebhooksApi#teamsUsernameHooksPost");
    e.printStackTrace();
}

Parameters

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

Return type

WebhookSubscription

Authorization

api_keybasicoauth2

HTTP request headers

teamsUsernameHooksUidDelete

teamsUsernameHooksUidDelete(username, uid)

Deletes the specified webhook subscription from the given team account.

Example

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

WebhooksApi apiInstance = new WebhooksApi();
String username = "username_example"; // String | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. 
String uid = "uid_example"; // String | The installed webhook's id
try {
    apiInstance.teamsUsernameHooksUidDelete(username, uid);
} catch (ApiException e) {
    System.err.println("Exception when calling WebhooksApi#teamsUsernameHooksUidDelete");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
username String This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user.  
uid String The installed webhook's id  

Return type

null (empty response body)

Authorization

api_keybasicoauth2

HTTP request headers

teamsUsernameHooksUidGet

WebhookSubscription teamsUsernameHooksUidGet(username, uid)

Returns the webhook with the specified id installed on the given team account.

Example

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

WebhooksApi apiInstance = new WebhooksApi();
String username = "username_example"; // String | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. 
String uid = "uid_example"; // String | The installed webhook's id.
try {
    WebhookSubscription result = apiInstance.teamsUsernameHooksUidGet(username, uid);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling WebhooksApi#teamsUsernameHooksUidGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
username String This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user.  
uid String The installed webhook's id.  

Return type

WebhookSubscription

Authorization

api_keybasicoauth2

HTTP request headers

teamsUsernameHooksUidPut

WebhookSubscription teamsUsernameHooksUidPut(username, uid)

Updates the specified webhook subscription. The following properties can be mutated: * `description` * `url` * `active` * `events`

Example

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

WebhooksApi apiInstance = new WebhooksApi();
String username = "username_example"; // String | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. 
String uid = "uid_example"; // String | The installed webhook's id
try {
    WebhookSubscription result = apiInstance.teamsUsernameHooksUidPut(username, uid);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling WebhooksApi#teamsUsernameHooksUidPut");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
username String This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user.  
uid String The installed webhook's id  

Return type

WebhookSubscription

Authorization

api_keybasicoauth2

HTTP request headers

usersSelectedUserHooksGet

PaginatedWebhookSubscriptions usersSelectedUserHooksGet(selectedUser)

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. Also note that the users endpoint has been deprecated, and the workspaces endpoint should be used instead. For more information, see the announcement.

Example

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

WebhooksApi apiInstance = new WebhooksApi();
String selectedUser = "selectedUser_example"; // String | This can either be the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`, OR an Atlassian Account ID. 
try {
    PaginatedWebhookSubscriptions result = apiInstance.usersSelectedUserHooksGet(selectedUser);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling WebhooksApi#usersSelectedUserHooksGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
selectedUser String This can either be the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`, OR an Atlassian Account ID.  

Return type

PaginatedWebhookSubscriptions

Authorization

api_keybasicoauth2

HTTP request headers

usersSelectedUserHooksPost

WebhookSubscription usersSelectedUserHooksPost(selectedUser)

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. The users endpoints have been deprecated, and the workspaces endpoint should be used instead. For more information, see the announcement.

Example

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

WebhooksApi apiInstance = new WebhooksApi();
String selectedUser = "selectedUser_example"; // String | This can either be the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`, OR an Atlassian Account ID. 
try {
    WebhookSubscription result = apiInstance.usersSelectedUserHooksPost(selectedUser);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling WebhooksApi#usersSelectedUserHooksPost");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
selectedUser String This can either be the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`, OR an Atlassian Account ID.  

Return type

WebhookSubscription

Authorization

api_keybasicoauth2

HTTP request headers

usersSelectedUserHooksUidDelete

usersSelectedUserHooksUidDelete(selectedUser, 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

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

WebhooksApi apiInstance = new WebhooksApi();
String selectedUser = "selectedUser_example"; // String | This can either be the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`, OR an Atlassian Account ID. 
String uid = "uid_example"; // String | Installed webhook's ID
try {
    apiInstance.usersSelectedUserHooksUidDelete(selectedUser, uid);
} catch (ApiException e) {
    System.err.println("Exception when calling WebhooksApi#usersSelectedUserHooksUidDelete");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
selectedUser String This can either be the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`, OR an Atlassian Account ID.  
uid String Installed webhook's ID  

Return type

null (empty response body)

Authorization

api_keybasicoauth2

HTTP request headers

usersSelectedUserHooksUidGet

WebhookSubscription usersSelectedUserHooksUidGet(selectedUser, 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

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

WebhooksApi apiInstance = new WebhooksApi();
String selectedUser = "selectedUser_example"; // String | This can either be the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`, OR an Atlassian Account ID. 
String uid = "uid_example"; // String | Installed webhook's ID
try {
    WebhookSubscription result = apiInstance.usersSelectedUserHooksUidGet(selectedUser, uid);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling WebhooksApi#usersSelectedUserHooksUidGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
selectedUser String This can either be the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`, OR an Atlassian Account ID.  
uid String Installed webhook's ID  

Return type

WebhookSubscription

Authorization

api_keybasicoauth2

HTTP request headers

usersSelectedUserHooksUidPut

WebhookSubscription usersSelectedUserHooksUidPut(selectedUser, 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

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

WebhooksApi apiInstance = new WebhooksApi();
String selectedUser = "selectedUser_example"; // String | This can either be the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`, OR an Atlassian Account ID. 
String uid = "uid_example"; // String | Installed webhook's ID
try {
    WebhookSubscription result = apiInstance.usersSelectedUserHooksUidPut(selectedUser, uid);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling WebhooksApi#usersSelectedUserHooksUidPut");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
selectedUser String This can either be the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`, OR an Atlassian Account ID.  
uid String Installed webhook's ID  

Return type

WebhookSubscription

Authorization

api_keybasicoauth2

HTTP request headers

workspacesWorkspaceHooksGet

PaginatedWebhookSubscriptions workspacesWorkspaceHooksGet(workspace)

Returns a paginated list of webhooks installed on this workspace.

Example

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

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

Parameters

Name Type Description Notes
workspace String This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`.  

Return type

PaginatedWebhookSubscriptions

Authorization

api_keybasicoauth2

HTTP request headers

workspacesWorkspaceHooksPost

WebhookSubscription workspacesWorkspaceHooksPost(workspace)

Creates a new webhook on the specified workspace. Workspace webhooks are fired for events from all repositories contained by that workspace. Note that only owners can install webhooks on workspaces.

Example

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

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

Parameters

Name Type Description Notes
workspace String This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`.  

Return type

WebhookSubscription

Authorization

api_keybasicoauth2

HTTP request headers

workspacesWorkspaceHooksUidDelete

workspacesWorkspaceHooksUidDelete(workspace, uid)

Deletes the specified webhook subscription from the given workspace.

Example

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

WebhooksApi apiInstance = new WebhooksApi();
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
String uid = "uid_example"; // String | The installed webhook's id
try {
    apiInstance.workspacesWorkspaceHooksUidDelete(workspace, uid);
} catch (ApiException e) {
    System.err.println("Exception when calling WebhooksApi#workspacesWorkspaceHooksUidDelete");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
workspace String This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`.  
uid String The installed webhook's id  

Return type

null (empty response body)

Authorization

api_keybasicoauth2

HTTP request headers

workspacesWorkspaceHooksUidGet

WebhookSubscription workspacesWorkspaceHooksUidGet(workspace, uid)

Returns the webhook with the specified id installed on the given workspace.

Example

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

WebhooksApi apiInstance = new WebhooksApi();
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
String uid = "uid_example"; // String | The installed webhook's id.
try {
    WebhookSubscription result = apiInstance.workspacesWorkspaceHooksUidGet(workspace, uid);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling WebhooksApi#workspacesWorkspaceHooksUidGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
workspace String This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`.  
uid String The installed webhook's id.  

Return type

WebhookSubscription

Authorization

api_keybasicoauth2

HTTP request headers

workspacesWorkspaceHooksUidPut

WebhookSubscription workspacesWorkspaceHooksUidPut(workspace, uid)

Updates the specified webhook subscription. The following properties can be mutated: * `description` * `url` * `active` * `events`

Example

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

WebhooksApi apiInstance = new WebhooksApi();
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. 
String uid = "uid_example"; // String | The installed webhook's id
try {
    WebhookSubscription result = apiInstance.workspacesWorkspaceHooksUidPut(workspace, uid);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling WebhooksApi#workspacesWorkspaceHooksUidPut");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
workspace String This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`.  
uid String The installed webhook's id  

Return type

WebhookSubscription

Authorization

api_keybasicoauth2

HTTP request headers