All URIs are relative to https://api.bitbucket.org/2.0
Method | HTTP request | Description |
---|---|---|
bulkCreateOrUpdateAnnotations | POST /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations | |
createOrUpdateAnnotation | PUT /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations/{annotationId} | |
createOrUpdateReport | PUT /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId} | |
deleteAnnotation | DELETE /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations/{annotationId} | |
deleteReport | DELETE /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId} | |
getAnnotation | GET /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations/{annotationId} | |
getAnnotationsForReport | GET /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations | |
getReport | GET /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId} | |
getReportsForCommit | GET /repositories/{workspace}/{repo_slug}/commit/{commit}/reports | |
repositoriesWorkspaceRepoSlugCommitNodeApproveDelete | DELETE /repositories/{workspace}/{repo_slug}/commit/{node}/approve | |
repositoriesWorkspaceRepoSlugCommitNodeApprovePost | POST /repositories/{workspace}/{repo_slug}/commit/{node}/approve | |
repositoriesWorkspaceRepoSlugCommitNodeCommentsCommentIdGet | GET /repositories/{workspace}/{repo_slug}/commit/{node}/comments/{comment_id} | |
repositoriesWorkspaceRepoSlugCommitNodeCommentsGet | GET /repositories/{workspace}/{repo_slug}/commit/{node}/comments | |
repositoriesWorkspaceRepoSlugCommitNodeCommentsPost | POST /repositories/{workspace}/{repo_slug}/commit/{node}/comments | |
repositoriesWorkspaceRepoSlugCommitNodeGet | GET /repositories/{workspace}/{repo_slug}/commit/{node} | |
repositoriesWorkspaceRepoSlugCommitsGet | GET /repositories/{workspace}/{repo_slug}/commits | |
repositoriesWorkspaceRepoSlugCommitsPost | POST /repositories/{workspace}/{repo_slug}/commits | |
repositoriesWorkspaceRepoSlugCommitsRevisionGet | GET /repositories/{workspace}/{repo_slug}/commits/{revision} | |
repositoriesWorkspaceRepoSlugCommitsRevisionPost | POST /repositories/{workspace}/{repo_slug}/commits/{revision} | |
repositoriesWorkspaceRepoSlugDiffSpecGet | GET /repositories/{workspace}/{repo_slug}/diff/{spec} | |
repositoriesWorkspaceRepoSlugMergeBaseRevspecGet | GET /repositories/{workspace}/{repo_slug}/merge-base/{revspec} | |
repositoriesWorkspaceRepoSlugPatchSpecGet | GET /repositories/{workspace}/{repo_slug}/patch/{spec} |
List<ReportAnnotation> bulkCreateOrUpdateAnnotations(body, username, repoSlug, commit, reportId)
Bulk upload of annotations. Annotations are individual findings that have been identified as part of a report, for example, a line of code that represents a vulnerability. These annotations can be attached to a specific file and even a specific line in that file, however, that is optional. Annotations are not mandatory and a report can contain up to 1000 annotations. Add the annotations you want to upload as objects in a JSON array and make sure each annotation has the external_id field set to a unique value. If you want to use an existing id from your own system, we recommend prefixing it with your system's name to avoid collisions, for example, mySystem-annotation001. The external id can later be used to identify the report as an alternative to the generated UUID. You can upload up to 100 annotations per POST request. ### Sample cURL request: ``` curl –location 'https://api.bitbucket.org/2.0/repositories/<username>/<reposity-name>/commit/<commit-hash>/reports/mysystem-001/annotations' \ –header 'Content-Type: application/json' \ –data-raw '[ { \"external_id\": \"mysystem-annotation001\", \"title\": \"Security scan report\", \"annotation_type\": \"VULNERABILITY\", \"summary\": \"This line represents a security threat.\", \"severity\": \"HIGH\", \"path\": \"my-service/src/main/java/com/myCompany/mysystem/logic/Main.java\", \"line\": 42 }, { \"external_id\": \"mySystem-annotation002\", \"title\": \"Bug report\", \"annotation_type\": \"BUG\", \"result\": \"FAILED\", \"summary\": \"This line might introduce a bug.\", \"severity\": \"MEDIUM\", \"path\": \"my-service/src/main/java/com/myCompany/mysystem/logic/Helper.java\", \"line\": 13 } ]' ``` ### Possible field values: annotation_type: VULNERABILITY, CODE_SMELL, BUG result: PASSED, FAILED, IGNORED, SKIPPED severity: HIGH, MEDIUM, LOW, CRITICAL Please refer to the Code Insights documentation for more information.
// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.api.CommitsApi;
CommitsApi apiInstance = new CommitsApi();
List<ReportAnnotation> body = Arrays.asList(new ReportAnnotation()); // List<ReportAnnotation> | The annotations to create or update
String username = "username_example"; // String | The account.
String repoSlug = "repoSlug_example"; // String | The repository.
String commit = "commit_example"; // String | The commit for which to retrieve reports.
String reportId = "reportId_example"; // String | Uuid or external-if of the report for which to get annotations for.
try {
List<ReportAnnotation> result = apiInstance.bulkCreateOrUpdateAnnotations(body, username, repoSlug, commit, reportId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommitsApi#bulkCreateOrUpdateAnnotations");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | List<ReportAnnotation> | The annotations to create or update | |
username | String | The account. | |
repoSlug | String | The repository. | |
commit | String | The commit for which to retrieve reports. | |
reportId | String | Uuid or external-if of the report for which to get annotations for. |
No authorization required
ReportAnnotation createOrUpdateAnnotation(body, username, repoSlug, commit, reportId, annotationId)
Creates or updates an individual annotation for the specified report. Annotations are individual findings that have been identified as part of a report, for example, a line of code that represents a vulnerability. These annotations can be attached to a specific file and even a specific line in that file, however, that is optional. Annotations are not mandatory and a report can contain up to 1000 annotations. Just as reports, annotation needs to be uploaded with a unique ID that can later be used to identify the report as an alternative to the generated UUID. If you want to use an existing id from your own system, we recommend prefixing it with your system's name to avoid collisions, for example, mySystem-annotation001. ### Sample cURL request: ``` curl –request PUT 'https://api.bitbucket.org/2.0/repositories/<username>/<reposity-name>/commit/<commit-hash>/reports/mySystem-001/annotations/mysystem-annotation001' \ –header 'Content-Type: application/json' \ –data-raw '{ \"title\": \"Security scan report\", \"annotation_type\": \"VULNERABILITY\", \"summary\": \"This line represents a security thread.\", \"severity\": \"HIGH\", \"path\": \"my-service/src/main/java/com/myCompany/mysystem/logic/Main.java\", \"line\": 42 }' ``` ### Possible field values: annotation_type: VULNERABILITY, CODE_SMELL, BUG result: PASSED, FAILED, IGNORED, SKIPPED severity: HIGH, MEDIUM, LOW, CRITICAL Please refer to the Code Insights documentation for more information.
// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.api.CommitsApi;
CommitsApi apiInstance = new CommitsApi();
ReportAnnotation body = new ReportAnnotation(); // ReportAnnotation | The annotation to create or update
String username = "username_example"; // String | The account.
String repoSlug = "repoSlug_example"; // String | The repository.
String commit = "commit_example"; // String | The commit the report belongs to.
String reportId = "reportId_example"; // String | Either the uuid or external-id of the report.
String annotationId = "annotationId_example"; // String | Either the uuid or external-id of the annotation.
try {
ReportAnnotation result = apiInstance.createOrUpdateAnnotation(body, username, repoSlug, commit, reportId, annotationId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommitsApi#createOrUpdateAnnotation");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | ReportAnnotation | The annotation to create or update | |
username | String | The account. | |
repoSlug | String | The repository. | |
commit | String | The commit the report belongs to. | |
reportId | String | Either the uuid or external-id of the report. | |
annotationId | String | Either the uuid or external-id of the annotation. |
No authorization required
Report createOrUpdateReport(body, username, repoSlug, commit, reportId)
Creates or updates a report for the specified commit. To upload a report, make sure to generate an ID that is unique across all reports for that commit. If you want to use an existing id from your own system, we recommend prefixing it with your system's name to avoid collisions, for example, mySystem-001. ### Sample cURL request: ``` curl –request PUT 'https://api.bitbucket.org/2.0/repositories/<username>/<reposity-name>/commit/<commit-hash>/reports/mysystem-001' \ –header 'Content-Type: application/json' \ –data-raw '{ \"title\": \"Security scan report\", \"details\": \"This pull request introduces 10 new dependency vulnerabilities.\", \"report_type\": \"SECURITY\", \"reporter\": \"mySystem\", \"link\": \"http://www.mysystem.com/reports/001\", \"result\": \"FAILED\", \"data\": [ { \"title\": \"Duration (seconds)\", \"type\": \"DURATION\", \"value\": 14 }, { \"title\": \"Safe to merge?\", \"type\": \"BOOLEAN\", \"value\": false } ] }' ``` ### Possible field values: report_type: SECURITY, COVERAGE, TEST, BUG result: PASSED, FAILED, PENDING data.type: BOOLEAN, DATE, DURATION, LINK, NUMBER, PERCENTAGE, TEXT Please refer to the Code Insights documentation for more information.
// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.api.CommitsApi;
CommitsApi apiInstance = new CommitsApi();
Report body = new Report(); // Report | The report to create or update
String username = "username_example"; // String | The account.
String repoSlug = "repoSlug_example"; // String | The repository.
String commit = "commit_example"; // String | The commit the report belongs to.
String reportId = "reportId_example"; // String | Either the uuid or external-id of the report.
try {
Report result = apiInstance.createOrUpdateReport(body, username, repoSlug, commit, reportId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommitsApi#createOrUpdateReport");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | Report | The report to create or update | |
username | String | The account. | |
repoSlug | String | The repository. | |
commit | String | The commit the report belongs to. | |
reportId | String | Either the uuid or external-id of the report. |
No authorization required
deleteAnnotation(username, repoSlug, commit, reportId, annotationId)
Deletes a single Annotation matching the provided ID.
// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.api.CommitsApi;
CommitsApi apiInstance = new CommitsApi();
String username = "username_example"; // String | The account.
String repoSlug = "repoSlug_example"; // String | The repository.
String commit = "commit_example"; // String | The commit the annotation belongs to.
String reportId = "reportId_example"; // String | Either the uuid or external-id of the annotation.
String annotationId = "annotationId_example"; // String | Either the uuid or external-id of the annotation.
try {
apiInstance.deleteAnnotation(username, repoSlug, commit, reportId, annotationId);
} catch (ApiException e) {
System.err.println("Exception when calling CommitsApi#deleteAnnotation");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
username | String | The account. | |
repoSlug | String | The repository. | |
commit | String | The commit the annotation belongs to. | |
reportId | String | Either the uuid or external-id of the annotation. | |
annotationId | String | Either the uuid or external-id of the annotation. |
null (empty response body)
No authorization required
deleteReport(username, repoSlug, commit, reportId)
Deletes a single Report matching the provided ID.
// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.api.CommitsApi;
CommitsApi apiInstance = new CommitsApi();
String username = "username_example"; // String | The account.
String repoSlug = "repoSlug_example"; // String | The repository.
String commit = "commit_example"; // String | The commit the report belongs to.
String reportId = "reportId_example"; // String | Either the uuid or external-id of the report.
try {
apiInstance.deleteReport(username, repoSlug, commit, reportId);
} catch (ApiException e) {
System.err.println("Exception when calling CommitsApi#deleteReport");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
username | String | The account. | |
repoSlug | String | The repository. | |
commit | String | The commit the report belongs to. | |
reportId | String | Either the uuid or external-id of the report. |
null (empty response body)
No authorization required
ReportAnnotation getAnnotation(username, repoSlug, commit, reportId, annotationId)
Returns a single Annotation matching the provided ID.
// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.api.CommitsApi;
CommitsApi apiInstance = new CommitsApi();
String username = "username_example"; // String | The account.
String repoSlug = "repoSlug_example"; // String | The repository.
String commit = "commit_example"; // String | The commit the report belongs to.
String reportId = "reportId_example"; // String | Either the uuid or external-id of the report.
String annotationId = "annotationId_example"; // String | Either the uuid or external-id of the annotation.
try {
ReportAnnotation result = apiInstance.getAnnotation(username, repoSlug, commit, reportId, annotationId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommitsApi#getAnnotation");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
username | String | The account. | |
repoSlug | String | The repository. | |
commit | String | The commit the report belongs to. | |
reportId | String | Either the uuid or external-id of the report. | |
annotationId | String | Either the uuid or external-id of the annotation. |
No authorization required
PaginatedAnnotations getAnnotationsForReport(username, repoSlug, commit, reportId)
Returns a paginated list of Annotations for a specified report.
// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.api.CommitsApi;
CommitsApi apiInstance = new CommitsApi();
String username = "username_example"; // String | The account.
String repoSlug = "repoSlug_example"; // String | The repository.
String commit = "commit_example"; // String | The commit for which to retrieve reports.
String reportId = "reportId_example"; // String | Uuid or external-if of the report for which to get annotations for.
try {
PaginatedAnnotations result = apiInstance.getAnnotationsForReport(username, repoSlug, commit, reportId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommitsApi#getAnnotationsForReport");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
username | String | The account. | |
repoSlug | String | The repository. | |
commit | String | The commit for which to retrieve reports. | |
reportId | String | Uuid or external-if of the report for which to get annotations for. |
No authorization required
Report getReport(username, repoSlug, commit, reportId)
Returns a single Report matching the provided ID.
// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.api.CommitsApi;
CommitsApi apiInstance = new CommitsApi();
String username = "username_example"; // String | The account.
String repoSlug = "repoSlug_example"; // String | The repository.
String commit = "commit_example"; // String | The commit the report belongs to.
String reportId = "reportId_example"; // String | Either the uuid or external-id of the report.
try {
Report result = apiInstance.getReport(username, repoSlug, commit, reportId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommitsApi#getReport");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
username | String | The account. | |
repoSlug | String | The repository. | |
commit | String | The commit the report belongs to. | |
reportId | String | Either the uuid or external-id of the report. |
No authorization required
PaginatedReports getReportsForCommit(username, repoSlug, commit)
Returns a paginated list of Reports linked to this commit.
// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.api.CommitsApi;
CommitsApi apiInstance = new CommitsApi();
String username = "username_example"; // String | The account.
String repoSlug = "repoSlug_example"; // String | The repository.
String commit = "commit_example"; // String | The commit for which to retrieve reports.
try {
PaginatedReports result = apiInstance.getReportsForCommit(username, repoSlug, commit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommitsApi#getReportsForCommit");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
username | String | The account. | |
repoSlug | String | The repository. | |
commit | String | The commit for which to retrieve reports. |
No authorization required
repositoriesWorkspaceRepoSlugCommitNodeApproveDelete(node, repoSlug, workspace)
Redact the authenticated user's approval of the specified commit. This operation is only available to users that have explicit access to the repository. In contrast, just the fact that a repository is publicly accessible to users does not give them the ability to approve commits.
// 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.CommitsApi;
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");
CommitsApi apiInstance = new CommitsApi();
String node = "node_example"; // String | The commit's SHA1.
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 {
apiInstance.repositoriesWorkspaceRepoSlugCommitNodeApproveDelete(node, repoSlug, workspace);
} catch (ApiException e) {
System.err.println("Exception when calling CommitsApi#repositoriesWorkspaceRepoSlugCommitNodeApproveDelete");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
node | String | The commit's SHA1. | |
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}`. |
null (empty response body)
Participant repositoriesWorkspaceRepoSlugCommitNodeApprovePost(node, repoSlug, workspace)
Approve the specified commit as the authenticated user. This operation is only available to users that have explicit access to the repository. In contrast, just the fact that a repository is publicly accessible to users does not give them the ability to approve commits.
// 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.CommitsApi;
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");
CommitsApi apiInstance = new CommitsApi();
String node = "node_example"; // String | The commit's SHA1.
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 {
Participant result = apiInstance.repositoriesWorkspaceRepoSlugCommitNodeApprovePost(node, repoSlug, workspace);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommitsApi#repositoriesWorkspaceRepoSlugCommitNodeApprovePost");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
node | String | The commit's SHA1. | |
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}`. |
CommitComment repositoriesWorkspaceRepoSlugCommitNodeCommentsCommentIdGet(commentId, node, repoSlug, workspace)
Returns the specified commit comment.
// 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.CommitsApi;
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");
CommitsApi apiInstance = new CommitsApi();
Integer commentId = 56; // Integer | The id of the comment.
String node = "node_example"; // String | The commit's SHA1.
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 {
CommitComment result = apiInstance.repositoriesWorkspaceRepoSlugCommitNodeCommentsCommentIdGet(commentId, node, repoSlug, workspace);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommitsApi#repositoriesWorkspaceRepoSlugCommitNodeCommentsCommentIdGet");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
commentId | Integer | The id of the comment. | |
node | String | The commit's SHA1. | |
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}`. |
PaginatedCommitComments repositoriesWorkspaceRepoSlugCommitNodeCommentsGet(node, repoSlug, workspace, q, sort)
Returns the commit's comments. This includes both global and inline comments. The default sorting is oldest to newest and can be overridden with the `sort` query parameter.
// 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.CommitsApi;
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");
CommitsApi apiInstance = new CommitsApi();
String node = "node_example"; // String | The commit's SHA1.
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 | Field by which the results should be sorted as per [filtering and sorting](../../../../../../meta/filtering).
try {
PaginatedCommitComments result = apiInstance.repositoriesWorkspaceRepoSlugCommitNodeCommentsGet(node, repoSlug, workspace, q, sort);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommitsApi#repositoriesWorkspaceRepoSlugCommitNodeCommentsGet");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
node | String | The commit's SHA1. | |
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 | Field by which the results should be sorted as per filtering and sorting. | [optional] |
repositoriesWorkspaceRepoSlugCommitNodeCommentsPost(body, node, workspace, username, repoSlug)
Creates new comment on the specified commit. To post a reply to an existing comment, include the `parent.id` field: ``` $ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/commit/db9ba1e031d07a02603eae0e559a7adc010257fc/comments/ \ -X POST -u evzijst \ -H 'Content-Type: application/json' \ -d '{\"content\": {\"raw\": \"One more thing!\"}, \"parent\": {\"id\": 5728901}}' ```
// 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.CommitsApi;
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");
CommitsApi apiInstance = new CommitsApi();
CommitComment body = new CommitComment(); // CommitComment | The specified comment.
String node = "node_example"; // String | The commit's SHA1.
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 username = "username_example"; // String | This can either be the username or the UUID of the user, surrounded by curly-braces, for example: `{user UUID}`.
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}`.
try {
apiInstance.repositoriesWorkspaceRepoSlugCommitNodeCommentsPost(body, node, workspace, username, repoSlug);
} catch (ApiException e) {
System.err.println("Exception when calling CommitsApi#repositoriesWorkspaceRepoSlugCommitNodeCommentsPost");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | CommitComment | The specified comment. | |
node | String | The commit's SHA1. | |
workspace | String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. | |
username | String | This can either be the username or the UUID of the user, surrounded by curly-braces, for example: `{user UUID}`. | |
repoSlug | String | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. |
null (empty response body)
Commit repositoriesWorkspaceRepoSlugCommitNodeGet(node, repoSlug, workspace)
Returns the specified commit. Example: ``` $ curl https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a1 { \"rendered\": { \"message\": { \"raw\": \"Add a GEORDI_OUTPUT_DIR setting\", \"markup\": \"markdown\", \"html\": \"<p>Add a GEORDI_OUTPUT_DIR setting</p>\", \"type\": \"rendered\" } }, \"hash\": \"f7591a13eda445d9a9167f98eb870319f4b6c2d8\", \"repository\": { \"name\": \"geordi\", \"type\": \"repository\", \"full_name\": \"bitbucket/geordi\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi\" }, \"html\": { \"href\": \"https://bitbucket.org/bitbucket/geordi\" }, \"avatar\": { \"href\": \"https://bytebucket.org/ravatar/%7B85d08b4e-571d-44e9-a507-fa476535aa98%7D?ts=1730260\" } }, \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\" }, \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a13eda445d9a9167f98eb870319f4b6c2d8\" }, \"comments\": { \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a13eda445d9a9167f98eb870319f4b6c2d8/comments\" }, \"patch\": { \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/patch/f7591a13eda445d9a9167f98eb870319f4b6c2d8\" }, \"html\": { \"href\": \"https://bitbucket.org/bitbucket/geordi/commits/f7591a13eda445d9a9167f98eb870319f4b6c2d8\" }, \"diff\": { \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/diff/f7591a13eda445d9a9167f98eb870319f4b6c2d8\" }, \"approve\": { \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a13eda445d9a9167f98eb870319f4b6c2d8/approve\" }, \"statuses\": { \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a13eda445d9a9167f98eb870319f4b6c2d8/statuses\" } }, \"author\": { \"raw\": \"Brodie Rao <a@b.c>\", \"type\": \"author\", \"user\": { \"display_name\": \"Brodie Rao\", \"uuid\": \"{9484702e-c663-4afd-aefb-c93a8cd31c28}\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/users/%7B9484702e-c663-4afd-aefb-c93a8cd31c28%7D\" }, \"html\": { \"href\": \"https://bitbucket.org/%7B9484702e-c663-4afd-aefb-c93a8cd31c28%7D/\" }, \"avatar\": { \"href\": \"https://avatar-management–avatars.us-west-2.prod.public.atl-paas.net/557058:3aae1e05-702a-41e5-81c8-f36f29afb6ca/613070db-28b0-421f-8dba-ae8a87e2a5c7/128\" } }, \"type\": \"user\", \"nickname\": \"brodie\", \"account_id\": \"557058:3aae1e05-702a-41e5-81c8-f36f29afb6ca\" } }, \"summary\": { \"raw\": \"Add a GEORDI_OUTPUT_DIR setting\", \"markup\": \"markdown\", \"html\": \"<p>Add a GEORDI_OUTPUT_DIR setting</p>\", \"type\": \"rendered\" }, \"participants\": [], \"parents\": [ { \"type\": \"commit\", \"hash\": \"f06941fec4ef6bcb0c2456927a0cf258fa4f899b\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f06941fec4ef6bcb0c2456927a0cf258fa4f899b\" }, \"html\": { \"href\": \"https://bitbucket.org/bitbucket/geordi/commits/f06941fec4ef6bcb0c2456927a0cf258fa4f899b\" } } } ], \"date\": \"2012-07-16T19:37:54+00:00\", \"message\": \"Add a GEORDI_OUTPUT_DIR setting\", \"type\": \"commit\" } ```
// 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.CommitsApi;
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");
CommitsApi apiInstance = new CommitsApi();
String node = "node_example"; // String | The commit's SHA1.
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 {
Commit result = apiInstance.repositoriesWorkspaceRepoSlugCommitNodeGet(node, repoSlug, workspace);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommitsApi#repositoriesWorkspaceRepoSlugCommitNodeGet");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
node | String | The commit's SHA1. | |
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}`. |
Error repositoriesWorkspaceRepoSlugCommitsGet(repoSlug, workspace)
These are the repository's commits. They are paginated and returned in reverse chronological order, similar to the output of `git log` and `hg log`. Like these tools, the DAG can be filtered. ## GET /repositories/{workspace}/{repo_slug}/commits/ Returns all commits in the repo in topological order (newest commit first). All branches and tags are included (similar to `git log –all` and `hg log`). ## GET /repositories/{workspace}/{repo_slug}/commits/master Returns all commits on rev `master` (similar to `git log master`, `hg log master`). ## GET /repositories/{workspace}/{repo_slug}/commits/dev?exclude=master Returns all commits on ref `dev`, except those that are reachable on `master` (similar to `git log dev ^master`). ## GET /repositories/{workspace}/{repo_slug}/commits/?exclude=master Returns all commits in the repo that are not on master (similar to `git log –all ^master`). ## GET /repositories/{workspace}/{repo_slug}/commits/?include=foo&include=bar&exclude=fu&exclude=fubar Returns all commits that are on refs `foo` or `bar`, but not on `fu` or `fubar` (similar to `git log foo bar ^fu ^fubar`). An optional `path` parameter can be specified that will limit the results to commits that affect that path. `path` can either be a file or a directory. If a directory is specified, commits are returned that have modified any file in the directory tree rooted by `path`. It is important to note that if the `path` parameter is specified, the commits returned by this endpoint may no longer be a DAG, parent commits that do not modify the path will be omitted from the response. ## GET /repositories/{workspace}/{repo_slug}/commits/?path=README.md&include=foo&include=bar&exclude=master Returns all commits that are on refs `foo` or `bar`, but not on `master` that changed the file README.md. ## GET /repositories/{workspace}/{repo_slug}/commits/?path=src/&include=foo&include=bar&exclude=master Returns all commits that are on refs `foo` or `bar`, but not on `master` that changed to a file in any file in the directory src or its children. Because the response could include a very large number of commits, it is paginated. Follow the 'next' link in the response to navigate to the next page of commits. As with other paginated resources, do not construct your own links. When the include and exclude parameters are more than can fit in a query string, clients can use a `x-www-form-urlencoded` POST instead.
// 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.CommitsApi;
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");
CommitsApi apiInstance = new CommitsApi();
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 {
Error result = apiInstance.repositoriesWorkspaceRepoSlugCommitsGet(repoSlug, workspace);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommitsApi#repositoriesWorkspaceRepoSlugCommitsGet");
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}`. |
Error repositoriesWorkspaceRepoSlugCommitsPost(repoSlug, workspace)
Identical to `GET /repositories/{workspace}/{repo_slug}/commits`, except that POST allows clients to place the include and exclude parameters in the request body to avoid URL length issues. Note that this resource does NOT support new commit creation.
// 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.CommitsApi;
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");
CommitsApi apiInstance = new CommitsApi();
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 {
Error result = apiInstance.repositoriesWorkspaceRepoSlugCommitsPost(repoSlug, workspace);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommitsApi#repositoriesWorkspaceRepoSlugCommitsPost");
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}`. |
Error repositoriesWorkspaceRepoSlugCommitsRevisionGet(repoSlug, revision, workspace)
These are the repository's commits. They are paginated and returned in reverse chronological order, similar to the output of `git log` and `hg log`. Like these tools, the DAG can be filtered. ## GET /repositories/{workspace}/{repo_slug}/commits/ Returns all commits in the repo in topological order (newest commit first). All branches and tags are included (similar to `git log –all` and `hg log`). ## GET /repositories/{workspace}/{repo_slug}/commits/master Returns all commits on rev `master` (similar to `git log master`, `hg log master`). ## GET /repositories/{workspace}/{repo_slug}/commits/dev?exclude=master Returns all commits on ref `dev`, except those that are reachable on `master` (similar to `git log dev ^master`). ## GET /repositories/{workspace}/{repo_slug}/commits/?exclude=master Returns all commits in the repo that are not on master (similar to `git log –all ^master`). ## GET /repositories/{workspace}/{repo_slug}/commits/?include=foo&include=bar&exclude=fu&exclude=fubar Returns all commits that are on refs `foo` or `bar`, but not on `fu` or `fubar` (similar to `git log foo bar ^fu ^fubar`). An optional `path` parameter can be specified that will limit the results to commits that affect that path. `path` can either be a file or a directory. If a directory is specified, commits are returned that have modified any file in the directory tree rooted by `path`. It is important to note that if the `path` parameter is specified, the commits returned by this endpoint may no longer be a DAG, parent commits that do not modify the path will be omitted from the response. ## GET /repositories/{workspace}/{repo_slug}/commits/?path=README.md&include=foo&include=bar&exclude=master Returns all commits that are on refs `foo` or `bar`, but not on `master` that changed the file README.md. ## GET /repositories/{workspace}/{repo_slug}/commits/?path=src/&include=foo&include=bar&exclude=master Returns all commits that are on refs `foo` or `bar`, but not on `master` that changed to a file in any file in the directory src or its children. Because the response could include a very large number of commits, it is paginated. Follow the 'next' link in the response to navigate to the next page of commits. As with other paginated resources, do not construct your own links. When the include and exclude parameters are more than can fit in a query string, clients can use a `x-www-form-urlencoded` POST instead.
// 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.CommitsApi;
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");
CommitsApi apiInstance = new CommitsApi();
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 revision = "revision_example"; // String |
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 {
Error result = apiInstance.repositoriesWorkspaceRepoSlugCommitsRevisionGet(repoSlug, revision, workspace);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommitsApi#repositoriesWorkspaceRepoSlugCommitsRevisionGet");
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}`. | |
revision | String | ||
workspace | String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. |
Error repositoriesWorkspaceRepoSlugCommitsRevisionPost(repoSlug, revision, workspace)
Identical to `GET /repositories/{workspace}/{repo_slug}/commits`, except that POST allows clients to place the include and exclude parameters in the request body to avoid URL length issues. Note that this resource does NOT support new commit creation.
// 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.CommitsApi;
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");
CommitsApi apiInstance = new CommitsApi();
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 revision = "revision_example"; // String |
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 {
Error result = apiInstance.repositoriesWorkspaceRepoSlugCommitsRevisionPost(repoSlug, revision, workspace);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommitsApi#repositoriesWorkspaceRepoSlugCommitsRevisionPost");
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}`. | |
revision | String | ||
workspace | String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. |
repositoriesWorkspaceRepoSlugDiffSpecGet(repoSlug, spec, workspace, context, path, ignoreWhitespace, binary, renames, merge)
Produces a raw, git-style diff for either a single commit (diffed against its first parent), or a revspec of 2 commits (e.g. `3a8b42..9ff173` where the first commit represents the source and the second commit the destination). In case of the latter (diffing a revspec), a 3-way diff, or merge diff, is computed. This shows the changes introduced by the left branch (`3a8b42` in our example) as compared againt the right branch (`9ff173`). This is equivalent to merging the left branch into the right branch and then computing the diff of the merge commit against its first parent (the right branch). This follows the same behavior as pull requests that also show this style of 3-way, or merge diff. While similar to patches, diffs: * Don't have a commit header (username, commit message, etc) * Support the optional `path=foo/bar.py` query param to filter the diff to just that one file diff The raw diff is returned as-is, in whatever encoding the files in the repository use. It is not decoded into unicode. As such, the content-type is `text/plain`.
// 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.CommitsApi;
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");
CommitsApi apiInstance = new CommitsApi();
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}`.
Integer context = 56; // Integer | Generate diffs with <n> lines of context instead of the usual three.
String path = "path_example"; // String | Limit the diff to a particular file (this parameter can be repeated for multiple paths).
Boolean ignoreWhitespace = true; // Boolean | Generate diffs that ignore whitespace.
Boolean binary = true; // Boolean | Generate diffs that include binary files, true if omitted.
Boolean renames = true; // Boolean | Whether to perform rename detection, true if omitted.
Boolean merge = true; // Boolean | If true, the source commit is merged into the destination commit, and then a diff from the destination to the merge result is returned. If false, a simple 'two dot' diff between the source and destination is returned. True if omitted.
try {
apiInstance.repositoriesWorkspaceRepoSlugDiffSpecGet(repoSlug, spec, workspace, context, path, ignoreWhitespace, binary, renames, merge);
} catch (ApiException e) {
System.err.println("Exception when calling CommitsApi#repositoriesWorkspaceRepoSlugDiffSpecGet");
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}`. | |
context | Integer | Generate diffs with <n> lines of context instead of the usual three. | [optional] |
path | String | Limit the diff to a particular file (this parameter can be repeated for multiple paths). | [optional] |
ignoreWhitespace | Boolean | Generate diffs that ignore whitespace. | [optional] |
binary | Boolean | Generate diffs that include binary files, true if omitted. | [optional] |
renames | Boolean | Whether to perform rename detection, true if omitted. | [optional] |
merge | Boolean | If true, the source commit is merged into the destination commit, and then a diff from the destination to the merge result is returned. If false, a simple 'two dot' diff between the source and destination is returned. True if omitted. | [optional] |
null (empty response body)
Commit repositoriesWorkspaceRepoSlugMergeBaseRevspecGet(repoSlug, revspec, workspace)
Returns the best common ancestor between two commits, specified in a revspec of 2 commits (e.g. 3a8b42..9ff173). If more than one best common ancestor exists, only one will be returned. It is unspecified which will be returned.
// 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.CommitsApi;
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");
CommitsApi apiInstance = new CommitsApi();
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 revspec = "revspec_example"; // String | 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}`.
try {
Commit result = apiInstance.repositoriesWorkspaceRepoSlugMergeBaseRevspecGet(repoSlug, revspec, workspace);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommitsApi#repositoriesWorkspaceRepoSlugMergeBaseRevspecGet");
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}`. | |
revspec | String | 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}`. |
repositoriesWorkspaceRepoSlugPatchSpecGet(repoSlug, spec, workspace)
Produces a raw patch for a single commit (diffed against its first parent), or a patch-series for a revspec of 2 commits (e.g. `3a8b42..9ff173` where the first commit represents the source and the second commit the destination). In case of the latter (diffing a revspec), a patch series is returned for the commits on the source branch (`3a8b42` and its ancestors in our example). For Mercurial, a single patch is returned that combines the changes of all commits on the source branch. While similar to diffs, patches: * Have a commit header (username, commit message, etc) * Do not support the `path=foo/bar.py` query parameter The raw patch is returned as-is, in whatever encoding the files in the repository use. It is not decoded into unicode. As such, the content-type is `text/plain`.
// 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.CommitsApi;
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");
CommitsApi apiInstance = new CommitsApi();
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}`.
try {
apiInstance.repositoriesWorkspaceRepoSlugPatchSpecGet(repoSlug, spec, workspace);
} catch (ApiException e) {
System.err.println("Exception when calling CommitsApi#repositoriesWorkspaceRepoSlugPatchSpecGet");
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}`. |
null (empty response body)