All URIs are relative to https://api.bitbucket.org/2.0
Method | HTTP request | Description |
---|---|---|
userPermissionsWorkspacesGet | GET /user/permissions/workspaces | |
workspacesGet | GET /workspaces | |
workspacesWorkspaceGet | GET /workspaces/{workspace} | |
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} | |
workspacesWorkspaceMembersGet | GET /workspaces/{workspace}/members | |
workspacesWorkspaceMembersMemberGet | GET /workspaces/{workspace}/members/{member} | |
workspacesWorkspacePermissionsGet | GET /workspaces/{workspace}/permissions | |
workspacesWorkspaceProjectsGet | GET /workspaces/{workspace}/projects | |
workspacesWorkspaceProjectsProjectKeyGet | GET /workspaces/{workspace}/projects/{project_key} |
PaginatedWorkspaceMemberships userPermissionsWorkspacesGet(q, sort)
Returns an object for each workspace the caller is a member of, and their effective role - the highest level of privilege the caller has. If a user is a member of multiple groups with distinct roles, only the highest level is returned. Permissions can be: * `owner` * `collaborator` * `member` Example: ``` $ curl https://api.bitbucket.org/2.0/user/permissions/workspaces { \"pagelen\": 10, \"page\": 1, \"size\": 1, \"values\": [ { \"type\": \"workspace_membership\", \"permission\": \"owner\", \"last_accessed\": \"2019-03-07T12:35:02.900024+00:00\", \"added_on\": \"2018-10-11T17:42:02.961424+00:00\", \"user\": { \"type\": \"user\", \"uuid\": \"{470c176d-3574-44ea-bb41-89e8638bcca4}\", \"nickname\": \"evzijst\", \"display_name\": \"Erik van Zijst\", }, \"workspace\": { \"type\": \"workspace\", \"uuid\": \"{a15fb181-db1f-48f7-b41f-e1eff06929d6}\", \"slug\": \"bbworkspace1\", \"name\": \"Atlassian Bitbucket\", } } ] } ``` Results may be further filtered or sorted by workspace or permission by adding the following query string parameters: * `q=workspace.slug=\"bbworkspace1\"` or `q=permission=\"owner\"` * `sort=workspace.slug` Note that the query parameter values need to be URL escaped so that `=` would become `%3D`.
// 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.WorkspacesApi;
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");
WorkspacesApi apiInstance = new WorkspacesApi();
String q = "q_example"; // String | Query string to narrow down the response. See [filtering and sorting](../../../meta/filtering) for details.
String sort = "sort_example"; // String | Name of a response property to sort results. See [filtering and sorting](../../../meta/filtering#query-sort) for details.
try {
PaginatedWorkspaceMemberships result = apiInstance.userPermissionsWorkspacesGet(q, sort);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WorkspacesApi#userPermissionsWorkspacesGet");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
q | String | Query string to narrow down the response. See filtering and sorting for details. | [optional] |
sort | String | Name of a response property to sort results. See filtering and sorting for details. | [optional] |
PaginatedWorkspaces workspacesGet(role, q, sort)
Returns a list of workspaces accessible by the authenticated user. Example: ``` $ curl https://api.bitbucket.org/2.0/workspaces { \"pagelen\": 10, \"page\": 1, \"size\": 1, \"values\": [ { \"uuid\": \"{a15fb181-db1f-48f7-b41f-e1eff06929d6}\", \"links\": { \"owners\": { \"href\": \"https://api.bitbucket.org/2.0/workspaces/bbworkspace1/members?q=permission%3D%22owner%22\" }, \"self\": { \"href\": \"https://api.bitbucket.org/2.0/workspaces/bbworkspace1\" }, \"repositories\": { \"href\": \"https://api.bitbucket.org/2.0/repositories/bbworkspace1\" }, \"snippets\": { \"href\": \"https://api.bitbucket.org/2.0/snippets/bbworkspace1\" }, \"html\": { \"href\": \"https://bitbucket.org/bbworkspace1/\" }, \"avatar\": { \"href\": \"https://bitbucket.org/workspaces/bbworkspace1/avatar/?ts=1543465801\" }, \"members\": { \"href\": \"https://api.bitbucket.org/2.0/workspaces/bbworkspace1/members\" }, \"projects\": { \"href\": \"https://api.bitbucket.org/2.0/workspaces/bbworkspace1/projects\" } }, \"created_on\": \"2018-11-14T19:15:05.058566+00:00\", \"type\": \"workspace\", \"slug\": \"bbworkspace1\", \"is_private\": true, \"name\": \"Atlassian Bitbucket\" } ] } ``` Results may be further filtered or sorted by workspace or permission by adding the following query string parameters: * `q=slug=\"bbworkspace1\"` or `q=is_private=true` * `sort=created_on` Note that the query parameter values need to be URL escaped so that `=` would become `%3D`.
// 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.WorkspacesApi;
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");
WorkspacesApi apiInstance = new WorkspacesApi();
String role = "role_example"; // String | Filters the workspaces based on the authenticated user's role on each workspace. * **member**: returns a list of all the workspaces which the caller is a member of at least one workspace group or repository * **collaborator**: returns a list of workspaces which the caller has write access to at least one repository in the workspace * **owner**: returns a list of workspaces which the caller has administrator access
String q = "q_example"; // String | Query string to narrow down the response. See [filtering and sorting](../meta/filtering) for details.
String sort = "sort_example"; // String | Name of a response property to sort results. See [filtering and sorting](../meta/filtering#query-sort) for details.
try {
PaginatedWorkspaces result = apiInstance.workspacesGet(role, q, sort);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WorkspacesApi#workspacesGet");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
role | String | Filters the workspaces based on the authenticated user's role on each workspace. * member: returns a list of all the workspaces which the caller is a member of at least one workspace group or repository * collaborator: returns a list of workspaces which the caller has write access to at least one repository in the workspace * owner: returns a list of workspaces which the caller has administrator access | [optional] [enum: owner, collaborator, member] |
q | String | Query string to narrow down the response. See filtering and sorting for details. | [optional] |
sort | String | Name of a response property to sort results. See filtering and sorting for details. | [optional] |
Workspace workspacesWorkspaceGet(workspace)
Returns the requested workspace.
// 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.WorkspacesApi;
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");
WorkspacesApi apiInstance = new WorkspacesApi();
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 {
Workspace result = apiInstance.workspacesWorkspaceGet(workspace);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WorkspacesApi#workspacesWorkspaceGet");
e.printStackTrace();
}
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}`. |
PaginatedWebhookSubscriptions workspacesWorkspaceHooksGet(workspace)
Returns a paginated list of webhooks installed on this workspace.
// 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.WorkspacesApi;
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");
WorkspacesApi apiInstance = new WorkspacesApi();
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 WorkspacesApi#workspacesWorkspaceHooksGet");
e.printStackTrace();
}
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}`. |
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.
// 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.WorkspacesApi;
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");
WorkspacesApi apiInstance = new WorkspacesApi();
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 WorkspacesApi#workspacesWorkspaceHooksPost");
e.printStackTrace();
}
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}`. |
workspacesWorkspaceHooksUidDelete(workspace, uid)
Deletes the specified webhook subscription from the given workspace.
// 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.WorkspacesApi;
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");
WorkspacesApi apiInstance = new WorkspacesApi();
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 WorkspacesApi#workspacesWorkspaceHooksUidDelete");
e.printStackTrace();
}
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 |
null (empty response body)
WebhookSubscription workspacesWorkspaceHooksUidGet(workspace, uid)
Returns the webhook with the specified id installed on the given workspace.
// 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.WorkspacesApi;
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");
WorkspacesApi apiInstance = new WorkspacesApi();
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 WorkspacesApi#workspacesWorkspaceHooksUidGet");
e.printStackTrace();
}
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. |
WebhookSubscription workspacesWorkspaceHooksUidPut(workspace, uid)
Updates the specified webhook subscription. The following properties can be mutated: * `description` * `url` * `active` * `events`
// 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.WorkspacesApi;
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");
WorkspacesApi apiInstance = new WorkspacesApi();
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 WorkspacesApi#workspacesWorkspaceHooksUidPut");
e.printStackTrace();
}
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 |
PaginatedWorkspaceMemberships workspacesWorkspaceMembersGet(workspace)
Returns all members of the requested workspace.
// 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.WorkspacesApi;
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");
WorkspacesApi apiInstance = new WorkspacesApi();
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 {
PaginatedWorkspaceMemberships result = apiInstance.workspacesWorkspaceMembersGet(workspace);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WorkspacesApi#workspacesWorkspaceMembersGet");
e.printStackTrace();
}
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}`. |
WorkspaceMembership workspacesWorkspaceMembersMemberGet(member, workspace)
Returns the workspace membership, which includes a `User` object for the member and a `Workspace` object for the requested workspace.
// 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.WorkspacesApi;
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");
WorkspacesApi apiInstance = new WorkspacesApi();
String member = "member_example"; // String | Member's UUID or Atlassian ID.
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 {
WorkspaceMembership result = apiInstance.workspacesWorkspaceMembersMemberGet(member, workspace);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WorkspacesApi#workspacesWorkspaceMembersMemberGet");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
member | String | Member's UUID or Atlassian ID. | |
workspace | String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. |
PaginatedWorkspaceMemberships workspacesWorkspacePermissionsGet(workspace, q)
Returns the list of members in a workspace and their permission levels. Permission can be: * `owner` * `collaborator` * `member` Example: ``` $ curl -X https://api.bitbucket.org/2.0/workspaces/bbworkspace1/permissions { \"pagelen\": 10, \"values\": [ { \"permission\": \"owner\", \"type\": \"workspace_membership\", \"user\": { \"type\": \"user\", \"uuid\": \"{470c176d-3574-44ea-bb41-89e8638bcca4}\", \"display_name\": \"Erik van Zijst\", }, \"workspace\": { \"type\": \"workspace\", \"uuid\": \"{a15fb181-db1f-48f7-b41f-e1eff06929d6}\", \"slug\": \"bbworkspace1\", \"name\": \"Atlassian Bitbucket\", } }, { \"permission\": \"member\", \"type\": \"workspace_membership\", \"user\": { \"type\": \"user\", \"nickname\": \"seanaty\", \"display_name\": \"Sean Conaty\", \"uuid\": \"{504c3b62-8120-4f0c-a7bc-87800b9d6f70}\" }, \"workspace\": { \"type\": \"workspace\", \"uuid\": \"{a15fb181-db1f-48f7-b41f-e1eff06929d6}\", \"slug\": \"bbworkspace1\", \"name\": \"Atlassian Bitbucket\", } } ], \"page\": 1, \"size\": 2 } ``` Results may be further filtered by permission by adding the following query string parameters: * `q=permission=\"owner\"`
// 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.WorkspacesApi;
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");
WorkspacesApi apiInstance = new WorkspacesApi();
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 q = "q_example"; // String | Query string to narrow down the response as per [filtering and sorting](../../../meta/filtering).
try {
PaginatedWorkspaceMemberships result = apiInstance.workspacesWorkspacePermissionsGet(workspace, q);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WorkspacesApi#workspacesWorkspacePermissionsGet");
e.printStackTrace();
}
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}`. | |
q | String | Query string to narrow down the response as per filtering and sorting. | [optional] |
PaginatedProjects workspacesWorkspaceProjectsGet(workspace)
Returns the list of projects in this workspace.
// 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.WorkspacesApi;
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");
WorkspacesApi apiInstance = new WorkspacesApi();
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 {
PaginatedProjects result = apiInstance.workspacesWorkspaceProjectsGet(workspace);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WorkspacesApi#workspacesWorkspaceProjectsGet");
e.printStackTrace();
}
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}`. |
Project workspacesWorkspaceProjectsProjectKeyGet(projectKey, workspace)
Returns the requested project.
// 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.WorkspacesApi;
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");
WorkspacesApi apiInstance = new WorkspacesApi();
String projectKey = "projectKey_example"; // String | The project in question. This is the actual `key` assigned to the project.
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 {
Project result = apiInstance.workspacesWorkspaceProjectsProjectKeyGet(projectKey, workspace);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WorkspacesApi#workspacesWorkspaceProjectsProjectKeyGet");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
projectKey | String | The project in question. This is the actual `key` assigned to the project. | |
workspace | String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. |