All URIs are relative to https://api.bitbucket.org/2.0
Method | HTTP request | Description |
---|---|---|
repositoriesWorkspaceRepoSlugDiffstatSpecGet | GET /repositories/{workspace}/{repo_slug}/diffstat/{spec} | |
repositoriesWorkspaceRepoSlugIssuesExportPost | POST /repositories/{workspace}/{repo_slug}/issues/export | |
repositoriesWorkspaceRepoSlugIssuesExportRepoNameIssuesTaskIdZipGet | GET /repositories/{workspace}/{repo_slug}/issues/export/{repo_name}-issues-{task_id}.zip | |
repositoriesWorkspaceRepoSlugIssuesImportGet | GET /repositories/{workspace}/{repo_slug}/issues/import | |
repositoriesWorkspaceRepoSlugIssuesImportPost | POST /repositories/{workspace}/{repo_slug}/issues/import | |
repositoriesWorkspaceRepoSlugPipelinesPipelineUuidStepsStepUuidLogsLogUuidGet | GET /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/logs/{log_uuid} | |
repositoriesWorkspaceRepoSlugPipelinesPipelineUuidStepsStepUuidTestReportsGet | GET /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports | |
repositoriesWorkspaceRepoSlugPipelinesPipelineUuidStepsStepUuidTestReportsTestCasesGet | GET /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports/test_cases | |
repositoriesWorkspaceRepoSlugPipelinesPipelineUuidStepsStepUuidTestReportsTestCasesTestCaseUuidTestCaseReasonsGet | GET /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports/test_cases/{test_case_uuid}/test_case_reasons | |
teamsUsernamePermissionsGet | GET /teams/{username}/permissions | |
teamsUsernamePermissionsRepositoriesGet | GET /teams/{username}/permissions/repositories | |
teamsUsernamePermissionsRepositoriesRepoSlugGet | GET /teams/{username}/permissions/repositories/{repo_slug} | |
userPermissionsTeamsGet | GET /user/permissions/teams | |
workspacesWorkspacePermissionsRepositoriesGet | GET /workspaces/{workspace}/permissions/repositories | |
workspacesWorkspacePermissionsRepositoriesRepoSlugGet | GET /workspaces/{workspace}/permissions/repositories/{repo_slug} |
PaginatedDiffstats repositoriesWorkspaceRepoSlugDiffstatSpecGet(repoSlug, spec, workspace, ignoreWhitespace, merge, path, renames)
Returns the diff stat for the specified commit. Diff stat responses contain a record for every path modified by the commit and lists the number of lines added and removed for each file. Example: ``` curl https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/diffstat/d222fa2..e174964 { \"pagelen\": 500, \"values\": [ { \"type\": \"diffstat\", \"status\": \"modified\", \"lines_removed\": 1, \"lines_added\": 2, \"old\": { \"path\": \"setup.py\", \"escaped_path\": \"setup.py\", \"type\": \"commit_file\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/src/e1749643d655d7c7014001a6c0f58abaf42ad850/setup.py\" } } }, \"new\": { \"path\": \"setup.py\", \"escaped_path\": \"setup.py\", \"type\": \"commit_file\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/src/d222fa235229c55dad20b190b0b571adf737d5a6/setup.py\" } } } } ], \"page\": 1, \"size\": 1 } ```
// 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.DefaultApi;
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");
DefaultApi apiInstance = new DefaultApi();
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 spec = "spec_example"; // String | A commit SHA (e.g. `3a8b42`) or a commit range using double dot notation (e.g. `3a8b42..9ff173`).
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}`.
Boolean ignoreWhitespace = true; // Boolean | Generate diffs that ignore whitespace
Boolean merge = true; // Boolean | If true, the source commit is merged into the destination commit, and then a diffstat from the destination to the merge result is returned. If false, a simple 'two dot' diffstat between the source and destination is returned. True if omitted.
String path = "path_example"; // String | Limit the diffstat to a particular file (this parameter can be repeated for multiple paths).
Boolean renames = true; // Boolean | Whether to perform rename detection, true if omitted.
try {
PaginatedDiffstats result = apiInstance.repositoriesWorkspaceRepoSlugDiffstatSpecGet(repoSlug, spec, workspace, ignoreWhitespace, merge, path, renames);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#repositoriesWorkspaceRepoSlugDiffstatSpecGet");
e.printStackTrace();
}
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}`. | |
spec | String | A commit SHA (e.g. `3a8b42`) or a commit range using double dot notation (e.g. `3a8b42..9ff173`). | |
workspace | String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. | |
ignoreWhitespace | Boolean | Generate diffs that ignore whitespace | [optional] |
merge | Boolean | If true, the source commit is merged into the destination commit, and then a diffstat from the destination to the merge result is returned. If false, a simple 'two dot' diffstat between the source and destination is returned. True if omitted. | [optional] |
path | String | Limit the diffstat to a particular file (this parameter can be repeated for multiple paths). | [optional] |
renames | Boolean | Whether to perform rename detection, true if omitted. | [optional] |
repositoriesWorkspaceRepoSlugIssuesExportPost(repoSlug, workspace, body)
A POST request to this endpoint initiates a new background celery task that archives the repo's issues. For example, you can run: curl -u <username> -X POST http://api.bitbucket.org/2.0/repositories/<owner_username>/<repo_slug>/ issues/export When the job has been accepted, it will return a 202 (Accepted) along with a unique url to this job in the 'Location' response header. This url is the endpoint for where the user can obtain their zip files.\"
// 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.DefaultApi;
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");
DefaultApi apiInstance = new DefaultApi();
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}`.
ExportOptions body = new ExportOptions(); // ExportOptions | The options to apply to the export. Available options include `project_key` and `project_name` which, if specified, are used as the project key and name in the exported Jira json format. Option `send_email` specifies whether an email should be sent upon export result. Option `include_attachments` specifies whether attachments are included in the export.
try {
apiInstance.repositoriesWorkspaceRepoSlugIssuesExportPost(repoSlug, workspace, body);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#repositoriesWorkspaceRepoSlugIssuesExportPost");
e.printStackTrace();
}
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}`. | |
body | ExportOptions | The options to apply to the export. Available options include `project_key` and `project_name` which, if specified, are used as the project key and name in the exported Jira json format. Option `send_email` specifies whether an email should be sent upon export result. Option `include_attachments` specifies whether attachments are included in the export. | [optional] |
null (empty response body)
IssueJobStatus repositoriesWorkspaceRepoSlugIssuesExportRepoNameIssuesTaskIdZipGet(repoSlug, workspace, repoName, taskId)
This endpoint is used to poll for the progress of an issue export job and return the zip file after the job is complete. As long as the job is running, this will return a 200 response with in the response body a description of the current status. After the job has been scheduled, but before it starts executing, this endpoint's response is: { \"type\": \"issue_job_status\", \"status\": \"ACCEPTED\", \"phase\": \"Initializing\", \"total\": 0, \"count\": 0, \"pct\": 0 } Then once it starts running, it becomes: { \"type\": \"issue_job_status\", \"status\": \"STARTED\", \"phase\": \"Attachments\", \"total\": 15, \"count\": 11, \"pct\": 73 } Once the job has successfully completed, it returns a stream of the zip file.
// 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.DefaultApi;
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");
DefaultApi apiInstance = new DefaultApi();
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 repoName = "repoName_example"; // String | The name of the repo
String taskId = "taskId_example"; // String | The ID of the export task
try {
IssueJobStatus result = apiInstance.repositoriesWorkspaceRepoSlugIssuesExportRepoNameIssuesTaskIdZipGet(repoSlug, workspace, repoName, taskId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#repositoriesWorkspaceRepoSlugIssuesExportRepoNameIssuesTaskIdZipGet");
e.printStackTrace();
}
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}`. | |
repoName | String | The name of the repo | |
taskId | String | The ID of the export task |
IssueJobStatus repositoriesWorkspaceRepoSlugIssuesImportGet(repoSlug, workspace)
When using GET, this endpoint reports the status of the current import task. Request example: ``` $ curl -u <username> -X GET https://api.bitbucket.org/2.0/repositories/<owner_username>/<repo_slug>/issues/import ``` After the job has been scheduled, but before it starts executing, this endpoint's response is: ``` < HTTP/1.1 202 Accepted { \"type\": \"issue_job_status\", \"status\": \"PENDING\", \"phase\": \"Attachments\", \"total\": 15, \"count\": 0, \"percent\": 0 } ``` Once it starts running, it is a 202 response with status STARTED and progress filled. After it is finished, it becomes a 200 response with status SUCCESS or FAILURE.
// 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.DefaultApi;
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");
DefaultApi apiInstance = new DefaultApi();
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 {
IssueJobStatus result = apiInstance.repositoriesWorkspaceRepoSlugIssuesImportGet(repoSlug, workspace);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#repositoriesWorkspaceRepoSlugIssuesImportGet");
e.printStackTrace();
}
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}`. |
IssueJobStatus repositoriesWorkspaceRepoSlugIssuesImportPost(repoSlug, workspace)
A POST request to this endpoint will import the zip file given by the archive parameter into the repository. All existing issues will be deleted and replaced by the contents of the imported zip file. Imports are done through a multipart/form-data POST. There is one valid and required form field, with the name \"archive,\" which needs to be a file field: ``` $ curl -u <username> -X POST -F archive=@/path/to/file.zip https://api.bitbucket.org/2.0/repositories/<owner_username>/<repo_slug>/issues/import ``` When the import job is accepted, here is example output: ``` < HTTP/1.1 202 Accepted { \"type\": \"issue_job_status\", \"status\": \"ACCEPTED\", \"phase\": \"Attachments\", \"total\": 15, \"count\": 0, \"percent\": 0 } ```
// 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.DefaultApi;
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");
DefaultApi apiInstance = new DefaultApi();
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 {
IssueJobStatus result = apiInstance.repositoriesWorkspaceRepoSlugIssuesImportPost(repoSlug, workspace);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#repositoriesWorkspaceRepoSlugIssuesImportPost");
e.printStackTrace();
}
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}`. |
repositoriesWorkspaceRepoSlugPipelinesPipelineUuidStepsStepUuidLogsLogUuidGet()
// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.api.DefaultApi;
DefaultApi apiInstance = new DefaultApi();
try {
apiInstance.repositoriesWorkspaceRepoSlugPipelinesPipelineUuidStepsStepUuidLogsLogUuidGet();
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#repositoriesWorkspaceRepoSlugPipelinesPipelineUuidStepsStepUuidLogsLogUuidGet");
e.printStackTrace();
}
This endpoint does not need any parameter.
null (empty response body)
No authorization required
repositoriesWorkspaceRepoSlugPipelinesPipelineUuidStepsStepUuidTestReportsGet()
// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.api.DefaultApi;
DefaultApi apiInstance = new DefaultApi();
try {
apiInstance.repositoriesWorkspaceRepoSlugPipelinesPipelineUuidStepsStepUuidTestReportsGet();
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#repositoriesWorkspaceRepoSlugPipelinesPipelineUuidStepsStepUuidTestReportsGet");
e.printStackTrace();
}
This endpoint does not need any parameter.
null (empty response body)
No authorization required
repositoriesWorkspaceRepoSlugPipelinesPipelineUuidStepsStepUuidTestReportsTestCasesGet()
// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.api.DefaultApi;
DefaultApi apiInstance = new DefaultApi();
try {
apiInstance.repositoriesWorkspaceRepoSlugPipelinesPipelineUuidStepsStepUuidTestReportsTestCasesGet();
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#repositoriesWorkspaceRepoSlugPipelinesPipelineUuidStepsStepUuidTestReportsTestCasesGet");
e.printStackTrace();
}
This endpoint does not need any parameter.
null (empty response body)
No authorization required
repositoriesWorkspaceRepoSlugPipelinesPipelineUuidStepsStepUuidTestReportsTestCasesTestCaseUuidTestCaseReasonsGet()
// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.api.DefaultApi;
DefaultApi apiInstance = new DefaultApi();
try {
apiInstance.repositoriesWorkspaceRepoSlugPipelinesPipelineUuidStepsStepUuidTestReportsTestCasesTestCaseUuidTestCaseReasonsGet();
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#repositoriesWorkspaceRepoSlugPipelinesPipelineUuidStepsStepUuidTestReportsTestCasesTestCaseUuidTestCaseReasonsGet");
e.printStackTrace();
}
This endpoint does not need any parameter.
null (empty response body)
No authorization required
PaginatedTeamPermissions teamsUsernamePermissionsGet(username, q, sort)
Returns an object for each team permission a user on the team has. This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see the announcement.\" Permissions returned are effective permissions — if a user is a member of multiple groups with distinct roles, only the highest level is returned. Permissions can be: * `admin` * `collaborator` Only users with admin permission for the team may access this resource. Example: ``` $ curl https://api.bitbucket.org/2.0/teams/atlassian_tutorial/permissions { \"pagelen\": 10, \"values\": [ { \"permission\": \"admin\", \"type\": \"team_permission\", \"user\": { \"type\": \"user\", \"nickname\": \"evzijst\", \"display_name\": \"Erik van Zijst\", \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\" }, \"team\": { \"display_name\": \"Atlassian Bitbucket\", \"uuid\": \"{4cc6108a-a241-4db0-96a5-64347ac04f87}\" } }, { \"permission\": \"collaborator\", \"type\": \"team_permission\", \"user\": { \"type\": \"user\", \"nickname\": \"seanaty\", \"display_name\": \"Sean Conaty\", \"uuid\": \"{504c3b62-8120-4f0c-a7bc-87800b9d6f70}\" }, \"team\": { \"display_name\": \"Atlassian Bitbucket\", \"uuid\": \"{4cc6108a-a241-4db0-96a5-64347ac04f87}\" } } ], \"page\": 1, \"size\": 2 } ``` Results may be further filtered or sorted by team, user, or permission by adding the following query string parameters: * `q=user.uuid=\"{d301aafa-d676-4ee0-88be-962be7417567}\"` or `q=permission=\"admin\"` * `sort=team.display_name` 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.DefaultApi;
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");
DefaultApi apiInstance = new DefaultApi();
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 q = "q_example"; // String | Query string to narrow down the response as per [filtering and sorting](../../../meta/filtering).
String sort = "sort_example"; // String | Name of a response property sort the result by as per [filtering and sorting](../../../meta/filtering#query-sort).
try {
PaginatedTeamPermissions result = apiInstance.teamsUsernamePermissionsGet(username, q, sort);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#teamsUsernamePermissionsGet");
e.printStackTrace();
}
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. | |
q | String | Query string to narrow down the response as per filtering and sorting. | [optional] |
sort | String | Name of a response property sort the result by as per filtering and sorting. | [optional] |
PaginatedRepositoryPermissions teamsUsernamePermissionsRepositoriesGet(username, q, sort)
Returns an object for each repository permission for all of a team’s repositories. This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see the announcement.\" If the username URL parameter refers to a user account instead of a team account, an object containing the repository permissions of all the username's repositories will be returned. Permissions returned are effective permissions — the highest level of permission the user has. This does not include public repositories that users are not granted any specific permission in, and does not distinguish between direct and indirect privileges. Only users with admin permission for the team may access this resource. Permissions can be: * `admin` * `write` * `read` Example: ``` $ curl https://api.bitbucket.org/2.0/teams/atlassian_tutorial/permissions/repositories { \"pagelen\": 10, \"values\": [ { \"type\": \"repository_permission\", \"user\": { \"type\": \"user\", \"display_name\": \"Erik van Zijst\", \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\" }, \"repository\": { \"type\": \"repository\", \"name\": \"geordi\", \"full_name\": \"bitbucket/geordi\", \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\" }, \"permission\": \"admin\" }, { \"type\": \"repository_permission\", \"user\": { \"type\": \"user\", \"display_name\": \"Sean Conaty\", \"uuid\": \"{504c3b62-8120-4f0c-a7bc-87800b9d6f70}\" }, \"repository\": { \"type\": \"repository\", \"name\": \"geordi\", \"full_name\": \"bitbucket/geordi\", \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\" }, \"permission\": \"write\" } ], \"page\": 1, \"size\": 2 } ``` Results may be further filtered or sorted by repository, user, or permission by adding the following query string parameters: * `q=repository.name=\"geordi\"` or `q=permission>\"read\"` * `sort=user.display_name` 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.DefaultApi;
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");
DefaultApi apiInstance = new DefaultApi();
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 q = "q_example"; // String | Query string to narrow down the response as per [filtering and sorting](../../../../meta/filtering).
String sort = "sort_example"; // String | Name of a response property sort the result by as per [filtering and sorting](../../../../meta/filtering#query-sort).
try {
PaginatedRepositoryPermissions result = apiInstance.teamsUsernamePermissionsRepositoriesGet(username, q, sort);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#teamsUsernamePermissionsRepositoriesGet");
e.printStackTrace();
}
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. | |
q | String | Query string to narrow down the response as per filtering and sorting. | [optional] |
sort | String | Name of a response property sort the result by as per filtering and sorting. | [optional] |
PaginatedRepositoryPermissions
PaginatedRepositoryPermissions teamsUsernamePermissionsRepositoriesRepoSlugGet(repoSlug, username, q, sort)
Returns an object for each repository permission of a given repository. This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see the announcement.\" If the username URL parameter refers to a user account instead of a team account, an object containing the repository permissions of the username's repository will be returned. Permissions returned are effective permissions — the highest level of permission the user has. This does not include public repositories that users are not granted any specific permission in, and does not distinguish between direct and indirect privileges. Only users with admin permission for the repository may access this resource. Permissions can be: * `admin` * `write` * `read` Example: ``` $ curl https://api.bitbucket.org/2.0/teams/atlassian_tutorial/permissions/repositories/geordi { \"pagelen\": 10, \"values\": [ { \"type\": \"repository_permission\", \"user\": { \"type\": \"user\", \"display_name\": \"Erik van Zijst\", \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\" }, \"repository\": { \"type\": \"repository\", \"name\": \"geordi\", \"full_name\": \"bitbucket/geordi\", \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\" }, \"permission\": \"admin\" }, { \"type\": \"repository_permission\", \"user\": { \"type\": \"user\", \"display_name\": \"Sean Conaty\", \"uuid\": \"{504c3b62-8120-4f0c-a7bc-87800b9d6f70}\" }, \"repository\": { \"type\": \"repository\", \"name\": \"geordi\", \"full_name\": \"bitbucket/geordi\", \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\" }, \"permission\": \"write\" } ], \"page\": 1, \"size\": 2 } ``` Results may be further filtered or sorted by user, or permission by adding the following query string parameters: * `q=permission>\"read\"` * `sort=user.display_name` 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.DefaultApi;
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");
DefaultApi apiInstance = new DefaultApi();
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 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 q = "q_example"; // String | Query string to narrow down the response as per [filtering and sorting](../../../../meta/filtering).
String sort = "sort_example"; // String | Name of a response property sort the result by as per [filtering and sorting](../../../../meta/filtering#query-sort).
try {
PaginatedRepositoryPermissions result = apiInstance.teamsUsernamePermissionsRepositoriesRepoSlugGet(repoSlug, username, q, sort);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#teamsUsernamePermissionsRepositoriesRepoSlugGet");
e.printStackTrace();
}
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}`. | |
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. | |
q | String | Query string to narrow down the response as per filtering and sorting. | [optional] |
sort | String | Name of a response property sort the result by as per filtering and sorting. | [optional] |
PaginatedRepositoryPermissions
PaginatedTeamPermissions userPermissionsTeamsGet(q, sort)
Returns an object for each team 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: * `admin` * `collaborator` Example: ``` $ curl https://api.bitbucket.org/2.0/user/permissions/teams { \"pagelen\": 10, \"values\": [ { \"permission\": \"admin\", \"type\": \"team_permission\", \"user\": { \"type\": \"user\", \"nickname\": \"evzijst\", \"display_name\": \"Erik van Zijst\", \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\" }, \"team\": { \"display_name\": \"Atlassian Bitbucket\", \"uuid\": \"{4cc6108a-a241-4db0-96a5-64347ac04f87}\" } } ], \"page\": 1, \"size\": 1 } ``` Results may be further filtered or sorted by team or permission by adding the following query string parameters: * `q=team.uuid=\"{4cc6108a-a241-4db0-96a5-64347ac04f87}\"` or `q=permission=\"admin\"` * `sort=team.display_name` 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.DefaultApi;
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");
DefaultApi apiInstance = new DefaultApi();
String q = "q_example"; // String | Query string to narrow down the response as per [filtering and sorting](../../../meta/filtering).
String sort = "sort_example"; // String | Name of a response property sort the result by as per [filtering and sorting](../../../meta/filtering#query-sort).
try {
PaginatedTeamPermissions result = apiInstance.userPermissionsTeamsGet(q, sort);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#userPermissionsTeamsGet");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
q | String | Query string to narrow down the response as per filtering and sorting. | [optional] |
sort | String | Name of a response property sort the result by as per filtering and sorting. | [optional] |
PaginatedRepositoryPermissions workspacesWorkspacePermissionsRepositoriesGet(workspace, q, sort)
Returns an object for each repository permission for all of a workspace's repositories. Permissions returned are effective permissions: the highest level of permission the user has. This does not distinguish between direct and indirect (group) privileges. Only users with admin permission for the team may access this resource. Permissions can be: * `admin` * `write` * `read` Example: ``` $ curl https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/permissions/repositories { \"pagelen\": 10, \"values\": [ { \"type\": \"repository_permission\", \"user\": { \"type\": \"user\", \"display_name\": \"Erik van Zijst\", \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\" }, \"repository\": { \"type\": \"repository\", \"name\": \"geordi\", \"full_name\": \"atlassian_tutorial/geordi\", \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\" }, \"permission\": \"admin\" }, { \"type\": \"repository_permission\", \"user\": { \"type\": \"user\", \"display_name\": \"Sean Conaty\", \"uuid\": \"{504c3b62-8120-4f0c-a7bc-87800b9d6f70}\" }, \"repository\": { \"type\": \"repository\", \"name\": \"geordi\", \"full_name\": \"atlassian_tutorial/geordi\", \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\" }, \"permission\": \"write\" }, { \"type\": \"repository_permission\", \"user\": { \"type\": \"user\", \"display_name\": \"Jeff Zeng\", \"uuid\": \"{47f92a9a-c3a3-4d0b-bc4e-782a969c5c72}\" }, \"repository\": { \"type\": \"repository\", \"name\": \"whee\", \"full_name\": \"atlassian_tutorial/whee\", \"uuid\": \"{30ba25e9-51ff-4555-8dd0-fc7ee2fa0895}\" }, \"permission\": \"admin\" } ], \"page\": 1, \"size\": 3 } ``` Results may be further filtered or sorted by repository, user, or permission by adding the following query string parameters: * `q=repository.name=\"geordi\"` or `q=permission>\"read\"` * `sort=user.display_name` 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.DefaultApi;
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");
DefaultApi apiInstance = new DefaultApi();
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).
String sort = "sort_example"; // String | Name of a response property sort the result by as per [filtering and sorting](../../../../meta/filtering#query-sort).
try {
PaginatedRepositoryPermissions result = apiInstance.workspacesWorkspacePermissionsRepositoriesGet(workspace, q, sort);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#workspacesWorkspacePermissionsRepositoriesGet");
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] |
sort | String | Name of a response property sort the result by as per filtering and sorting. | [optional] |
PaginatedRepositoryPermissions
PaginatedRepositoryPermissions workspacesWorkspacePermissionsRepositoriesRepoSlugGet(repoSlug, workspace, q, sort)
Returns an object for the repository permission of each user in the requested repository. Permissions returned are effective permissions: the highest level of permission the user has. This does not distinguish between direct and indirect (group) privileges. Only users with admin permission for the repository may access this resource. Permissions can be: * `admin` * `write` * `read` Example: ``` $ curl https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/permissions/repositories/geordi { \"pagelen\": 10, \"values\": [ { \"type\": \"repository_permission\", \"user\": { \"type\": \"user\", \"display_name\": \"Erik van Zijst\", \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\" }, \"repository\": { \"type\": \"repository\", \"name\": \"geordi\", \"full_name\": \"atlassian_tutorial/geordi\", \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\" }, \"permission\": \"admin\" }, { \"type\": \"repository_permission\", \"user\": { \"type\": \"user\", \"display_name\": \"Sean Conaty\", \"uuid\": \"{504c3b62-8120-4f0c-a7bc-87800b9d6f70}\" }, \"repository\": { \"type\": \"repository\", \"name\": \"geordi\", \"full_name\": \"atlassian_tutorial/geordi\", \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\" }, \"permission\": \"write\" } ], \"page\": 1, \"size\": 2 } ``` Results may be further filtered or sorted by user, or permission by adding the following query string parameters: * `q=permission>\"read\"` * `sort=user.display_name` 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.DefaultApi;
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");
DefaultApi apiInstance = new DefaultApi();
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 q = "q_example"; // String | Query string to narrow down the response as per [filtering and sorting](../../../../meta/filtering).
String sort = "sort_example"; // String | Name of a response property sort the result by as per [filtering and sorting](../../../../meta/filtering#query-sort).
try {
PaginatedRepositoryPermissions result = apiInstance.workspacesWorkspacePermissionsRepositoriesRepoSlugGet(repoSlug, workspace, q, sort);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#workspacesWorkspacePermissionsRepositoriesRepoSlugGet");
e.printStackTrace();
}
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}`. | |
q | String | Query string to narrow down the response as per filtering and sorting. | [optional] |
sort | String | Name of a response property sort the result by as per filtering and sorting. | [optional] |
PaginatedRepositoryPermissions