bitbucket-api-client-lib

AddonApi

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

Method HTTP request Description
addonDelete DELETE /addon  
addonLinkersGet GET /addon/linkers  
addonLinkersLinkerKeyGet GET /addon/linkers/{linker_key}  
addonLinkersLinkerKeyValuesDelete DELETE /addon/linkers/{linker_key}/values  
addonLinkersLinkerKeyValuesGet GET /addon/linkers/{linker_key}/values  
addonLinkersLinkerKeyValuesPost POST /addon/linkers/{linker_key}/values  
addonLinkersLinkerKeyValuesPut PUT /addon/linkers/{linker_key}/values  
addonLinkersLinkerKeyValuesValueIdDelete DELETE /addon/linkers/{linker_key}/values/{value_id}  
addonLinkersLinkerKeyValuesValueIdGet GET /addon/linkers/{linker_key}/values/{value_id}  
addonPut PUT /addon  

addonDelete

addonDelete()

Deletes the application for the user. This endpoint is intended to be used by Bitbucket Connect apps and only supports JWT authentication – that is how Bitbucket identifies the particular installation of the app. Developers with applications registered in the \"Develop Apps\" section of Bitbucket Marketplace need not use this endpoint as updates for those applications can be sent out via the UI of that section. ``` $ curl -X DELETE https://api.bitbucket.org/2.0/addon \ -H \"Authorization: JWT <JWT Token>\" ```

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.AddonApi;

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");

AddonApi apiInstance = new AddonApi();
try {
    apiInstance.addonDelete();
} catch (ApiException e) {
    System.err.println("Exception when calling AddonApi#addonDelete");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

api_keybasicoauth2

HTTP request headers

addonLinkersGet

addonLinkersGet()

Gets a list of all linkers for the authenticated application.

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.AddonApi;

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");

AddonApi apiInstance = new AddonApi();
try {
    apiInstance.addonLinkersGet();
} catch (ApiException e) {
    System.err.println("Exception when calling AddonApi#addonLinkersGet");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

api_keybasicoauth2

HTTP request headers

addonLinkersLinkerKeyGet

addonLinkersLinkerKeyGet(linkerKey)

Gets a linker specified by `linker_key` for the authenticated application.

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.AddonApi;

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");

AddonApi apiInstance = new AddonApi();
String linkerKey = "linkerKey_example"; // String | The unique key of a [linker module](/cloud/bitbucket/modules/linker/) as defined in an application descriptor.
try {
    apiInstance.addonLinkersLinkerKeyGet(linkerKey);
} catch (ApiException e) {
    System.err.println("Exception when calling AddonApi#addonLinkersLinkerKeyGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
linkerKey String The unique key of a linker module as defined in an application descriptor.  

Return type

null (empty response body)

Authorization

api_keybasicoauth2

HTTP request headers

addonLinkersLinkerKeyValuesDelete

addonLinkersLinkerKeyValuesDelete(linkerKey)

Delete all linker values for the specified linker of the authenticated application.

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.AddonApi;

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");

AddonApi apiInstance = new AddonApi();
String linkerKey = "linkerKey_example"; // String | The unique key of a [linker module](/cloud/bitbucket/modules/linker/) as defined in an application descriptor.
try {
    apiInstance.addonLinkersLinkerKeyValuesDelete(linkerKey);
} catch (ApiException e) {
    System.err.println("Exception when calling AddonApi#addonLinkersLinkerKeyValuesDelete");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
linkerKey String The unique key of a linker module as defined in an application descriptor.  

Return type

null (empty response body)

Authorization

api_keybasicoauth2

HTTP request headers

addonLinkersLinkerKeyValuesGet

addonLinkersLinkerKeyValuesGet(linkerKey)

Gets a list of all linker values for the specified linker of the authenticated application. A linker value lets applications supply values to modify its regular expression. The base regular expression must use a Bitbucket-specific match group `(?K)` which will be translated to `([\w\-]+)`. A value must match this pattern. Read more about linker values

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.AddonApi;

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");

AddonApi apiInstance = new AddonApi();
String linkerKey = "linkerKey_example"; // String | The unique key of a [linker module](/cloud/bitbucket/modules/linker/) as defined in an application descriptor.
try {
    apiInstance.addonLinkersLinkerKeyValuesGet(linkerKey);
} catch (ApiException e) {
    System.err.println("Exception when calling AddonApi#addonLinkersLinkerKeyValuesGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
linkerKey String The unique key of a linker module as defined in an application descriptor.  

Return type

null (empty response body)

Authorization

api_keybasicoauth2

HTTP request headers

addonLinkersLinkerKeyValuesPost

addonLinkersLinkerKeyValuesPost(linkerKey)

Creates a linker value for the specified linker of authenticated application. A linker value lets applications supply values to modify its regular expression. The base regular expression must use a Bitbucket-specific match group `(?K)` which will be translated to `([\w\-]+)`. A value must match this pattern. Read more about linker values

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.AddonApi;

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");

AddonApi apiInstance = new AddonApi();
String linkerKey = "linkerKey_example"; // String | The unique key of a [linker module](/cloud/bitbucket/modules/linker/) as defined in an application descriptor.
try {
    apiInstance.addonLinkersLinkerKeyValuesPost(linkerKey);
} catch (ApiException e) {
    System.err.println("Exception when calling AddonApi#addonLinkersLinkerKeyValuesPost");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
linkerKey String The unique key of a linker module as defined in an application descriptor.  

Return type

null (empty response body)

Authorization

api_keybasicoauth2

HTTP request headers

addonLinkersLinkerKeyValuesPut

addonLinkersLinkerKeyValuesPut(linkerKey)

Bulk update linker values for the specified linker of the authenticated application. A linker value lets applications supply values to modify its regular expression. The base regular expression must use a Bitbucket-specific match group `(?K)` which will be translated to `([\w\-]+)`. A value must match this pattern. Read more about linker values

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.AddonApi;

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");

AddonApi apiInstance = new AddonApi();
String linkerKey = "linkerKey_example"; // String | The unique key of a [linker module](/cloud/bitbucket/modules/linker/) as defined in an application descriptor.
try {
    apiInstance.addonLinkersLinkerKeyValuesPut(linkerKey);
} catch (ApiException e) {
    System.err.println("Exception when calling AddonApi#addonLinkersLinkerKeyValuesPut");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
linkerKey String The unique key of a linker module as defined in an application descriptor.  

Return type

null (empty response body)

Authorization

api_keybasicoauth2

HTTP request headers

addonLinkersLinkerKeyValuesValueIdDelete

addonLinkersLinkerKeyValuesValueIdDelete(linkerKey, valueId)

Delete a single linker value of the authenticated application.

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.AddonApi;

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");

AddonApi apiInstance = new AddonApi();
String linkerKey = "linkerKey_example"; // String | The unique key of a [linker module](/cloud/bitbucket/modules/linker/) as defined in an application descriptor.
Integer valueId = 56; // Integer | The numeric ID of the linker value.
try {
    apiInstance.addonLinkersLinkerKeyValuesValueIdDelete(linkerKey, valueId);
} catch (ApiException e) {
    System.err.println("Exception when calling AddonApi#addonLinkersLinkerKeyValuesValueIdDelete");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
linkerKey String The unique key of a linker module as defined in an application descriptor.  
valueId Integer The numeric ID of the linker value.  

Return type

null (empty response body)

Authorization

api_keybasicoauth2

HTTP request headers

addonLinkersLinkerKeyValuesValueIdGet

addonLinkersLinkerKeyValuesValueIdGet(linkerKey, valueId)

Get a single linker value of the authenticated application.

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.AddonApi;

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");

AddonApi apiInstance = new AddonApi();
String linkerKey = "linkerKey_example"; // String | The unique key of a [linker module](/cloud/bitbucket/modules/linker/) as defined in an application descriptor.
Integer valueId = 56; // Integer | The numeric ID of the linker value.
try {
    apiInstance.addonLinkersLinkerKeyValuesValueIdGet(linkerKey, valueId);
} catch (ApiException e) {
    System.err.println("Exception when calling AddonApi#addonLinkersLinkerKeyValuesValueIdGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
linkerKey String The unique key of a linker module as defined in an application descriptor.  
valueId Integer The numeric ID of the linker value.  

Return type

null (empty response body)

Authorization

api_keybasicoauth2

HTTP request headers

addonPut

addonPut()

Updates the application installation for the user. This endpoint is intended to be used by Bitbucket Connect apps and only supports JWT authentication – that is how Bitbucket identifies the particular installation of the app. Developers with applications registered in the \"Develop Apps\" section of Bitbucket Marketplace need not use this endpoint as updates for those applications can be sent out via the UI of that section. A new, valid descriptor must be provided in the body of the PUT request. ``` $ curl -X PUT https://api.bitbucket.org/2.0/addon \ -H \"Authorization: JWT <JWT Token>\" \ –header \"Content-Type: application/json\" \ –data '{\"descriptor\": $NEW_DESCRIPTOR}' ``` Note that the scopes of the application cannot be increased in the new descriptor nor reduced to none.

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.AddonApi;

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");

AddonApi apiInstance = new AddonApi();
try {
    apiInstance.addonPut();
} catch (ApiException e) {
    System.err.println("Exception when calling AddonApi#addonPut");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

api_keybasicoauth2

HTTP request headers