diff --git a/.swagger-codegen/VERSION b/.swagger-codegen/VERSION index 3356a5d..34ec317 100644 --- a/.swagger-codegen/VERSION +++ b/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.36 \ No newline at end of file +3.0.42 \ No newline at end of file diff --git a/README.md b/README.md index 22aab87..b5ff267 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,9 @@ Class | Method | HTTP request | Description *CommitsApi* | [**GetReportsForCommit**](docs/CommitsApi.md#getreportsforcommit) | **Get** /repositories/{workspace}/{repo_slug}/commit/{commit}/reports | List reports *CommitsApi* | [**RepositoriesWorkspaceRepoSlugCommitCommitApproveDelete**](docs/CommitsApi.md#repositoriesworkspacereposlugcommitcommitapprovedelete) | **Delete** /repositories/{workspace}/{repo_slug}/commit/{commit}/approve | Unapprove a commit *CommitsApi* | [**RepositoriesWorkspaceRepoSlugCommitCommitApprovePost**](docs/CommitsApi.md#repositoriesworkspacereposlugcommitcommitapprovepost) | **Post** /repositories/{workspace}/{repo_slug}/commit/{commit}/approve | Approve a commit +*CommitsApi* | [**RepositoriesWorkspaceRepoSlugCommitCommitCommentsCommentIdDelete**](docs/CommitsApi.md#repositoriesworkspacereposlugcommitcommitcommentscommentiddelete) | **Delete** /repositories/{workspace}/{repo_slug}/commit/{commit}/comments/{comment_id} | Delete a commit comment *CommitsApi* | [**RepositoriesWorkspaceRepoSlugCommitCommitCommentsCommentIdGet**](docs/CommitsApi.md#repositoriesworkspacereposlugcommitcommitcommentscommentidget) | **Get** /repositories/{workspace}/{repo_slug}/commit/{commit}/comments/{comment_id} | Get a commit comment +*CommitsApi* | [**RepositoriesWorkspaceRepoSlugCommitCommitCommentsCommentIdPut**](docs/CommitsApi.md#repositoriesworkspacereposlugcommitcommitcommentscommentidput) | **Put** /repositories/{workspace}/{repo_slug}/commit/{commit}/comments/{comment_id} | Update a commit comment *CommitsApi* | [**RepositoriesWorkspaceRepoSlugCommitCommitCommentsGet**](docs/CommitsApi.md#repositoriesworkspacereposlugcommitcommitcommentsget) | **Get** /repositories/{workspace}/{repo_slug}/commit/{commit}/comments | List a commit's comments *CommitsApi* | [**RepositoriesWorkspaceRepoSlugCommitCommitCommentsPost**](docs/CommitsApi.md#repositoriesworkspacereposlugcommitcommitcommentspost) | **Post** /repositories/{workspace}/{repo_slug}/commit/{commit}/comments | Create comment for a commit *CommitsApi* | [**RepositoriesWorkspaceRepoSlugCommitCommitGet**](docs/CommitsApi.md#repositoriesworkspacereposlugcommitcommitget) | **Get** /repositories/{workspace}/{repo_slug}/commit/{commit} | Get a commit @@ -72,18 +74,18 @@ Class | Method | HTTP request | Description *CommitsApi* | [**RepositoriesWorkspaceRepoSlugDiffstatSpecGet**](docs/CommitsApi.md#repositoriesworkspacereposlugdiffstatspecget) | **Get** /repositories/{workspace}/{repo_slug}/diffstat/{spec} | Compare two commit diff stats *CommitsApi* | [**RepositoriesWorkspaceRepoSlugMergeBaseRevspecGet**](docs/CommitsApi.md#repositoriesworkspacereposlugmergebaserevspecget) | **Get** /repositories/{workspace}/{repo_slug}/merge-base/{revspec} | Get the common ancestor between two commits *CommitsApi* | [**RepositoriesWorkspaceRepoSlugPatchSpecGet**](docs/CommitsApi.md#repositoriesworkspacereposlugpatchspecget) | **Get** /repositories/{workspace}/{repo_slug}/patch/{spec} | Get a patch for two commits -*DeploymentsApi* | [**CreateEnvironment**](docs/DeploymentsApi.md#createenvironment) | **Post** /repositories/{workspace}/{repo_slug}/environments/ | Create an environment +*DeploymentsApi* | [**CreateEnvironment**](docs/DeploymentsApi.md#createenvironment) | **Post** /repositories/{workspace}/{repo_slug}/environments | Create an environment *DeploymentsApi* | [**DeleteEnvironmentForRepository**](docs/DeploymentsApi.md#deleteenvironmentforrepository) | **Delete** /repositories/{workspace}/{repo_slug}/environments/{environment_uuid} | Delete an environment *DeploymentsApi* | [**GetDeploymentForRepository**](docs/DeploymentsApi.md#getdeploymentforrepository) | **Get** /repositories/{workspace}/{repo_slug}/deployments/{deployment_uuid} | Get a deployment -*DeploymentsApi* | [**GetDeploymentsForRepository**](docs/DeploymentsApi.md#getdeploymentsforrepository) | **Get** /repositories/{workspace}/{repo_slug}/deployments/ | List deployments +*DeploymentsApi* | [**GetDeploymentsForRepository**](docs/DeploymentsApi.md#getdeploymentsforrepository) | **Get** /repositories/{workspace}/{repo_slug}/deployments | List deployments *DeploymentsApi* | [**GetEnvironmentForRepository**](docs/DeploymentsApi.md#getenvironmentforrepository) | **Get** /repositories/{workspace}/{repo_slug}/environments/{environment_uuid} | Get an environment -*DeploymentsApi* | [**GetEnvironmentsForRepository**](docs/DeploymentsApi.md#getenvironmentsforrepository) | **Get** /repositories/{workspace}/{repo_slug}/environments/ | List environments +*DeploymentsApi* | [**GetEnvironmentsForRepository**](docs/DeploymentsApi.md#getenvironmentsforrepository) | **Get** /repositories/{workspace}/{repo_slug}/environments | List environments *DeploymentsApi* | [**RepositoriesWorkspaceRepoSlugDeployKeysGet**](docs/DeploymentsApi.md#repositoriesworkspacereposlugdeploykeysget) | **Get** /repositories/{workspace}/{repo_slug}/deploy-keys | List repository deploy keys *DeploymentsApi* | [**RepositoriesWorkspaceRepoSlugDeployKeysKeyIdDelete**](docs/DeploymentsApi.md#repositoriesworkspacereposlugdeploykeyskeyiddelete) | **Delete** /repositories/{workspace}/{repo_slug}/deploy-keys/{key_id} | Delete a repository deploy key *DeploymentsApi* | [**RepositoriesWorkspaceRepoSlugDeployKeysKeyIdGet**](docs/DeploymentsApi.md#repositoriesworkspacereposlugdeploykeyskeyidget) | **Get** /repositories/{workspace}/{repo_slug}/deploy-keys/{key_id} | Get a repository deploy key *DeploymentsApi* | [**RepositoriesWorkspaceRepoSlugDeployKeysKeyIdPut**](docs/DeploymentsApi.md#repositoriesworkspacereposlugdeploykeyskeyidput) | **Put** /repositories/{workspace}/{repo_slug}/deploy-keys/{key_id} | Update a repository deploy key *DeploymentsApi* | [**RepositoriesWorkspaceRepoSlugDeployKeysPost**](docs/DeploymentsApi.md#repositoriesworkspacereposlugdeploykeyspost) | **Post** /repositories/{workspace}/{repo_slug}/deploy-keys | Add a repository deploy key -*DeploymentsApi* | [**UpdateEnvironmentForRepository**](docs/DeploymentsApi.md#updateenvironmentforrepository) | **Post** /repositories/{workspace}/{repo_slug}/environments/{environment_uuid}/changes/ | Update an environment +*DeploymentsApi* | [**UpdateEnvironmentForRepository**](docs/DeploymentsApi.md#updateenvironmentforrepository) | **Post** /repositories/{workspace}/{repo_slug}/environments/{environment_uuid}/changes | Update an environment *DeploymentsApi* | [**WorkspacesWorkspaceProjectsProjectKeyDeployKeysGet**](docs/DeploymentsApi.md#workspacesworkspaceprojectsprojectkeydeploykeysget) | **Get** /workspaces/{workspace}/projects/{project_key}/deploy-keys | List project deploy keys *DeploymentsApi* | [**WorkspacesWorkspaceProjectsProjectKeyDeployKeysKeyIdDelete**](docs/DeploymentsApi.md#workspacesworkspaceprojectsprojectkeydeploykeyskeyiddelete) | **Delete** /workspaces/{workspace}/projects/{project_key}/deploy-keys/{key_id} | Delete a deploy key from a project *DeploymentsApi* | [**WorkspacesWorkspaceProjectsProjectKeyDeployKeysKeyIdGet**](docs/DeploymentsApi.md#workspacesworkspaceprojectsprojectkeydeploykeyskeyidget) | **Get** /workspaces/{workspace}/projects/{project_key}/deploy-keys/{key_id} | Get a project deploy key @@ -126,18 +128,19 @@ Class | Method | HTTP request | Description *IssueTrackerApi* | [**RepositoriesWorkspaceRepoSlugVersionsGet**](docs/IssueTrackerApi.md#repositoriesworkspacereposlugversionsget) | **Get** /repositories/{workspace}/{repo_slug}/versions | List defined versions for issues *IssueTrackerApi* | [**RepositoriesWorkspaceRepoSlugVersionsVersionIdGet**](docs/IssueTrackerApi.md#repositoriesworkspacereposlugversionsversionidget) | **Get** /repositories/{workspace}/{repo_slug}/versions/{version_id} | Get a defined version for issues *PipelinesApi* | [**CreateDeploymentVariable**](docs/PipelinesApi.md#createdeploymentvariable) | **Post** /repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables | Create a variable for an environment -*PipelinesApi* | [**CreatePipelineForRepository**](docs/PipelinesApi.md#createpipelineforrepository) | **Post** /repositories/{workspace}/{repo_slug}/pipelines/ | Run a pipeline -*PipelinesApi* | [**CreatePipelineVariableForTeam**](docs/PipelinesApi.md#createpipelinevariableforteam) | **Post** /teams/{username}/pipelines_config/variables/ | Create a variable for a user -*PipelinesApi* | [**CreatePipelineVariableForUser**](docs/PipelinesApi.md#createpipelinevariableforuser) | **Post** /users/{selected_user}/pipelines_config/variables/ | Create a variable for a user +*PipelinesApi* | [**CreatePipelineForRepository**](docs/PipelinesApi.md#createpipelineforrepository) | **Post** /repositories/{workspace}/{repo_slug}/pipelines | Run a pipeline +*PipelinesApi* | [**CreatePipelineVariableForTeam**](docs/PipelinesApi.md#createpipelinevariableforteam) | **Post** /teams/{username}/pipelines_config/variables | Create a variable for a user +*PipelinesApi* | [**CreatePipelineVariableForUser**](docs/PipelinesApi.md#createpipelinevariableforuser) | **Post** /users/{selected_user}/pipelines_config/variables | Create a variable for a user *PipelinesApi* | [**CreatePipelineVariableForWorkspace**](docs/PipelinesApi.md#createpipelinevariableforworkspace) | **Post** /workspaces/{workspace}/pipelines-config/variables | Create a variable for a workspace -*PipelinesApi* | [**CreateRepositoryPipelineKnownHost**](docs/PipelinesApi.md#createrepositorypipelineknownhost) | **Post** /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/ | Create a known host -*PipelinesApi* | [**CreateRepositoryPipelineSchedule**](docs/PipelinesApi.md#createrepositorypipelineschedule) | **Post** /repositories/{workspace}/{repo_slug}/pipelines_config/schedules/ | Create a schedule -*PipelinesApi* | [**CreateRepositoryPipelineVariable**](docs/PipelinesApi.md#createrepositorypipelinevariable) | **Post** /repositories/{workspace}/{repo_slug}/pipelines_config/variables/ | Create a variable for a repository +*PipelinesApi* | [**CreateRepositoryPipelineKnownHost**](docs/PipelinesApi.md#createrepositorypipelineknownhost) | **Post** /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts | Create a known host +*PipelinesApi* | [**CreateRepositoryPipelineSchedule**](docs/PipelinesApi.md#createrepositorypipelineschedule) | **Post** /repositories/{workspace}/{repo_slug}/pipelines_config/schedules | Create a schedule +*PipelinesApi* | [**CreateRepositoryPipelineVariable**](docs/PipelinesApi.md#createrepositorypipelinevariable) | **Post** /repositories/{workspace}/{repo_slug}/pipelines_config/variables | Create a variable for a repository *PipelinesApi* | [**DeleteDeploymentVariable**](docs/PipelinesApi.md#deletedeploymentvariable) | **Delete** /repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables/{variable_uuid} | Delete a variable for an environment *PipelinesApi* | [**DeletePipelineVariableForTeam**](docs/PipelinesApi.md#deletepipelinevariableforteam) | **Delete** /teams/{username}/pipelines_config/variables/{variable_uuid} | Delete a variable for a team *PipelinesApi* | [**DeletePipelineVariableForUser**](docs/PipelinesApi.md#deletepipelinevariableforuser) | **Delete** /users/{selected_user}/pipelines_config/variables/{variable_uuid} | Delete a variable for a user *PipelinesApi* | [**DeletePipelineVariableForWorkspace**](docs/PipelinesApi.md#deletepipelinevariableforworkspace) | **Delete** /workspaces/{workspace}/pipelines-config/variables/{variable_uuid} | Delete a variable for a workspace *PipelinesApi* | [**DeleteRepositoryPipelineCache**](docs/PipelinesApi.md#deleterepositorypipelinecache) | **Delete** /repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid} | Delete a cache +*PipelinesApi* | [**DeleteRepositoryPipelineCaches**](docs/PipelinesApi.md#deleterepositorypipelinecaches) | **Delete** /repositories/{workspace}/{repo_slug}/pipelines-config/caches | Delete caches *PipelinesApi* | [**DeleteRepositoryPipelineKeyPair**](docs/PipelinesApi.md#deleterepositorypipelinekeypair) | **Delete** /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/key_pair | Delete SSH key pair *PipelinesApi* | [**DeleteRepositoryPipelineKnownHost**](docs/PipelinesApi.md#deleterepositorypipelineknownhost) | **Delete** /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/{known_host_uuid} | Delete a known host *PipelinesApi* | [**DeleteRepositoryPipelineSchedule**](docs/PipelinesApi.md#deleterepositorypipelineschedule) | **Delete** /repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid} | Delete a schedule @@ -149,28 +152,28 @@ Class | Method | HTTP request | Description *PipelinesApi* | [**GetPipelineForRepository**](docs/PipelinesApi.md#getpipelineforrepository) | **Get** /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid} | Get a pipeline *PipelinesApi* | [**GetPipelineStepForRepository**](docs/PipelinesApi.md#getpipelinestepforrepository) | **Get** /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid} | Get a step of a pipeline *PipelinesApi* | [**GetPipelineStepLogForRepository**](docs/PipelinesApi.md#getpipelinesteplogforrepository) | **Get** /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/log | Get log file for a step -*PipelinesApi* | [**GetPipelineStepsForRepository**](docs/PipelinesApi.md#getpipelinestepsforrepository) | **Get** /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/ | List steps for a pipeline +*PipelinesApi* | [**GetPipelineStepsForRepository**](docs/PipelinesApi.md#getpipelinestepsforrepository) | **Get** /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps | List steps for a pipeline *PipelinesApi* | [**GetPipelineTestReportTestCaseReasons**](docs/PipelinesApi.md#getpipelinetestreporttestcasereasons) | **Get** /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports/test_cases/{test_case_uuid}/test_case_reasons | Get test case reasons (output) for a given test case in a step of a pipeline. *PipelinesApi* | [**GetPipelineTestReportTestCases**](docs/PipelinesApi.md#getpipelinetestreporttestcases) | **Get** /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports/test_cases | Get test cases for a given step of a pipeline. *PipelinesApi* | [**GetPipelineTestReports**](docs/PipelinesApi.md#getpipelinetestreports) | **Get** /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports | Get a summary of test reports for a given step of a pipeline. *PipelinesApi* | [**GetPipelineVariableForTeam**](docs/PipelinesApi.md#getpipelinevariableforteam) | **Get** /teams/{username}/pipelines_config/variables/{variable_uuid} | Get a variable for a team *PipelinesApi* | [**GetPipelineVariableForUser**](docs/PipelinesApi.md#getpipelinevariableforuser) | **Get** /users/{selected_user}/pipelines_config/variables/{variable_uuid} | Get a variable for a user *PipelinesApi* | [**GetPipelineVariableForWorkspace**](docs/PipelinesApi.md#getpipelinevariableforworkspace) | **Get** /workspaces/{workspace}/pipelines-config/variables/{variable_uuid} | Get variable for a workspace -*PipelinesApi* | [**GetPipelineVariablesForTeam**](docs/PipelinesApi.md#getpipelinevariablesforteam) | **Get** /teams/{username}/pipelines_config/variables/ | List variables for an account -*PipelinesApi* | [**GetPipelineVariablesForUser**](docs/PipelinesApi.md#getpipelinevariablesforuser) | **Get** /users/{selected_user}/pipelines_config/variables/ | List variables for a user +*PipelinesApi* | [**GetPipelineVariablesForTeam**](docs/PipelinesApi.md#getpipelinevariablesforteam) | **Get** /teams/{username}/pipelines_config/variables | List variables for an account +*PipelinesApi* | [**GetPipelineVariablesForUser**](docs/PipelinesApi.md#getpipelinevariablesforuser) | **Get** /users/{selected_user}/pipelines_config/variables | List variables for a user *PipelinesApi* | [**GetPipelineVariablesForWorkspace**](docs/PipelinesApi.md#getpipelinevariablesforworkspace) | **Get** /workspaces/{workspace}/pipelines-config/variables | List variables for a workspace -*PipelinesApi* | [**GetPipelinesForRepository**](docs/PipelinesApi.md#getpipelinesforrepository) | **Get** /repositories/{workspace}/{repo_slug}/pipelines/ | List pipelines +*PipelinesApi* | [**GetPipelinesForRepository**](docs/PipelinesApi.md#getpipelinesforrepository) | **Get** /repositories/{workspace}/{repo_slug}/pipelines | List pipelines *PipelinesApi* | [**GetRepositoryPipelineCacheContentURI**](docs/PipelinesApi.md#getrepositorypipelinecachecontenturi) | **Get** /repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}/content-uri | Get cache content URI -*PipelinesApi* | [**GetRepositoryPipelineCaches**](docs/PipelinesApi.md#getrepositorypipelinecaches) | **Get** /repositories/{workspace}/{repo_slug}/pipelines-config/caches/ | List caches +*PipelinesApi* | [**GetRepositoryPipelineCaches**](docs/PipelinesApi.md#getrepositorypipelinecaches) | **Get** /repositories/{workspace}/{repo_slug}/pipelines-config/caches | List caches *PipelinesApi* | [**GetRepositoryPipelineConfig**](docs/PipelinesApi.md#getrepositorypipelineconfig) | **Get** /repositories/{workspace}/{repo_slug}/pipelines_config | Get configuration *PipelinesApi* | [**GetRepositoryPipelineKnownHost**](docs/PipelinesApi.md#getrepositorypipelineknownhost) | **Get** /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/{known_host_uuid} | Get a known host -*PipelinesApi* | [**GetRepositoryPipelineKnownHosts**](docs/PipelinesApi.md#getrepositorypipelineknownhosts) | **Get** /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/ | List known hosts +*PipelinesApi* | [**GetRepositoryPipelineKnownHosts**](docs/PipelinesApi.md#getrepositorypipelineknownhosts) | **Get** /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts | List known hosts *PipelinesApi* | [**GetRepositoryPipelineSchedule**](docs/PipelinesApi.md#getrepositorypipelineschedule) | **Get** /repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid} | Get a schedule -*PipelinesApi* | [**GetRepositoryPipelineScheduleExecutions**](docs/PipelinesApi.md#getrepositorypipelinescheduleexecutions) | **Get** /repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}/executions/ | List executions of a schedule -*PipelinesApi* | [**GetRepositoryPipelineSchedules**](docs/PipelinesApi.md#getrepositorypipelineschedules) | **Get** /repositories/{workspace}/{repo_slug}/pipelines_config/schedules/ | List schedules +*PipelinesApi* | [**GetRepositoryPipelineScheduleExecutions**](docs/PipelinesApi.md#getrepositorypipelinescheduleexecutions) | **Get** /repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}/executions | List executions of a schedule +*PipelinesApi* | [**GetRepositoryPipelineSchedules**](docs/PipelinesApi.md#getrepositorypipelineschedules) | **Get** /repositories/{workspace}/{repo_slug}/pipelines_config/schedules | List schedules *PipelinesApi* | [**GetRepositoryPipelineSshKeyPair**](docs/PipelinesApi.md#getrepositorypipelinesshkeypair) | **Get** /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/key_pair | Get SSH key pair *PipelinesApi* | [**GetRepositoryPipelineVariable**](docs/PipelinesApi.md#getrepositorypipelinevariable) | **Get** /repositories/{workspace}/{repo_slug}/pipelines_config/variables/{variable_uuid} | Get a variable for a repository -*PipelinesApi* | [**GetRepositoryPipelineVariables**](docs/PipelinesApi.md#getrepositorypipelinevariables) | **Get** /repositories/{workspace}/{repo_slug}/pipelines_config/variables/ | List variables for a repository +*PipelinesApi* | [**GetRepositoryPipelineVariables**](docs/PipelinesApi.md#getrepositorypipelinevariables) | **Get** /repositories/{workspace}/{repo_slug}/pipelines_config/variables | List variables for a repository *PipelinesApi* | [**StopPipeline**](docs/PipelinesApi.md#stoppipeline) | **Post** /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/stopPipeline | Stop a pipeline *PipelinesApi* | [**UpdateDeploymentVariable**](docs/PipelinesApi.md#updatedeploymentvariable) | **Put** /repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables/{variable_uuid} | Update a variable for an environment *PipelinesApi* | [**UpdatePipelineVariableForTeam**](docs/PipelinesApi.md#updatepipelinevariableforteam) | **Put** /teams/{username}/pipelines_config/variables/{variable_uuid} | Update a variable for a team @@ -189,6 +192,14 @@ Class | Method | HTTP request | Description *ProjectsApi* | [**WorkspacesWorkspaceProjectsProjectKeyDefaultReviewersSelectedUserPut**](docs/ProjectsApi.md#workspacesworkspaceprojectsprojectkeydefaultreviewersselecteduserput) | **Put** /workspaces/{workspace}/projects/{project_key}/default-reviewers/{selected_user} | Add the specific user as a default reviewer for the project *ProjectsApi* | [**WorkspacesWorkspaceProjectsProjectKeyDelete**](docs/ProjectsApi.md#workspacesworkspaceprojectsprojectkeydelete) | **Delete** /workspaces/{workspace}/projects/{project_key} | Delete a project for a workspace *ProjectsApi* | [**WorkspacesWorkspaceProjectsProjectKeyGet**](docs/ProjectsApi.md#workspacesworkspaceprojectsprojectkeyget) | **Get** /workspaces/{workspace}/projects/{project_key} | Get a project for a workspace +*ProjectsApi* | [**WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigGroupsGet**](docs/ProjectsApi.md#workspacesworkspaceprojectsprojectkeypermissionsconfiggroupsget) | **Get** /workspaces/{workspace}/projects/{project_key}/permissions-config/groups | List explicit group permissions for a project +*ProjectsApi* | [**WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigGroupsGroupSlugDelete**](docs/ProjectsApi.md#workspacesworkspaceprojectsprojectkeypermissionsconfiggroupsgroupslugdelete) | **Delete** /workspaces/{workspace}/projects/{project_key}/permissions-config/groups/{group_slug} | Delete an explicit group permission for a project +*ProjectsApi* | [**WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigGroupsGroupSlugGet**](docs/ProjectsApi.md#workspacesworkspaceprojectsprojectkeypermissionsconfiggroupsgroupslugget) | **Get** /workspaces/{workspace}/projects/{project_key}/permissions-config/groups/{group_slug} | Get an explicit group permission for a project +*ProjectsApi* | [**WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigGroupsGroupSlugPut**](docs/ProjectsApi.md#workspacesworkspaceprojectsprojectkeypermissionsconfiggroupsgroupslugput) | **Put** /workspaces/{workspace}/projects/{project_key}/permissions-config/groups/{group_slug} | Update an explicit group permission for a project +*ProjectsApi* | [**WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigUsersGet**](docs/ProjectsApi.md#workspacesworkspaceprojectsprojectkeypermissionsconfigusersget) | **Get** /workspaces/{workspace}/projects/{project_key}/permissions-config/users | List explicit user permissions for a project +*ProjectsApi* | [**WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigUsersSelectedUserIdDelete**](docs/ProjectsApi.md#workspacesworkspaceprojectsprojectkeypermissionsconfigusersselecteduseriddelete) | **Delete** /workspaces/{workspace}/projects/{project_key}/permissions-config/users/{selected_user_id} | Delete an explicit user permission for a project +*ProjectsApi* | [**WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigUsersSelectedUserIdGet**](docs/ProjectsApi.md#workspacesworkspaceprojectsprojectkeypermissionsconfigusersselecteduseridget) | **Get** /workspaces/{workspace}/projects/{project_key}/permissions-config/users/{selected_user_id} | Get an explicit user permission for a project +*ProjectsApi* | [**WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigUsersSelectedUserIdPut**](docs/ProjectsApi.md#workspacesworkspaceprojectsprojectkeypermissionsconfigusersselecteduseridput) | **Put** /workspaces/{workspace}/projects/{project_key}/permissions-config/users/{selected_user_id} | Update an explicit user permission for a project *ProjectsApi* | [**WorkspacesWorkspaceProjectsProjectKeyPut**](docs/ProjectsApi.md#workspacesworkspaceprojectsprojectkeyput) | **Put** /workspaces/{workspace}/projects/{project_key} | Update a project for a workspace *PropertiesApi* | [**DeleteCommitHostedPropertyValue**](docs/PropertiesApi.md#deletecommithostedpropertyvalue) | **Delete** /repositories/{workspace}/{repo_slug}/commit/{commit}/properties/{app_key}/{property_name} | Delete a commit application property *PropertiesApi* | [**DeletePullRequestHostedPropertyValue**](docs/PropertiesApi.md#deletepullrequesthostedpropertyvalue) | **Delete** /repositories/{workspace}/{repo_slug}/pullrequests/{pullrequest_id}/properties/{app_key}/{property_name} | Delete a pull request application property @@ -218,6 +229,8 @@ Class | Method | HTTP request | Description *PullrequestsApi* | [**RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdDelete**](docs/PullrequestsApi.md#repositoriesworkspacereposlugpullrequestspullrequestidcommentscommentiddelete) | **Delete** /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id} | Delete a comment on a pull request *PullrequestsApi* | [**RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdGet**](docs/PullrequestsApi.md#repositoriesworkspacereposlugpullrequestspullrequestidcommentscommentidget) | **Get** /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id} | Get a comment on a pull request *PullrequestsApi* | [**RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut**](docs/PullrequestsApi.md#repositoriesworkspacereposlugpullrequestspullrequestidcommentscommentidput) | **Put** /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id} | Update a comment on a pull request +*PullrequestsApi* | [**RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdResolveDelete**](docs/PullrequestsApi.md#repositoriesworkspacereposlugpullrequestspullrequestidcommentscommentidresolvedelete) | **Delete** /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}/resolve | Reopen a comment thread +*PullrequestsApi* | [**RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdResolvePost**](docs/PullrequestsApi.md#repositoriesworkspacereposlugpullrequestspullrequestidcommentscommentidresolvepost) | **Post** /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}/resolve | Resolve a comment thread *PullrequestsApi* | [**RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsGet**](docs/PullrequestsApi.md#repositoriesworkspacereposlugpullrequestspullrequestidcommentsget) | **Get** /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments | List comments on a pull request *PullrequestsApi* | [**RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsPost**](docs/PullrequestsApi.md#repositoriesworkspacereposlugpullrequestspullrequestidcommentspost) | **Post** /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments | Create a comment on a pull request *PullrequestsApi* | [**RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommitsGet**](docs/PullrequestsApi.md#repositoriesworkspacereposlugpullrequestspullrequestidcommitsget) | **Get** /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/commits | List commits on a pull request @@ -351,31 +364,19 @@ Class | Method | HTTP request | Description ## Documentation For Models - [Account](docs/Account.md) - - [AccountLinks](docs/AccountLinks.md) - [AppUser](docs/AppUser.md) - - [ApplicationProperty](docs/ApplicationProperty.md) - [Author](docs/Author.md) - [BaseCommit](docs/BaseCommit.md) - [Branch](docs/Branch.md) - [BranchingModel](docs/BranchingModel.md) - - [BranchingModelBranchTypes](docs/BranchingModelBranchTypes.md) - - [BranchingModelDevelopment](docs/BranchingModelDevelopment.md) - [BranchingModelSettings](docs/BranchingModelSettings.md) - - [BranchingModelSettingsBranchTypes](docs/BranchingModelSettingsBranchTypes.md) - - [BranchingModelSettingsDevelopment](docs/BranchingModelSettingsDevelopment.md) - - [BranchingModelSettingsProduction](docs/BranchingModelSettingsProduction.md) - [Branchrestriction](docs/Branchrestriction.md) - [Comment](docs/Comment.md) - - [CommentInline](docs/CommentInline.md) - - [CommentLinks](docs/CommentLinks.md) - [Commit](docs/Commit.md) - [CommitComment](docs/CommitComment.md) - - [CommitFile](docs/CommitFile.md) - [Commitstatus](docs/Commitstatus.md) - - [CommitstatusLinks](docs/CommitstatusLinks.md) - [Component](docs/Component.md) - [DdevReport](docs/DdevReport.md) - - [DefaultReviewerAndType](docs/DefaultReviewerAndType.md) - [DeployKey](docs/DeployKey.md) - [Deployment](docs/Deployment.md) - [DeploymentEnvironment](docs/DeploymentEnvironment.md) @@ -396,28 +397,17 @@ Class | Method | HTTP request | Description - [DeploymentsStgWestDeploymentEnvironment](docs/DeploymentsStgWestDeploymentEnvironment.md) - [DeploymentsStgWestDeploymentEnvironmentLock](docs/DeploymentsStgWestDeploymentEnvironmentLock.md) - [DeploymentsStgWestPaginatedEnvironments](docs/DeploymentsStgWestPaginatedEnvironments.md) - - [Diffstat](docs/Diffstat.md) - [EffectiveRepoBranchingModel](docs/EffectiveRepoBranchingModel.md) - - [ErrorError](docs/ErrorError.md) - - [ExportOptions](docs/ExportOptions.md) - [Group](docs/Group.md) - - [GroupLinks](docs/GroupLinks.md) - [HookEvent](docs/HookEvent.md) - [Issue](docs/Issue.md) - [IssueAttachment](docs/IssueAttachment.md) - - [IssueChange](docs/IssueChange.md) - - [IssueChangeChanges](docs/IssueChangeChanges.md) - - [IssueChangeChangesAssignee](docs/IssueChangeChangesAssignee.md) - - [IssueChangeLinks](docs/IssueChangeLinks.md) - [IssueComment](docs/IssueComment.md) - [IssueJobStatus](docs/IssueJobStatus.md) - - [IssueLinks](docs/IssueLinks.md) - [JiraProject](docs/JiraProject.md) - [JiraSite](docs/JiraSite.md) - [Link](docs/Link.md) - [Milestone](docs/Milestone.md) - - [ModelError](docs/ModelError.md) - - [Object](docs/Object.md) - [Page](docs/Page.md) - [PaginatedAccounts](docs/PaginatedAccounts.md) - [PaginatedAnnotations](docs/PaginatedAnnotations.md) @@ -448,6 +438,8 @@ Class | Method | HTTP request | Description - [PaginatedPipelineVariables](docs/PaginatedPipelineVariables.md) - [PaginatedPipelines](docs/PaginatedPipelines.md) - [PaginatedProjectDeployKeys](docs/PaginatedProjectDeployKeys.md) + - [PaginatedProjectGroupPermissions](docs/PaginatedProjectGroupPermissions.md) + - [PaginatedProjectUserPermissions](docs/PaginatedProjectUserPermissions.md) - [PaginatedProjects](docs/PaginatedProjects.md) - [PaginatedPullrequestComments](docs/PaginatedPullrequestComments.md) - [PaginatedPullrequests](docs/PaginatedPullrequests.md) @@ -482,6 +474,9 @@ Class | Method | HTTP request | Description - [PipelineScheduleExecution](docs/PipelineScheduleExecution.md) - [PipelineScheduleExecutionErrored](docs/PipelineScheduleExecutionErrored.md) - [PipelineScheduleExecutionExecuted](docs/PipelineScheduleExecutionExecuted.md) + - [PipelineSchedulePostRequestBody](docs/PipelineSchedulePostRequestBody.md) + - [PipelineSchedulePostRequestBodyTarget](docs/PipelineSchedulePostRequestBodyTarget.md) + - [PipelineSchedulePutRequestBody](docs/PipelineSchedulePutRequestBody.md) - [PipelineSelector](docs/PipelineSelector.md) - [PipelineSshKeyPair](docs/PipelineSshKeyPair.md) - [PipelineSshPublicKey](docs/PipelineSshPublicKey.md) @@ -522,29 +517,14 @@ Class | Method | HTTP request | Description - [PipelinesStgWestPipelineStep](docs/PipelinesStgWestPipelineStep.md) - [Project](docs/Project.md) - [ProjectBranchingModel](docs/ProjectBranchingModel.md) - - [ProjectBranchingModelDevelopment](docs/ProjectBranchingModelDevelopment.md) - [ProjectDeployKey](docs/ProjectDeployKey.md) - - [ProjectLinks](docs/ProjectLinks.md) - - [PullRequestBranch](docs/PullRequestBranch.md) - - [PullRequestCommit](docs/PullRequestCommit.md) - [Pullrequest](docs/Pullrequest.md) - [PullrequestComment](docs/PullrequestComment.md) - [PullrequestEndpoint](docs/PullrequestEndpoint.md) - - [PullrequestLinks](docs/PullrequestLinks.md) - - [PullrequestMergeParameters](docs/PullrequestMergeParameters.md) - - [Ref](docs/Ref.md) - - [RefLinks](docs/RefLinks.md) - - [RenderedPullRequestMarkup](docs/RenderedPullRequestMarkup.md) - - [RenderedPullRequestMarkupTitle](docs/RenderedPullRequestMarkupTitle.md) - [Report](docs/Report.md) - [ReportAnnotation](docs/ReportAnnotation.md) - [ReportData](docs/ReportData.md) - [Repository](docs/Repository.md) - - [RepositoryGroupPermission](docs/RepositoryGroupPermission.md) - - [RepositoryInheritanceState](docs/RepositoryInheritanceState.md) - - [RepositoryLinks](docs/RepositoryLinks.md) - - [RepositoryPermission](docs/RepositoryPermission.md) - - [RepositoryUserPermission](docs/RepositoryUserPermission.md) - [SearchCodeSearchResult](docs/SearchCodeSearchResult.md) - [SearchContentMatch](docs/SearchContentMatch.md) - [SearchLine](docs/SearchLine.md) @@ -553,23 +533,18 @@ Class | Method | HTTP request | Description - [Snippet](docs/Snippet.md) - [SnippetComment](docs/SnippetComment.md) - [SnippetCommit](docs/SnippetCommit.md) - - [SnippetCommitLinks](docs/SnippetCommitLinks.md) - [SshAccountKey](docs/SshAccountKey.md) - [SshKey](docs/SshKey.md) - [StgWestReport](docs/StgWestReport.md) - [SubjectTypes](docs/SubjectTypes.md) - - [SubjectTypesRepository](docs/SubjectTypesRepository.md) - [Tag](docs/Tag.md) - [Team](docs/Team.md) - [TeamLinks](docs/TeamLinks.md) - - [Treeentry](docs/Treeentry.md) - [User](docs/User.md) - [UserLinks](docs/UserLinks.md) - [Version](docs/Version.md) - - [VersionLinks](docs/VersionLinks.md) - [WebhookSubscription](docs/WebhookSubscription.md) - [Workspace](docs/Workspace.md) - - [WorkspaceLinks](docs/WorkspaceLinks.md) - [WorkspaceMembership](docs/WorkspaceMembership.md) ## Documentation For Authorization diff --git a/api/swagger.yaml b/api/swagger.yaml index 164961a..1e00e1c 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -2546,6 +2546,145 @@ paths: - repository - basic: [] - api_key: [] + put: + tags: + - Commits + summary: Update a commit comment + description: |- + Used to update the contents of a comment. Only the content of the comment can be updated. + + ``` + $ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/commit/7f71b5/comments/5728901 \ + -X PUT -u evzijst \ + -H 'Content-Type: application/json' \ + -d '{"content": {"raw": "One more thing!"}' + ``` + parameters: + - name: comment_id + in: path + description: The id of the comment. + required: true + style: simple + explode: false + schema: + type: integer + - name: commit + in: path + description: The commit's SHA1. + required: true + style: simple + explode: false + schema: + type: string + - name: repo_slug + in: path + description: | + This can either be the repository slug or the UUID of the repository, + surrounded by curly-braces, for example: `{repository UUID}`. + required: true + style: simple + explode: false + schema: + type: string + - name: workspace + in: path + description: | + This can either be the workspace ID (slug) or the workspace UUID + surrounded by curly-braces, for example: `{workspace UUID}`. + required: true + style: simple + explode: false + schema: + type: string + requestBody: + description: The updated comment. + content: + application/json: + schema: + $ref: '#/components/schemas/commit_comment' + required: true + responses: + "201": + description: The newly updated comment. + headers: + Location: + description: The location of the newly updated comment. + style: simple + explode: false + schema: + type: string + content: {} + "400": + description: If the comment update was detected as spam + content: {} + security: + - oauth2: + - repository + - basic: [] + - api_key: [] + x-codegen-request-body-name: _body + delete: + tags: + - Commits + summary: Delete a commit comment + description: |- + Deletes the specified commit comment. + + Note that deleting comments that have visible replies that point to + them will not really delete the resource. This is to retain the integrity + of the original comment tree. Instead, the `deleted` element is set to + `true` and the content is blanked out. The comment will continue to be + returned by the collections and self endpoints. + parameters: + - name: comment_id + in: path + description: The id of the comment. + required: true + style: simple + explode: false + schema: + type: integer + - name: commit + in: path + description: The commit's SHA1. + required: true + style: simple + explode: false + schema: + type: string + - name: repo_slug + in: path + description: | + This can either be the repository slug or the UUID of the repository, + surrounded by curly-braces, for example: `{repository UUID}`. + required: true + style: simple + explode: false + schema: + type: string + - name: workspace + in: path + description: | + This can either be the workspace ID (slug) or the workspace UUID + surrounded by curly-braces, for example: `{workspace UUID}`. + required: true + style: simple + explode: false + schema: + type: string + responses: + "204": + description: Indicates the comment was deleted by this action or a previous + delete. + content: {} + "404": + description: If the comment doesn't exist + content: {} + security: + - oauth2: + - repository + - basic: [] + - api_key: [] /repositories/{workspace}/{repo_slug}/commit/{commit}/properties/{app_key}/{property_name}: get: tags: @@ -3858,7 +3997,7 @@ paths: #### GET /repositories/{workspace}/{repo_slug}/commits/master - Returns all commits on rev `master` (similar to `git log master`). + Returns all commits on ref `master` (similar to `git log master`). #### GET /repositories/{workspace}/{repo_slug}/commits/dev?include=foo&exclude=master @@ -3903,7 +4042,7 @@ paths: type: string - name: revision in: path - description: The commit's SHA1. + description: A commit SHA1 or ref name. required: true style: simple explode: false @@ -3960,7 +4099,7 @@ paths: type: string - name: revision in: path - description: The commit's SHA1. + description: A commit SHA1 or ref name. required: true style: simple explode: false @@ -4774,7 +4913,7 @@ paths: - repository:admin - basic: [] - api_key: [] - /repositories/{workspace}/{repo_slug}/deployments/: + /repositories/{workspace}/{repo_slug}/deployments: get: tags: - Deployments @@ -5775,7 +5914,7 @@ paths: - pullrequest - basic: [] - api_key: [] - /repositories/{workspace}/{repo_slug}/environments/: + /repositories/{workspace}/{repo_slug}/environments: get: tags: - Deployments @@ -5954,7 +6093,7 @@ paths: application/json: schema: $ref: '#/components/schemas/error' - /repositories/{workspace}/{repo_slug}/environments/{environment_uuid}/changes/: + /repositories/{workspace}/{repo_slug}/environments/{environment_uuid}/changes: post: tags: - Deployments @@ -9369,8 +9508,8 @@ paths: schema: $ref: '#/components/schemas/error' "404": - description: "The workspace does not exist, the repository does not exist,or\ - \ the group does not exist." + description: "The workspace does not exist, the repository does not exist,\ + \ or the group does not exist." content: application/json: schema: @@ -9443,8 +9582,8 @@ paths: schema: $ref: '#/components/schemas/error' "404": - description: "The workspace does not exist, the repository does not exist,or\ - \ the group does not exist." + description: "The workspace does not exist, the repository does not exist,\ + \ or the group does not exist." content: application/json: schema: @@ -9881,133 +10020,7 @@ paths: - repository:admin - basic: [] - api_key: [] - /repositories/{workspace}/{repo_slug}/pipelines-config/caches/: - get: - tags: - - Pipelines - summary: List caches - description: Retrieve the repository pipelines caches. - operationId: getRepositoryPipelineCaches - parameters: - - name: workspace - in: path - description: The account. - required: true - style: simple - explode: false - schema: - type: string - - name: repo_slug - in: path - description: The repository. - required: true - style: simple - explode: false - schema: - type: string - responses: - "200": - description: The list of caches for the given repository. - content: - application/json: - schema: - $ref: '#/components/schemas/paginated_pipeline_caches' - "404": - description: The account or repository was not found. - content: - application/json: - schema: - $ref: '#/components/schemas/error' - /repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}: - delete: - tags: - - Pipelines - summary: Delete a cache - description: Delete a repository cache. - operationId: deleteRepositoryPipelineCache - parameters: - - name: workspace - in: path - description: The account. - required: true - style: simple - explode: false - schema: - type: string - - name: repo_slug - in: path - description: The repository. - required: true - style: simple - explode: false - schema: - type: string - - name: cache_uuid - in: path - description: The UUID of the cache to delete. - required: true - style: simple - explode: false - schema: - type: string - responses: - "204": - description: The cache was deleted. - content: {} - "404": - description: "The workspace, repository or cache_uuid with given UUID was\ - \ not found." - content: - application/json: - schema: - $ref: '#/components/schemas/error' - /repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}/content-uri: - get: - tags: - - Pipelines - summary: Get cache content URI - description: Retrieve the URI of the content of the specified cache. - operationId: getRepositoryPipelineCacheContentURI - parameters: - - name: workspace - in: path - description: The account. - required: true - style: simple - explode: false - schema: - type: string - - name: repo_slug - in: path - description: The repository. - required: true - style: simple - explode: false - schema: - type: string - - name: cache_uuid - in: path - description: The UUID of the cache. - required: true - style: simple - explode: false - schema: - type: string - responses: - "200": - description: The cache content uri. - content: - application/json: - schema: - $ref: '#/components/schemas/pipeline_cache_content_uri' - "404": - description: "The workspace, repository or cache_uuid with given UUID was\ - \ not found." - content: - application/json: - schema: - $ref: '#/components/schemas/error' - /repositories/{workspace}/{repo_slug}/pipelines/: + /repositories/{workspace}/{repo_slug}/pipelines: get: tags: - Pipelines @@ -10173,13 +10186,180 @@ paths: schema: $ref: '#/components/schemas/error' x-codegen-request-body-name: _body - /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}: + /repositories/{workspace}/{repo_slug}/pipelines-config/caches: get: tags: - Pipelines - summary: Get a pipeline - description: Retrieve a specified pipeline - operationId: getPipelineForRepository + summary: List caches + description: Retrieve the repository pipelines caches. + operationId: getRepositoryPipelineCaches + parameters: + - name: workspace + in: path + description: The account. + required: true + style: simple + explode: false + schema: + type: string + - name: repo_slug + in: path + description: The repository. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: The list of caches for the given repository. + content: + application/json: + schema: + $ref: '#/components/schemas/paginated_pipeline_caches' + "404": + description: The account or repository was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/error' + delete: + tags: + - Pipelines + summary: Delete caches + description: Delete repository cache versions by name. + operationId: deleteRepositoryPipelineCaches + parameters: + - name: workspace + in: path + description: The account. + required: true + style: simple + explode: false + schema: + type: string + - name: repo_slug + in: path + description: The repository. + required: true + style: simple + explode: false + schema: + type: string + - name: name + in: query + description: The cache name. + required: true + style: form + explode: true + schema: + type: string + responses: + "204": + description: The caches were deleted. + content: {} + "404": + description: "The workspace, repository or cache name was not found." + content: + application/json: + schema: + $ref: '#/components/schemas/error' + /repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}: + delete: + tags: + - Pipelines + summary: Delete a cache + description: Delete a repository cache. + operationId: deleteRepositoryPipelineCache + parameters: + - name: workspace + in: path + description: The account. + required: true + style: simple + explode: false + schema: + type: string + - name: repo_slug + in: path + description: The repository. + required: true + style: simple + explode: false + schema: + type: string + - name: cache_uuid + in: path + description: The UUID of the cache to delete. + required: true + style: simple + explode: false + schema: + type: string + responses: + "204": + description: The cache was deleted. + content: {} + "404": + description: "The workspace, repository or cache_uuid with given UUID was\ + \ not found." + content: + application/json: + schema: + $ref: '#/components/schemas/error' + /repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}/content-uri: + get: + tags: + - Pipelines + summary: Get cache content URI + description: Retrieve the URI of the content of the specified cache. + operationId: getRepositoryPipelineCacheContentURI + parameters: + - name: workspace + in: path + description: The account. + required: true + style: simple + explode: false + schema: + type: string + - name: repo_slug + in: path + description: The repository. + required: true + style: simple + explode: false + schema: + type: string + - name: cache_uuid + in: path + description: The UUID of the cache. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: The cache content uri. + content: + application/json: + schema: + $ref: '#/components/schemas/pipeline_cache_content_uri' + "404": + description: "The workspace, repository or cache_uuid with given UUID was\ + \ not found." + content: + application/json: + schema: + $ref: '#/components/schemas/error' + /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}: + get: + tags: + - Pipelines + summary: Get a pipeline + description: Retrieve a specified pipeline + operationId: getPipelineForRepository parameters: - name: workspace in: path @@ -10220,7 +10400,7 @@ paths: application/json: schema: $ref: '#/components/schemas/error' - /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/: + /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps: get: tags: - Pipelines @@ -10787,7 +10967,7 @@ paths: schema: $ref: '#/components/schemas/error' x-codegen-request-body-name: _body - /repositories/{workspace}/{repo_slug}/pipelines_config/schedules/: + /repositories/{workspace}/{repo_slug}/pipelines_config/schedules: get: tags: - Pipelines @@ -10854,7 +11034,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/pipeline_schedule' + $ref: '#/components/schemas/pipeline_schedule_post_request_body' required: true responses: "201": @@ -10965,7 +11145,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/pipeline_schedule' + $ref: '#/components/schemas/pipeline_schedule_put_request_body' required: true responses: "200": @@ -11023,7 +11203,7 @@ paths: application/json: schema: $ref: '#/components/schemas/error' - /repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}/executions/: + /repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}/executions: get: tags: - Pipelines @@ -11189,7 +11369,7 @@ paths: application/json: schema: $ref: '#/components/schemas/error' - /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/: + /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts: get: tags: - Pipelines @@ -11423,7 +11603,7 @@ paths: application/json: schema: $ref: '#/components/schemas/error' - /repositories/{workspace}/{repo_slug}/pipelines_config/variables/: + /repositories/{workspace}/{repo_slug}/pipelines_config/variables: get: tags: - Pipelines @@ -12915,6 +13095,13 @@ paths: description: An empty response indicating the authenticated user's approval has been withdrawn. content: {} + "400": + description: Pull request cannot be unapproved because the pull request + has already been merged. + content: + application/json: + schema: + $ref: '#/components/schemas/error' "401": description: The request wasn't authenticated. content: @@ -13286,17 +13473,20 @@ paths: - pullrequest - basic: [] - api_key: [] - /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/commits: - get: + /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}/resolve: + post: tags: - Pullrequests - summary: List commits on a pull request - description: |- - Returns a paginated list of the pull request's commits. - - These are the commits that are being merged into the destination - branch when the pull requests gets accepted. + summary: Resolve a comment thread parameters: + - name: comment_id + in: path + description: The id of the comment. + required: true + style: simple + explode: false + schema: + type: integer - name: pull_request_id in: path description: The id of the pull request. @@ -13327,20 +13517,27 @@ paths: type: string responses: "200": - description: "A paginated list of commits made on the given pull request,\ - \ in chronological order. This list will be empty if the source branch\ - \ no longer exists." - content: {} + description: The comment resolution details. + content: + application/json: + schema: + $ref: '#/components/schemas/comment_resolution' "403": - description: If the authenticated user does not have access to the pull - request. + description: |- + If the authenticated user does not have access to the pull request, + or if the provided comment is not a top-level comment. content: application/json: schema: $ref: '#/components/schemas/error' "404": - description: If the pull request does not exist or the source branch is - from a forked repository which no longer exists. + description: If the comment does not exist. + content: + application/json: + schema: + $ref: '#/components/schemas/error' + "409": + description: If the comment has already been resolved. content: application/json: schema: @@ -13350,13 +13547,19 @@ paths: - pullrequest - basic: [] - api_key: [] - /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/decline: - post: + delete: tags: - Pullrequests - summary: Decline a pull request - description: Declines the pull request. + summary: Reopen a comment thread parameters: + - name: comment_id + in: path + description: The id of the comment. + required: true + style: simple + explode: false + schema: + type: integer - name: pull_request_id in: path description: The id of the pull request. @@ -13386,33 +13589,39 @@ paths: schema: type: string responses: - "200": - description: The pull request was successfully declined. + "204": + description: The comment is reopened. + content: {} + "403": + description: |- + If the authenticated user does not have access to the pull request, + or if the provided comment is not a top-level comment. content: application/json: schema: - $ref: '#/components/schemas/pullrequest' - "555": - description: |- - If the decline took too long and timed out. - In this case the caller should retry the request later. + $ref: '#/components/schemas/error' + "404": + description: "If the comment does not exist, or if the comment has not been\ + \ resolved" content: application/json: schema: $ref: '#/components/schemas/error' security: - oauth2: - - pullrequest:write + - pullrequest - basic: [] - api_key: [] - /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/diff: + /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/commits: get: tags: - Pullrequests - summary: List changes in a pull request + summary: List commits on a pull request description: |- - Redirects to the [repository diff](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diff-spec-get) - with the revspec that corresponds to the pull request. + Returns a paginated list of the pull request's commits. + + These are the commits that are being merged into the destination + branch when the pull requests gets accepted. parameters: - name: pull_request_id in: path @@ -13443,20 +13652,137 @@ paths: schema: type: string responses: - "302": - description: | - Redirects to the [repository diff](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diff-spec-get) with the - revspec that corresponds to the pull request. + "200": + description: "A paginated list of commits made on the given pull request,\ + \ in chronological order. This list will be empty if the source branch\ + \ no longer exists." content: {} - security: - - oauth2: - - pullrequest - - basic: [] - - api_key: [] - /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/diffstat: - get: - tags: - - Pullrequests + "403": + description: If the authenticated user does not have access to the pull + request. + content: + application/json: + schema: + $ref: '#/components/schemas/error' + "404": + description: If the pull request does not exist or the source branch is + from a forked repository which no longer exists. + content: + application/json: + schema: + $ref: '#/components/schemas/error' + security: + - oauth2: + - pullrequest + - basic: [] + - api_key: [] + /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/decline: + post: + tags: + - Pullrequests + summary: Decline a pull request + description: Declines the pull request. + parameters: + - name: pull_request_id + in: path + description: The id of the pull request. + required: true + style: simple + explode: false + schema: + type: integer + - name: repo_slug + in: path + description: | + This can either be the repository slug or the UUID of the repository, + surrounded by curly-braces, for example: `{repository UUID}`. + required: true + style: simple + explode: false + schema: + type: string + - name: workspace + in: path + description: | + This can either be the workspace ID (slug) or the workspace UUID + surrounded by curly-braces, for example: `{workspace UUID}`. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: The pull request was successfully declined. + content: + application/json: + schema: + $ref: '#/components/schemas/pullrequest' + "555": + description: |- + If the decline took too long and timed out. + In this case the caller should retry the request later. + content: + application/json: + schema: + $ref: '#/components/schemas/error' + security: + - oauth2: + - pullrequest:write + - basic: [] + - api_key: [] + /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/diff: + get: + tags: + - Pullrequests + summary: List changes in a pull request + description: |- + Redirects to the [repository diff](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diff-spec-get) + with the revspec that corresponds to the pull request. + parameters: + - name: pull_request_id + in: path + description: The id of the pull request. + required: true + style: simple + explode: false + schema: + type: integer + - name: repo_slug + in: path + description: | + This can either be the repository slug or the UUID of the repository, + surrounded by curly-braces, for example: `{repository UUID}`. + required: true + style: simple + explode: false + schema: + type: string + - name: workspace + in: path + description: | + This can either be the workspace ID (slug) or the workspace UUID + surrounded by curly-braces, for example: `{workspace UUID}`. + required: true + style: simple + explode: false + schema: + type: string + responses: + "302": + description: | + Redirects to the [repository diff](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diff-spec-get) with the + revspec that corresponds to the pull request. + content: {} + security: + - oauth2: + - pullrequest + - basic: [] + - api_key: [] + /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/diffstat: + get: + tags: + - Pullrequests summary: Get the diff stat for a pull request description: |- Redirects to the [repository diffstat](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diffstat-spec-get) @@ -13786,6 +14112,13 @@ paths: application/json: schema: $ref: '#/components/schemas/participant' + "400": + description: Pull request changes cannot be requested because the pull request + has already been merged. + content: + application/json: + schema: + $ref: '#/components/schemas/error' "401": description: The request wasn't authenticated. content: @@ -13841,6 +14174,13 @@ paths: description: An empty response indicating the authenticated user's request for change has been withdrawn. content: {} + "400": + description: Pull request requested changes cannot be removed because the + pull request has already been merged. + content: + application/json: + schema: + $ref: '#/components/schemas/error' "401": description: The request wasn't authenticated. content: @@ -15825,7 +16165,7 @@ paths: schema: $ref: '#/components/schemas/error' "555": - description: "If the call times out, possibly because the specifiedrecursion\ + description: "If the call times out, possibly because the specified recursion\ \ depth is too large." content: application/json: @@ -18127,7 +18467,7 @@ paths: - snippet - basic: [] - api_key: [] - /teams/{username}/pipelines_config/variables/: + /teams/{username}/pipelines_config/variables: get: tags: - Pipelines @@ -18876,7 +19216,7 @@ paths: - oauth2: [] - basic: [] - api_key: [] - /users/{selected_user}/pipelines_config/variables/: + /users/{selected_user}/pipelines_config/variables: get: tags: - Pipelines @@ -22013,7 +22353,8 @@ paths: type: string responses: "204": - description: The specified user was removed from the list of project default reviewers + description: The specified user was removed from the list of project default + reviewers content: {} "400": description: If the specified user is not a default reviewer for the project @@ -22389,1005 +22730,2387 @@ paths: - project:admin - basic: [] - api_key: [] - /workspaces/{workspace}/search/code: + /workspaces/{workspace}/projects/{project_key}/permissions-config/groups: get: tags: - - Search - summary: Search for code in a workspace - description: | - Search for code in the repositories of the specified workspace. + - Projects + summary: List explicit group permissions for a project + description: |- + Returns a paginated list of explicit group permissions for the given project. + This endpoint does not support BBQL features. - Searching across all repositories: + Example: ``` - curl 'https://api.bitbucket.org/2.0/workspaces/workspace_slug_or_uuid/search/code?search_query=foo' + $ curl https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/groups + + HTTP/1.1 200 + Location: https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/groups + { - "size": 1, - "page": 1, - "pagelen": 10, - "query_substituted": false, - "values": [ + "pagelen": 10, + "values": [ { - "type": "code_search_result", - "content_match_count": 2, - "content_matches": [ - { - "lines": [ - { - "line": 2, - "segments": [] - }, - { - "line": 3, - "segments": [ - { - "text": "def " - }, - { - "text": "foo", - "match": true - }, - { - "text": "():" - } - ] - }, - { - "line": 4, - "segments": [ - { - "text": " print(\"snek\")" - } - ] - }, - { - "line": 5, - "segments": [] + "type": "project_group_permission", + "group": { + "type": "group", + "name": "Administrators", + "slug": "administrators" + }, + "permission": "admin", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ + permissions-config/groups/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" } - ] } - ], - "path_matches": [ - { - "text": "src/" - }, - { - "text": "foo", - "match": true + }, + { + "type": "project_group_permission", + "group": { + "type": "group", + "name": "Developers", + "slug": "developers" }, - { - "text": ".py" - } - ], - "file": { - "path": "src/foo.py", - "type": "commit_file", + "permission": "write", "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py" - } + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ + permissions-config/groups/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324c" + } } - } } - ] + ], + "page": 1, + "size": 2 } ``` - - Note that searches can match in the file's text (`content_matches`), - the path (`path_matches`), or both as in the example above. - - You can use the same syntax for the search query as in the UI, e.g. - to only search within a specific repository: - - ``` - curl 'https://api.bitbucket.org/2.0/workspaces/my-workspace/search/code?search_query=foo+repo:demo' - # results from the "demo" repository - ``` - - Similar to other APIs, you can request more fields using a - `fields` query parameter. E.g. to get some more information about - the repository of matched files (the `%2B` is a URL-encoded `+`): - - ``` - curl 'https://api.bitbucket.org/2.0/workspaces/my-workspace/search/code'\ - '?search_query=foo&fields=%2Bvalues.file.commit.repository' - { - "size": 1, - "page": 1, - "pagelen": 10, - "query_substituted": false, - "values": [ - { - "type": "code_search_result", - "content_match_count": 1, - "content_matches": [...], - "path_matches": [...], - "file": { - "commit": { - "type": "commit", - "hash": "ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/my-workspace/demo/commit/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b" - }, - "html": { - "href": "https://bitbucket.org/my-workspace/demo/commits/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b" - } - }, - "repository": { - "name": "demo", - "type": "repository", - "full_name": "my-workspace/demo", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/my-workspace/demo" - }, - "html": { - "href": "https://bitbucket.org/my-workspace/demo" - }, - "avatar": { - "href": "https://bytebucket.org/ravatar/%7B850e1749-781a-4115-9316-df39d0600e7a%7D?ts=default" - } - }, - "uuid": "{850e1749-781a-4115-9316-df39d0600e7a}" - } - }, - "type": "commit_file", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py" - } - }, - "path": "src/foo.py" - } + parameters: + - name: project_key + in: path + description: | + The project in question. This is the actual key assigned to the project. + required: true + style: simple + explode: false + schema: + type: string + - name: workspace + in: path + description: | + This can either be the workspace ID (slug) or the workspace UUID + surrounded by curly-braces, for example: `{workspace UUID}`. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: Paginated list of project group permissions + content: + application/json: + schema: + $ref: '#/components/schemas/paginated_project_group_permissions' + "401": + description: The user couldn't be authenticated. + content: + application/json: + schema: + $ref: '#/components/schemas/error' + "403": + description: The user doesn't have admin access to the project. + content: + application/json: + schema: + $ref: '#/components/schemas/error' + "404": + description: One or both of the workspace and project don't exist for the + given identifiers or the requesting user is not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/error' + security: + - oauth2: + - project:admin + - basic: [] + - api_key: [] + /workspaces/{workspace}/projects/{project_key}/permissions-config/groups/{group_slug}: + get: + tags: + - Projects + summary: Get an explicit group permission for a project + description: |- + Returns the group permission for a given group and project. + + Only users with admin permission for the project may access this resource. + + Permissions can be: + + * `admin` + * `create-repo` + * `write` + * `read` + * `none` + + Example: + + ``` + $ curl https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ + permissions-config/groups/administrators + + HTTP/1.1 200 + Location: https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ + permissions-config/groups/administrators + + { + "type": "project_group_permission", + "group": { + "type": "group", + "name": "Administrators", + "slug": "administrators" + }, + "permission": "admin", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ + permissions-config/groups/administrators" + } } - ] } ``` - - Try `fields=%2Bvalues.*.*.*.*` to get an idea what's possible. - operationId: searchWorkspace parameters: - - name: workspace + - name: group_slug in: path - description: The workspace to search in; either the slug or the UUID in curly - braces + description: Slug of the requested group. required: true style: simple explode: false schema: type: string - - name: search_query - in: query - description: The search query + - name: project_key + in: path + description: | + The project in question. This is the actual key assigned to the project. required: true - style: form - explode: true + style: simple + explode: false schema: type: string - - name: page - in: query - description: Which page of the search results to retrieve - required: false - style: form - explode: true - schema: - type: integer - format: int32 - default: 1 - - name: pagelen - in: query - description: How many search results to retrieve per page - required: false - style: form - explode: true + - name: workspace + in: path + description: | + This can either be the workspace ID (slug) or the workspace UUID + surrounded by curly-braces, for example: `{workspace UUID}`. + required: true + style: simple + explode: false schema: - type: integer - format: int32 - default: 10 + type: string responses: "200": - description: Successful search + description: Project group permission content: application/json: schema: - $ref: '#/components/schemas/search_result_page' - "400": - description: | - If the search request was invalid due to one of the - following reasons: - - * the specified type of target account doesn''t match the actual - account type; - - * malformed pagination properties; - - * missing or malformed search query, in the latter case an error - key will be returned in `error.data.key` property. + $ref: '#/components/schemas/project_group_permission' + "401": + description: The user couldn't be authenticated. content: application/json: schema: $ref: '#/components/schemas/error' - "404": - description: "Search is not enabled for the requested workspace, navigate\ - \ to [https://bitbucket.org/search](https://bitbucket.org/search) to turn\ - \ it on" + "403": + description: The user doesn't have admin access to the project. content: application/json: schema: $ref: '#/components/schemas/error' - "429": - description: "Too many requests, try again later" + "404": + description: "One or more of the workspace, project, and group doesn't exist\ + \ for the given identifiers or the requesting\ + \ user is not authenticated" content: application/json: schema: $ref: '#/components/schemas/error' -components: - schemas: - jira_site: - allOf: - - $ref: '#/components/schemas/object' - - type: object - description: A Jira Site. - x-bb-default-fields: - - type - - cloudId - - cloudUrl - - cloudName - x-bb-detail-fields: - - connected - x-bb-url: "/api/{target_user.uuid}/jira/sites/{cloudId}?atlassian_account_id={user.account_id}" - jira_project: - allOf: - - $ref: '#/components/schemas/object' - - type: object - description: A Jira Project. - x-bb-default-fields: - - type - - cloudId - - id - x-bb-detail-fields: - - key - - name - - url - - avatarUrls.* - - site - x-bb-url: "/api/{target_user.uuid}/jira/sites/{cloudId}/projects/{id}?atlassian_account_id={user.account_id}" - pipelines_stg_west_pipeline_step: - allOf: - - $ref: '#/components/schemas/object' - - type: object - description: A step of a Bitbucket pipeline. This represents the actual result - of the step execution. - x-bb-default-fields: - - uuid - x-bb-url: "/rest/1.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/pipelines/{pipeline.uuid}/steps/{uuid}" - x-bb-batch-url: "/rest/1.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/pipelines/steps_batch" - x-bb-batch-max-size: 100 - paginated_pullrequests: - title: Paginated Pull Requests - type: object - properties: - size: - minimum: 0 - type: integer - description: "Total number of objects in the response. This is an optional\ - \ element that is not provided in all responses, as it can be expensive\ - \ to compute." - page: - minimum: 1 - type: integer - description: Page number of the current results. This is an optional element - that is not provided in all responses. - pagelen: - minimum: 1 - type: integer - description: Current number of objects on the existing page. The default - value is 10 with 100 being the maximum allowed value. Individual APIs - may enforce different values. - next: - type: string - description: Link to the next page if it exists. The last page of a collection - does not have this value. Use this link to navigate the result set and - refrain from constructing your own URLs. - format: uri - previous: - type: string - description: Link to previous page if it exists. A collections first page - does not have this value. This is an optional element that is not provided - in all responses. Some result sets strictly support forward navigation - and never provide previous links. Clients must anticipate that backwards - navigation is not always available. Use this link to navigate the result - set and refrain from constructing your own URLs. - format: uri - values: - minItems: 0 - uniqueItems: true - type: array - items: - $ref: '#/components/schemas/pullrequest' - description: A paginated list of pullrequests. - example: - next: http://example.com/aeiou - size: 0 - previous: http://example.com/aeiou - values: - - "" - - "" - page: 1 - pagelen: 1 - search_code_search_result: - type: object - properties: - type: + security: + - oauth2: + - project:admin + - basic: [] + - api_key: [] + put: + tags: + - Projects + summary: Update an explicit group permission for a project + description: |- + Updates the group permission if it exists. + + Only users with admin permission for the project may access this resource. + + Due to security concerns, the JWT and OAuth authentication methods are unsupported. + This is to ensure integrations and add-ons are not allowed to change permissions. + + Permissions can be: + + * `admin` + * `create-repo` + * `write` + * `read` + + Example: + ``` + $ curl -X PUT -H "Content-Type: application/json" https://api.bitbucket.org/2.0/ + workspaces/atlassian_tutorial/projects/PRJ/permissions-config/groups/administrators + -d '{ + "permission": "write" + }' + + HTTP/1.1 200 + Location: https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ + permissions-config/groups/administrators + + + { + "type": "project_group_permission", + "group": { + "type": "group", + "name": "Administrators", + "slug": "administrators" + }, + "permission": "write", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ + permissions-config/groups/administrators" + } + } + } + ``` + parameters: + - name: group_slug + in: path + description: Slug of the requested group. + required: true + style: simple + explode: false + schema: type: string - readOnly: true - content_match_count: - type: integer - format: int64 - readOnly: true - content_matches: - type: array - readOnly: true - items: - $ref: '#/components/schemas/search_content_match' - path_matches: - type: array - readOnly: true - items: - $ref: '#/components/schemas/search_segment' - file: - $ref: '#/components/schemas/commit_file' - example: - file: - path: path - escaped_path: escaped_path - commit: "" - attributes: link - type: type - content_matches: - - lines: - - line: 5 - segments: - - match: true - text: text - - match: true - text: text - - line: 5 - segments: - - match: true - text: text - - match: true - text: text - - lines: - - line: 5 - segments: - - match: true - text: text - - match: true - text: text - - line: 5 - segments: - - match: true - text: text - - match: true - text: text - content_match_count: 5 - path_matches: - - null - - null - type: type - search_content_match: - type: object - properties: - lines: - type: array - readOnly: true - items: - $ref: '#/components/schemas/search_line' - example: - lines: - - line: 5 - segments: - - match: true - text: text - - match: true - text: text - - line: 5 - segments: - - match: true - text: text - - match: true - text: text - search_line: - type: object - properties: - line: - type: integer - format: int32 - readOnly: true - segments: - type: array - readOnly: true - items: - $ref: '#/components/schemas/search_segment' - example: - line: 5 - segments: - - match: true - text: text - - match: true - text: text - search_result_page: - type: object - properties: - size: - type: integer - format: int64 - readOnly: true - page: - type: integer - format: int32 - readOnly: true - pagelen: - type: integer - format: int32 - readOnly: true - query_substituted: - type: boolean - readOnly: true - next: + - name: project_key + in: path + description: | + The project in question. This is the actual key assigned to the project. + required: true + style: simple + explode: false + schema: type: string - format: uri - readOnly: true - previous: + - name: workspace + in: path + description: | + This can either be the workspace ID (slug) or the workspace UUID + surrounded by curly-braces, for example: `{workspace UUID}`. + required: true + style: simple + explode: false + schema: type: string - format: uri - readOnly: true - values: - type: array - readOnly: true - items: - $ref: '#/components/schemas/search_code_search_result' - example: - next: http://example.com/aeiou - size: 0 - previous: http://example.com/aeiou - query_substituted: true - values: - - file: - path: path - escaped_path: escaped_path - commit: "" - attributes: link - type: type - content_matches: - - lines: - - line: 5 - segments: - - match: true - text: text - - match: true - text: text - - line: 5 - segments: - - match: true - text: text - - match: true - text: text - - lines: - - line: 5 - segments: - - match: true - text: text - - match: true - text: text - - line: 5 - segments: - - match: true - text: text - - match: true - text: text - content_match_count: 5 - path_matches: - - null - - null - type: type - - file: - path: path - escaped_path: escaped_path - commit: "" - attributes: link - type: type - content_matches: - - lines: - - line: 5 - segments: - - match: true - text: text - - match: true - text: text - - line: 5 - segments: - - match: true - text: text - - match: true - text: text - - lines: - - line: 5 - segments: - - match: true - text: text - - match: true - text: text - - line: 5 - segments: - - match: true - text: text - - match: true - text: text - content_match_count: 5 - path_matches: - - null - - null - type: type - page: 6 - pagelen: 1 - search_segment: - type: object - properties: - text: - type: string - readOnly: true - match: - type: boolean - readOnly: true - example: - match: true - text: text - pipelines_config: - allOf: - - $ref: '#/components/schemas/object' - - title: Pipelines Configuration - type: object - properties: - enabled: - type: boolean - description: Whether Pipelines is enabled for the repository. - repository: - $ref: '#/components/schemas/repository' - description: The Pipelines configuration for a repository. - pipeline: - allOf: - - $ref: '#/components/schemas/object' - - title: Pipeline - type: object - properties: - uuid: - type: string - description: The UUID identifying the pipeline. - build_number: - type: integer - description: The build number of the pipeline. - creator: - $ref: '#/components/schemas/account' - repository: - $ref: '#/components/schemas/repository' - target: - $ref: '#/components/schemas/pipeline_target' - trigger: - $ref: '#/components/schemas/pipeline_trigger' - state: - $ref: '#/components/schemas/pipeline_state' - created_on: - type: string - description: The timestamp when the pipeline was created. - format: date-time - completed_on: - type: string - description: The timestamp when the Pipeline was completed. This is not - set if the pipeline is still in progress. - format: date-time - build_seconds_used: - type: integer - description: The number of build seconds used by this pipeline. - description: A Bitbucket Pipeline. This represents an actual pipeline result. - pipeline_cache: - allOf: - - $ref: '#/components/schemas/object' - - title: Pipeline Cache - type: object - properties: - uuid: - type: string - description: The UUID identifying the pipeline cache. - pipeline_uuid: - type: string - description: The UUID of the pipeline that created the cache. - step_uuid: - type: string - description: The uuid of the step that created the cache. - name: - type: string - description: The name of the cache. - path: - type: string - description: The path where the cache contents were retrieved from. - file_size_bytes: - type: integer - description: The size of the file containing the archive of the cache. - created_on: - type: string - description: The timestamp when the cache was created. - format: date-time - description: A representation of metadata for a pipeline cache for given repository. - paginated_pipeline_caches: - title: Paginated Pipeline Cache - type: object - properties: - page: - type: integer - description: Page number of the current results. This is an optional element - that is not provided in all responses. - values: - minItems: 0 - type: array - description: The values of the current page. - items: - $ref: '#/components/schemas/pipeline_cache' - size: - type: integer - description: "Total number of objects in the response. This is an optional\ - \ element that is not provided in all responses, as it can be expensive\ - \ to compute." - pagelen: - type: integer - description: Current number of objects on the existing page. The default - value is 10 with 100 being the maximum allowed value. Individual APIs - may enforce different values. - next: + responses: + "200": + description: Project group permission updated. + content: + application/json: + schema: + $ref: '#/components/schemas/project_group_permission' + "400": + description: "No permission value was provided or the value is invalid(not\ + \ one of read, write, create-repo, or admin)." + content: + application/json: + schema: + $ref: '#/components/schemas/error' + "401": + description: The user couldn't be authenticated. + content: + application/json: + schema: + $ref: '#/components/schemas/error' + "402": + description: You have reached your plan's user limit and must upgrade before + giving access to additional users. + content: + application/json: + schema: + $ref: '#/components/schemas/error' + "403": + description: "The requesting user isn't an admin of the project, or the\ + \ authentication method was not via app password." + content: + application/json: + schema: + $ref: '#/components/schemas/error' + "404": + description: "One or more of the workspace, project, and group doesn't exist\ + \ for the given identifiers or the requesting\ + \ user is not authenticated" + content: + application/json: + schema: + $ref: '#/components/schemas/error' + security: + - oauth2: + - project:admin + - basic: [] + - api_key: [] + delete: + tags: + - Projects + summary: Delete an explicit group permission for a project + description: |- + Deletes the project group permission between the requested project and group, if one exists. + + Only users with admin permission for the project may access this resource. + + Example: + + $ curl -X DELETE https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/ + projects/PRJ/permissions-config/groups/developers + + HTTP/1.1 204 + parameters: + - name: group_slug + in: path + description: Slug of the requested group. + required: true + style: simple + explode: false + schema: type: string - description: Link to the next page if it exists. The last page of a collection - does not have this value. Use this link to navigate the result set and - refrain from constructing your own URLs. - format: uri - previous: + - name: project_key + in: path + description: | + The project in question. This is the actual key assigned to the project. + required: true + style: simple + explode: false + schema: type: string - description: Link to previous page if it exists. A collections first page - does not have this value. This is an optional element that is not provided - in all responses. Some result sets strictly support forward navigation - and never provide previous links. Clients must anticipate that backwards - navigation is not always available. Use this link to navigate the result - set and refrain from constructing your own URLs. - format: uri - description: A paged list of pipeline caches - example: - next: http://example.com/aeiou - size: 6 - previous: http://example.com/aeiou - values: - - "" - - "" - page: 0 - pagelen: 1 - pipeline_cache_content_uri: - title: Pipeline Cache Content URI - type: object - properties: - uri: + - name: workspace + in: path + description: | + This can either be the workspace ID (slug) or the workspace UUID + surrounded by curly-braces, for example: `{workspace UUID}`. + required: true + style: simple + explode: false + schema: type: string - description: The uri for pipeline cache content. - format: uri - description: A representation of the location of pipeline cache content. + responses: + "204": + description: The project group permission was deleted and no content returned. + content: {} + "401": + description: The user couldn't be authenticated. + content: + application/json: + schema: + $ref: '#/components/schemas/error' + "403": + description: "The requesting user isn't an admin of the project, or the\ + \ authentication method was not via app password." + content: + application/json: + schema: + $ref: '#/components/schemas/error' + "404": + description: "One or more of the workspace, project, and group doesn't exist\ + \ for the given identifiers or the requesting\ + \ user is not authenticated" + content: + application/json: + schema: + $ref: '#/components/schemas/error' + security: + - oauth2: + - project:admin + - basic: [] + - api_key: [] + /workspaces/{workspace}/projects/{project_key}/permissions-config/users: + get: + tags: + - Projects + summary: List explicit user permissions for a project + description: |- + Returns a paginated list of explicit user permissions for the given project. + This endpoint does not support BBQL features. + + Example: + + ``` + $ curl https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/users + + HTTP/1.1 200 + Location: https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/users + + { + "pagelen": 10, + "values": [ + { + "type": "project_user_permission", + "user": { + "type": "user", + "display_name": "Colin Cameron", + "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}", + "account_id": "557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" + }, + "permission": "admin", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ + permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" + } + } + }, + { + "type": "project_user_permission", + "user": { + "type": "user", + "display_name": "Sean Conaty", + "uuid": "{504c3b62-8120-4f0c-a7bc-87800b9d6f70}", + "account_id": "557058:ba8948b2-49da-43a9-9e8b-e7249b8e324c" + }, + "permission": "write", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ + permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324c" + } + } + } + ], + "page": 1, + "size": 2 + } + ``` + parameters: + - name: project_key + in: path + description: | + The project in question. This is the actual key assigned to the project. + required: true + style: simple + explode: false + schema: + type: string + - name: workspace + in: path + description: | + This can either be the workspace ID (slug) or the workspace UUID + surrounded by curly-braces, for example: `{workspace UUID}`. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: Paginated list of explicit user permissions. + content: + application/json: + schema: + $ref: '#/components/schemas/paginated_project_user_permissions' + "401": + description: The user couldn't be authenticated. + content: + application/json: + schema: + $ref: '#/components/schemas/error' + "403": + description: The user doesn't have admin access to the project. + content: + application/json: + schema: + $ref: '#/components/schemas/error' + "404": + description: One or both of the workspace and project don't exist for the + given identifiers or the requesting user is not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/error' + security: + - oauth2: + - project:admin + - basic: [] + - api_key: [] + /workspaces/{workspace}/projects/{project_key}/permissions-config/users/{selected_user_id}: + get: + tags: + - Projects + summary: Get an explicit user permission for a project + description: |- + Returns the explicit user permission for a given user and project. + + Only users with admin permission for the project may access this resource. + + Permissions can be: + + * `admin` + * `create-repo` + * `write` + * `read` + * `none` + + Example: + + ``` + $ curl 'https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/ + PRJ/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a' + + HTTP/1.1 200 + Location: 'https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/ + PRJ/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a' + + { + "type": "project_user_permission", + "user": { + "type": "user", + "display_name": "Colin Cameron", + "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}", + "account_id": "557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" + }, + "permission": "admin", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/ + PRJ/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" + } + } + } + ``` + # + parameters: + - name: project_key + in: path + description: | + The project in question. This is the actual key assigned to the project. + required: true + style: simple + explode: false + schema: + type: string + - name: selected_user_id + in: path + description: | + This can either be the username, the user's UUID surrounded by curly-braces, + for example: {account UUID}, or the user's Atlassian ID. + required: true + style: simple + explode: false + schema: + type: string + - name: workspace + in: path + description: | + This can either be the workspace ID (slug) or the workspace UUID + surrounded by curly-braces, for example: `{workspace UUID}`. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: Explicit user permission for user and project + content: + application/json: + schema: + $ref: '#/components/schemas/project_user_permission' + "401": + description: The user couldn't be authenticated. + content: + application/json: + schema: + $ref: '#/components/schemas/error' + "403": + description: The requesting user isn't an admin of the project. + content: + application/json: + schema: + $ref: '#/components/schemas/error' + "404": + description: "One or more of the workspace, project, and selected user doesn't\ + \ exist for the given identifiers or the requesting user is not authenticated" + content: + application/json: + schema: + $ref: '#/components/schemas/error' + security: + - oauth2: + - project:admin + - basic: [] + - api_key: [] + put: + tags: + - Projects + summary: Update an explicit user permission for a project + description: |- + Updates the explicit user permission for a given user and project. The selected + user must be a member of the workspace, and cannot be the workspace owner. + + Only users with admin permission for the project may access this resource. + + Due to security concerns, the JWT and OAuth authentication methods are unsupported. + This is to ensure integrations and add-ons are not allowed to change permissions. + + Permissions can be: + + * `admin` + * `create-repo` + * `write` + * `read` + + Example: + + ``` + $ curl -X PUT -H "Content-Type: application/json" + https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ + permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a + -d + { + "permission": "write" + } + + HTTP/1.1 200 + Location: + https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ + permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a + + + { + "type": "project_user_permission", + "user": { + "type": "user", + "display_name": "Colin Cameron", + "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}", + "account_id": "557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" + }, + "permission": "write", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ + permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" + } + } + } + ``` + parameters: + - name: project_key + in: path + description: | + The project in question. This is the actual key assigned to the project. + required: true + style: simple + explode: false + schema: + type: string + - name: selected_user_id + in: path + description: | + This can either be the username, the user's UUID surrounded by curly-braces, + for example: {account UUID}, or the user's Atlassian ID. + required: true + style: simple + explode: false + schema: + type: string + - name: workspace + in: path + description: | + This can either be the workspace ID (slug) or the workspace UUID + surrounded by curly-braces, for example: `{workspace UUID}`. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: Explicit user permission updated + content: + application/json: + schema: + $ref: '#/components/schemas/project_user_permission' + "400": + description: "No permission value was provided or the value is invalid (not\ + \ one of read, write, create-repo, or admin)" + content: + application/json: + schema: + $ref: '#/components/schemas/error' + "401": + description: The user couldn't be authenticated. + content: + application/json: + schema: + $ref: '#/components/schemas/error' + "402": + description: You have reached your plan's user limit and must upgrade before + giving access to additional users. + content: + application/json: + schema: + $ref: '#/components/schemas/error' + "403": + description: "The requesting user isn't an admin of the project, or the\ + \ authentication method was not via app password." + content: + application/json: + schema: + $ref: '#/components/schemas/error' + "404": + description: "One or more of the workspace, project, and selected user doesn't\ + \ exist for the given identifiers or the requesting user is not authenticated" + content: + application/json: + schema: + $ref: '#/components/schemas/error' + security: + - oauth2: + - project:admin + - basic: [] + - api_key: [] + delete: + tags: + - Projects + summary: Delete an explicit user permission for a project + description: |- + Deletes the project user permission between the requested project and user, if one exists. + + Only users with admin permission for the project may access this resource. + + Due to security concerns, the JWT and OAuth authentication methods are unsupported. + This is to ensure integrations and add-ons are not allowed to change permissions. + + ``` + $ curl -X DELETE https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ + permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a + + HTTP/1.1 204 + ``` + parameters: + - name: project_key + in: path + description: | + The project in question. This is the actual key assigned to the project. + required: true + style: simple + explode: false + schema: + type: string + - name: selected_user_id + in: path + description: | + This can either be the username, the user's UUID surrounded by curly-braces, + for example: {account UUID}, or the user's Atlassian ID. + required: true + style: simple + explode: false + schema: + type: string + - name: workspace + in: path + description: | + This can either be the workspace ID (slug) or the workspace UUID + surrounded by curly-braces, for example: `{workspace UUID}`. + required: true + style: simple + explode: false + schema: + type: string + responses: + "204": + description: The project user permission was deleted and no content returned. + content: {} + "401": + description: The user couldn't be authenticated. + content: + application/json: + schema: + $ref: '#/components/schemas/error' + "403": + description: "The requesting user isn't an admin of the project, or the\ + \ authentication method was not via app password." + content: + application/json: + schema: + $ref: '#/components/schemas/error' + "404": + description: "One or more of the workspace, project, and selected user doesn't\ + \ exist for the given identifiers or the requesting user is not authenticated" + content: + application/json: + schema: + $ref: '#/components/schemas/error' + security: + - oauth2: + - project:admin + - basic: [] + - api_key: [] + /workspaces/{workspace}/search/code: + get: + tags: + - Search + summary: Search for code in a workspace + description: | + Search for code in the repositories of the specified workspace. + + Searching across all repositories: + + ``` + curl 'https://api.bitbucket.org/2.0/workspaces/workspace_slug_or_uuid/search/code?search_query=foo' + { + "size": 1, + "page": 1, + "pagelen": 10, + "query_substituted": false, + "values": [ + { + "type": "code_search_result", + "content_match_count": 2, + "content_matches": [ + { + "lines": [ + { + "line": 2, + "segments": [] + }, + { + "line": 3, + "segments": [ + { + "text": "def " + }, + { + "text": "foo", + "match": true + }, + { + "text": "():" + } + ] + }, + { + "line": 4, + "segments": [ + { + "text": " print(\"snek\")" + } + ] + }, + { + "line": 5, + "segments": [] + } + ] + } + ], + "path_matches": [ + { + "text": "src/" + }, + { + "text": "foo", + "match": true + }, + { + "text": ".py" + } + ], + "file": { + "path": "src/foo.py", + "type": "commit_file", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py" + } + } + } + } + ] + } + ``` + + Note that searches can match in the file's text (`content_matches`), + the path (`path_matches`), or both as in the example above. + + You can use the same syntax for the search query as in the UI, e.g. + to only search within a specific repository: + + ``` + curl 'https://api.bitbucket.org/2.0/workspaces/my-workspace/search/code?search_query=foo+repo:demo' + # results from the "demo" repository + ``` + + Similar to other APIs, you can request more fields using a + `fields` query parameter. E.g. to get some more information about + the repository of matched files (the `%2B` is a URL-encoded `+`): + + ``` + curl 'https://api.bitbucket.org/2.0/workspaces/my-workspace/search/code'\ + '?search_query=foo&fields=%2Bvalues.file.commit.repository' + { + "size": 1, + "page": 1, + "pagelen": 10, + "query_substituted": false, + "values": [ + { + "type": "code_search_result", + "content_match_count": 1, + "content_matches": [...], + "path_matches": [...], + "file": { + "commit": { + "type": "commit", + "hash": "ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/my-workspace/demo/commit/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b" + }, + "html": { + "href": "https://bitbucket.org/my-workspace/demo/commits/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b" + } + }, + "repository": { + "name": "demo", + "type": "repository", + "full_name": "my-workspace/demo", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/my-workspace/demo" + }, + "html": { + "href": "https://bitbucket.org/my-workspace/demo" + }, + "avatar": { + "href": "https://bytebucket.org/ravatar/%7B850e1749-781a-4115-9316-df39d0600e7a%7D?ts=default" + } + }, + "uuid": "{850e1749-781a-4115-9316-df39d0600e7a}" + } + }, + "type": "commit_file", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py" + } + }, + "path": "src/foo.py" + } + } + ] + } + ``` + + Try `fields=%2Bvalues.*.*.*.*` to get an idea what's possible. + operationId: searchWorkspace + parameters: + - name: workspace + in: path + description: The workspace to search in; either the slug or the UUID in curly + braces + required: true + style: simple + explode: false + schema: + type: string + - name: search_query + in: query + description: The search query + required: true + style: form + explode: true + schema: + type: string + - name: page + in: query + description: Which page of the search results to retrieve + required: false + style: form + explode: true + schema: + type: integer + format: int32 + default: 1 + - name: pagelen + in: query + description: How many search results to retrieve per page + required: false + style: form + explode: true + schema: + type: integer + format: int32 + default: 10 + responses: + "200": + description: Successful search + content: + application/json: + schema: + $ref: '#/components/schemas/search_result_page' + "400": + description: | + If the search request was invalid due to one of the + following reasons: + + * the specified type of target account doesn''t match the actual + account type; + + * malformed pagination properties; + + * missing or malformed search query, in the latter case an error + key will be returned in `error.data.key` property. + content: + application/json: + schema: + $ref: '#/components/schemas/error' + "404": + description: "Search is not enabled for the requested workspace, navigate\ + \ to [https://bitbucket.org/search](https://bitbucket.org/search) to turn\ + \ it on" + content: + application/json: + schema: + $ref: '#/components/schemas/error' + "429": + description: "Too many requests, try again later" + content: + application/json: + schema: + $ref: '#/components/schemas/error' +components: + schemas: + account: + allOf: + - $ref: '#/components/schemas/object' + - title: Account + type: object + properties: + links: + $ref: '#/components/schemas/account_links' + created_on: + type: string + format: date-time + display_name: + type: string + username: + pattern: "^[a-zA-Z0-9_\\-]+$" + type: string + uuid: + type: string + additionalProperties: true + description: An account object. + account_links: + title: Account Links + type: object + properties: + avatar: + $ref: '#/components/schemas/link' + additionalProperties: true + description: Links related to an Account. + x-schema-name: account_links + app_user: + allOf: + - $ref: '#/components/schemas/account' + - title: App User + type: object + properties: + account_id: + type: string + description: The user's Atlassian account ID. + account_status: + type: string + description: "The status of the account. Currently the only possible value\ + \ is \"active\", but more values may be added in the future." + kind: + type: string + description: The kind of App User. + additionalProperties: true + description: An app user object. + application_property: + title: Application Property + type: object + properties: + _attributes: + type: array + items: + type: string + enum: + - public + - read_only + additionalProperties: true + description: "An application property. It is a caller defined JSON object that\ + \ Bitbucket will store and return. \nThe `_attributes` field at its top level\ + \ can be used to control who is allowed to read and update the property. \n\ + The keys of the JSON object must match an allowed pattern. For details, \n\ + see [Application properties](/cloud/bitbucket/application-properties/).\n" + example: + _attributes: + - public + - public + x-schema-name: application_property + author: + allOf: + - $ref: '#/components/schemas/object' + - title: Author + type: object + properties: + raw: + type: string + description: The raw author value from the repository. This may be the + only value available if the author does not match a user in Bitbucket. + user: + $ref: '#/components/schemas/account' + additionalProperties: true + description: The author of a change in a repository + base_commit: + allOf: + - $ref: '#/components/schemas/object' + - title: Base Commit + type: object + properties: + hash: + pattern: "[0-9a-f]{7,}?" + type: string + date: + type: string + format: date-time + author: + $ref: '#/components/schemas/author' + message: + type: string + summary: + type: object + additionalProperties: false + parents: + minItems: 0 + type: array + items: + $ref: '#/components/schemas/base_commit' + additionalProperties: true + description: The common base type for both repository and snippet commits. + branch: + allOf: + - $ref: '#/components/schemas/ref' + - title: Branch + type: object + properties: + merge_strategies: + type: array + description: Available merge strategies for pull requests targeting this + branch. + items: + type: string + enum: + - merge_commit + - squash + - fast_forward + default_merge_strategy: + type: string + description: The default merge strategy for pull requests targeting this + branch. + additionalProperties: true + description: "A branch object, representing a branch in a repository." + branching_model: + allOf: + - $ref: '#/components/schemas/object' + - title: Branching Model + type: object + properties: + branch_types: + maxItems: 4 + minItems: 0 + uniqueItems: true + type: array + description: The active branch types. + items: + type: object + additionalProperties: false + development: + type: object + additionalProperties: false + production: + type: object + additionalProperties: false + additionalProperties: true + description: A repository's branching model + branching_model_settings: + allOf: + - $ref: '#/components/schemas/object' + - title: Branching Model Settings + type: object + properties: + links: + type: object + additionalProperties: false + branch_types: + maxItems: 4 + minItems: 0 + uniqueItems: true + type: array + items: + type: object + additionalProperties: false + development: + type: object + additionalProperties: false + production: + type: object + additionalProperties: false + additionalProperties: true + description: A repository's branching model settings + branchrestriction: + allOf: + - $ref: '#/components/schemas/object' + - title: Branch Restriction + type: object + properties: + users: + minItems: 0 + type: array + items: + $ref: '#/components/schemas/account' + groups: + minItems: 0 + type: array + items: + $ref: '#/components/schemas/group' + additionalProperties: true + description: A branch restriction rule. + comment: + allOf: + - $ref: '#/components/schemas/object' + - title: Comment + type: object + properties: + id: + type: integer + created_on: + type: string + format: date-time + updated_on: + type: string + format: date-time + content: + type: object + additionalProperties: false + user: + $ref: '#/components/schemas/account' + deleted: + type: boolean + parent: + $ref: '#/components/schemas/comment' + inline: + type: object + additionalProperties: false + links: + type: object + additionalProperties: false + additionalProperties: true + description: The base type for all comments. This type should be considered + abstract. Each of the "commentable" resources defines its own subtypes (e.g. + `issue_comment`). + comment_resolution: + title: Comment Resolution + required: + - type + type: object + properties: + type: + type: string + user: + $ref: '#/components/schemas/account' + created_on: + type: string + description: The ISO8601 timestamp the resolution was created. + format: date-time + additionalProperties: true + description: The resolution object for a Comment. example: - uri: http://example.com/aeiou - pipeline_target: + created_on: 2000-01-23T04:56:07.000+00:00 + type: type + user: "" + x-schema-name: comment_resolution + commit: allOf: - - $ref: '#/components/schemas/object' - - title: Pipeline Target + - $ref: '#/components/schemas/base_commit' + - title: Commit type: object - description: A representation of the target that a pipeline executes on. - pipeline_ref_target: + properties: + repository: + $ref: '#/components/schemas/repository' + participants: + minItems: 0 + type: array + items: + $ref: '#/components/schemas/participant' + additionalProperties: true + description: A repository commit object. + commit_comment: allOf: - - $ref: '#/components/schemas/pipeline_target' - - title: Pipeline Ref Target + - $ref: '#/components/schemas/comment' + - title: Commit Comment type: object properties: - ref_type: + commit: + $ref: '#/components/schemas/commit' + additionalProperties: true + description: A commit comment. + commit_file: + title: Commit File + required: + - type + type: object + properties: + type: + type: string + path: + type: string + description: The path in the repository + commit: + $ref: '#/components/schemas/commit' + attributes: + type: string + enum: + - link + - executable + - subrepository + - binary + - lfs + escaped_path: + type: string + description: The escaped version of the path as it appears in a diff. If + the path does not require escaping this will be the same as path. + additionalProperties: true + description: "A file object, representing a file at a commit in a repository" + example: + path: path + escaped_path: escaped_path + commit: "" + attributes: link + type: type + x-schema-name: commit_file + commitstatus: + allOf: + - $ref: '#/components/schemas/object' + - title: Commit Status + type: object + properties: + links: + type: object + additionalProperties: false + uuid: type: string - description: The type of reference (branch/tag). + description: The commit status' id. + key: + type: string + description: |- + An identifier for the status that's unique to + its type (current "build" is the only supported type) and the vendor, + e.g. BB-DEPLOY + refname: + type: string + description: |2- + + The name of the ref that pointed to this commit at the time the status + object was created. Note that this the ref may since have moved off of + the commit. This optional field can be useful for build systems whose + build triggers and configuration are branch-dependent (e.g. a Pipeline + build). + It is legitimate for this field to not be set, or even apply (e.g. a + static linting job). + url: + type: string + description: "A URL linking back to the vendor or build system, for providing\ + \ more information about whatever process produced this status. Accepts\ + \ context variables `repository` and `commit` that Bitbucket will evaluate\ + \ at runtime whenever at runtime. For example, one could use https://foo.com/builds/{repository.full_name}\ + \ which Bitbucket will turn into https://foo.com/builds/foo/bar at render\ + \ time." + state: + type: string + description: Provides some indication of the status of this commit enum: - - branch - - tag - - named_branch - - bookmark - ref_name: + - INPROGRESS + - FAILED + - SUCCESSFUL + - STOPPED + name: type: string - description: The name of the reference. - commit: - $ref: '#/components/schemas/commit' - selector: - $ref: '#/components/schemas/pipeline_selector' - description: A Bitbucket Pipelines reference target. - pipeline_commit_target: + description: "An identifier for the build itself, e.g. BB-DEPLOY-1" + description: + type: string + description: A description of the build (e.g. "Unit tests in Bamboo") + created_on: + type: string + format: date-time + updated_on: + type: string + format: date-time + additionalProperties: true + description: A commit status object. + component: allOf: - - $ref: '#/components/schemas/pipeline_target' - - title: Pipeline Commit Target + - $ref: '#/components/schemas/object' + - title: Component type: object properties: - commit: - $ref: '#/components/schemas/commit' - selector: - $ref: '#/components/schemas/pipeline_selector' - description: A Bitbucket Pipelines commit target. - pipeline_selector: + links: + type: object + additionalProperties: false + name: + type: string + id: + type: integer + additionalProperties: true + description: A component as defined in a repository's issue tracker. + ddev_report: + allOf: + - $ref: '#/components/schemas/object' + - type: object + additionalProperties: true + description: A report for a commit. + x-bb-default-fields: + - uuid + - commitHash + x-bb-url: "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/commits/{commitHash}/reports/{uuid}" + default_reviewer_and_type: + title: Default Reviewer and Type + required: + - type + type: object + properties: + type: + type: string + reviewer_type: + type: string + user: + $ref: '#/components/schemas/user' + additionalProperties: true + description: Object containing a user that is a default reviewer and the type + of reviewer + example: + reviewer_type: reviewer_type + type: type + user: "" + x-schema-name: default_reviewer_and_type + deploy_key: + allOf: + - $ref: '#/components/schemas/object' + - title: Deploy Key + type: object + properties: + key: + type: string + description: The deploy key value. + repository: + $ref: '#/components/schemas/repository' + comment: + type: string + description: The comment parsed from the deploy key (if present) + label: + type: string + description: The user-defined label for the deploy key + added_on: + type: string + format: date-time + last_used: + type: string + format: date-time + links: + type: object + additionalProperties: false + owner: + $ref: '#/components/schemas/account' + additionalProperties: true + description: Represents deploy key for a repository. + deployment: + allOf: + - $ref: '#/components/schemas/object' + - title: Deployment + type: object + properties: + uuid: + type: string + description: The UUID identifying the deployment. + state: + $ref: '#/components/schemas/deployment_state' + environment: + $ref: '#/components/schemas/deployment_environment' + release: + $ref: '#/components/schemas/deployment_release' + additionalProperties: true + description: A Bitbucket Deployment. + deployment_environment: + allOf: + - $ref: '#/components/schemas/object' + - title: Deployment Environment + type: object + properties: + uuid: + type: string + description: The UUID identifying the environment. + name: + type: string + description: The name of the environment. + additionalProperties: true + description: A Bitbucket Deployment Environment. + x-bb-default-fields: + - uuid + x-bb-url: "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments/{uuid}" + x-bb-batch-url: "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments_batch" + x-bb-batch-max-size: 100 + deployment_environment_lock: + allOf: + - $ref: '#/components/schemas/object' + - title: Deployment Environment Lock + type: object + properties: + environmentUuid: + type: string + description: The UUID identifying the environment. + additionalProperties: true + description: A Bitbucket Deployment Environment Lock. + x-bb-default-fields: + - '*' + - lock_opener.* + - owner.* + x-bb-batch-url: "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments/locks_batch" + x-bb-batch-max-size: 100 + deployment_release: allOf: - $ref: '#/components/schemas/object' - - title: Pipeline Selector + - title: Deployment Release type: object properties: - type: + uuid: type: string - description: The type of selector. - enum: - - branches - - tags - - bookmarks - - default - - custom - pattern: + description: The UUID identifying the release. + name: type: string - description: The name of the matching pipeline definition. - description: A representation of the selector that was used to identify the - pipeline in the YML file. - pipeline_trigger: + description: The name of the release. + url: + type: string + description: Link to the pipeline that produced the release. + format: uri + commit: + $ref: '#/components/schemas/commit' + created_on: + type: string + description: The timestamp when the release was created. + format: date-time + additionalProperties: true + description: A Bitbucket Deployment Release. + deployment_state: allOf: - $ref: '#/components/schemas/object' - - title: Pipeline Trigger - type: object - description: A representation of the trigger used for a pipeline. - pipeline_trigger_push: - allOf: - - $ref: '#/components/schemas/pipeline_trigger' - - title: Pipeline Push Trigger + - title: Deployment State type: object - description: A Bitbucket Pipelines PUSH trigger. - pipeline_trigger_manual: + additionalProperties: true + description: The representation of the progress state of a deployment. + deployment_state_completed: allOf: - - $ref: '#/components/schemas/pipeline_trigger' - - title: Pipeline Manual Trigger - type: object - description: A Bitbucket Pipelines MANUAL trigger. - pipeline_state: + - $ref: '#/components/schemas/deployment_state' + - type: object + properties: + name: + type: string + description: The name of deployment state (COMPLETED). + enum: + - COMPLETED + url: + type: string + description: Link to the deployment result. + format: uri + deployer: + $ref: '#/components/schemas/account' + status: + $ref: '#/components/schemas/deployment_state_completed_status' + start_date: + type: string + description: The timestamp when the deployment was started. + format: date-time + completion_date: + type: string + description: The timestamp when the deployment completed. + format: date-time + additionalProperties: true + description: A Bitbucket Deployment COMPLETED deployment state. + deployment_state_completed_status: allOf: - $ref: '#/components/schemas/object' - - title: Pipeline State + - title: Completed Deployment type: object - description: The representation of the progress state of a pipeline. - pipeline_state_pending: + additionalProperties: true + description: The status of a completed deployment. + deployment_state_completed_status_failed: allOf: - - $ref: '#/components/schemas/pipeline_state' - - title: Pipeline Pending State - type: object + - $ref: '#/components/schemas/deployment_state_completed_status' + - type: object properties: name: type: string - description: The name of pipeline state (PENDING). + description: The name of the completed deployment status (FAILED). enum: - - PENDING - description: A Bitbucket Pipelines PENDING pipeline state. - pipeline_state_in_progress: + - FAILED + additionalProperties: true + description: A FAILED completed deployment status. + deployment_state_completed_status_stopped: allOf: - - $ref: '#/components/schemas/pipeline_state' - - title: Pipeline In-Progress State - type: object + - $ref: '#/components/schemas/deployment_state_completed_status' + - type: object properties: name: type: string - description: The name of pipeline state (IN_PROGRESS). + description: The name of the completed deployment status (STOPPED). enum: - - IN_PROGRESS - stage: - $ref: '#/components/schemas/pipeline_state_in_progress_stage' - description: A Bitbucket Pipelines IN_PROGRESS pipeline state. - pipeline_state_in_progress_stage: + - STOPPED + additionalProperties: true + description: A STOPPED completed deployment status. + deployment_state_completed_status_successful: allOf: - - $ref: '#/components/schemas/object' - - title: Pipeline In-Progress Stage - type: object - description: A result of an in progress pipeline state. - pipeline_state_in_progress_running: + - $ref: '#/components/schemas/deployment_state_completed_status' + - type: object + properties: + name: + type: string + description: The name of the completed deployment status (SUCCESSFUL). + enum: + - SUCCESSFUL + additionalProperties: true + description: A SUCCESSFUL completed deployment status. + deployment_state_in_progress: allOf: - - $ref: '#/components/schemas/pipeline_state_in_progress_stage' + - $ref: '#/components/schemas/deployment_state' - type: object properties: name: type: string - description: The name of the stage (RUNNING) + description: The name of deployment state (IN_PROGRESS). enum: - - RUNNING - description: A Bitbucket Pipelines RUNNING stage of a pipeline that is in - progress. - pipeline_state_in_progress_paused: + - IN_PROGRESS + url: + type: string + description: Link to the deployment result. + format: uri + deployer: + $ref: '#/components/schemas/account' + start_date: + type: string + description: The timestamp when the deployment was started. + format: date-time + additionalProperties: true + description: A Bitbucket Deployment IN_PROGRESS deployment state. + deployment_state_undeployed: allOf: - - $ref: '#/components/schemas/pipeline_state_in_progress_stage' + - $ref: '#/components/schemas/deployment_state' - type: object properties: name: type: string - description: The name of the stage (PAUSED) + description: The name of deployment state (UNDEPLOYED). enum: - - PAUSED - description: A Bitbucket Pipelines PAUSED stage of a pipeline that is in progress. - pipeline_state_completed: + - UNDEPLOYED + trigger_url: + type: string + description: Link to trigger the deployment. + format: uri + additionalProperties: true + description: A Bitbucket Deployment UNDEPLOYED deployment state. + deployment_variable: allOf: - - $ref: '#/components/schemas/pipeline_state' - - title: Pipeline Completed State + - $ref: '#/components/schemas/object' + - title: Deployment Variable + type: object + properties: + uuid: + type: string + description: The UUID identifying the variable. + key: + type: string + description: The unique name of the variable. + value: + type: string + description: "The value of the variable. If the variable is secured, this\ + \ will be empty." + secured: + type: boolean + description: "If true, this variable will be treated as secured. The value\ + \ will never be exposed in the logs or the REST API." + additionalProperties: true + description: A Pipelines deployment variable. + deployments_ddev_deployment_environment: + allOf: + - $ref: '#/components/schemas/object' + - title: Deployment Environment type: object properties: + uuid: + type: string + description: The UUID identifying the environment. name: type: string - description: The name of pipeline state (COMPLETED). - enum: - - COMPLETED - result: - $ref: '#/components/schemas/pipeline_state_completed_result' - description: A Bitbucket Pipelines COMPLETED pipeline state. - pipeline_state_completed_result: + description: The name of the environment. + additionalProperties: true + description: A Bitbucket Deployment Environment. + x-bb-default-fields: + - uuid + x-bb-url: "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments/{uuid}" + x-bb-batch-url: "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments_batch" + x-bb-batch-max-size: 100 + deployments_ddev_deployment_environment_lock: + allOf: + - $ref: '#/components/schemas/object' + - title: Deployment Environment Lock + type: object + properties: + environmentUuid: + type: string + description: The UUID identifying the environment. + additionalProperties: true + description: A Bitbucket Deployment Environment Lock. + x-bb-default-fields: + - '*' + - lock_opener.* + - owner.* + x-bb-batch-url: "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments/locks_batch" + x-bb-batch-max-size: 100 + deployments_ddev_paginated_environments: + title: Paginated Deployment Environments + type: object + properties: + page: + type: integer + description: Page number of the current results. This is an optional element + that is not provided in all responses. + values: + minItems: 0 + type: array + description: The values of the current page. + items: + $ref: '#/components/schemas/deployments_ddev_deployment_environment' + size: + type: integer + description: "Total number of objects in the response. This is an optional\ + \ element that is not provided in all responses, as it can be expensive\ + \ to compute." + pagelen: + type: integer + description: Current number of objects on the existing page. The default + value is 10 with 100 being the maximum allowed value. Individual APIs + may enforce different values. + next: + type: string + description: Link to the next page if it exists. The last page of a collection + does not have this value. Use this link to navigate the result set and + refrain from constructing your own URLs. + format: uri + previous: + type: string + description: Link to previous page if it exists. A collections first page + does not have this value. This is an optional element that is not provided + in all responses. Some result sets strictly support forward navigation + and never provide previous links. Clients must anticipate that backwards + navigation is not always available. Use this link to navigate the result + set and refrain from constructing your own URLs. + format: uri + description: A paged list of environments + deployments_stg_west_deployment_environment: allOf: - $ref: '#/components/schemas/object' - - title: Pipeline Completed Result - type: object - description: A result of a completed pipeline state. - pipeline_state_completed_error: - allOf: - - $ref: '#/components/schemas/pipeline_state_completed_result' - - title: Pipeline Completed Error + - title: Deployment Environment type: object properties: - name: + uuid: type: string - description: The name of the result (ERROR) - enum: - - ERROR - error: - $ref: '#/components/schemas/pipeline_error' - description: A Bitbucket Pipelines ERROR pipeline result. - pipeline_state_completed_failed: - allOf: - - $ref: '#/components/schemas/pipeline_state_completed_result' - - type: object - properties: + description: The UUID identifying the environment. name: type: string - description: The name of the failed result (FAILED). - enum: - - FAILED - description: A Bitbucket Pipelines FAILED pipeline result. - pipeline_state_completed_stopped: + description: The name of the environment. + additionalProperties: true + description: A Bitbucket Deployment Environment. + x-bb-default-fields: + - uuid + x-bb-url: "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments/{uuid}" + x-bb-batch-url: "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments_batch" + x-bb-batch-max-size: 100 + deployments_stg_west_deployment_environment_lock: allOf: - - $ref: '#/components/schemas/pipeline_state_completed_result' - - type: object + - $ref: '#/components/schemas/object' + - title: Deployment Environment Lock + type: object properties: - name: + environmentUuid: type: string - description: The name of the stopped result (STOPPED). - enum: - - STOPPED - description: A Bitbucket Pipelines STOPPED pipeline result. - pipeline_state_completed_expired: + description: The UUID identifying the environment. + additionalProperties: true + description: A Bitbucket Deployment Environment Lock. + x-bb-default-fields: + - '*' + - lock_opener.* + - owner.* + x-bb-batch-url: "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments/locks_batch" + x-bb-batch-max-size: 100 + deployments_stg_west_paginated_environments: + title: Paginated Deployment Environments + type: object + properties: + page: + type: integer + description: Page number of the current results. This is an optional element + that is not provided in all responses. + values: + minItems: 0 + type: array + description: The values of the current page. + items: + $ref: '#/components/schemas/deployments_stg_west_deployment_environment' + size: + type: integer + description: "Total number of objects in the response. This is an optional\ + \ element that is not provided in all responses, as it can be expensive\ + \ to compute." + pagelen: + type: integer + description: Current number of objects on the existing page. The default + value is 10 with 100 being the maximum allowed value. Individual APIs + may enforce different values. + next: + type: string + description: Link to the next page if it exists. The last page of a collection + does not have this value. Use this link to navigate the result set and + refrain from constructing your own URLs. + format: uri + previous: + type: string + description: Link to previous page if it exists. A collections first page + does not have this value. This is an optional element that is not provided + in all responses. Some result sets strictly support forward navigation + and never provide previous links. Clients must anticipate that backwards + navigation is not always available. Use this link to navigate the result + set and refrain from constructing your own URLs. + format: uri + description: A paged list of environments + diffstat: + title: Diff Stat + required: + - type + type: object + properties: + type: + type: string + status: + type: string + enum: + - added + - removed + - modified + - renamed + lines_added: + type: integer + lines_removed: + type: integer + old: + $ref: '#/components/schemas/commit_file' + new: + $ref: '#/components/schemas/commit_file' + additionalProperties: true + description: A diffstat object that includes a summary of changes made to a + file between two commits. + example: + new: null + lines_removed: 5 + old: + path: path + escaped_path: escaped_path + commit: "" + attributes: link + type: type + lines_added: 5 + type: type + status: added + x-schema-name: diffstat + effective_repo_branching_model: allOf: - - $ref: '#/components/schemas/pipeline_state_completed_result' - - type: object + - $ref: '#/components/schemas/object' + - title: Effective Repository Branching Model + type: object properties: - name: - type: string - description: The name of the stopped result (EXPIRED). - enum: - - EXPIRED - description: A Bitbucket Pipelines EXPIRED pipeline result. - pipeline_state_completed_successful: + branch_types: + maxItems: 4 + minItems: 0 + uniqueItems: true + type: array + description: The active branch types. + items: + type: object + additionalProperties: false + development: + type: object + additionalProperties: false + production: + type: object + additionalProperties: false + additionalProperties: true + description: A repository's effective branching model + error: + title: Error + required: + - type + type: object + properties: + type: + type: string + error: + type: object + additionalProperties: false + additionalProperties: true + description: Base type for most resource objects. It defines the common `type` + element that identifies an object's type. It also identifies the element as + Swagger's `discriminator`. + example: + type: type + error: {} + x-schema-name: error + export_options: + title: Export Options + required: + - type + type: object + properties: + type: + type: string + project_key: + type: string + project_name: + type: string + send_email: + type: boolean + include_attachments: + type: boolean + additionalProperties: true + description: Options for issue export. + group: allOf: - - $ref: '#/components/schemas/pipeline_state_completed_result' - - type: object + - $ref: '#/components/schemas/object' + - title: Group + type: object properties: + links: + type: object + additionalProperties: false + owner: + $ref: '#/components/schemas/account' + workspace: + $ref: '#/components/schemas/workspace' name: type: string - description: The name of the successful result (SUCCESSFUL). - enum: - - SUCCESSFUL - description: A Bitbucket Pipelines SUCCESSFUL pipeline result. - pipeline_error: + slug: + type: string + description: |- + The "sluggified" version of the group's name. This contains only ASCII + characters and can therefore be slightly different than the name + full_slug: + type: string + description: | + The concatenation of the workspace's slug and the group's slug, + separated with a colon (e.g. `acme:developers`) + additionalProperties: true + description: A group object + hook_event: + title: Hook Event + type: object + properties: + event: + type: string + description: The event identifier. + enum: + - repo:fork + - issue:created + - pullrequest:updated + - repo:transfer + - pullrequest:fulfilled + - pullrequest:changes_request_removed + - pullrequest:comment_updated + - repo:created + - pullrequest:rejected + - repo:commit_status_created + - pullrequest:unapproved + - repo:commit_comment_created + - pullrequest:comment_reopened + - project:updated + - repo:push + - pullrequest:comment_resolved + - pullrequest:comment_created + - repo:updated + - repo:imported + - repo:commit_status_updated + - pullrequest:changes_request_created + - pullrequest:comment_deleted + - pullrequest:created + - issue:comment_created + - pullrequest:approved + - repo:deleted + - issue:updated + category: + type: string + description: The category this event belongs to. + label: + type: string + description: Summary of the webhook event type. + description: + type: string + description: More detailed description of the webhook event type. + additionalProperties: false + description: "An event, associated with a resource or subject type." + example: + description: description + label: label + event: repo:fork + category: category + issue: allOf: - $ref: '#/components/schemas/object' - - title: Pipeline Error + - title: Issue type: object properties: - key: + links: + type: object + additionalProperties: false + id: + type: integer + repository: + $ref: '#/components/schemas/repository' + title: type: string - description: The error key. - message: + reporter: + $ref: '#/components/schemas/account' + assignee: + $ref: '#/components/schemas/account' + created_on: type: string - description: The error message. - description: An error causing a pipeline failure. - pipeline_ssh_public_key: - allOf: - - $ref: '#/components/schemas/object' - - title: Pipeline SSH Public Key - type: object - properties: - key_type: + format: date-time + updated_on: type: string - description: The type of the public key. - key: + format: date-time + edited_on: type: string - description: The base64 encoded public key. - md5_fingerprint: + format: date-time + state: type: string - description: The MD5 fingerprint of the public key. - sha256_fingerprint: + enum: + - submitted + - new + - open + - resolved + - on hold + - invalid + - duplicate + - wontfix + - closed + kind: type: string - description: The SHA-256 fingerprint of the public key. - description: A Pipelines known host public key. - pipeline_known_host: + enum: + - bug + - enhancement + - proposal + - task + priority: + type: string + enum: + - trivial + - minor + - major + - critical + - blocker + milestone: + $ref: '#/components/schemas/milestone' + version: + $ref: '#/components/schemas/version' + component: + $ref: '#/components/schemas/component' + votes: + type: integer + content: + type: object + additionalProperties: false + additionalProperties: true + description: An issue. + issue_attachment: allOf: - $ref: '#/components/schemas/object' - - title: Pipeline Known Host + - title: Issue Attachment type: object properties: - uuid: - type: string - description: The UUID identifying the known host. - hostname: + links: + type: object + additionalProperties: false + name: type: string - description: The hostname of the known host. - public_key: - $ref: '#/components/schemas/pipeline_ssh_public_key' - description: A Pipelines known host. - pipeline_ssh_key_pair: + additionalProperties: true + description: An issue file attachment's meta data. Note this does not contain + the file's actual contents. + issue_change: + title: Issue Change + required: + - type + type: object + properties: + type: + type: string + links: + type: object + additionalProperties: false + name: + type: string + created_on: + type: string + format: date-time + user: + $ref: '#/components/schemas/account' + issue: + $ref: '#/components/schemas/issue' + changes: + type: object + additionalProperties: false + message: + type: object + additionalProperties: false + additionalProperties: true + description: An issue change. + example: + issue: "" + created_on: 2000-01-23T04:56:07.000+00:00 + name: name + changes: {} + links: {} + type: type + message: {} + user: "" + x-schema-name: issue_change + issue_comment: allOf: - - $ref: '#/components/schemas/object' - - title: Pipeline SSH Key Pair + - $ref: '#/components/schemas/comment' + - title: Issue Comment type: object properties: - private_key: - type: string - description: The SSH private key. This value will be empty when retrieving - the SSH key pair. - public_key: - type: string - description: The SSH public key. - description: A Pipelines SSH key pair. - pipeline_schedule: + issue: + $ref: '#/components/schemas/issue' + additionalProperties: true + description: A issue comment. + issue_job_status: + title: Issue Job Status + type: object + properties: + type: + type: string + status: + type: string + description: The status of the import/export job + enum: + - ACCEPTED + - STARTED + - RUNNING + - FAILURE + phase: + type: string + description: The phase of the import/export job + total: + type: integer + description: The total number of issues being imported/exported + count: + type: integer + description: The total number of issues already imported/exported + pct: + maximum: 100 + minimum: 0 + type: number + description: The percentage of issues already imported/exported + additionalProperties: false + description: The status of an import or export job + example: + phase: phase + pct: 14.658129805029452 + total: 0 + count: 6 + type: type + status: ACCEPTED + jira_project: allOf: - $ref: '#/components/schemas/object' - - title: Pipeline Schedule + - type: object + additionalProperties: true + description: A Jira Project. + x-bb-default-fields: + - type + - cloudId + - id + x-bb-detail-fields: + - key + - name + - url + - avatarUrls.* + - site + x-bb-url: "/api/{target_user.uuid}/jira/sites/{cloudId}/projects/{id}?atlassian_account_id={user.account_id}" + jira_site: + allOf: + - $ref: '#/components/schemas/object' + - type: object + additionalProperties: true + description: A Jira Site. + x-bb-default-fields: + - type + - cloudId + - cloudUrl + - cloudName + x-bb-detail-fields: + - connected + x-bb-url: "/api/{target_user.uuid}/jira/sites/{cloudId}?atlassian_account_id={user.account_id}" + link: + title: Link + type: object + properties: + href: + type: string + format: uri + name: + type: string + additionalProperties: false + description: A link to a resource related to this object. + milestone: + allOf: + - $ref: '#/components/schemas/object' + - title: Milestone type: object properties: - uuid: - type: string - description: The UUID identifying the schedule. - enabled: - type: boolean - description: Whether the schedule is enabled. - target: - $ref: '#/components/schemas/pipeline_target' - selector: - $ref: '#/components/schemas/pipeline_selector' - cron_pattern: - type: string - description: The cron expression that the schedule applies. - created_on: - type: string - description: The timestamp when the schedule was created. - format: date-time - updated_on: + links: + type: object + additionalProperties: false + name: type: string - description: The timestamp when the schedule was updated. - format: date-time - description: A Pipelines schedule. - paginated_pipeline_schedules: - title: Paginated Pipeline Schedule + id: + type: integer + additionalProperties: true + description: A milestone as defined in a repository's issue tracker. + object: + required: + - type + type: object + properties: + type: + type: string + additionalProperties: true + description: Base type for most resource objects. It defines the common `type` + element that identifies an object's type. It also identifies the element as + Swagger's `discriminator`. + discriminator: + propertyName: type + x-schema-name: object + page: + title: Page + type: object + properties: + size: + minimum: 0 + type: integer + description: "Total number of objects in the response. This is an optional\ + \ element that is not provided in all responses, as it can be expensive\ + \ to compute." + page: + minimum: 1 + type: integer + description: Page number of the current results. This is an optional element + that is not provided in all responses. + pagelen: + minimum: 1 + type: integer + description: Current number of objects on the existing page. The default + value is 10 with 100 being the maximum allowed value. Individual APIs + may enforce different values. + next: + type: string + description: Link to the next page if it exists. The last page of a collection + does not have this value. Use this link to navigate the result set and + refrain from constructing your own URLs. + format: uri + previous: + type: string + description: Link to previous page if it exists. A collections first page + does not have this value. This is an optional element that is not provided + in all responses. Some result sets strictly support forward navigation + and never provide previous links. Clients must anticipate that backwards + navigation is not always available. Use this link to navigate the result + set and refrain from constructing your own URLs. + format: uri + additionalProperties: false + paginated_accounts: + title: Paginated Accounts + type: object + properties: + size: + minimum: 0 + type: integer + description: "Total number of objects in the response. This is an optional\ + \ element that is not provided in all responses, as it can be expensive\ + \ to compute." + page: + minimum: 1 + type: integer + description: Page number of the current results. This is an optional element + that is not provided in all responses. + pagelen: + minimum: 1 + type: integer + description: Current number of objects on the existing page. The default + value is 10 with 100 being the maximum allowed value. Individual APIs + may enforce different values. + next: + type: string + description: Link to the next page if it exists. The last page of a collection + does not have this value. Use this link to navigate the result set and + refrain from constructing your own URLs. + format: uri + previous: + type: string + description: Link to previous page if it exists. A collections first page + does not have this value. This is an optional element that is not provided + in all responses. Some result sets strictly support forward navigation + and never provide previous links. Clients must anticipate that backwards + navigation is not always available. Use this link to navigate the result + set and refrain from constructing your own URLs. + format: uri + values: + minItems: 0 + uniqueItems: true + type: array + items: + $ref: '#/components/schemas/account' + additionalProperties: false + description: A paginated list of accounts. + example: + next: http://example.com/aeiou + size: 0 + previous: http://example.com/aeiou + values: + - "" + - "" + page: 1 + pagelen: 1 + paginated_annotations: + title: Paginated Annotations type: object properties: page: @@ -23399,7 +25122,7 @@ components: type: array description: The values of the current page. items: - $ref: '#/components/schemas/pipeline_schedule' + $ref: '#/components/schemas/report_annotation' size: type: integer description: "Total number of objects in the response. This is an optional\ @@ -23425,7 +25148,7 @@ components: navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri - description: A paged list of schedules + description: A paginated list of annotations. example: next: http://example.com/aeiou size: 6 @@ -23435,48 +25158,182 @@ components: - "" page: 0 pagelen: 1 - pipeline_schedule_execution: - allOf: - - $ref: '#/components/schemas/object' - - title: Pipeline Schedule Execution - type: object - description: A Pipelines schedule execution. - pipeline_schedule_execution_executed: - allOf: - - $ref: '#/components/schemas/pipeline_schedule_execution' - - type: object - properties: - pipeline: - $ref: '#/components/schemas/pipeline' - description: A Pipelines executed schedule execution. - pipeline_schedule_execution_errored: - allOf: - - $ref: '#/components/schemas/pipeline_schedule_execution' - - type: object - properties: - error: - $ref: '#/components/schemas/pipeline_error' - description: A Pipelines schedule execution that failed to be executed. - paginated_pipeline_schedule_executions: - title: Paginated Pipeline Schedule Executions + paginated_branches: + title: Paginated Branches + type: object + properties: + size: + minimum: 0 + type: integer + description: "Total number of objects in the response. This is an optional\ + \ element that is not provided in all responses, as it can be expensive\ + \ to compute." + page: + minimum: 1 + type: integer + description: Page number of the current results. This is an optional element + that is not provided in all responses. + pagelen: + minimum: 1 + type: integer + description: Current number of objects on the existing page. The default + value is 10 with 100 being the maximum allowed value. Individual APIs + may enforce different values. + next: + type: string + description: Link to the next page if it exists. The last page of a collection + does not have this value. Use this link to navigate the result set and + refrain from constructing your own URLs. + format: uri + previous: + type: string + description: Link to previous page if it exists. A collections first page + does not have this value. This is an optional element that is not provided + in all responses. Some result sets strictly support forward navigation + and never provide previous links. Clients must anticipate that backwards + navigation is not always available. Use this link to navigate the result + set and refrain from constructing your own URLs. + format: uri + values: + minItems: 0 + uniqueItems: true + type: array + items: + $ref: '#/components/schemas/branch' + additionalProperties: false + description: A paginated list of branches. + example: + next: http://example.com/aeiou + size: 0 + previous: http://example.com/aeiou + values: + - "" + - "" + page: 1 + pagelen: 1 + paginated_branchrestrictions: + title: Paginated Branch Restrictions + type: object + properties: + size: + minimum: 0 + type: integer + description: "Total number of objects in the response. This is an optional\ + \ element that is not provided in all responses, as it can be expensive\ + \ to compute." + page: + minimum: 1 + type: integer + description: Page number of the current results. This is an optional element + that is not provided in all responses. + pagelen: + minimum: 1 + type: integer + description: Current number of objects on the existing page. The default + value is 10 with 100 being the maximum allowed value. Individual APIs + may enforce different values. + next: + type: string + description: Link to the next page if it exists. The last page of a collection + does not have this value. Use this link to navigate the result set and + refrain from constructing your own URLs. + format: uri + previous: + type: string + description: Link to previous page if it exists. A collections first page + does not have this value. This is an optional element that is not provided + in all responses. Some result sets strictly support forward navigation + and never provide previous links. Clients must anticipate that backwards + navigation is not always available. Use this link to navigate the result + set and refrain from constructing your own URLs. + format: uri + values: + minItems: 0 + uniqueItems: true + type: array + items: + $ref: '#/components/schemas/branchrestriction' + additionalProperties: false + description: A paginated list of branch restriction rules. + example: + next: http://example.com/aeiou + size: 0 + previous: http://example.com/aeiou + values: + - "" + - "" + page: 1 + pagelen: 1 + paginated_changeset: + title: Page type: object properties: + size: + minimum: 0 + type: integer + description: "Total number of objects in the response. This is an optional\ + \ element that is not provided in all responses, as it can be expensive\ + \ to compute." page: + minimum: 1 type: integer description: Page number of the current results. This is an optional element that is not provided in all responses. + pagelen: + minimum: 1 + type: integer + description: Current number of objects on the existing page. The default + value is 10 with 100 being the maximum allowed value. Individual APIs + may enforce different values. + next: + type: string + description: Link to the next page if it exists. The last page of a collection + does not have this value. Use this link to navigate the result set and + refrain from constructing your own URLs. + format: uri + previous: + type: string + description: Link to previous page if it exists. A collections first page + does not have this value. This is an optional element that is not provided + in all responses. Some result sets strictly support forward navigation + and never provide previous links. Clients must anticipate that backwards + navigation is not always available. Use this link to navigate the result + set and refrain from constructing your own URLs. + format: uri values: minItems: 0 + uniqueItems: true type: array - description: The values of the current page. items: - $ref: '#/components/schemas/pipeline_schedule_execution' + $ref: '#/components/schemas/base_commit' + additionalProperties: false + description: A paginated list of commits. + example: + next: http://example.com/aeiou + size: 0 + previous: http://example.com/aeiou + values: + - "" + - "" + page: 1 + pagelen: 1 + paginated_commit_comments: + title: Paginated Commit Comments + type: object + properties: size: + minimum: 0 type: integer description: "Total number of objects in the response. This is an optional\ \ element that is not provided in all responses, as it can be expensive\ \ to compute." + page: + minimum: 1 + type: integer + description: Page number of the current results. This is an optional element + that is not provided in all responses. pagelen: + minimum: 1 type: integer description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs @@ -23496,282 +25353,203 @@ components: navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri - description: A paged list of the executions of a schedule. + values: + minItems: 0 + uniqueItems: true + type: array + items: + $ref: '#/components/schemas/commit_comment' + additionalProperties: false + description: A paginated list of commit comments. example: next: http://example.com/aeiou - size: 6 - previous: http://example.com/aeiou - values: - - "" - - "" - page: 0 - pagelen: 1 - pipeline_build_number: - allOf: - - $ref: '#/components/schemas/object' - - title: Pipeline Build Number - type: object - properties: - next: - type: integer - description: The next number that will be used as build number. - description: A Pipelines build number. - pipeline_variable: - allOf: - - $ref: '#/components/schemas/object' - - title: Pipeline Variable - type: object - properties: - uuid: - type: string - description: The UUID identifying the variable. - key: - type: string - description: The unique name of the variable. - value: - type: string - description: "The value of the variable. If the variable is secured, this\ - \ will be empty." - secured: - type: boolean - description: "If true, this variable will be treated as secured. The value\ - \ will never be exposed in the logs or the REST API." - description: A Pipelines variable. - pipeline_step: - allOf: - - $ref: '#/components/schemas/object' - - title: Pipeline Step - type: object - properties: - uuid: - type: string - description: The UUID identifying the step. - started_on: - type: string - description: The timestamp when the step execution was started. This is - not set when the step hasn't executed yet. - format: date-time - completed_on: - type: string - description: The timestamp when the step execution was completed. This - is not set if the step is still in progress. - format: date-time - state: - $ref: '#/components/schemas/pipeline_step_state' - image: - $ref: '#/components/schemas/pipeline_image' - setup_commands: - type: array - description: The list of commands that are executed as part of the setup - phase of the build. These commands are executed outside the build container. - items: - $ref: '#/components/schemas/pipeline_command' - script_commands: - type: array - description: The list of build commands. These commands are executed in - the build container. - items: - $ref: '#/components/schemas/pipeline_command' - description: A step of a Bitbucket pipeline. This represents the actual result - of the step execution. - x-bb-default-fields: - - uuid - x-bb-url: "/rest/1.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/pipelines/{pipeline.uuid}/steps/{uuid}" - x-bb-batch-url: "/rest/1.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/pipelines/steps_batch" - x-bb-batch-max-size: 100 - pipeline_step_state: - allOf: - - $ref: '#/components/schemas/object' - - title: Pipeline Step State - type: object - description: The representation of the progress state of a pipeline step. - pipeline_step_state_pending: - allOf: - - $ref: '#/components/schemas/pipeline_step_state' - - type: object - properties: - name: - type: string - description: The name of pipeline step state (PENDING). - enum: - - PENDING - description: A Bitbucket Pipelines PENDING pipeline step state. - pipeline_step_state_ready: - allOf: - - $ref: '#/components/schemas/pipeline_step_state' - - type: object - properties: - name: - type: string - description: The name of pipeline step state (READY). - enum: - - READY - description: A Bitbucket Pipelines READY pipeline step state. - pipeline_step_state_in_progress: - allOf: - - $ref: '#/components/schemas/pipeline_step_state' - - type: object - properties: - name: - type: string - description: The name of pipeline step state (IN_PROGRESS). - enum: - - IN_PROGRESS - description: A Bitbucket Pipelines IN_PROGRESS pipeline step state. - pipeline_step_state_completed: - allOf: - - $ref: '#/components/schemas/pipeline_step_state' - - type: object - properties: - name: - type: string - description: The name of pipeline step state (COMPLETED). - enum: - - COMPLETED - result: - $ref: '#/components/schemas/pipeline_step_state_completed_result' - description: A Bitbucket Pipelines COMPLETED pipeline step state. - pipeline_step_state_completed_result: - allOf: - - $ref: '#/components/schemas/object' - - title: Pipeline Completed Step Result - type: object - description: A result of a completed pipeline step state. - pipeline_step_state_completed_error: - allOf: - - $ref: '#/components/schemas/pipeline_step_state_completed_result' - - type: object - properties: - name: - type: string - description: The name of the result (ERROR) - enum: - - ERROR - error: - $ref: '#/components/schemas/pipeline_step_error' - description: A Bitbucket Pipelines ERROR pipeline step result. - pipeline_step_state_completed_failed: - allOf: - - $ref: '#/components/schemas/pipeline_step_state_completed_result' - - type: object - properties: - name: - type: string - description: The name of the result (FAILED) - enum: - - FAILED - description: A Bitbucket Pipelines FAILED pipeline step result. - pipeline_step_state_completed_stopped: - allOf: - - $ref: '#/components/schemas/pipeline_step_state_completed_result' - - type: object - properties: - name: - type: string - description: The name of the result (STOPPED) - enum: - - STOPPED - description: A Bitbucket Pipelines STOPPED pipeline step result. - pipeline_step_state_completed_not_run: - allOf: - - $ref: '#/components/schemas/pipeline_step_state_completed_result' - - type: object - properties: - name: - type: string - description: The name of the result (NOT_RUN) - enum: - - NOT_RUN - description: A Bitbucket Pipelines NOT_RUN pipeline step result. - pipeline_step_state_completed_expired: - allOf: - - $ref: '#/components/schemas/pipeline_step_state_completed_result' - - type: object - properties: - name: - type: string - description: The name of the result (EXPIRED) - enum: - - EXPIRED - description: A Bitbucket Pipelines EXPIRED pipeline step result. - pipeline_step_state_completed_successful: - allOf: - - $ref: '#/components/schemas/pipeline_step_state_completed_result' - - type: object - properties: - name: - type: string - description: The name of the result (SUCCESSFUL) - enum: - - SUCCESSFUL - description: A Bitbucket Pipelines SUCCESSFUL pipeline step result. - pipeline_step_error: - allOf: - - $ref: '#/components/schemas/object' - - title: Pipeline Step Error - type: object - properties: - key: - type: string - description: The error key. - message: - type: string - description: The error message. - description: An error causing a step failure. - pipeline_image: - title: Pipeline Image + size: 0 + previous: http://example.com/aeiou + values: + - "" + - "" + page: 1 + pagelen: 1 + paginated_commitstatuses: + title: Paginated Commit Statuses type: object properties: - name: - type: string - description: "The name of the image. If the image is hosted on DockerHub\ - \ the short name can be used, otherwise the fully qualified name is required\ - \ here." - username: - type: string - description: The username needed to authenticate with the Docker registry. - Only required when using a private Docker image. - password: + size: + minimum: 0 + type: integer + description: "Total number of objects in the response. This is an optional\ + \ element that is not provided in all responses, as it can be expensive\ + \ to compute." + page: + minimum: 1 + type: integer + description: Page number of the current results. This is an optional element + that is not provided in all responses. + pagelen: + minimum: 1 + type: integer + description: Current number of objects on the existing page. The default + value is 10 with 100 being the maximum allowed value. Individual APIs + may enforce different values. + next: type: string - description: The password needed to authenticate with the Docker registry. - Only required when using a private Docker image. - email: + description: Link to the next page if it exists. The last page of a collection + does not have this value. Use this link to navigate the result set and + refrain from constructing your own URLs. + format: uri + previous: type: string - description: The email needed to authenticate with the Docker registry. - Only required when using a private Docker image. - description: The definition of a Docker image that can be used for a Bitbucket - Pipelines step execution context. - pipeline_command: - title: Pipeline Command + description: Link to previous page if it exists. A collections first page + does not have this value. This is an optional element that is not provided + in all responses. Some result sets strictly support forward navigation + and never provide previous links. Clients must anticipate that backwards + navigation is not always available. Use this link to navigate the result + set and refrain from constructing your own URLs. + format: uri + values: + minItems: 0 + uniqueItems: true + type: array + items: + $ref: '#/components/schemas/commitstatus' + additionalProperties: false + description: A paginated list of commit status objects. + example: + next: http://example.com/aeiou + size: 0 + previous: http://example.com/aeiou + values: + - "" + - "" + page: 1 + pagelen: 1 + paginated_components: + title: Paginated Components type: object properties: - name: + size: + minimum: 0 + type: integer + description: "Total number of objects in the response. This is an optional\ + \ element that is not provided in all responses, as it can be expensive\ + \ to compute." + page: + minimum: 1 + type: integer + description: Page number of the current results. This is an optional element + that is not provided in all responses. + pagelen: + minimum: 1 + type: integer + description: Current number of objects on the existing page. The default + value is 10 with 100 being the maximum allowed value. Individual APIs + may enforce different values. + next: type: string - description: The name of the command. - command: + description: Link to the next page if it exists. The last page of a collection + does not have this value. Use this link to navigate the result set and + refrain from constructing your own URLs. + format: uri + previous: type: string - description: The executable command. - description: An executable pipeline command. - paginated_pipelines: - title: Paginated Pipelines + description: Link to previous page if it exists. A collections first page + does not have this value. This is an optional element that is not provided + in all responses. Some result sets strictly support forward navigation + and never provide previous links. Clients must anticipate that backwards + navigation is not always available. Use this link to navigate the result + set and refrain from constructing your own URLs. + format: uri + values: + minItems: 0 + uniqueItems: true + type: array + items: + $ref: '#/components/schemas/component' + additionalProperties: false + description: A paginated list of issue tracker components. + example: + next: http://example.com/aeiou + size: 0 + previous: http://example.com/aeiou + values: + - "" + - "" + page: 1 + pagelen: 1 + paginated_default_reviewer_and_type: + title: Paginated Default Reviewer and Type type: object properties: + size: + minimum: 0 + type: integer + description: "Total number of objects in the response. This is an optional\ + \ element that is not provided in all responses, as it can be expensive\ + \ to compute." page: + minimum: 1 type: integer description: Page number of the current results. This is an optional element that is not provided in all responses. + pagelen: + minimum: 1 + type: integer + description: Current number of objects on the existing page. The default + value is 10 with 100 being the maximum allowed value. Individual APIs + may enforce different values. + next: + type: string + description: Link to the next page if it exists. The last page of a collection + does not have this value. Use this link to navigate the result set and + refrain from constructing your own URLs. + format: uri + previous: + type: string + description: Link to previous page if it exists. A collections first page + does not have this value. This is an optional element that is not provided + in all responses. Some result sets strictly support forward navigation + and never provide previous links. Clients must anticipate that backwards + navigation is not always available. Use this link to navigate the result + set and refrain from constructing your own URLs. + format: uri values: minItems: 0 + uniqueItems: true type: array - description: The values of the current page. items: - $ref: '#/components/schemas/pipeline' + $ref: '#/components/schemas/default_reviewer_and_type' + additionalProperties: false + description: A paginated list of default reviewers with reviewer type. + example: + next: http://example.com/aeiou + size: 0 + previous: http://example.com/aeiou + values: + - reviewer_type: reviewer_type + type: type + user: "" + - reviewer_type: reviewer_type + type: type + user: "" + page: 1 + pagelen: 1 + paginated_deploy_keys: + title: Paginated Deploy Keys + type: object + properties: size: + minimum: 0 type: integer description: "Total number of objects in the response. This is an optional\ \ element that is not provided in all responses, as it can be expensive\ \ to compute." + page: + minimum: 1 + type: integer + description: Page number of the current results. This is an optional element + that is not provided in all responses. pagelen: + minimum: 1 type: integer description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs @@ -23791,18 +25569,25 @@ components: navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri - description: A paged list of pipelines + values: + minItems: 0 + uniqueItems: true + type: array + items: + $ref: '#/components/schemas/deploy_key' + additionalProperties: false + description: A paginated list of deploy keys. example: next: http://example.com/aeiou - size: 6 + size: 0 previous: http://example.com/aeiou values: - "" - "" - page: 0 + page: 1 pagelen: 1 - paginated_pipeline_known_hosts: - title: Paginated Pipeline Known Hosts + paginated_deployment_variable: + title: Paginated Deployment Variables type: object properties: page: @@ -23814,7 +25599,7 @@ components: type: array description: The values of the current page. items: - $ref: '#/components/schemas/pipeline_known_host' + $ref: '#/components/schemas/deployment_variable' size: type: integer description: "Total number of objects in the response. This is an optional\ @@ -23840,7 +25625,7 @@ components: navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri - description: A paged list of known hosts. + description: A paged list of deployment variables. example: next: http://example.com/aeiou size: 6 @@ -23850,8 +25635,8 @@ components: - "" page: 0 pagelen: 1 - paginated_pipeline_variables: - title: Paginated Pipeline Variables + paginated_deployments: + title: Paginated Deployments type: object properties: page: @@ -23863,17 +25648,62 @@ components: type: array description: The values of the current page. items: - $ref: '#/components/schemas/pipeline_variable' + $ref: '#/components/schemas/deployment' + size: + type: integer + description: "Total number of objects in the response. This is an optional\ + \ element that is not provided in all responses, as it can be expensive\ + \ to compute." + pagelen: + type: integer + description: Current number of objects on the existing page. The default + value is 10 with 100 being the maximum allowed value. Individual APIs + may enforce different values. + next: + type: string + description: Link to the next page if it exists. The last page of a collection + does not have this value. Use this link to navigate the result set and + refrain from constructing your own URLs. + format: uri + previous: + type: string + description: Link to previous page if it exists. A collections first page + does not have this value. This is an optional element that is not provided + in all responses. Some result sets strictly support forward navigation + and never provide previous links. Clients must anticipate that backwards + navigation is not always available. Use this link to navigate the result + set and refrain from constructing your own URLs. + format: uri + description: A paged list of deployments + example: + next: http://example.com/aeiou + size: 6 + previous: http://example.com/aeiou + values: + - "" + - "" + page: 0 + pagelen: 1 + paginated_diffstats: + title: Paginated Diff Stat + type: object + properties: size: + minimum: 0 type: integer description: "Total number of objects in the response. This is an optional\ \ element that is not provided in all responses, as it can be expensive\ \ to compute." + page: + minimum: 1 + type: integer + description: Page number of the current results. This is an optional element + that is not provided in all responses. pagelen: + minimum: 1 type: integer description: Current number of objects on the existing page. The default - value is 10 with 100 being the maximum allowed value. Individual APIs - may enforce different values. + value is 500 with 5000 being the maximum allowed value. next: type: string description: Link to the next page if it exists. The last page of a collection @@ -23889,18 +25719,45 @@ components: navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri - description: A paged list of variables. + values: + minItems: 0 + uniqueItems: true + type: array + items: + $ref: '#/components/schemas/diffstat' + additionalProperties: false + description: A paginated list of diffstats. example: next: http://example.com/aeiou - size: 6 + size: 0 previous: http://example.com/aeiou values: - - "" - - "" - page: 0 + - new: null + lines_removed: 5 + old: + path: path + escaped_path: escaped_path + commit: "" + attributes: link + type: type + lines_added: 5 + type: type + status: added + - new: null + lines_removed: 5 + old: + path: path + escaped_path: escaped_path + commit: "" + attributes: link + type: type + lines_added: 5 + type: type + status: added + page: 1 pagelen: 1 - paginated_pipeline_steps: - title: Paginated Pipeline Steps + paginated_environments: + title: Paginated Deployment Environments type: object properties: page: @@ -23912,7 +25769,7 @@ components: type: array description: The values of the current page. items: - $ref: '#/components/schemas/pipeline_step' + $ref: '#/components/schemas/deployment_environment' size: type: integer description: "Total number of objects in the response. This is an optional\ @@ -23934,232 +25791,98 @@ components: description: Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation - and never provide previous links. Clients must anticipate that backwards - navigation is not always available. Use this link to navigate the result - set and refrain from constructing your own URLs. - format: uri - description: A paged list of pipeline steps. - example: - next: http://example.com/aeiou - size: 6 - previous: http://example.com/aeiou - values: - - "" - - "" - page: 0 - pagelen: 1 - ddev_report: - allOf: - - $ref: '#/components/schemas/object' - - type: object - description: A report for a commit. - x-bb-default-fields: - - uuid - - commitHash - x-bb-url: "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/commits/{commitHash}/reports/{uuid}" - stg_west_report: - allOf: - - $ref: '#/components/schemas/object' - - type: object - description: A report for a commit. - x-bb-default-fields: - - uuid - - commitHash - x-bb-url: "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/commits/{commitHash}/reports/{uuid}" - report: - allOf: - - $ref: '#/components/schemas/object' - - title: Commit Report - type: object - properties: - uuid: - type: string - description: The UUID that can be used to identify the report. - title: - type: string - description: The title of the report. - details: - type: string - description: A string to describe the purpose of the report. - external_id: - type: string - description: "ID of the report provided by the report creator. It can\ - \ be used to identify the report as an alternative to it's generated\ - \ uuid. It is not used by Bitbucket, but only by the report creator\ - \ for updating or deleting this specific report. Needs to be unique." - reporter: - type: string - description: A string to describe the tool or company who created the - report. - link: - type: string - description: A URL linking to the results of the report in an external - tool. - format: uri - remote_link_enabled: - type: boolean - description: "If enabled, a remote link is created in Jira for the issue\ - \ associated with the commit the report belongs to." - logo_url: - type: string - description: "A URL to the report logo. If none is provided, the default\ - \ insights logo will be used." - format: uri - report_type: - type: string - description: The type of the report. - enum: - - SECURITY - - COVERAGE - - TEST - - BUG - result: - type: string - description: The state of the report. May be set to PENDING and later - updated. - enum: - - PASSED - - FAILED - - PENDING - data: - type: array - description: An array of data fields to display information on the report. - Maximum 10. - items: - $ref: '#/components/schemas/report_data' - created_on: - type: string - description: The timestamp when the report was created. - format: date-time - updated_on: - type: string - description: The timestamp when the report was updated. - format: date-time - description: A report for a commit. - x-bb-default-fields: - - uuid - - commitHash - x-bb-url: "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/commits/{commitHash}/reports/{uuid}" - report_data: - title: Report Data - type: object - properties: - type: - type: string - description: "The type of data contained in the value field. If not provided,\ - \ then the value will be detected as a boolean, number or string." - enum: - - BOOLEAN - - DATE - - DURATION - - LINK - - NUMBER - - PERCENTAGE - - TEXT - title: - type: string - description: A string describing what this data field represents. - value: - type: object - properties: {} - description: The value of the data element. - description: A key-value element that will be displayed along with the report. - report_annotation: - allOf: - - $ref: '#/components/schemas/object' - - title: Report Annotation - type: object - properties: - external_id: - type: string - description: "ID of the annotation provided by the annotation creator.\ - \ It can be used to identify the annotation as an alternative to it's\ - \ generated uuid. It is not used by Bitbucket, but only by the annotation\ - \ creator for updating or deleting this specific annotation. Needs to\ - \ be unique." - uuid: - type: string - description: The UUID that can be used to identify the annotation. - annotation_type: - type: string - description: The type of the report. - enum: - - VULNERABILITY - - CODE_SMELL - - BUG - path: - type: string - description: "The path of the file on which this annotation should be\ - \ placed. This is the path of the file relative to the git repository.\ - \ If no path is provided, then it will appear in the overview modal\ - \ on all pull requests where the tip of the branch is the given commit,\ - \ regardless of which files were modified." - line: - minimum: 1 - type: integer - description: "The line number that the annotation should belong to. If\ - \ no line number is provided, then it will default to 0 and in a pull\ - \ request it will appear at the top of the file specified by the path\ - \ field." - summary: - type: string - description: The message to display to users. - details: - type: string - description: The details to show to users when clicking on the annotation. - result: - type: string - description: The state of the report. May be set to PENDING and later - updated. - enum: - - PASSED - - FAILED - - SKIPPED - - IGNORED - severity: - type: string - description: The severity of the annotation. - enum: - - CRITICAL - - HIGH - - MEDIUM - - LOW - link: - type: string - description: A URL linking to the annotation in an external tool. - format: uri - created_on: - type: string - description: The timestamp when the report was created. - format: date-time - updated_on: - type: string - description: The timestamp when the report was updated. - format: date-time - description: A report for a commit. - x-bb-default-fields: - - uuid - x-bb-url: "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/commits/{commit.hash}/reports/{reportUuid}/annotations/{uuid}" - paginated_reports: - title: Paginated Reports + and never provide previous links. Clients must anticipate that backwards + navigation is not always available. Use this link to navigate the result + set and refrain from constructing your own URLs. + format: uri + description: A paged list of environments + example: + next: http://example.com/aeiou + size: 6 + previous: http://example.com/aeiou + values: + - "" + - "" + page: 0 + pagelen: 1 + paginated_files: + title: Paginated Files type: object properties: + size: + minimum: 0 + type: integer + description: "Total number of objects in the response. This is an optional\ + \ element that is not provided in all responses, as it can be expensive\ + \ to compute." page: + minimum: 1 type: integer description: Page number of the current results. This is an optional element that is not provided in all responses. + pagelen: + minimum: 1 + type: integer + description: Current number of objects on the existing page. The default + value is 10 with 100 being the maximum allowed value. Individual APIs + may enforce different values. + next: + type: string + description: Link to the next page if it exists. The last page of a collection + does not have this value. Use this link to navigate the result set and + refrain from constructing your own URLs. + format: uri + previous: + type: string + description: Link to previous page if it exists. A collections first page + does not have this value. This is an optional element that is not provided + in all responses. Some result sets strictly support forward navigation + and never provide previous links. Clients must anticipate that backwards + navigation is not always available. Use this link to navigate the result + set and refrain from constructing your own URLs. + format: uri values: minItems: 0 + uniqueItems: true type: array - description: The values of the current page. items: - $ref: '#/components/schemas/report' + $ref: '#/components/schemas/commit_file' + additionalProperties: false + description: A paginated list of commit_file objects. + example: + next: http://example.com/aeiou + size: 0 + previous: http://example.com/aeiou + values: + - path: path + escaped_path: escaped_path + commit: "" + attributes: link + type: type + - path: path + escaped_path: escaped_path + commit: "" + attributes: link + type: type + page: 1 + pagelen: 1 + paginated_hook_events: + title: Paginated Hook Events + type: object + properties: size: + minimum: 0 type: integer description: "Total number of objects in the response. This is an optional\ \ element that is not provided in all responses, as it can be expensive\ \ to compute." + page: + minimum: 1 + type: integer + description: Page number of the current results. This is an optional element + that is not provided in all responses. pagelen: + minimum: 1 type: integer description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs @@ -24179,36 +25902,98 @@ components: navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri - description: A paginated list of reports. + values: + minItems: 0 + uniqueItems: true + type: array + items: + $ref: '#/components/schemas/hook_event' + additionalProperties: false + description: A paginated list of webhook types available to subscribe on. example: next: http://example.com/aeiou - size: 6 + size: 0 previous: http://example.com/aeiou values: - - "" - - "" - page: 0 + - description: description + label: label + event: repo:fork + category: category + - description: description + label: label + event: repo:fork + category: category + page: 1 pagelen: 1 - paginated_annotations: - title: Paginated Annotations + paginated_issue_attachments: + title: Paginated Issue Attachment type: object properties: + size: + minimum: 0 + type: integer + description: "Total number of objects in the response. This is an optional\ + \ element that is not provided in all responses, as it can be expensive\ + \ to compute." page: + minimum: 1 type: integer description: Page number of the current results. This is an optional element that is not provided in all responses. + pagelen: + minimum: 1 + type: integer + description: Current number of objects on the existing page. The default + value is 10 with 100 being the maximum allowed value. Individual APIs + may enforce different values. + next: + type: string + description: Link to the next page if it exists. The last page of a collection + does not have this value. Use this link to navigate the result set and + refrain from constructing your own URLs. + format: uri + previous: + type: string + description: Link to previous page if it exists. A collections first page + does not have this value. This is an optional element that is not provided + in all responses. Some result sets strictly support forward navigation + and never provide previous links. Clients must anticipate that backwards + navigation is not always available. Use this link to navigate the result + set and refrain from constructing your own URLs. + format: uri values: minItems: 0 type: array - description: The values of the current page. items: - $ref: '#/components/schemas/report_annotation' + $ref: '#/components/schemas/issue_attachment' + additionalProperties: false + description: A paginated list of issue attachments. + example: + next: http://example.com/aeiou + size: 0 + previous: http://example.com/aeiou + values: + - "" + - "" + page: 1 + pagelen: 1 + paginated_issue_comments: + title: Paginated Issue Comments + type: object + properties: size: + minimum: 0 type: integer description: "Total number of objects in the response. This is an optional\ \ element that is not provided in all responses, as it can be expensive\ \ to compute." + page: + minimum: 1 + type: integer + description: Page number of the current results. This is an optional element + that is not provided in all responses. pagelen: + minimum: 1 type: integer description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs @@ -24228,74 +26013,93 @@ components: navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri - description: A paginated list of annotations. + values: + minItems: 0 + uniqueItems: true + type: array + items: + $ref: '#/components/schemas/issue_comment' + additionalProperties: false + description: A paginated list of issue comments. example: next: http://example.com/aeiou - size: 6 + size: 0 previous: http://example.com/aeiou values: - "" - "" - page: 0 + page: 1 pagelen: 1 - application_property: - title: Application Property - type: object - properties: - _attributes: - type: array - items: - type: string - enum: - - public - - read_only - description: "An application property. It is a caller defined JSON object that\ - \ Bitbucket will store and return. \nThe `_attributes` field at its top level\ - \ can be used to control who is allowed to read and update the property. \n\ - The keys of the JSON object must match an allowed pattern. For details, \n\ - see [Application properties](/cloud/bitbucket/application-properties/).\n" - example: - _attributes: - - public - - public - deployments_stg_west_deployment_environment: - allOf: - - $ref: '#/components/schemas/object' - - title: Deployment Environment - type: object - properties: - uuid: - type: string - description: The UUID identifying the environment. - name: - type: string - description: The name of the environment. - description: A Bitbucket Deployment Environment. - x-bb-default-fields: - - uuid - x-bb-url: "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments/{uuid}" - x-bb-batch-url: "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments_batch" - x-bb-batch-max-size: 100 - deployments_stg_west_paginated_environments: - title: Paginated Deployment Environments + paginated_issues: + title: Paginated Issues type: object properties: + size: + minimum: 0 + type: integer + description: "Total number of objects in the response. This is an optional\ + \ element that is not provided in all responses, as it can be expensive\ + \ to compute." page: + minimum: 1 type: integer description: Page number of the current results. This is an optional element that is not provided in all responses. + pagelen: + minimum: 1 + type: integer + description: Current number of objects on the existing page. The default + value is 10 with 100 being the maximum allowed value. Individual APIs + may enforce different values. + next: + type: string + description: Link to the next page if it exists. The last page of a collection + does not have this value. Use this link to navigate the result set and + refrain from constructing your own URLs. + format: uri + previous: + type: string + description: Link to previous page if it exists. A collections first page + does not have this value. This is an optional element that is not provided + in all responses. Some result sets strictly support forward navigation + and never provide previous links. Clients must anticipate that backwards + navigation is not always available. Use this link to navigate the result + set and refrain from constructing your own URLs. + format: uri values: minItems: 0 + uniqueItems: true type: array - description: The values of the current page. items: - $ref: '#/components/schemas/deployments_stg_west_deployment_environment' + $ref: '#/components/schemas/issue' + additionalProperties: false + description: A paginated list of issues. + example: + next: http://example.com/aeiou + size: 0 + previous: http://example.com/aeiou + values: + - "" + - "" + page: 1 + pagelen: 1 + paginated_log_entries: + title: Paginated Log Entries + type: object + properties: size: + minimum: 0 type: integer description: "Total number of objects in the response. This is an optional\ \ element that is not provided in all responses, as it can be expensive\ \ to compute." + page: + minimum: 1 + type: integer + description: Page number of the current results. This is an optional element + that is not provided in all responses. pagelen: + minimum: 1 type: integer description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs @@ -24315,61 +26119,53 @@ components: navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri - description: A paged list of environments - deployments_stg_west_deployment_environment_lock: - allOf: - - $ref: '#/components/schemas/object' - - title: Deployment Environment Lock - type: object - properties: - environmentUuid: - type: string - description: The UUID identifying the environment. - description: A Bitbucket Deployment Environment Lock. - x-bb-default-fields: - - '*' - - lock_opener.* - - owner.* - x-bb-batch-url: "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments/locks_batch" - x-bb-batch-max-size: 100 - deployment_environment: - allOf: - - $ref: '#/components/schemas/object' - - title: Deployment Environment - type: object - properties: - uuid: - type: string - description: The UUID identifying the environment. - name: - type: string - description: The name of the environment. - description: A Bitbucket Deployment Environment. - x-bb-default-fields: - - uuid - x-bb-url: "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments/{uuid}" - x-bb-batch-url: "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments_batch" - x-bb-batch-max-size: 100 - paginated_environments: - title: Paginated Deployment Environments - type: object - properties: - page: - type: integer - description: Page number of the current results. This is an optional element - that is not provided in all responses. values: minItems: 0 type: array - description: The values of the current page. items: - $ref: '#/components/schemas/deployment_environment' + $ref: '#/components/schemas/issue_change' + additionalProperties: false + description: A paginated list of issue changes. + example: + next: http://example.com/aeiou + size: 0 + previous: http://example.com/aeiou + values: + - issue: "" + created_on: 2000-01-23T04:56:07.000+00:00 + name: name + changes: {} + links: {} + type: type + message: {} + user: "" + - issue: "" + created_on: 2000-01-23T04:56:07.000+00:00 + name: name + changes: {} + links: {} + type: type + message: {} + user: "" + page: 1 + pagelen: 1 + paginated_milestones: + title: Paginated Milestones + type: object + properties: size: + minimum: 0 type: integer description: "Total number of objects in the response. This is an optional\ \ element that is not provided in all responses, as it can be expensive\ \ to compute." + page: + minimum: 1 + type: integer + description: Page number of the current results. This is an optional element + that is not provided in all responses. pagelen: + minimum: 1 type: integer description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs @@ -24389,181 +26185,25 @@ components: navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri - description: A paged list of environments + values: + minItems: 0 + uniqueItems: true + type: array + items: + $ref: '#/components/schemas/milestone' + additionalProperties: false + description: A paginated list of issue tracker milestones. example: next: http://example.com/aeiou - size: 6 + size: 0 previous: http://example.com/aeiou values: - "" - "" - page: 0 + page: 1 pagelen: 1 - deployment_environment_lock: - allOf: - - $ref: '#/components/schemas/object' - - title: Deployment Environment Lock - type: object - properties: - environmentUuid: - type: string - description: The UUID identifying the environment. - description: A Bitbucket Deployment Environment Lock. - x-bb-default-fields: - - '*' - - lock_opener.* - - owner.* - x-bb-batch-url: "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments/locks_batch" - x-bb-batch-max-size: 100 - deployment_release: - allOf: - - $ref: '#/components/schemas/object' - - title: Deployment Release - type: object - properties: - uuid: - type: string - description: The UUID identifying the release. - name: - type: string - description: The name of the release. - url: - type: string - description: Link to the pipeline that produced the release. - format: uri - commit: - $ref: '#/components/schemas/commit' - created_on: - type: string - description: The timestamp when the release was created. - format: date-time - description: A Bitbucket Deployment Release. - deployment: - allOf: - - $ref: '#/components/schemas/object' - - title: Deployment - type: object - properties: - uuid: - type: string - description: The UUID identifying the deployment. - state: - $ref: '#/components/schemas/deployment_state' - environment: - $ref: '#/components/schemas/deployment_environment' - release: - $ref: '#/components/schemas/deployment_release' - description: A Bitbucket Deployment. - deployment_state: - allOf: - - $ref: '#/components/schemas/object' - - title: Deployment State - type: object - description: The representation of the progress state of a deployment. - deployment_state_undeployed: - allOf: - - $ref: '#/components/schemas/deployment_state' - - type: object - properties: - name: - type: string - description: The name of deployment state (UNDEPLOYED). - enum: - - UNDEPLOYED - trigger_url: - type: string - description: Link to trigger the deployment. - format: uri - description: A Bitbucket Deployment UNDEPLOYED deployment state. - deployment_state_in_progress: - allOf: - - $ref: '#/components/schemas/deployment_state' - - type: object - properties: - name: - type: string - description: The name of deployment state (IN_PROGRESS). - enum: - - IN_PROGRESS - url: - type: string - description: Link to the deployment result. - format: uri - deployer: - $ref: '#/components/schemas/account' - start_date: - type: string - description: The timestamp when the deployment was started. - format: date-time - description: A Bitbucket Deployment IN_PROGRESS deployment state. - deployment_state_completed: - allOf: - - $ref: '#/components/schemas/deployment_state' - - type: object - properties: - name: - type: string - description: The name of deployment state (COMPLETED). - enum: - - COMPLETED - url: - type: string - description: Link to the deployment result. - format: uri - deployer: - $ref: '#/components/schemas/account' - status: - $ref: '#/components/schemas/deployment_state_completed_status' - start_date: - type: string - description: The timestamp when the deployment was started. - format: date-time - completion_date: - type: string - description: The timestamp when the deployment completed. - format: date-time - description: A Bitbucket Deployment COMPLETED deployment state. - deployment_state_completed_status: - allOf: - - $ref: '#/components/schemas/object' - - title: Completed Deployment - type: object - description: The status of a completed deployment. - deployment_state_completed_status_successful: - allOf: - - $ref: '#/components/schemas/deployment_state_completed_status' - - type: object - properties: - name: - type: string - description: The name of the completed deployment status (SUCCESSFUL). - enum: - - SUCCESSFUL - description: A SUCCESSFUL completed deployment status. - deployment_state_completed_status_failed: - allOf: - - $ref: '#/components/schemas/deployment_state_completed_status' - - type: object - properties: - name: - type: string - description: The name of the completed deployment status (FAILED). - enum: - - FAILED - description: A FAILED completed deployment status. - deployment_state_completed_status_stopped: - allOf: - - $ref: '#/components/schemas/deployment_state_completed_status' - - type: object - properties: - name: - type: string - description: The name of the completed deployment status (STOPPED). - enum: - - STOPPED - description: A STOPPED completed deployment status. - paginated_deployments: - title: Paginated Deployments + paginated_pipeline_caches: + title: Paginated Pipeline Cache type: object properties: page: @@ -24575,7 +26215,7 @@ components: type: array description: The values of the current page. items: - $ref: '#/components/schemas/deployment' + $ref: '#/components/schemas/pipeline_cache' size: type: integer description: "Total number of objects in the response. This is an optional\ @@ -24601,7 +26241,7 @@ components: navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri - description: A paged list of deployments + description: A paged list of pipeline caches example: next: http://example.com/aeiou size: 6 @@ -24611,29 +26251,8 @@ components: - "" page: 0 pagelen: 1 - deployment_variable: - allOf: - - $ref: '#/components/schemas/object' - - title: Deployment Variable - type: object - properties: - uuid: - type: string - description: The UUID identifying the variable. - key: - type: string - description: The unique name of the variable. - value: - type: string - description: "The value of the variable. If the variable is secured, this\ - \ will be empty." - secured: - type: boolean - description: "If true, this variable will be treated as secured. The value\ - \ will never be exposed in the logs or the REST API." - description: A Pipelines deployment variable. - paginated_deployment_variable: - title: Paginated Deployment Variables + paginated_pipeline_known_hosts: + title: Paginated Pipeline Known Hosts type: object properties: page: @@ -24645,7 +26264,7 @@ components: type: array description: The values of the current page. items: - $ref: '#/components/schemas/deployment_variable' + $ref: '#/components/schemas/pipeline_known_host' size: type: integer description: "Total number of objects in the response. This is an optional\ @@ -24671,7 +26290,7 @@ components: navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri - description: A paged list of deployment variables. + description: A paged list of known hosts. example: next: http://example.com/aeiou size: 6 @@ -24681,26 +26300,8 @@ components: - "" page: 0 pagelen: 1 - deployments_ddev_deployment_environment: - allOf: - - $ref: '#/components/schemas/object' - - title: Deployment Environment - type: object - properties: - uuid: - type: string - description: The UUID identifying the environment. - name: - type: string - description: The name of the environment. - description: A Bitbucket Deployment Environment. - x-bb-default-fields: - - uuid - x-bb-url: "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments/{uuid}" - x-bb-batch-url: "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments_batch" - x-bb-batch-max-size: 100 - deployments_ddev_paginated_environments: - title: Paginated Deployment Environments + paginated_pipeline_schedule_executions: + title: Paginated Pipeline Schedule Executions type: object properties: page: @@ -24712,7 +26313,7 @@ components: type: array description: The values of the current page. items: - $ref: '#/components/schemas/deployments_ddev_deployment_environment' + $ref: '#/components/schemas/pipeline_schedule_execution' size: type: integer description: "Total number of objects in the response. This is an optional\ @@ -24738,51 +26339,36 @@ components: navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri - description: A paged list of environments - deployments_ddev_deployment_environment_lock: - allOf: - - $ref: '#/components/schemas/object' - - title: Deployment Environment Lock - type: object - properties: - environmentUuid: - type: string - description: The UUID identifying the environment. - description: A Bitbucket Deployment Environment Lock. - x-bb-default-fields: - - '*' - - lock_opener.* - - owner.* - x-bb-batch-url: "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments/locks_batch" - x-bb-batch-max-size: 100 - pipelines_ddev_pipeline_step: - allOf: - - $ref: '#/components/schemas/object' - - type: object - description: A step of a Bitbucket pipeline. This represents the actual result - of the step execution. - x-bb-default-fields: - - uuid - x-bb-url: "/rest/1.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/pipelines/{pipeline.uuid}/steps/{uuid}" - x-bb-batch-url: "/rest/1.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/pipelines/steps_batch" - x-bb-batch-max-size: 100 - paginated_commit_comments: - title: Paginated Commit Comments + description: A paged list of the executions of a schedule. + example: + next: http://example.com/aeiou + size: 6 + previous: http://example.com/aeiou + values: + - "" + - "" + page: 0 + pagelen: 1 + paginated_pipeline_schedules: + title: Paginated Pipeline Schedule type: object properties: + page: + type: integer + description: Page number of the current results. This is an optional element + that is not provided in all responses. + values: + minItems: 0 + type: array + description: The values of the current page. + items: + $ref: '#/components/schemas/pipeline_schedule' size: - minimum: 0 type: integer description: "Total number of objects in the response. This is an optional\ \ element that is not provided in all responses, as it can be expensive\ \ to compute." - page: - minimum: 1 - type: integer - description: Page number of the current results. This is an optional element - that is not provided in all responses. pagelen: - minimum: 1 type: integer description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs @@ -24802,57 +26388,36 @@ components: navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri - values: - minItems: 0 - uniqueItems: true - type: array - items: - $ref: '#/components/schemas/commit_comment' - description: A paginated list of commit comments. + description: A paged list of schedules example: next: http://example.com/aeiou - size: 0 + size: 6 previous: http://example.com/aeiou values: - "" - "" - page: 1 + page: 0 pagelen: 1 - default_reviewer_and_type: - title: Default Reviewer and Type - required: - - type - type: object - properties: - type: - type: string - reviewer_type: - type: string - user: - $ref: '#/components/schemas/user' - description: Object containing a user that is a default reviewer and the type - of reviewer - example: - reviewer_type: reviewer_type - type: type - user: "" - paginated_default_reviewer_and_type: - title: Paginated Default Reviewer and Type + paginated_pipeline_steps: + title: Paginated Pipeline Steps type: object properties: + page: + type: integer + description: Page number of the current results. This is an optional element + that is not provided in all responses. + values: + minItems: 0 + type: array + description: The values of the current page. + items: + $ref: '#/components/schemas/pipeline_step' size: - minimum: 0 type: integer description: "Total number of objects in the response. This is an optional\ \ element that is not provided in all responses, as it can be expensive\ \ to compute." - page: - minimum: 1 - type: integer - description: Page number of the current results. This is an optional element - that is not provided in all responses. pagelen: - minimum: 1 type: integer description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs @@ -24872,91 +26437,36 @@ components: navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri - values: - minItems: 0 - uniqueItems: true - type: array - items: - $ref: '#/components/schemas/default_reviewer_and_type' - description: A paginated list of default reviewers with reviewer type. + description: A paged list of pipeline steps. example: next: http://example.com/aeiou - size: 0 + size: 6 previous: http://example.com/aeiou values: - - reviewer_type: reviewer_type - type: type - user: "" - - reviewer_type: reviewer_type - type: type - user: "" - page: 1 + - "" + - "" + page: 0 pagelen: 1 - hook_event: - title: Hook Event - type: object - properties: - event: - type: string - description: The event identifier. - enum: - - pullrequest:changes_request_created - - repo:push - - repo:commit_status_created - - pullrequest:comment_updated - - pullrequest:updated - - repo:transfer - - pullrequest:fulfilled - - issue:created - - repo:commit_status_updated - - pullrequest:rejected - - pullrequest:created - - repo:commit_comment_created - - repo:deleted - - pullrequest:approved - - pullrequest:unapproved - - repo:updated - - repo:fork - - pullrequest:changes_request_removed - - issue:updated - - project:updated - - repo:created - - pullrequest:comment_deleted - - pullrequest:comment_created - - repo:imported - - issue:comment_created - category: - type: string - description: The category this event belongs to. - label: - type: string - description: Summary of the webhook event type. - description: - type: string - description: More detailed description of the webhook event type. - description: "An event, associated with a resource or subject type." - example: - description: description - label: label - event: pullrequest:changes_request_created - category: category - paginated_hook_events: - title: Paginated Hook Events + paginated_pipeline_variables: + title: Paginated Pipeline Variables type: object properties: - size: - minimum: 0 - type: integer - description: "Total number of objects in the response. This is an optional\ - \ element that is not provided in all responses, as it can be expensive\ - \ to compute." page: - minimum: 1 type: integer description: Page number of the current results. This is an optional element that is not provided in all responses. + values: + minItems: 0 + type: array + description: The values of the current page. + items: + $ref: '#/components/schemas/pipeline_variable' + size: + type: integer + description: "Total number of objects in the response. This is an optional\ + \ element that is not provided in all responses, as it can be expensive\ + \ to compute." pagelen: - minimum: 1 type: integer description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs @@ -24976,45 +26486,36 @@ components: navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri - values: - minItems: 0 - uniqueItems: true - type: array - items: - $ref: '#/components/schemas/hook_event' - description: A paginated list of webhook types available to subscribe on. + description: A paged list of variables. example: next: http://example.com/aeiou - size: 0 + size: 6 previous: http://example.com/aeiou values: - - description: description - label: label - event: pullrequest:changes_request_created - category: category - - description: description - label: label - event: pullrequest:changes_request_created - category: category - page: 1 + - "" + - "" + page: 0 pagelen: 1 - paginated_project_deploy_keys: - title: Paginated Project Deploy Keys + paginated_pipelines: + title: Paginated Pipelines type: object properties: + page: + type: integer + description: Page number of the current results. This is an optional element + that is not provided in all responses. + values: + minItems: 0 + type: array + description: The values of the current page. + items: + $ref: '#/components/schemas/pipeline' size: - minimum: 0 type: integer description: "Total number of objects in the response. This is an optional\ \ element that is not provided in all responses, as it can be expensive\ \ to compute." - page: - minimum: 1 - type: integer - description: Page number of the current results. This is an optional element - that is not provided in all responses. pagelen: - minimum: 1 type: integer description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs @@ -25034,40 +26535,18 @@ components: navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri - values: - minItems: 0 - uniqueItems: true - type: array - items: - $ref: '#/components/schemas/project_deploy_key' - description: A paginated list of project deploy keys. + description: A paged list of pipelines example: next: http://example.com/aeiou - size: 0 + size: 6 previous: http://example.com/aeiou values: - "" - "" - page: 1 + page: 0 pagelen: 1 - repository_inheritance_state: - title: Repository Inheritance State - required: - - type - type: object - properties: - type: - type: string - override_settings: - type: object - properties: {} - example: {} - description: A json object representing the repository's inheritance state values - example: - override_settings: {} - type: type - paginated_snippet_commit: - title: Paginated Snippet Commits + paginated_project_deploy_keys: + title: Paginated Project Deploy Keys type: object properties: size: @@ -25104,10 +26583,12 @@ components: format: uri values: minItems: 0 + uniqueItems: true type: array items: - $ref: '#/components/schemas/snippet_commit' - description: A paginated list of snippet commits. + $ref: '#/components/schemas/project_deploy_key' + additionalProperties: false + description: A paginated list of project deploy keys. example: next: http://example.com/aeiou size: 0 @@ -25117,8 +26598,8 @@ components: - "" page: 1 pagelen: 1 - paginated_components: - title: Paginated Components + paginated_project_group_permissions: + title: Paginated Project Group Permissions type: object properties: size: @@ -25158,19 +26639,28 @@ components: uniqueItems: true type: array items: - $ref: '#/components/schemas/component' - description: A paginated list of issue tracker components. + $ref: '#/components/schemas/project_group_permission' + additionalProperties: false + description: A paginated list of project group permissions. example: next: http://example.com/aeiou size: 0 previous: http://example.com/aeiou values: - - "" - - "" + - project: "" + links: {} + permission: read + type: type + group: "" + - project: "" + links: {} + permission: read + type: type + group: "" page: 1 pagelen: 1 - paginated_refs: - title: Paginated Refs + paginated_project_user_permissions: + title: Paginated Project User Permissions type: object properties: size: @@ -25210,66 +26700,28 @@ components: uniqueItems: true type: array items: - $ref: '#/components/schemas/ref' - description: A paginated list of refs. + $ref: '#/components/schemas/project_user_permission' + additionalProperties: false + description: A paginated list of project user permissions. example: next: http://example.com/aeiou size: 0 previous: http://example.com/aeiou values: - - name: name - links: - self: - name: name - href: http://example.com/aeiou - commits: null - html: null + - project: "" + links: {} + permission: read type: type - target: "" - - name: name - links: - self: - name: name - href: http://example.com/aeiou - commits: null - html: null + user: "" + - project: "" + links: {} + permission: read type: type - target: "" + user: "" page: 1 pagelen: 1 - object: - required: - - type - type: object - properties: - type: - type: string - description: Base type for most resource objects. It defines the common `type` - element that identifies an object's type. It also identifies the element as - Swagger's `discriminator`. - discriminator: - propertyName: type - branching_model: - allOf: - - $ref: '#/components/schemas/object' - - title: Branching Model - type: object - properties: - branch_types: - maxItems: 4 - minItems: 0 - uniqueItems: true - type: array - description: The active branch types. - items: - $ref: '#/components/schemas/branching_model_branch_types' - development: - $ref: '#/components/schemas/branching_model_development' - production: - $ref: '#/components/schemas/branching_model_development' - description: A repository's branching model - paginated_issue_comments: - title: Paginated Issue Comments + paginated_projects: + title: Paginated Projects type: object properties: size: @@ -25309,8 +26761,9 @@ components: uniqueItems: true type: array items: - $ref: '#/components/schemas/issue_comment' - description: A paginated list of issue comments. + $ref: '#/components/schemas/project' + additionalProperties: false + description: A paginated list of projects example: next: http://example.com/aeiou size: 0 @@ -25320,21 +26773,8 @@ components: - "" page: 1 pagelen: 1 - version: - allOf: - - $ref: '#/components/schemas/object' - - title: Version - type: object - properties: - links: - $ref: '#/components/schemas/version_links' - name: - type: string - id: - type: integer - description: A version as defined in a repository's issue tracker. - paginated_webhook_subscriptions: - title: Paginated Webhook Subscriptions + paginated_pullrequest_comments: + title: Paginated Pull Request Comments type: object properties: size: @@ -25374,8 +26814,9 @@ components: uniqueItems: true type: array items: - $ref: '#/components/schemas/webhook_subscription' - description: A paginated list of webhook subscriptions + $ref: '#/components/schemas/pullrequest_comment' + additionalProperties: false + description: A paginated list of pullrequest comments. example: next: http://example.com/aeiou size: 0 @@ -25385,8 +26826,8 @@ components: - "" page: 1 pagelen: 1 - paginated_tags: - title: Paginated Tags + paginated_pullrequests: + title: Paginated Pull Requests type: object properties: size: @@ -25406,96 +26847,40 @@ components: description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. - next: - type: string - description: Link to the next page if it exists. The last page of a collection - does not have this value. Use this link to navigate the result set and - refrain from constructing your own URLs. - format: uri - previous: - type: string - description: Link to previous page if it exists. A collections first page - does not have this value. This is an optional element that is not provided - in all responses. Some result sets strictly support forward navigation - and never provide previous links. Clients must anticipate that backwards - navigation is not always available. Use this link to navigate the result - set and refrain from constructing your own URLs. - format: uri - values: - minItems: 0 - uniqueItems: true - type: array - items: - $ref: '#/components/schemas/tag' - description: A paginated list of tags. - example: - next: http://example.com/aeiou - size: 0 - previous: http://example.com/aeiou - values: - - "" - - "" - page: 1 - pagelen: 1 - deploy_key: - allOf: - - $ref: '#/components/schemas/object' - - title: Deploy Key - type: object - properties: - key: - type: string - description: The deploy key value. - repository: - $ref: '#/components/schemas/repository' - comment: - type: string - description: The comment parsed from the deploy key (if present) - label: - type: string - description: The user-defined label for the deploy key - added_on: - type: string - format: date-time - last_used: - type: string - format: date-time - links: - $ref: '#/components/schemas/version_links' - owner: - $ref: '#/components/schemas/account' - description: Represents deploy key for a repository. - snippet: - allOf: - - $ref: '#/components/schemas/object' - - title: Snippet - type: object - properties: - id: - minimum: 0 - type: integer - title: - type: string - scm: - type: string - description: The DVCS used to store the snippet. - enum: - - git - created_on: - type: string - format: date-time - updated_on: - type: string - format: date-time - owner: - $ref: '#/components/schemas/account' - creator: - $ref: '#/components/schemas/account' - is_private: - type: boolean - description: A snippet object. - paginated_repository_user_permissions: - title: Paginated Repository User Permissions + next: + type: string + description: Link to the next page if it exists. The last page of a collection + does not have this value. Use this link to navigate the result set and + refrain from constructing your own URLs. + format: uri + previous: + type: string + description: Link to previous page if it exists. A collections first page + does not have this value. This is an optional element that is not provided + in all responses. Some result sets strictly support forward navigation + and never provide previous links. Clients must anticipate that backwards + navigation is not always available. Use this link to navigate the result + set and refrain from constructing your own URLs. + format: uri + values: + minItems: 0 + uniqueItems: true + type: array + items: + $ref: '#/components/schemas/pullrequest' + additionalProperties: false + description: A paginated list of pullrequests. + example: + next: http://example.com/aeiou + size: 0 + previous: http://example.com/aeiou + values: + - "" + - "" + page: 1 + pagelen: 1 + paginated_refs: + title: Paginated Refs type: object properties: size: @@ -25535,146 +26920,75 @@ components: uniqueItems: true type: array items: - $ref: '#/components/schemas/repository_user_permission' - description: A paginated list of repository user permissions. + $ref: '#/components/schemas/ref' + additionalProperties: false + description: A paginated list of refs. example: next: http://example.com/aeiou size: 0 previous: http://example.com/aeiou values: - - permission: read - links: - self: - name: name - href: http://example.com/aeiou + - name: name + links: {} type: type - repository: "" - user: "" - - permission: read - links: - self: - name: name - href: http://example.com/aeiou + target: "" + - name: name + links: {} type: type - repository: "" - user: "" + target: "" page: 1 pagelen: 1 - group: - allOf: - - $ref: '#/components/schemas/object' - - title: Group - type: object - properties: - links: - $ref: '#/components/schemas/group_links' - owner: - $ref: '#/components/schemas/account' - workspace: - $ref: '#/components/schemas/workspace' - name: - type: string - slug: - type: string - description: |- - The "sluggified" version of the group's name. This contains only ASCII - characters and can therefore be slightly different than the name - full_slug: - type: string - description: | - The concatenation of the workspace's slug and the group's slug, - separated with a colon (e.g. `acme:developers`) - description: A group object - repository_group_permission: - title: Repository Group Permission - required: - - type + paginated_reports: + title: Paginated Reports type: object properties: - type: + page: + type: integer + description: Page number of the current results. This is an optional element + that is not provided in all responses. + values: + minItems: 0 + type: array + description: The values of the current page. + items: + $ref: '#/components/schemas/report' + size: + type: integer + description: "Total number of objects in the response. This is an optional\ + \ element that is not provided in all responses, as it can be expensive\ + \ to compute." + pagelen: + type: integer + description: Current number of objects on the existing page. The default + value is 10 with 100 being the maximum allowed value. Individual APIs + may enforce different values. + next: type: string - links: - $ref: '#/components/schemas/version_links' - permission: + description: Link to the next page if it exists. The last page of a collection + does not have this value. Use this link to navigate the result set and + refrain from constructing your own URLs. + format: uri + previous: type: string - enum: - - read - - write - - admin - - none - group: - $ref: '#/components/schemas/group' - repository: - $ref: '#/components/schemas/repository' - description: A group's permission for a given repository. + description: Link to previous page if it exists. A collections first page + does not have this value. This is an optional element that is not provided + in all responses. Some result sets strictly support forward navigation + and never provide previous links. Clients must anticipate that backwards + navigation is not always available. Use this link to navigate the result + set and refrain from constructing your own URLs. + format: uri + description: A paginated list of reports. example: - links: - self: - name: name - href: http://example.com/aeiou - permission: read - type: type - repository: "" - group: "" - commitstatus: - allOf: - - $ref: '#/components/schemas/object' - - title: Commit Status - type: object - properties: - links: - $ref: '#/components/schemas/commitstatus_links' - uuid: - type: string - description: The commit status' id. - key: - type: string - description: |- - An identifier for the status that's unique to - its type (current "build" is the only supported type) and the vendor, - e.g. BB-DEPLOY - refname: - type: string - description: |2- - - The name of the ref that pointed to this commit at the time the status - object was created. Note that this the ref may since have moved off of - the commit. This optional field can be useful for build systems whose - build triggers and configuration are branch-dependent (e.g. a Pipeline - build). - It is legitimate for this field to not be set, or even apply (e.g. a - static linting job). - url: - type: string - description: "A URL linking back to the vendor or build system, for providing\ - \ more information about whatever process produced this status. Accepts\ - \ context variables `repository` and `commit` that Bitbucket will evaluate\ - \ at runtime whenever at runtime. For example, one could use https://foo.com/builds/{repository.full_name}\ - \ which Bitbucket will turn into https://foo.com/builds/foo/bar at render\ - \ time." - state: - type: string - description: Provides some indication of the status of this commit - enum: - - INPROGRESS - - SUCCESSFUL - - STOPPED - - FAILED - name: - type: string - description: "An identifier for the build itself, e.g. BB-DEPLOY-1" - description: - type: string - description: A description of the build (e.g. "Unit tests in Bamboo") - created_on: - type: string - format: date-time - updated_on: - type: string - format: date-time - description: A commit status object. - paginated_milestones: - title: Paginated Milestones + next: http://example.com/aeiou + size: 6 + previous: http://example.com/aeiou + values: + - "" + - "" + page: 0 + pagelen: 1 + paginated_repositories: + title: Paginated Repositories type: object properties: size: @@ -25714,301 +27028,81 @@ components: uniqueItems: true type: array items: - $ref: '#/components/schemas/milestone' - description: A paginated list of issue tracker milestones. - example: - next: http://example.com/aeiou - size: 0 - previous: http://example.com/aeiou - values: - - "" - - "" - page: 1 - pagelen: 1 - ref: - title: Ref - required: - - type - type: object - properties: - type: - type: string - links: - $ref: '#/components/schemas/ref_links' - name: - type: string - description: The name of the ref. - target: - $ref: '#/components/schemas/commit' - description: "A ref object, representing a branch or tag in a repository." - example: - name: name - links: - self: - name: name - href: http://example.com/aeiou - commits: null - html: null - type: type - target: "" - branch: - allOf: - - $ref: '#/components/schemas/ref' - - title: Branch - type: object - properties: - merge_strategies: - type: array - description: Available merge strategies for pull requests targeting this - branch. - items: - type: string - enum: - - merge_commit - - squash - - fast_forward - default_merge_strategy: - type: string - description: The default merge strategy for pull requests targeting this - branch. - description: "A branch object, representing a branch in a repository." - pullrequest_endpoint: - title: Pull Request Endpoint + $ref: '#/components/schemas/repository' + additionalProperties: false + description: A paginated list of repositories. + example: + next: http://example.com/aeiou + size: 0 + previous: http://example.com/aeiou + values: + - "" + - "" + page: 1 + pagelen: 1 + paginated_repository_group_permissions: + title: Paginated Repository Group Permissions type: object properties: - repository: - $ref: '#/components/schemas/repository' - branch: - $ref: '#/components/schemas/Pull Request Branch' - commit: - $ref: '#/components/schemas/Pull Request Commit' - pullrequest: - allOf: - - $ref: '#/components/schemas/object' - - title: Pull Request - type: object - properties: - links: - $ref: '#/components/schemas/pullrequest_links' - id: - type: integer - description: The pull request's unique ID. Note that pull request IDs - are only unique within their associated repository. - title: - type: string - description: Title of the pull request. - rendered: - $ref: '#/components/schemas/Rendered Pull Request Markup' - summary: - $ref: '#/components/schemas/Rendered Pull Request Markup_title' - state: - type: string - description: The pull request's current status. - enum: - - OPEN - - MERGED - - DECLINED - - SUPERSEDED - author: - $ref: '#/components/schemas/account' - source: - $ref: '#/components/schemas/pullrequest_endpoint' - destination: - $ref: '#/components/schemas/pullrequest_endpoint' - merge_commit: - $ref: '#/components/schemas/Pull Request Commit' - comment_count: - minimum: 0 - type: integer - description: The number of comments for a specific pull request. - task_count: - minimum: 0 - type: integer - description: The number of open tasks for a specific pull request. - close_source_branch: - type: boolean - description: A boolean flag indicating if merging the pull request closes - the source branch. - closed_by: - $ref: '#/components/schemas/account' - reason: - type: string - description: Explains why a pull request was declined. This field is only - applicable to pull requests in rejected state. - created_on: - type: string - description: The ISO8601 timestamp the request was created. - format: date-time - updated_on: - type: string - description: The ISO8601 timestamp the request was last updated. - format: date-time - reviewers: - type: array - description: "The list of users that were added as reviewers on this pull\ - \ request when it was created. For performance reasons, the API only\ - \ includes this list on a pull request's `self` URL." - items: - $ref: '#/components/schemas/account' - participants: - type: array - description: " The list of users that are collaborating on this\ - \ pull request.\n Collaborators are user that:\n\n * are\ - \ added to the pull request as a reviewer (part of the reviewers\n \ - \ list)\n * are not explicit reviewers, but have commented\ - \ on the pull request\n * are not explicit reviewers, but have\ - \ approved the pull request\n\n Each user is wrapped in an object\ - \ that indicates the user's role and\n whether they have approved\ - \ the pull request. For performance reasons,\n the API only returns\ - \ this list when an API requests a pull request by\n id.\n \ - \ " - items: - $ref: '#/components/schemas/participant' - description: A pull request object. - participant: - allOf: - - $ref: '#/components/schemas/object' - - title: Participant - type: object - properties: - user: - $ref: '#/components/schemas/account' - role: - type: string - enum: - - PARTICIPANT - - REVIEWER - approved: - type: boolean - state: - type: string - enum: - - approved - - changes_requested - participated_on: - type: string - description: "The ISO8601 timestamp of the participant's action. For approvers,\ - \ this is the time of their approval. For commenters and pull request\ - \ reviewers who are not approvers, this is the time they last commented,\ - \ or null if they have not commented." - format: date-time - description: Object describing a user's role on resources like commits or - pull requests. - ssh_key: - allOf: - - $ref: '#/components/schemas/object' - - title: SSH Key - type: object - properties: - uuid: - type: string - description: The SSH key's immutable ID. - key: - type: string - description: The SSH public key value in OpenSSH format. - comment: - type: string - description: The comment parsed from the SSH key (if present) - label: - type: string - description: The user-defined label for the SSH key - created_on: - type: string - format: date-time - last_used: - type: string - format: date-time - links: - $ref: '#/components/schemas/version_links' - description: Base type for representing SSH public keys. - ssh_account_key: - allOf: - - $ref: '#/components/schemas/ssh_key' - - title: SSH Account Key - type: object - properties: - owner: - $ref: '#/components/schemas/account' - description: Represents an SSH public key for a user. - issue: - allOf: - - $ref: '#/components/schemas/object' - - title: Issue - type: object - properties: - links: - $ref: '#/components/schemas/issue_links' - id: - type: integer - repository: - $ref: '#/components/schemas/repository' - title: - type: string - reporter: - $ref: '#/components/schemas/account' - assignee: - $ref: '#/components/schemas/account' - created_on: - type: string - format: date-time - updated_on: - type: string - format: date-time - edited_on: - type: string - format: date-time - state: - type: string - enum: - - new - - open - - resolved - - on hold - - invalid - - duplicate - - wontfix - - closed - kind: - type: string - enum: - - bug - - enhancement - - proposal - - task - priority: - type: string - enum: - - trivial - - minor - - major - - critical - - blocker - milestone: - $ref: '#/components/schemas/milestone' - version: - $ref: '#/components/schemas/version' - component: - $ref: '#/components/schemas/component' - votes: - type: integer - content: - $ref: '#/components/schemas/Rendered Pull Request Markup_title' - description: An issue. - component: - allOf: - - $ref: '#/components/schemas/object' - - title: Component - type: object - properties: - links: - $ref: '#/components/schemas/version_links' - name: - type: string - id: - type: integer - description: A component as defined in a repository's issue tracker. - paginated_deploy_keys: - title: Paginated Deploy Keys + size: + minimum: 0 + type: integer + description: "Total number of objects in the response. This is an optional\ + \ element that is not provided in all responses, as it can be expensive\ + \ to compute." + page: + minimum: 1 + type: integer + description: Page number of the current results. This is an optional element + that is not provided in all responses. + pagelen: + minimum: 1 + type: integer + description: Current number of objects on the existing page. The default + value is 10 with 100 being the maximum allowed value. Individual APIs + may enforce different values. + next: + type: string + description: Link to the next page if it exists. The last page of a collection + does not have this value. Use this link to navigate the result set and + refrain from constructing your own URLs. + format: uri + previous: + type: string + description: Link to previous page if it exists. A collections first page + does not have this value. This is an optional element that is not provided + in all responses. Some result sets strictly support forward navigation + and never provide previous links. Clients must anticipate that backwards + navigation is not always available. Use this link to navigate the result + set and refrain from constructing your own URLs. + format: uri + values: + minItems: 0 + uniqueItems: true + type: array + items: + $ref: '#/components/schemas/repository_group_permission' + additionalProperties: false + description: A paginated list of repository group permissions. + example: + next: http://example.com/aeiou + size: 0 + previous: http://example.com/aeiou + values: + - links: {} + permission: read + type: type + repository: "" + group: "" + - links: {} + permission: read + type: type + repository: "" + group: "" + page: 1 + pagelen: 1 + paginated_repository_permissions: + title: Paginated Repository Permissions type: object properties: size: @@ -26048,8 +27142,181 @@ components: uniqueItems: true type: array items: - $ref: '#/components/schemas/deploy_key' - description: A paginated list of deploy keys. + $ref: '#/components/schemas/repository_permission' + additionalProperties: false + description: A paginated list of repository permissions. + example: + next: http://example.com/aeiou + size: 0 + previous: http://example.com/aeiou + values: + - permission: read + type: type + repository: "" + user: "" + - permission: read + type: type + repository: "" + user: "" + page: 1 + pagelen: 1 + paginated_repository_user_permissions: + title: Paginated Repository User Permissions + type: object + properties: + size: + minimum: 0 + type: integer + description: "Total number of objects in the response. This is an optional\ + \ element that is not provided in all responses, as it can be expensive\ + \ to compute." + page: + minimum: 1 + type: integer + description: Page number of the current results. This is an optional element + that is not provided in all responses. + pagelen: + minimum: 1 + type: integer + description: Current number of objects on the existing page. The default + value is 10 with 100 being the maximum allowed value. Individual APIs + may enforce different values. + next: + type: string + description: Link to the next page if it exists. The last page of a collection + does not have this value. Use this link to navigate the result set and + refrain from constructing your own URLs. + format: uri + previous: + type: string + description: Link to previous page if it exists. A collections first page + does not have this value. This is an optional element that is not provided + in all responses. Some result sets strictly support forward navigation + and never provide previous links. Clients must anticipate that backwards + navigation is not always available. Use this link to navigate the result + set and refrain from constructing your own URLs. + format: uri + values: + minItems: 0 + uniqueItems: true + type: array + items: + $ref: '#/components/schemas/repository_user_permission' + additionalProperties: false + description: A paginated list of repository user permissions. + example: + next: http://example.com/aeiou + size: 0 + previous: http://example.com/aeiou + values: + - permission: read + links: {} + type: type + repository: "" + user: "" + - permission: read + links: {} + type: type + repository: "" + user: "" + page: 1 + pagelen: 1 + paginated_snippet_comments: + title: Paginated Snippet Comments + type: object + properties: + size: + minimum: 0 + type: integer + description: "Total number of objects in the response. This is an optional\ + \ element that is not provided in all responses, as it can be expensive\ + \ to compute." + page: + minimum: 1 + type: integer + description: Page number of the current results. This is an optional element + that is not provided in all responses. + pagelen: + minimum: 1 + type: integer + description: Current number of objects on the existing page. The default + value is 10 with 100 being the maximum allowed value. Individual APIs + may enforce different values. + next: + type: string + description: Link to the next page if it exists. The last page of a collection + does not have this value. Use this link to navigate the result set and + refrain from constructing your own URLs. + format: uri + previous: + type: string + description: Link to previous page if it exists. A collections first page + does not have this value. This is an optional element that is not provided + in all responses. Some result sets strictly support forward navigation + and never provide previous links. Clients must anticipate that backwards + navigation is not always available. Use this link to navigate the result + set and refrain from constructing your own URLs. + format: uri + values: + minItems: 0 + uniqueItems: true + type: array + items: + $ref: '#/components/schemas/snippet_comment' + additionalProperties: false + description: A paginated list of snippet comments. + example: + next: http://example.com/aeiou + size: 0 + previous: http://example.com/aeiou + values: + - "" + - "" + page: 1 + pagelen: 1 + paginated_snippet_commit: + title: Paginated Snippet Commits + type: object + properties: + size: + minimum: 0 + type: integer + description: "Total number of objects in the response. This is an optional\ + \ element that is not provided in all responses, as it can be expensive\ + \ to compute." + page: + minimum: 1 + type: integer + description: Page number of the current results. This is an optional element + that is not provided in all responses. + pagelen: + minimum: 1 + type: integer + description: Current number of objects on the existing page. The default + value is 10 with 100 being the maximum allowed value. Individual APIs + may enforce different values. + next: + type: string + description: Link to the next page if it exists. The last page of a collection + does not have this value. Use this link to navigate the result set and + refrain from constructing your own URLs. + format: uri + previous: + type: string + description: Link to previous page if it exists. A collections first page + does not have this value. This is an optional element that is not provided + in all responses. Some result sets strictly support forward navigation + and never provide previous links. Clients must anticipate that backwards + navigation is not always available. Use this link to navigate the result + set and refrain from constructing your own URLs. + format: uri + values: + minItems: 0 + type: array + items: + $ref: '#/components/schemas/snippet_commit' + additionalProperties: false + description: A paginated list of snippet commits. example: next: http://example.com/aeiou size: 0 @@ -26101,6 +27368,7 @@ components: type: array items: $ref: '#/components/schemas/snippet' + additionalProperties: false description: A paginated list of snippets. example: next: http://example.com/aeiou @@ -26111,8 +27379,61 @@ components: - "" page: 1 pagelen: 1 - paginated_repository_group_permissions: - title: Paginated Repository Group Permissions + paginated_ssh_user_keys: + title: Paginated SSH User Keys + type: object + properties: + size: + minimum: 0 + type: integer + description: "Total number of objects in the response. This is an optional\ + \ element that is not provided in all responses, as it can be expensive\ + \ to compute." + page: + minimum: 1 + type: integer + description: Page number of the current results. This is an optional element + that is not provided in all responses. + pagelen: + minimum: 1 + type: integer + description: Current number of objects on the existing page. The default + value is 10 with 100 being the maximum allowed value. Individual APIs + may enforce different values. + next: + type: string + description: Link to the next page if it exists. The last page of a collection + does not have this value. Use this link to navigate the result set and + refrain from constructing your own URLs. + format: uri + previous: + type: string + description: Link to previous page if it exists. A collections first page + does not have this value. This is an optional element that is not provided + in all responses. Some result sets strictly support forward navigation + and never provide previous links. Clients must anticipate that backwards + navigation is not always available. Use this link to navigate the result + set and refrain from constructing your own URLs. + format: uri + values: + minItems: 0 + uniqueItems: true + type: array + items: + $ref: '#/components/schemas/ssh_account_key' + additionalProperties: false + description: A paginated list of SSH keys. + example: + next: http://example.com/aeiou + size: 0 + previous: http://example.com/aeiou + values: + - "" + - "" + page: 1 + pagelen: 1 + paginated_tags: + title: Paginated Tags type: object properties: size: @@ -26152,80 +27473,20 @@ components: uniqueItems: true type: array items: - $ref: '#/components/schemas/repository_group_permission' - description: A paginated list of repository group permissions. + $ref: '#/components/schemas/tag' + additionalProperties: false + description: A paginated list of tags. example: next: http://example.com/aeiou size: 0 previous: http://example.com/aeiou values: - - links: - self: - name: name - href: http://example.com/aeiou - permission: read - type: type - repository: "" - group: "" - - links: - self: - name: name - href: http://example.com/aeiou - permission: read - type: type - repository: "" - group: "" + - "" + - "" page: 1 pagelen: 1 - workspace_membership: - allOf: - - $ref: '#/components/schemas/object' - - title: Workspace Membership - type: object - properties: - links: - $ref: '#/components/schemas/version_links' - user: - $ref: '#/components/schemas/account' - workspace: - $ref: '#/components/schemas/workspace' - description: |- - A Bitbucket workspace membership. - Links a user to a workspace. - commit_file: - title: Commit File - required: - - type - type: object - properties: - type: - type: string - path: - type: string - description: The path in the repository - commit: - $ref: '#/components/schemas/commit' - attributes: - type: string - enum: - - link - - executable - - subrepository - - binary - - lfs - escaped_path: - type: string - description: The escaped version of the path as it appears in a diff. If - the path does not require escaping this will be the same as path. - description: "A file object, representing a file at a commit in a repository" - example: - path: path - escaped_path: escaped_path - commit: "" - attributes: link - type: type - paginated_files: - title: Paginated Files + paginated_treeentries: + title: Paginated Tree Entry type: object properties: size: @@ -26265,206 +27526,77 @@ components: uniqueItems: true type: array items: - $ref: '#/components/schemas/commit_file' - description: A paginated list of commit_file objects. + $ref: '#/components/schemas/treeentry' + additionalProperties: false + description: A paginated list of commit_file and/or commit_directory objects. example: next: http://example.com/aeiou size: 0 previous: http://example.com/aeiou values: - path: path - escaped_path: escaped_path commit: "" - attributes: link type: type - path: path - escaped_path: escaped_path commit: "" - attributes: link type: type page: 1 pagelen: 1 - pullrequest_comment: - allOf: - - $ref: '#/components/schemas/comment' - - title: Pull Request Comment - type: object - properties: - pullrequest: - $ref: '#/components/schemas/pullrequest' - description: A pullrequest comment. - snippet_comment: - allOf: - - $ref: '#/components/schemas/object' - - title: Snippet Comment - type: object - properties: - links: - $ref: '#/components/schemas/group_links' - snippet: - $ref: '#/components/schemas/snippet' - description: A comment on a snippet. - issue_change: - title: Issue Change - required: - - type - type: object - properties: - type: - type: string - links: - $ref: '#/components/schemas/issue_change_links' - name: - type: string - created_on: - type: string - format: date-time - user: - $ref: '#/components/schemas/account' - issue: - $ref: '#/components/schemas/issue' - changes: - $ref: '#/components/schemas/issue_change_changes' - message: - $ref: '#/components/schemas/Rendered Pull Request Markup_title' - description: An issue change. - example: - issue: "" - created_on: 2000-01-23T04:56:07.000+00:00 - name: name - changes: - component: null - milestone: null - kind: null - assignee: - new: new - old: old - state: null - title: null - priority: null - version: null - content: null - links: - issue: null - self: - name: name - href: http://example.com/aeiou - type: type - message: - markup: markdown - raw: raw - html: html - user: "" - repository_user_permission: - title: Repository User Permission - required: - - type - type: object - properties: - type: - type: string - permission: - type: string - enum: - - read - - write - - admin - - none - user: - $ref: '#/components/schemas/user' - repository: - $ref: '#/components/schemas/repository' - links: - $ref: '#/components/schemas/version_links' - description: A user's direct permission for a given repository. - example: - permission: read - links: - self: - name: name - href: http://example.com/aeiou - type: type - repository: "" - user: "" - link: - title: Link + paginated_versions: + title: Paginated Versions type: object properties: - href: - type: string - format: uri - name: + size: + minimum: 0 + type: integer + description: "Total number of objects in the response. This is an optional\ + \ element that is not provided in all responses, as it can be expensive\ + \ to compute." + page: + minimum: 1 + type: integer + description: Page number of the current results. This is an optional element + that is not provided in all responses. + pagelen: + minimum: 1 + type: integer + description: Current number of objects on the existing page. The default + value is 10 with 100 being the maximum allowed value. Individual APIs + may enforce different values. + next: type: string - description: A link to a resource related to this object. - account_links: - title: Account Links - type: object - properties: - avatar: - $ref: '#/components/schemas/link' - description: Links related to an Account. - user_links: - allOf: - - $ref: '#/components/schemas/account_links' - - title: User Links - type: object - properties: - self: - $ref: '#/components/schemas/link' - html: - $ref: '#/components/schemas/link' - repositories: - $ref: '#/components/schemas/link' - description: Links related to a User. - account: - allOf: - - $ref: '#/components/schemas/object' - - title: Account - type: object - properties: - links: - $ref: '#/components/schemas/account_links' - created_on: - type: string - format: date-time - display_name: - type: string - username: - pattern: "^[a-zA-Z0-9_\\-]+$" - type: string - uuid: - type: string - description: An account object. - user: - allOf: - - $ref: '#/components/schemas/account' - - title: User - type: object - properties: - links: - $ref: '#/components/schemas/user_links' - account_id: - type: string - description: The user's Atlassian account ID. - account_status: - type: string - description: "The status of the account. Currently the only possible value\ - \ is \"active\", but more values may be added in the future." - has_2fa_enabled: - type: boolean - nickname: - type: string - description: "Account name defined by the owner. Should be used instead\ - \ of the \"username\" field. Note that \"nickname\" cannot be used in\ - \ place of \"username\" in URLs and queries, as \"nickname\" is not\ - \ guaranteed to be unique." - is_staff: - type: boolean - website: - type: string - description: A user object. - paginated_issues: - title: Paginated Issues + description: Link to the next page if it exists. The last page of a collection + does not have this value. Use this link to navigate the result set and + refrain from constructing your own URLs. + format: uri + previous: + type: string + description: Link to previous page if it exists. A collections first page + does not have this value. This is an optional element that is not provided + in all responses. Some result sets strictly support forward navigation + and never provide previous links. Clients must anticipate that backwards + navigation is not always available. Use this link to navigate the result + set and refrain from constructing your own URLs. + format: uri + values: + minItems: 0 + uniqueItems: true + type: array + items: + $ref: '#/components/schemas/version' + additionalProperties: false + description: A paginated list of issue tracker versions. + example: + next: http://example.com/aeiou + size: 0 + previous: http://example.com/aeiou + values: + - "" + - "" + page: 1 + pagelen: 1 + paginated_webhook_subscriptions: + title: Paginated Webhook Subscriptions type: object properties: size: @@ -26504,8 +27636,9 @@ components: uniqueItems: true type: array items: - $ref: '#/components/schemas/issue' - description: A paginated list of issues. + $ref: '#/components/schemas/webhook_subscription' + additionalProperties: false + description: A paginated list of webhook subscriptions example: next: http://example.com/aeiou size: 0 @@ -26515,8 +27648,8 @@ components: - "" page: 1 pagelen: 1 - paginated_commitstatuses: - title: Paginated Commit Statuses + paginated_workspace_memberships: + title: Paginated Workspace Memberships type: object properties: size: @@ -26556,8 +27689,9 @@ components: uniqueItems: true type: array items: - $ref: '#/components/schemas/commitstatus' - description: A paginated list of commit status objects. + $ref: '#/components/schemas/workspace_membership' + additionalProperties: false + description: A paginated list of workspace memberships. example: next: http://example.com/aeiou size: 0 @@ -26567,45 +27701,8 @@ components: - "" page: 1 pagelen: 1 - author: - allOf: - - $ref: '#/components/schemas/object' - - title: Author - type: object - properties: - raw: - type: string - description: The raw author value from the repository. This may be the - only value available if the author does not match a user in Bitbucket. - user: - $ref: '#/components/schemas/account' - description: The author of a change in a repository - base_commit: - allOf: - - $ref: '#/components/schemas/object' - - title: Base Commit - type: object - properties: - hash: - pattern: "[0-9a-f]{7,}?" - type: string - date: - type: string - format: date-time - author: - $ref: '#/components/schemas/author' - message: - type: string - summary: - $ref: '#/components/schemas/Rendered Pull Request Markup_title' - parents: - minItems: 0 - type: array - items: - $ref: '#/components/schemas/base_commit' - description: The common base type for both repository and snippet commits. - paginated_branches: - title: Paginated Branches + paginated_workspaces: + title: Paginated Workspaces type: object properties: size: @@ -26645,8 +27742,9 @@ components: uniqueItems: true type: array items: - $ref: '#/components/schemas/branch' - description: A paginated list of branches. + $ref: '#/components/schemas/workspace' + additionalProperties: false + description: A paginated list of workspaces. example: next: http://example.com/aeiou size: 0 @@ -26656,1094 +27754,1081 @@ components: - "" page: 1 pagelen: 1 - branching_model_settings: + participant: + allOf: + - $ref: '#/components/schemas/object' + - title: Participant + type: object + properties: + user: + $ref: '#/components/schemas/account' + role: + type: string + enum: + - PARTICIPANT + - REVIEWER + approved: + type: boolean + state: + type: string + enum: + - approved + - changes_requested + participated_on: + type: string + description: "The ISO8601 timestamp of the participant's action. For approvers,\ + \ this is the time of their approval. For commenters and pull request\ + \ reviewers who are not approvers, this is the time they last commented,\ + \ or null if they have not commented." + format: date-time + additionalProperties: true + description: Object describing a user's role on resources like commits or + pull requests. + pipeline: + allOf: + - $ref: '#/components/schemas/object' + - title: Pipeline + type: object + properties: + uuid: + type: string + description: The UUID identifying the pipeline. + build_number: + type: integer + description: The build number of the pipeline. + creator: + $ref: '#/components/schemas/account' + repository: + $ref: '#/components/schemas/repository' + target: + $ref: '#/components/schemas/pipeline_target' + trigger: + $ref: '#/components/schemas/pipeline_trigger' + state: + $ref: '#/components/schemas/pipeline_state' + created_on: + type: string + description: The timestamp when the pipeline was created. + format: date-time + completed_on: + type: string + description: The timestamp when the Pipeline was completed. This is not + set if the pipeline is still in progress. + format: date-time + build_seconds_used: + type: integer + description: The number of build seconds used by this pipeline. + additionalProperties: true + description: A Bitbucket Pipeline. This represents an actual pipeline result. + pipeline_build_number: + allOf: + - $ref: '#/components/schemas/object' + - title: Pipeline Build Number + type: object + properties: + next: + type: integer + description: The next number that will be used as build number. + additionalProperties: true + description: A Pipelines build number. + pipeline_cache: + allOf: + - $ref: '#/components/schemas/object' + - title: Pipeline Cache + type: object + properties: + uuid: + type: string + description: The UUID identifying the pipeline cache. + pipeline_uuid: + type: string + description: The UUID of the pipeline that created the cache. + step_uuid: + type: string + description: The uuid of the step that created the cache. + name: + type: string + description: The name of the cache. + key_hash: + type: string + description: The key hash of the cache version. + path: + type: string + description: The path where the cache contents were retrieved from. + file_size_bytes: + type: integer + description: The size of the file containing the archive of the cache. + created_on: + type: string + description: The timestamp when the cache was created. + format: date-time + additionalProperties: true + description: A representation of metadata for a pipeline cache for given repository. + pipeline_cache_content_uri: + title: Pipeline Cache Content URI + type: object + properties: + uri: + type: string + description: The uri for pipeline cache content. + format: uri + description: A representation of the location of pipeline cache content. + example: + uri: http://example.com/aeiou + pipeline_command: + title: Pipeline Command + type: object + properties: + name: + type: string + description: The name of the command. + command: + type: string + description: The executable command. + description: An executable pipeline command. + pipeline_commit_target: + allOf: + - $ref: '#/components/schemas/pipeline_target' + - title: Pipeline Commit Target + type: object + properties: + commit: + $ref: '#/components/schemas/commit' + selector: + $ref: '#/components/schemas/pipeline_selector' + additionalProperties: true + description: A Bitbucket Pipelines commit target. + pipeline_error: + allOf: + - $ref: '#/components/schemas/object' + - title: Pipeline Error + type: object + properties: + key: + type: string + description: The error key. + message: + type: string + description: The error message. + additionalProperties: true + description: An error causing a pipeline failure. + pipeline_image: + title: Pipeline Image + type: object + properties: + name: + type: string + description: "The name of the image. If the image is hosted on DockerHub\ + \ the short name can be used, otherwise the fully qualified name is required\ + \ here." + username: + type: string + description: The username needed to authenticate with the Docker registry. + Only required when using a private Docker image. + password: + type: string + description: The password needed to authenticate with the Docker registry. + Only required when using a private Docker image. + email: + type: string + description: The email needed to authenticate with the Docker registry. + Only required when using a private Docker image. + description: The definition of a Docker image that can be used for a Bitbucket + Pipelines step execution context. + pipeline_known_host: allOf: - $ref: '#/components/schemas/object' - - title: Branching Model Settings + - title: Pipeline Known Host type: object properties: - links: - $ref: '#/components/schemas/version_links' - branch_types: - maxItems: 4 - minItems: 0 - uniqueItems: true - type: array - items: - $ref: '#/components/schemas/branching_model_settings_branch_types' - development: - $ref: '#/components/schemas/branching_model_settings_development' - production: - $ref: '#/components/schemas/branching_model_settings_production' - description: A repository's branching model settings - commit: + uuid: + type: string + description: The UUID identifying the known host. + hostname: + type: string + description: The hostname of the known host. + public_key: + $ref: '#/components/schemas/pipeline_ssh_public_key' + additionalProperties: true + description: A Pipelines known host. + pipeline_ref_target: allOf: - - $ref: '#/components/schemas/base_commit' - - title: Commit + - $ref: '#/components/schemas/pipeline_target' + - title: Pipeline Ref Target type: object properties: - repository: - $ref: '#/components/schemas/repository' - participants: - minItems: 0 - type: array - items: - $ref: '#/components/schemas/participant' - description: A repository commit object. - project_branching_model: + ref_type: + type: string + description: The type of reference (branch/tag). + enum: + - branch + - tag + - named_branch + - bookmark + ref_name: + type: string + description: The name of the reference. + commit: + $ref: '#/components/schemas/commit' + selector: + $ref: '#/components/schemas/pipeline_selector' + additionalProperties: true + description: A Bitbucket Pipelines reference target. + pipeline_schedule: allOf: - $ref: '#/components/schemas/object' - - title: Project Branching Model + - title: Pipeline Schedule type: object properties: - branch_types: - maxItems: 4 - minItems: 0 - uniqueItems: true - type: array - description: The active branch types. - items: - $ref: '#/components/schemas/branching_model_branch_types' - development: - $ref: '#/components/schemas/project_branching_model_development' - production: - $ref: '#/components/schemas/project_branching_model_development' - description: A project's branching model - app_user: + uuid: + type: string + description: The UUID identifying the schedule. + enabled: + type: boolean + description: Whether the schedule is enabled. + target: + $ref: '#/components/schemas/pipeline_ref_target' + cron_pattern: + type: string + description: "The cron expression with second precision (7 fields) that\ + \ the schedule applies. For example, for expression: 0 0 12 * * ? *,\ + \ will execute at 12pm UTC every day." + created_on: + type: string + description: The timestamp when the schedule was created. + format: date-time + updated_on: + type: string + description: The timestamp when the schedule was updated. + format: date-time + additionalProperties: true + description: A Pipelines schedule. + pipeline_schedule_execution: allOf: - - $ref: '#/components/schemas/account' - - title: App User + - $ref: '#/components/schemas/object' + - title: Pipeline Schedule Execution + type: object + additionalProperties: true + description: A Pipelines schedule execution. + pipeline_schedule_execution_errored: + allOf: + - $ref: '#/components/schemas/pipeline_schedule_execution' + - type: object + properties: + error: + $ref: '#/components/schemas/pipeline_error' + additionalProperties: true + description: A Pipelines schedule execution that failed to be executed. + pipeline_schedule_execution_executed: + allOf: + - $ref: '#/components/schemas/pipeline_schedule_execution' + - type: object + properties: + pipeline: + $ref: '#/components/schemas/pipeline' + additionalProperties: true + description: A Pipelines executed schedule execution. + pipeline_schedule_post_request_body: + allOf: + - $ref: '#/components/schemas/object' + - title: Request body for Pipeline Schedule POST request + required: + - cron_pattern + - target type: object properties: - account_id: - type: string - description: The user's Atlassian account ID. - account_status: - type: string - description: "The status of the account. Currently the only possible value\ - \ is \"active\", but more values may be added in the future." - kind: + target: + $ref: '#/components/schemas/pipeline_schedule_post_request_body_target' + enabled: + type: boolean + description: Whether the schedule is enabled. + cron_pattern: type: string - description: The kind of App User. - description: An app user object. - branchrestriction: + description: "The cron expression with second precision (7 fields) that\ + \ the schedule applies. For example, for expression: 0 0 12 * * ? *,\ + \ will execute at 12pm UTC every day." + additionalProperties: true + pipeline_schedule_put_request_body: allOf: - $ref: '#/components/schemas/object' - - title: Branch Restriction + - title: Request body for Pipeline Schedule PUT request type: object properties: - users: - minItems: 0 - type: array - items: - $ref: '#/components/schemas/account' - groups: - minItems: 0 - type: array - items: - $ref: '#/components/schemas/group' - description: A branch restriction rule. - team_links: + enabled: + type: boolean + description: Whether the schedule is enabled. + additionalProperties: true + pipeline_selector: allOf: - - $ref: '#/components/schemas/account_links' - - title: Team Links + - $ref: '#/components/schemas/object' + - title: Pipeline Selector type: object properties: - self: - $ref: '#/components/schemas/link' - html: - $ref: '#/components/schemas/link' - members: - $ref: '#/components/schemas/link' - projects: - $ref: '#/components/schemas/link' - repositories: - $ref: '#/components/schemas/link' - description: Links related to a Team. - team: + type: + type: string + description: The type of selector. + enum: + - branches + - tags + - bookmarks + - default + - custom + pattern: + type: string + description: The name of the matching pipeline definition. + additionalProperties: true + description: A representation of the selector that was used to identify the + pipeline in the YML file. + pipeline_ssh_key_pair: allOf: - - $ref: '#/components/schemas/account' - - title: Team + - $ref: '#/components/schemas/object' + - title: Pipeline SSH Key Pair type: object properties: - links: - $ref: '#/components/schemas/team_links' - description: A team object. - project: + private_key: + type: string + description: The SSH private key. This value will be empty when retrieving + the SSH key pair. + public_key: + type: string + description: The SSH public key. + additionalProperties: true + description: A Pipelines SSH key pair. + pipeline_ssh_public_key: allOf: - $ref: '#/components/schemas/object' - - title: Project + - title: Pipeline SSH Public Key type: object properties: - links: - $ref: '#/components/schemas/project_links' - uuid: + key_type: type: string - description: The project's immutable id. + description: The type of the public key. key: type: string - description: The project's key. - owner: - $ref: '#/components/schemas/team' + description: The base64 encoded public key. + md5_fingerprint: + type: string + description: The MD5 fingerprint of the public key. + sha256_fingerprint: + type: string + description: The SHA-256 fingerprint of the public key. + additionalProperties: true + description: A Pipelines known host public key. + pipeline_state: + allOf: + - $ref: '#/components/schemas/object' + - title: Pipeline State + type: object + additionalProperties: true + description: The representation of the progress state of a pipeline. + pipeline_state_completed: + allOf: + - $ref: '#/components/schemas/pipeline_state' + - title: Pipeline Completed State + type: object + properties: name: type: string - description: The name of the project. - description: + description: The name of pipeline state (COMPLETED). + enum: + - COMPLETED + result: + $ref: '#/components/schemas/pipeline_state_completed_result' + additionalProperties: true + description: A Bitbucket Pipelines COMPLETED pipeline state. + pipeline_state_completed_error: + allOf: + - $ref: '#/components/schemas/pipeline_state_completed_result' + - title: Pipeline Completed Error + type: object + properties: + name: type: string - is_private: - type: boolean - description: |2- - - Indicates whether the project is publicly accessible, or whether it is - private to the team and consequently only visible to team members. - Note that private projects cannot contain public repositories. - created_on: + description: The name of the result (ERROR) + enum: + - ERROR + error: + $ref: '#/components/schemas/pipeline_error' + additionalProperties: true + description: A Bitbucket Pipelines ERROR pipeline result. + pipeline_state_completed_expired: + allOf: + - $ref: '#/components/schemas/pipeline_state_completed_result' + - type: object + properties: + name: type: string - format: date-time - updated_on: + description: The name of the stopped result (EXPIRED). + enum: + - EXPIRED + additionalProperties: true + description: A Bitbucket Pipelines EXPIRED pipeline result. + pipeline_state_completed_failed: + allOf: + - $ref: '#/components/schemas/pipeline_state_completed_result' + - type: object + properties: + name: type: string - format: date-time - has_publicly_visible_repos: - type: boolean - description: |2- - - Indicates whether the project contains publicly visible repositories. - Note that private projects cannot contain public repositories. - description: |- - A Bitbucket project. - Projects are used by teams to organize repositories. - export_options: - title: Export Options - required: - - type - type: object - properties: - type: - type: string - project_key: - type: string - project_name: - type: string - send_email: - type: boolean - include_attachments: - type: boolean - description: Options for issue export. - error: - title: Error - required: - - type - type: object - properties: - type: - type: string - error: - $ref: '#/components/schemas/error_error' - description: Base type for most resource objects. It defines the common `type` - element that identifies an object's type. It also identifies the element as - Swagger's `discriminator`. - example: - type: type - error: - data: {} - detail: detail - message: message - milestone: + description: The name of the failed result (FAILED). + enum: + - FAILED + additionalProperties: true + description: A Bitbucket Pipelines FAILED pipeline result. + pipeline_state_completed_result: allOf: - $ref: '#/components/schemas/object' - - title: Milestone + - title: Pipeline Completed Result type: object + additionalProperties: true + description: A result of a completed pipeline state. + pipeline_state_completed_stopped: + allOf: + - $ref: '#/components/schemas/pipeline_state_completed_result' + - type: object properties: - links: - $ref: '#/components/schemas/version_links' name: type: string - id: - type: integer - description: A milestone as defined in a repository's issue tracker. - treeentry: - title: Tree Entry - required: - - type - type: object - properties: - type: - type: string - path: - type: string - description: The path in the repository - commit: - $ref: '#/components/schemas/commit' - description: Base type for most resource objects. It defines the common `type` - element that identifies an object's type. It also identifies the element as - Swagger's `discriminator`. - example: - path: path - commit: "" - type: type - paginated_treeentries: - title: Paginated Tree Entry - type: object - properties: - size: - minimum: 0 - type: integer - description: "Total number of objects in the response. This is an optional\ - \ element that is not provided in all responses, as it can be expensive\ - \ to compute." - page: - minimum: 1 - type: integer - description: Page number of the current results. This is an optional element - that is not provided in all responses. - pagelen: - minimum: 1 - type: integer - description: Current number of objects on the existing page. The default - value is 10 with 100 being the maximum allowed value. Individual APIs - may enforce different values. - next: - type: string - description: Link to the next page if it exists. The last page of a collection - does not have this value. Use this link to navigate the result set and - refrain from constructing your own URLs. - format: uri - previous: - type: string - description: Link to previous page if it exists. A collections first page - does not have this value. This is an optional element that is not provided - in all responses. Some result sets strictly support forward navigation - and never provide previous links. Clients must anticipate that backwards - navigation is not always available. Use this link to navigate the result - set and refrain from constructing your own URLs. - format: uri - values: - minItems: 0 - uniqueItems: true - type: array - items: - $ref: '#/components/schemas/treeentry' - description: A paginated list of commit_file and/or commit_directory objects. - example: - next: http://example.com/aeiou - size: 0 - previous: http://example.com/aeiou - values: - - path: path - commit: "" - type: type - - path: path - commit: "" - type: type - page: 1 - pagelen: 1 - paginated_accounts: - title: Paginated Accounts - type: object - properties: - size: - minimum: 0 - type: integer - description: "Total number of objects in the response. This is an optional\ - \ element that is not provided in all responses, as it can be expensive\ - \ to compute." - page: - minimum: 1 - type: integer - description: Page number of the current results. This is an optional element - that is not provided in all responses. - pagelen: - minimum: 1 - type: integer - description: Current number of objects on the existing page. The default - value is 10 with 100 being the maximum allowed value. Individual APIs - may enforce different values. - next: - type: string - description: Link to the next page if it exists. The last page of a collection - does not have this value. Use this link to navigate the result set and - refrain from constructing your own URLs. - format: uri - previous: - type: string - description: Link to previous page if it exists. A collections first page - does not have this value. This is an optional element that is not provided - in all responses. Some result sets strictly support forward navigation - and never provide previous links. Clients must anticipate that backwards - navigation is not always available. Use this link to navigate the result - set and refrain from constructing your own URLs. - format: uri - values: - minItems: 0 - uniqueItems: true - type: array - items: - $ref: '#/components/schemas/account' - description: A paginated list of accounts. - example: - next: http://example.com/aeiou - size: 0 - previous: http://example.com/aeiou - values: - - "" - - "" - page: 1 - pagelen: 1 - paginated_workspace_memberships: - title: Paginated Workspace Memberships - type: object - properties: - size: - minimum: 0 - type: integer - description: "Total number of objects in the response. This is an optional\ - \ element that is not provided in all responses, as it can be expensive\ - \ to compute." - page: - minimum: 1 - type: integer - description: Page number of the current results. This is an optional element - that is not provided in all responses. - pagelen: - minimum: 1 - type: integer - description: Current number of objects on the existing page. The default - value is 10 with 100 being the maximum allowed value. Individual APIs - may enforce different values. - next: - type: string - description: Link to the next page if it exists. The last page of a collection - does not have this value. Use this link to navigate the result set and - refrain from constructing your own URLs. - format: uri - previous: - type: string - description: Link to previous page if it exists. A collections first page - does not have this value. This is an optional element that is not provided - in all responses. Some result sets strictly support forward navigation - and never provide previous links. Clients must anticipate that backwards - navigation is not always available. Use this link to navigate the result - set and refrain from constructing your own URLs. - format: uri - values: - minItems: 0 - uniqueItems: true - type: array - items: - $ref: '#/components/schemas/workspace_membership' - description: A paginated list of workspace memberships. - example: - next: http://example.com/aeiou - size: 0 - previous: http://example.com/aeiou - values: - - "" - - "" - page: 1 - pagelen: 1 - repository: + description: The name of the stopped result (STOPPED). + enum: + - STOPPED + additionalProperties: true + description: A Bitbucket Pipelines STOPPED pipeline result. + pipeline_state_completed_successful: allOf: - - $ref: '#/components/schemas/object' - - title: Repository + - $ref: '#/components/schemas/pipeline_state_completed_result' + - type: object + properties: + name: + type: string + description: The name of the successful result (SUCCESSFUL). + enum: + - SUCCESSFUL + additionalProperties: true + description: A Bitbucket Pipelines SUCCESSFUL pipeline result. + pipeline_state_in_progress: + allOf: + - $ref: '#/components/schemas/pipeline_state' + - title: Pipeline In-Progress State type: object properties: - links: - $ref: '#/components/schemas/repository_links' - uuid: + name: type: string - description: "The repository's immutable id. This can be used as a substitute\ - \ for the slug segment in URLs. Doing this guarantees your URLs will\ - \ survive renaming of the repository by its owner, or even transfer\ - \ of the repository to a different user." - full_name: + description: The name of pipeline state (IN_PROGRESS). + enum: + - IN_PROGRESS + stage: + $ref: '#/components/schemas/pipeline_state_in_progress_stage' + additionalProperties: true + description: A Bitbucket Pipelines IN_PROGRESS pipeline state. + pipeline_state_in_progress_paused: + allOf: + - $ref: '#/components/schemas/pipeline_state_in_progress_stage' + - type: object + properties: + name: type: string - description: "The concatenation of the repository owner's username and\ - \ the slugified name, e.g. \"evzijst/interruptingcow\". This is the\ - \ same string used in Bitbucket URLs." - is_private: - type: boolean - parent: - $ref: '#/components/schemas/repository' - scm: + description: The name of the stage (PAUSED) + enum: + - PAUSED + additionalProperties: true + description: A Bitbucket Pipelines PAUSED stage of a pipeline that is in progress. + pipeline_state_in_progress_running: + allOf: + - $ref: '#/components/schemas/pipeline_state_in_progress_stage' + - type: object + properties: + name: type: string + description: The name of the stage (RUNNING) enum: - - git - owner: - $ref: '#/components/schemas/account' + - RUNNING + additionalProperties: true + description: A Bitbucket Pipelines RUNNING stage of a pipeline that is in + progress. + pipeline_state_in_progress_stage: + allOf: + - $ref: '#/components/schemas/object' + - title: Pipeline In-Progress Stage + type: object + additionalProperties: true + description: A result of an in progress pipeline state. + pipeline_state_pending: + allOf: + - $ref: '#/components/schemas/pipeline_state' + - title: Pipeline Pending State + type: object + properties: name: type: string - description: + description: The name of pipeline state (PENDING). + enum: + - PENDING + additionalProperties: true + description: A Bitbucket Pipelines PENDING pipeline state. + pipeline_step: + allOf: + - $ref: '#/components/schemas/object' + - title: Pipeline Step + type: object + properties: + uuid: type: string - created_on: + description: The UUID identifying the step. + started_on: type: string + description: The timestamp when the step execution was started. This is + not set when the step hasn't executed yet. format: date-time - updated_on: + completed_on: type: string + description: The timestamp when the step execution was completed. This + is not set if the step is still in progress. format: date-time - size: - type: integer - language: - type: string - has_issues: - type: boolean - has_wiki: - type: boolean - fork_policy: - type: string - description: |2 - - Controls the rules for forking this repository. - - * **allow_forks**: unrestricted forking - * **no_public_forks**: restrict forking to private forks (forks cannot - be made public later) - * **no_forks**: deny all forking - enum: - - allow_forks - - no_public_forks - - no_forks - project: - $ref: '#/components/schemas/project' - mainbranch: - $ref: '#/components/schemas/branch' - description: A Bitbucket repository. - paginated_snippet_comments: - title: Paginated Snippet Comments - type: object - properties: - size: - minimum: 0 - type: integer - description: "Total number of objects in the response. This is an optional\ - \ element that is not provided in all responses, as it can be expensive\ - \ to compute." - page: - minimum: 1 - type: integer - description: Page number of the current results. This is an optional element - that is not provided in all responses. - pagelen: - minimum: 1 - type: integer - description: Current number of objects on the existing page. The default - value is 10 with 100 being the maximum allowed value. Individual APIs - may enforce different values. - next: - type: string - description: Link to the next page if it exists. The last page of a collection - does not have this value. Use this link to navigate the result set and - refrain from constructing your own URLs. - format: uri - previous: - type: string - description: Link to previous page if it exists. A collections first page - does not have this value. This is an optional element that is not provided - in all responses. Some result sets strictly support forward navigation - and never provide previous links. Clients must anticipate that backwards - navigation is not always available. Use this link to navigate the result - set and refrain from constructing your own URLs. - format: uri - values: - minItems: 0 - uniqueItems: true - type: array - items: - $ref: '#/components/schemas/snippet_comment' - description: A paginated list of snippet comments. - example: - next: http://example.com/aeiou - size: 0 - previous: http://example.com/aeiou - values: - - "" - - "" - page: 1 - pagelen: 1 - paginated_log_entries: - title: Paginated Log Entries - type: object - properties: - size: - minimum: 0 - type: integer - description: "Total number of objects in the response. This is an optional\ - \ element that is not provided in all responses, as it can be expensive\ - \ to compute." - page: - minimum: 1 - type: integer - description: Page number of the current results. This is an optional element - that is not provided in all responses. - pagelen: - minimum: 1 - type: integer - description: Current number of objects on the existing page. The default - value is 10 with 100 being the maximum allowed value. Individual APIs - may enforce different values. - next: - type: string - description: Link to the next page if it exists. The last page of a collection - does not have this value. Use this link to navigate the result set and - refrain from constructing your own URLs. - format: uri - previous: - type: string - description: Link to previous page if it exists. A collections first page - does not have this value. This is an optional element that is not provided - in all responses. Some result sets strictly support forward navigation - and never provide previous links. Clients must anticipate that backwards - navigation is not always available. Use this link to navigate the result - set and refrain from constructing your own URLs. - format: uri - values: - minItems: 0 - type: array - items: - $ref: '#/components/schemas/issue_change' - description: A paginated list of issue changes. - example: - next: http://example.com/aeiou - size: 0 - previous: http://example.com/aeiou - values: - - issue: "" - created_on: 2000-01-23T04:56:07.000+00:00 - name: name - changes: - component: null - milestone: null - kind: null - assignee: - new: new - old: old - state: null - title: null - priority: null - version: null - content: null - links: - issue: null - self: - name: name - href: http://example.com/aeiou - type: type - message: - markup: markdown - raw: raw - html: html - user: "" - - issue: "" - created_on: 2000-01-23T04:56:07.000+00:00 - name: name - changes: - component: null - milestone: null - kind: null - assignee: - new: new - old: old - state: null - title: null - priority: null - version: null - content: null - links: - issue: null - self: - name: name - href: http://example.com/aeiou - type: type - message: - markup: markdown - raw: raw - html: html - user: "" - page: 1 - pagelen: 1 - workspace: + state: + $ref: '#/components/schemas/pipeline_step_state' + image: + $ref: '#/components/schemas/pipeline_image' + setup_commands: + type: array + description: The list of commands that are executed as part of the setup + phase of the build. These commands are executed outside the build container. + items: + $ref: '#/components/schemas/pipeline_command' + script_commands: + type: array + description: The list of build commands. These commands are executed in + the build container. + items: + $ref: '#/components/schemas/pipeline_command' + additionalProperties: true + description: A step of a Bitbucket pipeline. This represents the actual result + of the step execution. + x-bb-default-fields: + - uuid + x-bb-url: "/rest/1.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/pipelines/{pipeline.uuid}/steps/{uuid}" + x-bb-batch-url: "/rest/1.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/pipelines/steps_batch" + x-bb-batch-max-size: 100 + pipeline_step_error: allOf: - $ref: '#/components/schemas/object' - - title: Workspace + - title: Pipeline Step Error type: object properties: - links: - $ref: '#/components/schemas/workspace_links' - uuid: - type: string - description: The workspace's immutable id. - name: + key: type: string - description: The name of the workspace. - slug: + description: The error key. + message: type: string - description: The short label that identifies this workspace. - is_private: - type: boolean - description: |- - Indicates whether the workspace is publicly accessible, or whether it is - private to the members and consequently only visible to members. - created_on: + description: The error message. + additionalProperties: true + description: An error causing a step failure. + pipeline_step_state: + allOf: + - $ref: '#/components/schemas/object' + - title: Pipeline Step State + type: object + additionalProperties: true + description: The representation of the progress state of a pipeline step. + pipeline_step_state_completed: + allOf: + - $ref: '#/components/schemas/pipeline_step_state' + - type: object + properties: + name: type: string - format: date-time - updated_on: + description: The name of pipeline step state (COMPLETED). + enum: + - COMPLETED + result: + $ref: '#/components/schemas/pipeline_step_state_completed_result' + additionalProperties: true + description: A Bitbucket Pipelines COMPLETED pipeline step state. + pipeline_step_state_completed_error: + allOf: + - $ref: '#/components/schemas/pipeline_step_state_completed_result' + - type: object + properties: + name: type: string - format: date-time - description: |- - A Bitbucket workspace. - Workspaces are used to organize repositories. - issue_comment: + description: The name of the result (ERROR) + enum: + - ERROR + error: + $ref: '#/components/schemas/pipeline_step_error' + additionalProperties: true + description: A Bitbucket Pipelines ERROR pipeline step result. + pipeline_step_state_completed_expired: allOf: - - $ref: '#/components/schemas/comment' - - title: Issue Comment - type: object + - $ref: '#/components/schemas/pipeline_step_state_completed_result' + - type: object properties: - issue: - $ref: '#/components/schemas/issue' - description: A issue comment. - issue_attachment: + name: + type: string + description: The name of the result (EXPIRED) + enum: + - EXPIRED + additionalProperties: true + description: A Bitbucket Pipelines EXPIRED pipeline step result. + pipeline_step_state_completed_failed: allOf: - - $ref: '#/components/schemas/object' - - title: Issue Attachment - type: object + - $ref: '#/components/schemas/pipeline_step_state_completed_result' + - type: object properties: - links: - $ref: '#/components/schemas/version_links' name: type: string - description: An issue file attachment's meta data. Note this does not contain - the file's actual contents. - paginated_issue_attachments: - title: Paginated Issue Attachment - type: object - properties: - size: - minimum: 0 - type: integer - description: "Total number of objects in the response. This is an optional\ - \ element that is not provided in all responses, as it can be expensive\ - \ to compute." - page: - minimum: 1 - type: integer - description: Page number of the current results. This is an optional element - that is not provided in all responses. - pagelen: - minimum: 1 - type: integer - description: Current number of objects on the existing page. The default - value is 10 with 100 being the maximum allowed value. Individual APIs - may enforce different values. - next: - type: string - description: Link to the next page if it exists. The last page of a collection - does not have this value. Use this link to navigate the result set and - refrain from constructing your own URLs. - format: uri - previous: - type: string - description: Link to previous page if it exists. A collections first page - does not have this value. This is an optional element that is not provided - in all responses. Some result sets strictly support forward navigation - and never provide previous links. Clients must anticipate that backwards - navigation is not always available. Use this link to navigate the result - set and refrain from constructing your own URLs. - format: uri - values: - minItems: 0 - type: array - items: - $ref: '#/components/schemas/issue_attachment' - description: A paginated list of issue attachments. - example: - next: http://example.com/aeiou - size: 0 - previous: http://example.com/aeiou - values: - - "" - - "" - page: 1 - pagelen: 1 - paginated_changeset: - title: Page - type: object - properties: - size: - minimum: 0 - type: integer - description: "Total number of objects in the response. This is an optional\ - \ element that is not provided in all responses, as it can be expensive\ - \ to compute." - page: - minimum: 1 - type: integer - description: Page number of the current results. This is an optional element - that is not provided in all responses. - pagelen: - minimum: 1 - type: integer - description: Current number of objects on the existing page. The default - value is 10 with 100 being the maximum allowed value. Individual APIs - may enforce different values. - next: - type: string - description: Link to the next page if it exists. The last page of a collection - does not have this value. Use this link to navigate the result set and - refrain from constructing your own URLs. - format: uri - previous: - type: string - description: Link to previous page if it exists. A collections first page - does not have this value. This is an optional element that is not provided - in all responses. Some result sets strictly support forward navigation - and never provide previous links. Clients must anticipate that backwards - navigation is not always available. Use this link to navigate the result - set and refrain from constructing your own URLs. - format: uri - values: - minItems: 0 - uniqueItems: true - type: array - items: - $ref: '#/components/schemas/base_commit' - description: A paginated list of commits. - example: - next: http://example.com/aeiou - size: 0 - previous: http://example.com/aeiou - values: - - "" - - "" - page: 1 - pagelen: 1 - paginated_repositories: - title: Paginated Repositories - type: object - properties: - size: - minimum: 0 - type: integer - description: "Total number of objects in the response. This is an optional\ - \ element that is not provided in all responses, as it can be expensive\ - \ to compute." - page: - minimum: 1 - type: integer - description: Page number of the current results. This is an optional element - that is not provided in all responses. - pagelen: - minimum: 1 - type: integer - description: Current number of objects on the existing page. The default - value is 10 with 100 being the maximum allowed value. Individual APIs - may enforce different values. - next: - type: string - description: Link to the next page if it exists. The last page of a collection - does not have this value. Use this link to navigate the result set and - refrain from constructing your own URLs. - format: uri - previous: - type: string - description: Link to previous page if it exists. A collections first page - does not have this value. This is an optional element that is not provided - in all responses. Some result sets strictly support forward navigation - and never provide previous links. Clients must anticipate that backwards - navigation is not always available. Use this link to navigate the result - set and refrain from constructing your own URLs. - format: uri - values: - minItems: 0 - uniqueItems: true - type: array - items: - $ref: '#/components/schemas/repository' - description: A paginated list of repositories. - example: - next: http://example.com/aeiou - size: 0 - previous: http://example.com/aeiou - values: - - "" - - "" - page: 1 - pagelen: 1 - commit_comment: + description: The name of the result (FAILED) + enum: + - FAILED + additionalProperties: true + description: A Bitbucket Pipelines FAILED pipeline step result. + pipeline_step_state_completed_not_run: + allOf: + - $ref: '#/components/schemas/pipeline_step_state_completed_result' + - type: object + properties: + name: + type: string + description: The name of the result (NOT_RUN) + enum: + - NOT_RUN + additionalProperties: true + description: A Bitbucket Pipelines NOT_RUN pipeline step result. + pipeline_step_state_completed_result: allOf: - - $ref: '#/components/schemas/comment' - - title: Commit Comment + - $ref: '#/components/schemas/object' + - title: Pipeline Completed Step Result type: object + additionalProperties: true + description: A result of a completed pipeline step state. + pipeline_step_state_completed_stopped: + allOf: + - $ref: '#/components/schemas/pipeline_step_state_completed_result' + - type: object properties: - commit: - $ref: '#/components/schemas/commit' - description: A commit comment. - project_deploy_key: + name: + type: string + description: The name of the result (STOPPED) + enum: + - STOPPED + additionalProperties: true + description: A Bitbucket Pipelines STOPPED pipeline step result. + pipeline_step_state_completed_successful: + allOf: + - $ref: '#/components/schemas/pipeline_step_state_completed_result' + - type: object + properties: + name: + type: string + description: The name of the result (SUCCESSFUL) + enum: + - SUCCESSFUL + additionalProperties: true + description: A Bitbucket Pipelines SUCCESSFUL pipeline step result. + pipeline_step_state_in_progress: + allOf: + - $ref: '#/components/schemas/pipeline_step_state' + - type: object + properties: + name: + type: string + description: The name of pipeline step state (IN_PROGRESS). + enum: + - IN_PROGRESS + additionalProperties: true + description: A Bitbucket Pipelines IN_PROGRESS pipeline step state. + pipeline_step_state_pending: + allOf: + - $ref: '#/components/schemas/pipeline_step_state' + - type: object + properties: + name: + type: string + description: The name of pipeline step state (PENDING). + enum: + - PENDING + additionalProperties: true + description: A Bitbucket Pipelines PENDING pipeline step state. + pipeline_step_state_ready: + allOf: + - $ref: '#/components/schemas/pipeline_step_state' + - type: object + properties: + name: + type: string + description: The name of pipeline step state (READY). + enum: + - READY + additionalProperties: true + description: A Bitbucket Pipelines READY pipeline step state. + pipeline_target: allOf: - $ref: '#/components/schemas/object' - - title: Project Deploy Key + - title: Pipeline Target + type: object + additionalProperties: true + description: A representation of the target that a pipeline executes on. + pipeline_trigger: + allOf: + - $ref: '#/components/schemas/object' + - title: Pipeline Trigger + type: object + additionalProperties: true + description: A representation of the trigger used for a pipeline. + pipeline_trigger_manual: + allOf: + - $ref: '#/components/schemas/pipeline_trigger' + - title: Pipeline Manual Trigger + type: object + additionalProperties: true + description: A Bitbucket Pipelines MANUAL trigger. + pipeline_trigger_push: + allOf: + - $ref: '#/components/schemas/pipeline_trigger' + - title: Pipeline Push Trigger + type: object + additionalProperties: true + description: A Bitbucket Pipelines PUSH trigger. + pipeline_variable: + allOf: + - $ref: '#/components/schemas/object' + - title: Pipeline Variable type: object properties: + uuid: + type: string + description: The UUID identifying the variable. key: type: string - description: The deploy key value. - project: - $ref: '#/components/schemas/project' - comment: + description: The unique name of the variable. + value: type: string - description: The comment parsed from the deploy key (if present) - label: + description: "The value of the variable. If the variable is secured, this\ + \ will be empty." + secured: + type: boolean + description: "If true, this variable will be treated as secured. The value\ + \ will never be exposed in the logs or the REST API." + additionalProperties: true + description: A Pipelines variable. + pipelines_config: + allOf: + - $ref: '#/components/schemas/object' + - title: Pipelines Configuration + type: object + properties: + enabled: + type: boolean + description: Whether Pipelines is enabled for the repository. + repository: + $ref: '#/components/schemas/repository' + additionalProperties: true + description: The Pipelines configuration for a repository. + pipelines_ddev_pipeline_step: + allOf: + - $ref: '#/components/schemas/object' + - type: object + additionalProperties: true + description: A step of a Bitbucket pipeline. This represents the actual result + of the step execution. + x-bb-default-fields: + - uuid + x-bb-url: "/rest/1.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/pipelines/{pipeline.uuid}/steps/{uuid}" + x-bb-batch-url: "/rest/1.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/pipelines/steps_batch" + x-bb-batch-max-size: 100 + pipelines_stg_west_pipeline_step: + allOf: + - $ref: '#/components/schemas/object' + - type: object + additionalProperties: true + description: A step of a Bitbucket pipeline. This represents the actual result + of the step execution. + x-bb-default-fields: + - uuid + x-bb-url: "/rest/1.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/pipelines/{pipeline.uuid}/steps/{uuid}" + x-bb-batch-url: "/rest/1.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/pipelines/steps_batch" + x-bb-batch-max-size: 100 + project: + allOf: + - $ref: '#/components/schemas/object' + - title: Project + type: object + properties: + links: + type: object + additionalProperties: false + uuid: type: string - description: The user-defined label for the deploy key - added_on: + description: The project's immutable id. + key: + type: string + description: The project's key. + owner: + $ref: '#/components/schemas/team' + name: + type: string + description: The name of the project. + description: + type: string + is_private: + type: boolean + description: |2- + + Indicates whether the project is publicly accessible, or whether it is + private to the team and consequently only visible to team members. + Note that private projects cannot contain public repositories. + created_on: type: string format: date-time - last_used: + updated_on: type: string format: date-time - links: - $ref: '#/components/schemas/version_links' - created_by: - $ref: '#/components/schemas/account' - description: Represents deploy key for a project. - snippet_commit: - allOf: - - $ref: '#/components/schemas/base_commit' - - title: Snippet Commit - type: object - properties: - links: - $ref: '#/components/schemas/snippet_commit_links' - snippet: - $ref: '#/components/schemas/snippet' - description: "" - paginated_ssh_user_keys: - title: Paginated SSH User Keys - type: object - properties: - size: - minimum: 0 - type: integer - description: "Total number of objects in the response. This is an optional\ - \ element that is not provided in all responses, as it can be expensive\ - \ to compute." - page: - minimum: 1 - type: integer - description: Page number of the current results. This is an optional element - that is not provided in all responses. - pagelen: - minimum: 1 - type: integer - description: Current number of objects on the existing page. The default - value is 10 with 100 being the maximum allowed value. Individual APIs - may enforce different values. - next: - type: string - description: Link to the next page if it exists. The last page of a collection - does not have this value. Use this link to navigate the result set and - refrain from constructing your own URLs. - format: uri - previous: - type: string - description: Link to previous page if it exists. A collections first page - does not have this value. This is an optional element that is not provided - in all responses. Some result sets strictly support forward navigation - and never provide previous links. Clients must anticipate that backwards - navigation is not always available. Use this link to navigate the result - set and refrain from constructing your own URLs. - format: uri - values: - minItems: 0 - uniqueItems: true - type: array - items: - $ref: '#/components/schemas/ssh_account_key' - description: A paginated list of SSH keys. - example: - next: http://example.com/aeiou - size: 0 - previous: http://example.com/aeiou - values: - - "" - - "" - page: 1 - pagelen: 1 - paginated_branchrestrictions: - title: Paginated Branch Restrictions + has_publicly_visible_repos: + type: boolean + description: |2- + + Indicates whether the project contains publicly visible repositories. + Note that private projects cannot contain public repositories. + additionalProperties: true + description: |- + A Bitbucket project. + Projects are used by teams to organize repositories. + project_branching_model: + allOf: + - $ref: '#/components/schemas/object' + - title: Project Branching Model + type: object + properties: + branch_types: + maxItems: 4 + minItems: 0 + uniqueItems: true + type: array + description: The active branch types. + items: + type: object + additionalProperties: false + development: + type: object + additionalProperties: false + production: + type: object + additionalProperties: false + additionalProperties: true + description: A project's branching model + project_deploy_key: + allOf: + - $ref: '#/components/schemas/object' + - title: Project Deploy Key + type: object + properties: + key: + type: string + description: The deploy key value. + project: + $ref: '#/components/schemas/project' + comment: + type: string + description: The comment parsed from the deploy key (if present) + label: + type: string + description: The user-defined label for the deploy key + added_on: + type: string + format: date-time + last_used: + type: string + format: date-time + links: + type: object + additionalProperties: false + created_by: + $ref: '#/components/schemas/account' + additionalProperties: true + description: Represents deploy key for a project. + project_group_permission: + title: Project Group Permission + required: + - type type: object properties: - size: - minimum: 0 - type: integer - description: "Total number of objects in the response. This is an optional\ - \ element that is not provided in all responses, as it can be expensive\ - \ to compute." - page: - minimum: 1 - type: integer - description: Page number of the current results. This is an optional element - that is not provided in all responses. - pagelen: - minimum: 1 - type: integer - description: Current number of objects on the existing page. The default - value is 10 with 100 being the maximum allowed value. Individual APIs - may enforce different values. - next: + type: type: string - description: Link to the next page if it exists. The last page of a collection - does not have this value. Use this link to navigate the result set and - refrain from constructing your own URLs. - format: uri - previous: + links: + type: object + additionalProperties: false + permission: type: string - description: Link to previous page if it exists. A collections first page - does not have this value. This is an optional element that is not provided - in all responses. Some result sets strictly support forward navigation - and never provide previous links. Clients must anticipate that backwards - navigation is not always available. Use this link to navigate the result - set and refrain from constructing your own URLs. - format: uri - values: - minItems: 0 - uniqueItems: true - type: array - items: - $ref: '#/components/schemas/branchrestriction' - description: A paginated list of branch restriction rules. + enum: + - read + - write + - create-repo + - admin + - none + group: + $ref: '#/components/schemas/group' + project: + $ref: '#/components/schemas/project' + additionalProperties: true + description: A group's permission for a given project. example: - next: http://example.com/aeiou - size: 0 - previous: http://example.com/aeiou - values: - - "" - - "" - page: 1 - pagelen: 1 - paginated_versions: - title: Paginated Versions + project: "" + links: {} + permission: read + type: type + group: "" + x-schema-name: project_group_permission + project_user_permission: + title: Project User Permission + required: + - type type: object properties: - size: - minimum: 0 - type: integer - description: "Total number of objects in the response. This is an optional\ - \ element that is not provided in all responses, as it can be expensive\ - \ to compute." - page: - minimum: 1 - type: integer - description: Page number of the current results. This is an optional element - that is not provided in all responses. - pagelen: - minimum: 1 - type: integer - description: Current number of objects on the existing page. The default - value is 10 with 100 being the maximum allowed value. Individual APIs - may enforce different values. - next: + type: type: string - description: Link to the next page if it exists. The last page of a collection - does not have this value. Use this link to navigate the result set and - refrain from constructing your own URLs. - format: uri - previous: + links: + type: object + additionalProperties: false + permission: type: string - description: Link to previous page if it exists. A collections first page - does not have this value. This is an optional element that is not provided - in all responses. Some result sets strictly support forward navigation - and never provide previous links. Clients must anticipate that backwards - navigation is not always available. Use this link to navigate the result - set and refrain from constructing your own URLs. - format: uri - values: - minItems: 0 - uniqueItems: true - type: array - items: - $ref: '#/components/schemas/version' - description: A paginated list of issue tracker versions. + enum: + - read + - write + - create-repo + - admin + - none + user: + $ref: '#/components/schemas/user' + project: + $ref: '#/components/schemas/project' + additionalProperties: true + description: A user's direct permission for a given project. example: - next: http://example.com/aeiou - size: 0 - previous: http://example.com/aeiou - values: - - "" - - "" - page: 1 - pagelen: 1 - comment: + project: "" + links: {} + permission: read + type: type + user: "" + x-schema-name: project_user_permission + pullrequest: allOf: - $ref: '#/components/schemas/object' - - title: Comment + - title: Pull Request type: object properties: + links: + type: object + additionalProperties: false id: type: integer + description: The pull request's unique ID. Note that pull request IDs + are only unique within their associated repository. + title: + type: string + description: Title of the pull request. + rendered: + title: Rendered Pull Request Markup + type: object + additionalProperties: false + description: "User provided pull request text, interpreted in a markup\ + \ language and rendered in HTML" + summary: + type: object + additionalProperties: false + state: + type: string + description: The pull request's current status. + enum: + - OPEN + - MERGED + - DECLINED + - SUPERSEDED + author: + $ref: '#/components/schemas/account' + source: + $ref: '#/components/schemas/pullrequest_endpoint' + destination: + $ref: '#/components/schemas/pullrequest_endpoint' + merge_commit: + title: Pull Request Commit + type: object + additionalProperties: false + comment_count: + minimum: 0 + type: integer + description: The number of comments for a specific pull request. + task_count: + minimum: 0 + type: integer + description: The number of open tasks for a specific pull request. + close_source_branch: + type: boolean + description: A boolean flag indicating if merging the pull request closes + the source branch. + closed_by: + $ref: '#/components/schemas/account' + reason: + type: string + description: Explains why a pull request was declined. This field is only + applicable to pull requests in rejected state. created_on: type: string + description: The ISO8601 timestamp the request was created. format: date-time updated_on: type: string + description: The ISO8601 timestamp the request was last updated. format: date-time - content: - $ref: '#/components/schemas/Rendered Pull Request Markup_title' - user: - $ref: '#/components/schemas/account' - deleted: - type: boolean - parent: - $ref: '#/components/schemas/comment' - inline: - $ref: '#/components/schemas/comment_inline' - links: - $ref: '#/components/schemas/comment_links' - description: The base type for all comments. This type should be considered - abstract. Each of the "commentable" resources defines its own subtypes (e.g. - `issue_comment`). - repository_permission: - title: Repository Permission - required: - - type + reviewers: + type: array + description: "The list of users that were added as reviewers on this pull\ + \ request when it was created. For performance reasons, the API only\ + \ includes this list on a pull request's `self` URL." + items: + $ref: '#/components/schemas/account' + participants: + type: array + description: " The list of users that are collaborating on this\ + \ pull request.\n Collaborators are user that:\n\n * are\ + \ added to the pull request as a reviewer (part of the reviewers\n \ + \ list)\n * are not explicit reviewers, but have commented\ + \ on the pull request\n * are not explicit reviewers, but have\ + \ approved the pull request\n\n Each user is wrapped in an object\ + \ that indicates the user's role and\n whether they have approved\ + \ the pull request. For performance reasons,\n the API only returns\ + \ this list when an API requests a pull request by\n id.\n \ + \ " + items: + $ref: '#/components/schemas/participant' + additionalProperties: true + description: A pull request object. + pullrequest_comment: + allOf: + - $ref: '#/components/schemas/comment' + - title: Pull Request Comment + type: object + properties: + pullrequest: + $ref: '#/components/schemas/pullrequest' + resolution: + $ref: '#/components/schemas/comment_resolution' + additionalProperties: true + description: A pullrequest comment. + pullrequest_endpoint: + title: Pull Request Endpoint type: object properties: - type: - type: string - permission: - type: string - enum: - - read - - write - - admin - - none - user: - $ref: '#/components/schemas/user' repository: $ref: '#/components/schemas/repository' - description: A user's permission for a given repository. - example: - permission: read - type: type - repository: "" - user: "" - effective_repo_branching_model: - allOf: - - $ref: '#/components/schemas/object' - - title: Effective Repository Branching Model - type: object - properties: - branch_types: - maxItems: 4 - minItems: 0 - uniqueItems: true - type: array - description: The active branch types. - items: - $ref: '#/components/schemas/branching_model_branch_types' - development: - $ref: '#/components/schemas/branching_model_development' - production: - $ref: '#/components/schemas/branching_model_development' - description: A repository's effective branching model + branch: + title: Pull Request Branch + type: object + additionalProperties: false + commit: + title: Pull Request Commit + type: object + additionalProperties: false + additionalProperties: false pullrequest_merge_parameters: title: Pull Request Merge Parameters required: @@ -27763,940 +28848,1002 @@ components: merge_strategy: type: string description: The merge strategy that will be used to merge the pull request. + default: merge_commit enum: - merge_commit - squash - fast_forward - default: merge_commit + additionalProperties: true description: The metadata that describes a pull request merge. - webhook_subscription: + ref: + title: Ref + required: + - type + type: object + properties: + type: + type: string + links: + type: object + additionalProperties: false + name: + type: string + description: The name of the ref. + target: + $ref: '#/components/schemas/commit' + additionalProperties: true + description: "A ref object, representing a branch or tag in a repository." + example: + name: name + links: {} + type: type + target: "" + x-schema-name: ref + report: allOf: - $ref: '#/components/schemas/object' - - title: Webhook Subscription + - title: Commit Report + type: object + properties: + uuid: + type: string + description: The UUID that can be used to identify the report. + title: + type: string + description: The title of the report. + details: + type: string + description: A string to describe the purpose of the report. + external_id: + type: string + description: "ID of the report provided by the report creator. It can\ + \ be used to identify the report as an alternative to it's generated\ + \ uuid. It is not used by Bitbucket, but only by the report creator\ + \ for updating or deleting this specific report. Needs to be unique." + reporter: + type: string + description: A string to describe the tool or company who created the + report. + link: + type: string + description: A URL linking to the results of the report in an external + tool. + format: uri + remote_link_enabled: + type: boolean + description: "If enabled, a remote link is created in Jira for the issue\ + \ associated with the commit the report belongs to." + logo_url: + type: string + description: "A URL to the report logo. If none is provided, the default\ + \ insights logo will be used." + format: uri + report_type: + type: string + description: The type of the report. + enum: + - SECURITY + - COVERAGE + - TEST + - BUG + result: + type: string + description: The state of the report. May be set to PENDING and later + updated. + enum: + - PASSED + - FAILED + - PENDING + data: + type: array + description: An array of data fields to display information on the report. + Maximum 10. + items: + $ref: '#/components/schemas/report_data' + created_on: + type: string + description: The timestamp when the report was created. + format: date-time + updated_on: + type: string + description: The timestamp when the report was updated. + format: date-time + additionalProperties: true + description: A report for a commit. + x-bb-default-fields: + - uuid + - commitHash + x-bb-url: "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/commits/{commitHash}/reports/{uuid}" + report_annotation: + allOf: + - $ref: '#/components/schemas/object' + - title: Report Annotation type: object properties: + external_id: + type: string + description: "ID of the annotation provided by the annotation creator.\ + \ It can be used to identify the annotation as an alternative to it's\ + \ generated uuid. It is not used by Bitbucket, but only by the annotation\ + \ creator for updating or deleting this specific annotation. Needs to\ + \ be unique." uuid: type: string - description: The webhook's id - url: + description: The UUID that can be used to identify the annotation. + annotation_type: + type: string + description: The type of the report. + enum: + - VULNERABILITY + - CODE_SMELL + - BUG + path: + type: string + description: "The path of the file on which this annotation should be\ + \ placed. This is the path of the file relative to the git repository.\ + \ If no path is provided, then it will appear in the overview modal\ + \ on all pull requests where the tip of the branch is the given commit,\ + \ regardless of which files were modified." + line: + minimum: 1 + type: integer + description: "The line number that the annotation should belong to. If\ + \ no line number is provided, then it will default to 0 and in a pull\ + \ request it will appear at the top of the file specified by the path\ + \ field." + summary: + type: string + description: The message to display to users. + details: + type: string + description: The details to show to users when clicking on the annotation. + result: + type: string + description: The state of the report. May be set to PENDING and later + updated. + enum: + - PASSED + - FAILED + - SKIPPED + - IGNORED + severity: + type: string + description: The severity of the annotation. + enum: + - CRITICAL + - HIGH + - MEDIUM + - LOW + link: + type: string + description: A URL linking to the annotation in an external tool. + format: uri + created_on: + type: string + description: The timestamp when the report was created. + format: date-time + updated_on: + type: string + description: The timestamp when the report was updated. + format: date-time + additionalProperties: true + description: A report for a commit. + x-bb-default-fields: + - uuid + x-bb-url: "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/commits/{commit.hash}/reports/{reportUuid}/annotations/{uuid}" + report_data: + title: Report Data + type: object + properties: + type: + type: string + description: "The type of data contained in the value field. If not provided,\ + \ then the value will be detected as a boolean, number or string." + enum: + - BOOLEAN + - DATE + - DURATION + - LINK + - NUMBER + - PERCENTAGE + - TEXT + title: + type: string + description: A string describing what this data field represents. + value: + type: object + properties: {} + description: The value of the data element. + description: A key-value element that will be displayed along with the report. + repository: + allOf: + - $ref: '#/components/schemas/object' + - title: Repository + type: object + properties: + created_on: + type: string + format: date-time + description: + type: string + fork_policy: + type: string + description: |2 + + Controls the rules for forking this repository. + + * **allow_forks**: unrestricted forking + * **no_public_forks**: restrict forking to private forks (forks cannot + be made public later) + * **no_forks**: deny all forking + enum: + - allow_forks + - no_public_forks + - no_forks + full_name: + type: string + description: "The concatenation of the repository owner's username and\ + \ the slugified name, e.g. \"evzijst/interruptingcow\". This is the\ + \ same string used in Bitbucket URLs." + has_issues: + type: boolean + has_wiki: + type: boolean + is_private: + type: boolean + language: type: string - description: The URL events get delivered to. - format: uri - description: + links: + type: object + additionalProperties: false + mainbranch: + $ref: '#/components/schemas/branch' + name: type: string - description: A user-defined description of the webhook. - subject_type: + owner: + $ref: '#/components/schemas/account' + parent: + $ref: '#/components/schemas/repository' + project: + $ref: '#/components/schemas/project' + scm: type: string - description: The type of entity. Set to either `repository` or `workspace` - based on where the subscription is defined. enum: - - repository - - workspace - subject: - $ref: '#/components/schemas/object' - active: - type: boolean - created_at: - type: string - format: date-time - events: - minItems: 1 - uniqueItems: true - type: array - description: The events this webhook is subscribed to. - items: - type: string - enum: - - pullrequest:changes_request_created - - repo:push - - repo:commit_status_created - - pullrequest:comment_updated - - pullrequest:updated - - repo:transfer - - pullrequest:fulfilled - - issue:created - - repo:commit_status_updated - - pullrequest:rejected - - pullrequest:created - - repo:commit_comment_created - - repo:deleted - - pullrequest:approved - - pullrequest:unapproved - - repo:updated - - repo:fork - - pullrequest:changes_request_removed - - issue:updated - - project:updated - - repo:created - - pullrequest:comment_deleted - - pullrequest:comment_created - - repo:imported - - issue:comment_created - description: A Webhook subscription. - tag: - allOf: - - $ref: '#/components/schemas/ref' - - title: Tag - type: object - properties: - message: + - git + size: + type: integer + slug: type: string - description: "The message associated with the tag, if available." - date: + description: "Slugified name, the same string that is used in Bitbucket\ + \ URLs." + updated_on: type: string - description: "The date that the tag was created, if available" format: date-time - tagger: - $ref: '#/components/schemas/author' - description: "A tag object, representing a tag in a repository." - paginated_workspaces: - title: Paginated Workspaces - type: object - properties: - size: - minimum: 0 - type: integer - description: "Total number of objects in the response. This is an optional\ - \ element that is not provided in all responses, as it can be expensive\ - \ to compute." - page: - minimum: 1 - type: integer - description: Page number of the current results. This is an optional element - that is not provided in all responses. - pagelen: - minimum: 1 - type: integer - description: Current number of objects on the existing page. The default - value is 10 with 100 being the maximum allowed value. Individual APIs - may enforce different values. - next: - type: string - description: Link to the next page if it exists. The last page of a collection - does not have this value. Use this link to navigate the result set and - refrain from constructing your own URLs. - format: uri - previous: - type: string - description: Link to previous page if it exists. A collections first page - does not have this value. This is an optional element that is not provided - in all responses. Some result sets strictly support forward navigation - and never provide previous links. Clients must anticipate that backwards - navigation is not always available. Use this link to navigate the result - set and refrain from constructing your own URLs. - format: uri - values: - minItems: 0 - uniqueItems: true - type: array - items: - $ref: '#/components/schemas/workspace' - description: A paginated list of workspaces. - example: - next: http://example.com/aeiou - size: 0 - previous: http://example.com/aeiou - values: - - "" - - "" - page: 1 - pagelen: 1 - paginated_pullrequest_comments: - title: Paginated Pull Request Comments + uuid: + type: string + description: "The repository's immutable id. This can be used as a substitute\ + \ for the slug segment in URLs. Doing this guarantees your URLs will\ + \ survive renaming of the repository by its owner, or even transfer\ + \ of the repository to a different user." + additionalProperties: true + description: A Bitbucket repository. + repository_group_permission: + title: Repository Group Permission + required: + - type type: object properties: - size: - minimum: 0 - type: integer - description: "Total number of objects in the response. This is an optional\ - \ element that is not provided in all responses, as it can be expensive\ - \ to compute." - page: - minimum: 1 - type: integer - description: Page number of the current results. This is an optional element - that is not provided in all responses. - pagelen: - minimum: 1 - type: integer - description: Current number of objects on the existing page. The default - value is 10 with 100 being the maximum allowed value. Individual APIs - may enforce different values. - next: + type: type: string - description: Link to the next page if it exists. The last page of a collection - does not have this value. Use this link to navigate the result set and - refrain from constructing your own URLs. - format: uri - previous: + links: + type: object + additionalProperties: false + permission: type: string - description: Link to previous page if it exists. A collections first page - does not have this value. This is an optional element that is not provided - in all responses. Some result sets strictly support forward navigation - and never provide previous links. Clients must anticipate that backwards - navigation is not always available. Use this link to navigate the result - set and refrain from constructing your own URLs. - format: uri - values: - minItems: 0 - uniqueItems: true - type: array - items: - $ref: '#/components/schemas/pullrequest_comment' - description: A paginated list of pullrequest comments. + enum: + - read + - write + - admin + - none + group: + $ref: '#/components/schemas/group' + repository: + $ref: '#/components/schemas/repository' + additionalProperties: true + description: A group's permission for a given repository. example: - next: http://example.com/aeiou - size: 0 - previous: http://example.com/aeiou - values: - - "" - - "" - page: 1 - pagelen: 1 - paginated_repository_permissions: - title: Paginated Repository Permissions + links: {} + permission: read + type: type + repository: "" + group: "" + x-schema-name: repository_group_permission + repository_inheritance_state: + title: Repository Inheritance State + required: + - type type: object properties: - size: - minimum: 0 - type: integer - description: "Total number of objects in the response. This is an optional\ - \ element that is not provided in all responses, as it can be expensive\ - \ to compute." - page: - minimum: 1 - type: integer - description: Page number of the current results. This is an optional element - that is not provided in all responses. - pagelen: - minimum: 1 - type: integer - description: Current number of objects on the existing page. The default - value is 10 with 100 being the maximum allowed value. Individual APIs - may enforce different values. - next: - type: string - description: Link to the next page if it exists. The last page of a collection - does not have this value. Use this link to navigate the result set and - refrain from constructing your own URLs. - format: uri - previous: + type: type: string - description: Link to previous page if it exists. A collections first page - does not have this value. This is an optional element that is not provided - in all responses. Some result sets strictly support forward navigation - and never provide previous links. Clients must anticipate that backwards - navigation is not always available. Use this link to navigate the result - set and refrain from constructing your own URLs. - format: uri - values: - minItems: 0 - uniqueItems: true - type: array - items: - $ref: '#/components/schemas/repository_permission' - description: A paginated list of repository permissions. + override_settings: + type: object + properties: {} + example: {} + additionalProperties: true + description: A json object representing the repository's inheritance state values example: - next: http://example.com/aeiou - size: 0 - previous: http://example.com/aeiou - values: - - permission: read - type: type - repository: "" - user: "" - - permission: read - type: type - repository: "" - user: "" - page: 1 - pagelen: 1 - paginated_projects: - title: Paginated Projects + override_settings: {} + type: type + x-schema-name: repository_inheritance_state + repository_permission: + title: Repository Permission + required: + - type type: object properties: - size: - minimum: 0 - type: integer - description: "Total number of objects in the response. This is an optional\ - \ element that is not provided in all responses, as it can be expensive\ - \ to compute." - page: - minimum: 1 - type: integer - description: Page number of the current results. This is an optional element - that is not provided in all responses. - pagelen: - minimum: 1 - type: integer - description: Current number of objects on the existing page. The default - value is 10 with 100 being the maximum allowed value. Individual APIs - may enforce different values. - next: + type: type: string - description: Link to the next page if it exists. The last page of a collection - does not have this value. Use this link to navigate the result set and - refrain from constructing your own URLs. - format: uri - previous: + permission: type: string - description: Link to previous page if it exists. A collections first page - does not have this value. This is an optional element that is not provided - in all responses. Some result sets strictly support forward navigation - and never provide previous links. Clients must anticipate that backwards - navigation is not always available. Use this link to navigate the result - set and refrain from constructing your own URLs. - format: uri - values: - minItems: 0 - uniqueItems: true - type: array - items: - $ref: '#/components/schemas/project' - description: A paginated list of projects + enum: + - read + - write + - admin + - none + user: + $ref: '#/components/schemas/user' + repository: + $ref: '#/components/schemas/repository' + additionalProperties: true + description: A user's permission for a given repository. example: - next: http://example.com/aeiou - size: 0 - previous: http://example.com/aeiou - values: - - "" - - "" - page: 1 - pagelen: 1 - diffstat: - title: Diff Stat + permission: read + type: type + repository: "" + user: "" + x-schema-name: repository_permission + repository_user_permission: + title: Repository User Permission required: - type type: object properties: type: type: string - status: + permission: type: string enum: - - added - - removed - - modified - - renamed - lines_added: - type: integer - lines_removed: + - read + - write + - admin + - none + user: + $ref: '#/components/schemas/user' + repository: + $ref: '#/components/schemas/repository' + links: + type: object + additionalProperties: false + additionalProperties: true + description: A user's direct permission for a given repository. + example: + permission: read + links: {} + type: type + repository: "" + user: "" + x-schema-name: repository_user_permission + search_code_search_result: + type: object + properties: + type: + type: string + readOnly: true + content_match_count: type: integer - old: - $ref: '#/components/schemas/commit_file' - new: + format: int64 + readOnly: true + content_matches: + type: array + readOnly: true + items: + $ref: '#/components/schemas/search_content_match' + path_matches: + type: array + readOnly: true + items: + $ref: '#/components/schemas/search_segment' + file: $ref: '#/components/schemas/commit_file' - description: A diffstat object that includes a summary of changes made to a - file between two commits. example: - new: null - lines_removed: 5 - old: + file: path: path escaped_path: escaped_path commit: "" attributes: link type: type - lines_added: 5 + content_matches: + - lines: + - line: 5 + segments: + - match: true + text: text + - match: true + text: text + - line: 5 + segments: + - match: true + text: text + - match: true + text: text + - lines: + - line: 5 + segments: + - match: true + text: text + - match: true + text: text + - line: 5 + segments: + - match: true + text: text + - match: true + text: text + content_match_count: 5 + path_matches: + - null + - null type: type - status: added - paginated_diffstats: - title: Paginated Diff Stat + search_content_match: + type: object + properties: + lines: + type: array + readOnly: true + items: + $ref: '#/components/schemas/search_line' + example: + lines: + - line: 5 + segments: + - match: true + text: text + - match: true + text: text + - line: 5 + segments: + - match: true + text: text + - match: true + text: text + search_line: + type: object + properties: + line: + type: integer + format: int32 + readOnly: true + segments: + type: array + readOnly: true + items: + $ref: '#/components/schemas/search_segment' + example: + line: 5 + segments: + - match: true + text: text + - match: true + text: text + search_result_page: type: object properties: size: - minimum: 0 type: integer - description: "Total number of objects in the response. This is an optional\ - \ element that is not provided in all responses, as it can be expensive\ - \ to compute." + format: int64 + readOnly: true page: - minimum: 1 type: integer - description: Page number of the current results. This is an optional element - that is not provided in all responses. + format: int32 + readOnly: true pagelen: - minimum: 1 type: integer - description: Current number of objects on the existing page. The default - value is 500 with 5000 being the maximum allowed value. + format: int32 + readOnly: true + query_substituted: + type: boolean + readOnly: true next: type: string - description: Link to the next page if it exists. The last page of a collection - does not have this value. Use this link to navigate the result set and - refrain from constructing your own URLs. format: uri + readOnly: true previous: type: string - description: Link to previous page if it exists. A collections first page - does not have this value. This is an optional element that is not provided - in all responses. Some result sets strictly support forward navigation - and never provide previous links. Clients must anticipate that backwards - navigation is not always available. Use this link to navigate the result - set and refrain from constructing your own URLs. format: uri + readOnly: true values: - minItems: 0 - uniqueItems: true type: array + readOnly: true items: - $ref: '#/components/schemas/diffstat' - description: A paginated list of diffstats. + $ref: '#/components/schemas/search_code_search_result' example: next: http://example.com/aeiou size: 0 previous: http://example.com/aeiou + query_substituted: true values: - - new: null - lines_removed: 5 - old: + - file: path: path escaped_path: escaped_path commit: "" attributes: link type: type - lines_added: 5 + content_matches: + - lines: + - line: 5 + segments: + - match: true + text: text + - match: true + text: text + - line: 5 + segments: + - match: true + text: text + - match: true + text: text + - lines: + - line: 5 + segments: + - match: true + text: text + - match: true + text: text + - line: 5 + segments: + - match: true + text: text + - match: true + text: text + content_match_count: 5 + path_matches: + - null + - null type: type - status: added - - new: null - lines_removed: 5 - old: + - file: path: path escaped_path: escaped_path commit: "" attributes: link type: type - lines_added: 5 + content_matches: + - lines: + - line: 5 + segments: + - match: true + text: text + - match: true + text: text + - line: 5 + segments: + - match: true + text: text + - match: true + text: text + - lines: + - line: 5 + segments: + - match: true + text: text + - match: true + text: text + - line: 5 + segments: + - match: true + text: text + - match: true + text: text + content_match_count: 5 + path_matches: + - null + - null type: type - status: added - page: 1 + page: 6 pagelen: 1 - page: - title: Page - type: object - properties: - size: - minimum: 0 - type: integer - description: "Total number of objects in the response. This is an optional\ - \ element that is not provided in all responses, as it can be expensive\ - \ to compute." - page: - minimum: 1 - type: integer - description: Page number of the current results. This is an optional element - that is not provided in all responses. - pagelen: - minimum: 1 - type: integer - description: Current number of objects on the existing page. The default - value is 10 with 100 being the maximum allowed value. Individual APIs - may enforce different values. - next: - type: string - description: Link to the next page if it exists. The last page of a collection - does not have this value. Use this link to navigate the result set and - refrain from constructing your own URLs. - format: uri - previous: - type: string - description: Link to previous page if it exists. A collections first page - does not have this value. This is an optional element that is not provided - in all responses. Some result sets strictly support forward navigation - and never provide previous links. Clients must anticipate that backwards - navigation is not always available. Use this link to navigate the result - set and refrain from constructing your own URLs. - format: uri - subject_types: - title: Subject Types - type: object - properties: - repository: - $ref: '#/components/schemas/subject_types_repository' - workspace: - $ref: '#/components/schemas/subject_types_repository' - description: The mapping of resource/subject types pointing to their individual - event types. - example: - workspace: null - repository: - events: - name: name - href: http://example.com/aeiou - issue_job_status: - title: Issue Job Status + search_segment: type: object properties: - type: - type: string - status: - type: string - description: The status of the import/export job - enum: - - ACCEPTED - - STARTED - - RUNNING - - FAILURE - phase: + text: type: string - description: The phase of the import/export job - total: - type: integer - description: The total number of issues being imported/exported - count: - type: integer - description: The total number of issues already imported/exported - pct: - maximum: 100 - minimum: 0 - type: number - description: The percentage of issues already imported/exported - description: The status of an import or export job + readOnly: true + match: + type: boolean + readOnly: true example: - phase: phase - pct: 14.658129805029452 - total: 0 - count: 6 - type: type - status: ACCEPTED - branching_model_branch_types: - required: - - kind - - prefix + match: true + text: text + snippet: + allOf: + - $ref: '#/components/schemas/object' + - title: Snippet + type: object + properties: + id: + minimum: 0 + type: integer + title: + type: string + scm: + type: string + description: The DVCS used to store the snippet. + enum: + - git + created_on: + type: string + format: date-time + updated_on: + type: string + format: date-time + owner: + $ref: '#/components/schemas/account' + creator: + $ref: '#/components/schemas/account' + is_private: + type: boolean + additionalProperties: true + description: A snippet object. + snippet_comment: + allOf: + - $ref: '#/components/schemas/object' + - title: Snippet Comment + type: object + properties: + links: + type: object + additionalProperties: false + snippet: + $ref: '#/components/schemas/snippet' + additionalProperties: true + description: A comment on a snippet. + snippet_commit: + allOf: + - $ref: '#/components/schemas/base_commit' + - title: Snippet Commit + type: object + properties: + links: + type: object + additionalProperties: false + snippet: + $ref: '#/components/schemas/snippet' + additionalProperties: true + description: "" + ssh_account_key: + allOf: + - $ref: '#/components/schemas/ssh_key' + - title: SSH Account Key + type: object + properties: + owner: + $ref: '#/components/schemas/account' + additionalProperties: true + description: Represents an SSH public key for a user. + ssh_key: + allOf: + - $ref: '#/components/schemas/object' + - title: SSH Key + type: object + properties: + uuid: + type: string + description: The SSH key's immutable ID. + key: + type: string + description: The SSH public key value in OpenSSH format. + comment: + type: string + description: The comment parsed from the SSH key (if present) + label: + type: string + description: The user-defined label for the SSH key + created_on: + type: string + format: date-time + last_used: + type: string + format: date-time + links: + type: object + additionalProperties: false + additionalProperties: true + description: Base type for representing SSH public keys. + stg_west_report: + allOf: + - $ref: '#/components/schemas/object' + - type: object + additionalProperties: true + description: A report for a commit. + x-bb-default-fields: + - uuid + - commitHash + x-bb-url: "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/commits/{commitHash}/reports/{uuid}" + subject_types: + title: Subject Types type: object properties: - kind: - type: string - description: The kind of branch. - enum: - - feature - - bugfix - - release - - hotfix - prefix: - type: string - description: "The prefix for this branch type. A branch with this prefix\ - \ will be classified as per `kind`. The prefix must be a valid prefix\ - \ for a branch and must always exist. It cannot be blank, empty or `null`." - branching_model_development: + repository: + type: object + additionalProperties: false + workspace: + type: object + additionalProperties: false + additionalProperties: false + description: The mapping of resource/subject types pointing to their individual + event types. + example: + workspace: {} + repository: {} + tag: + allOf: + - $ref: '#/components/schemas/ref' + - title: Tag + type: object + properties: + message: + type: string + description: "The message associated with the tag, if available." + date: + type: string + description: "The date that the tag was created, if available" + format: date-time + tagger: + $ref: '#/components/schemas/author' + additionalProperties: true + description: "A tag object, representing a tag in a repository." + team: + allOf: + - $ref: '#/components/schemas/account' + - title: Team + type: object + properties: + links: + $ref: '#/components/schemas/team_links' + additionalProperties: true + description: A team object. + team_links: + allOf: + - $ref: '#/components/schemas/account_links' + - title: Team Links + type: object + properties: + self: + $ref: '#/components/schemas/link' + html: + $ref: '#/components/schemas/link' + members: + $ref: '#/components/schemas/link' + projects: + $ref: '#/components/schemas/link' + repositories: + $ref: '#/components/schemas/link' + additionalProperties: true + description: Links related to a Team. + treeentry: + title: Tree Entry required: - - name - - use_mainbranch - type: object - properties: - branch: - $ref: '#/components/schemas/branch' - name: - type: string - description: Name of the target branch. Will be listed here even when the - target branch does not exist. Will be `null` if targeting the main branch - and the repository is empty. - use_mainbranch: - type: boolean - description: Indicates if the setting points at an explicit branch (`false`) - or tracks the main branch (`true`). - Link: - title: Link + - type type: object properties: - href: + type: type: string - format: uri - name: + path: type: string - description: A link to a resource related to this object. - example: - name: name - href: http://example.com/aeiou - version_links: - type: object - properties: - self: - $ref: '#/components/schemas/Link' - example: - self: - name: name - href: http://example.com/aeiou - group_links: - type: object - properties: - self: - $ref: '#/components/schemas/Link' - html: - $ref: '#/components/schemas/Link' - commitstatus_links: - type: object - properties: - self: - $ref: '#/components/schemas/Link' + description: The path in the repository commit: - $ref: '#/components/schemas/Link' - ref_links: - type: object - properties: - self: - $ref: '#/components/schemas/Link' - commits: - $ref: '#/components/schemas/Link' - html: - $ref: '#/components/schemas/Link' + $ref: '#/components/schemas/commit' + additionalProperties: true + description: Base type for most resource objects. It defines the common `type` + element that identifies an object's type. It also identifies the element as + Swagger's `discriminator`. example: - self: - name: name - href: http://example.com/aeiou - commits: null - html: null - Pull Request Branch: - title: Pull Request Branch - type: object - properties: - name: - type: string - merge_strategies: - type: array - description: "Available merge strategies, when this endpoint is the destination\ - \ of the pull request." - items: + path: path + commit: "" + type: type + x-schema-name: treeentry + user: + allOf: + - $ref: '#/components/schemas/account' + - title: User + type: object + properties: + links: + $ref: '#/components/schemas/user_links' + account_id: + type: string + description: The user's Atlassian account ID. + account_status: + type: string + description: "The status of the account. Currently the only possible value\ + \ is \"active\", but more values may be added in the future." + has_2fa_enabled: + type: boolean + nickname: + type: string + description: "Account name defined by the owner. Should be used instead\ + \ of the \"username\" field. Note that \"nickname\" cannot be used in\ + \ place of \"username\" in URLs and queries, as \"nickname\" is not\ + \ guaranteed to be unique." + is_staff: + type: boolean + website: + type: string + additionalProperties: true + description: A user object. + user_links: + allOf: + - $ref: '#/components/schemas/account_links' + - title: User Links + type: object + properties: + self: + $ref: '#/components/schemas/link' + html: + $ref: '#/components/schemas/link' + repositories: + $ref: '#/components/schemas/link' + additionalProperties: true + description: Links related to a User. + version: + allOf: + - $ref: '#/components/schemas/object' + - title: Version + type: object + properties: + links: + type: object + additionalProperties: false + name: + type: string + id: + type: integer + additionalProperties: true + description: A version as defined in a repository's issue tracker. + webhook_subscription: + allOf: + - $ref: '#/components/schemas/object' + - title: Webhook Subscription + type: object + properties: + uuid: + type: string + description: The webhook's id + url: + type: string + description: The URL events get delivered to. + format: uri + description: + type: string + description: A user-defined description of the webhook. + subject_type: + type: string + description: The type of entity. Set to either `repository` or `workspace` + based on where the subscription is defined. + enum: + - repository + - workspace + subject: + $ref: '#/components/schemas/object' + active: + type: boolean + created_at: + type: string + format: date-time + events: + minItems: 1 + uniqueItems: true + type: array + description: The events this webhook is subscribed to. + items: + type: string + enum: + - repo:fork + - issue:created + - pullrequest:updated + - repo:transfer + - pullrequest:fulfilled + - pullrequest:changes_request_removed + - pullrequest:comment_updated + - repo:created + - pullrequest:rejected + - repo:commit_status_created + - pullrequest:unapproved + - repo:commit_comment_created + - pullrequest:comment_reopened + - project:updated + - repo:push + - pullrequest:comment_resolved + - pullrequest:comment_created + - repo:updated + - repo:imported + - repo:commit_status_updated + - pullrequest:changes_request_created + - pullrequest:comment_deleted + - pullrequest:created + - issue:comment_created + - pullrequest:approved + - repo:deleted + - issue:updated + additionalProperties: true + description: A Webhook subscription. + workspace: + allOf: + - $ref: '#/components/schemas/object' + - title: Workspace + type: object + properties: + links: + type: object + additionalProperties: false + uuid: + type: string + description: The workspace's immutable id. + name: + type: string + description: The name of the workspace. + slug: + type: string + description: The short label that identifies this workspace. + is_private: + type: boolean + description: |- + Indicates whether the workspace is publicly accessible, or whether it is + private to the members and consequently only visible to members. + created_on: type: string - enum: - - merge_commit - - squash - - fast_forward - default_merge_strategy: - type: string - description: "The default merge strategy, when this endpoint is the destination\ - \ of the pull request." - Pull Request Commit: - title: Pull Request Commit - type: object - properties: - hash: - pattern: "[0-9a-f]{7,}?" - type: string - pullrequest_links: - type: object - properties: - self: - $ref: '#/components/schemas/Link' - html: - $ref: '#/components/schemas/Link' - commits: - $ref: '#/components/schemas/Link' - approve: - $ref: '#/components/schemas/Link' - diff: - $ref: '#/components/schemas/Link' - diffstat: - $ref: '#/components/schemas/Link' - comments: - $ref: '#/components/schemas/Link' - activity: - $ref: '#/components/schemas/Link' - merge: - $ref: '#/components/schemas/Link' - decline: - $ref: '#/components/schemas/Link' - Rendered Pull Request Markup_title: - type: object - properties: - raw: - type: string - description: The text as it was typed by a user. - markup: - type: string - description: The type of markup language the raw content is to be interpreted - in. - enum: - - markdown - - creole - - plaintext - html: - type: string - description: The user's content rendered as HTML. - example: - markup: markdown - raw: raw - html: html - Rendered Pull Request Markup: - title: Rendered Pull Request Markup - type: object - properties: - title: - $ref: '#/components/schemas/Rendered Pull Request Markup_title' - description: - $ref: '#/components/schemas/Rendered Pull Request Markup_title' - reason: - $ref: '#/components/schemas/Rendered Pull Request Markup_title' - description: "User provided pull request text, interpreted in a markup language\ - \ and rendered in HTML" - issue_links: - type: object - properties: - self: - $ref: '#/components/schemas/Link' - html: - $ref: '#/components/schemas/Link' - comments: - $ref: '#/components/schemas/Link' - attachments: - $ref: '#/components/schemas/Link' - watch: - $ref: '#/components/schemas/Link' - vote: - $ref: '#/components/schemas/Link' - issue_change_links: - type: object - properties: - self: - $ref: '#/components/schemas/Link' - issue: - $ref: '#/components/schemas/Link' - example: - issue: null - self: - name: name - href: http://example.com/aeiou - issue_change_changes_assignee: - type: object - properties: - old: - type: string - new: - type: string - example: - new: new - old: old - issue_change_changes: - type: object - properties: - assignee: - $ref: '#/components/schemas/issue_change_changes_assignee' - state: - $ref: '#/components/schemas/issue_change_changes_assignee' - title: - $ref: '#/components/schemas/issue_change_changes_assignee' - kind: - $ref: '#/components/schemas/issue_change_changes_assignee' - milestone: - $ref: '#/components/schemas/issue_change_changes_assignee' - component: - $ref: '#/components/schemas/issue_change_changes_assignee' - priority: - $ref: '#/components/schemas/issue_change_changes_assignee' - version: - $ref: '#/components/schemas/issue_change_changes_assignee' - content: - $ref: '#/components/schemas/issue_change_changes_assignee' - example: - component: null - milestone: null - kind: null - assignee: - new: new - old: old - state: null - title: null - priority: null - version: null - content: null - branching_model_settings_branch_types: - required: - - kind - type: object - properties: - enabled: - type: boolean - description: Whether the branch type is enabled or not. A disabled branch - type may contain an invalid `prefix`. - kind: - type: string - description: The kind of the branch type. - enum: - - feature - - bugfix - - release - - hotfix - prefix: - type: string - description: "The prefix for this branch type. A branch with this prefix\ - \ will be classified as per `kind`. The `prefix` of an enabled branch\ - \ type must be a valid branch prefix.Additionally, it cannot be blank,\ - \ empty or `null`. The `prefix` for a disabled branch type can be empty\ - \ or invalid." - branching_model_settings_development: - type: object - properties: - is_valid: - type: boolean - description: "Indicates if the configured branch is valid, that is, if the\ - \ configured branch actually exists currently. Is always `true` when `use_mainbranch`\ - \ is `true` (even if the main branch does not exist). This field is read-only.\ - \ This field is ignored when updating/creating settings." - name: - type: string - description: The configured branch. It must be `null` when `use_mainbranch` - is `true`. Otherwise it must be a non-empty value. It is possible for - the configured branch to not exist (e.g. it was deleted after the settings - are set). In this case `is_valid` will be `false`. The branch must exist - when updating/setting the `name` or an error will occur. - use_mainbranch: - type: boolean - description: Indicates if the setting points at an explicit branch (`false`) - or tracks the main branch (`true`). When `true` the `name` must be `null` - or not provided. When `false` the `name` must contain a non-empty branch - name. - branching_model_settings_production: - type: object - properties: - is_valid: - type: boolean - description: "Indicates if the configured branch is valid, that is, if the\ - \ configured branch actually exists currently. Is always `true` when `use_mainbranch`\ - \ is `true` (even if the main branch does not exist). This field is read-only.\ - \ This field is ignored when updating/creating settings." - name: - type: string - description: The configured branch. It must be `null` when `use_mainbranch` - is `true`. Otherwise it must be a non-empty value. It is possible for - the configured branch to not exist (e.g. it was deleted after the settings - are set). In this case `is_valid` will be `false`. The branch must exist - when updating/setting the `name` or an error will occur. - use_mainbranch: - type: boolean - description: Indicates if the setting points at an explicit branch (`false`) - or tracks the main branch (`true`). When `true` the `name` must be `null` - or not provided. When `false` the `name` must contain a non-empty branch - name. - enabled: - type: boolean - description: Indicates if branch is enabled or not. - project_branching_model_development: - required: - - name - - use_mainbranch - type: object - properties: - name: - type: string - description: "Name of the target branch. If inherited by a repository, it\ - \ will default to the main branch if the specified branch does not exist." - use_mainbranch: - type: boolean - description: Indicates if the setting points at an explicit branch (`false`) - or tracks the main branch (`true`). - project_links: - type: object - properties: - html: - $ref: '#/components/schemas/Link' - avatar: - $ref: '#/components/schemas/Link' - error_error: + format: date-time + updated_on: + type: string + format: date-time + additionalProperties: true + description: |- + A Bitbucket workspace. + Workspaces are used to organize repositories. + workspace_membership: + allOf: + - $ref: '#/components/schemas/object' + - title: Workspace Membership + type: object + properties: + links: + type: object + additionalProperties: false + user: + $ref: '#/components/schemas/account' + workspace: + $ref: '#/components/schemas/workspace' + additionalProperties: true + description: |- + A Bitbucket workspace membership. + Links a user to a workspace. + pipeline_schedule_post_request_body_target: required: - - message + - ref_name + - ref_type + - selector type: object properties: - message: - type: string - detail: + selector: + $ref: '#/components/schemas/pipeline_selector' + ref_name: type: string - data: - type: object - properties: {} - description: Optional structured data that is endpoint-specific. - example: {} - example: - data: {} - detail: detail - message: message - repository_links: - type: object - properties: - self: - $ref: '#/components/schemas/Link' - html: - $ref: '#/components/schemas/Link' - avatar: - $ref: '#/components/schemas/Link' - pullrequests: - $ref: '#/components/schemas/Link' - commits: - $ref: '#/components/schemas/Link' - forks: - $ref: '#/components/schemas/Link' - watchers: - $ref: '#/components/schemas/Link' - downloads: - $ref: '#/components/schemas/Link' - clone: - type: array - items: - $ref: '#/components/schemas/Link' - hooks: - $ref: '#/components/schemas/Link' - workspace_links: - type: object - properties: - avatar: - $ref: '#/components/schemas/Link' - html: - $ref: '#/components/schemas/Link' - members: - $ref: '#/components/schemas/Link' - owners: - $ref: '#/components/schemas/Link' - projects: - $ref: '#/components/schemas/Link' - repositories: - $ref: '#/components/schemas/Link' - snippets: - $ref: '#/components/schemas/Link' - self: - $ref: '#/components/schemas/Link' - snippet_commit_links: - type: object - properties: - self: - $ref: '#/components/schemas/Link' - html: - $ref: '#/components/schemas/Link' - diff: - $ref: '#/components/schemas/Link' - comment_inline: - required: - - path - type: object - properties: - from: - minimum: 1 - type: integer - description: The comment's anchor line in the old version of the file. - to: - minimum: 1 - type: integer - description: "The comment's anchor line in the new version of the file.\ - \ If the 'from' line is also provided, this value will be removed." - path: + description: The name of the reference. + ref_type: type: string - description: The path of the file this comment is anchored to. - comment_links: - type: object - properties: - self: - $ref: '#/components/schemas/Link' - html: - $ref: '#/components/schemas/Link' - code: - $ref: '#/components/schemas/Link' - subject_types_repository: - type: object - properties: - events: - $ref: '#/components/schemas/Link' - example: - events: - name: name - href: http://example.com/aeiou + description: The type of reference (branch only). + enum: + - branch + description: The target on which the schedule will be executed. securitySchemes: basic: type: http @@ -28747,248 +29894,518 @@ components: account. name: Authorization in: header -x-revision: 11abb42bfdb5 x-atlassian-narrative: documents: - anchor: authentication title: Authentication methods description: How to authenticate API actions icon: "data:image/svg+xml;base64,b'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxOTcuNjQ3MyAxODYuODEzOCI+CiAgPGRlZnM+CiAgICA8c3R5bGU+CiAgICAgIC5jbHMtMSB7CiAgICAgICAgaXNvbGF0aW9uOiBpc29sYXRlOwogICAgICB9CgogICAgICAuY2xzLTIgewogICAgICAgIGZpbGw6ICNkZTM1MGI7CiAgICAgIH0KCiAgICAgIC5jbHMtMyB7CiAgICAgICAgZmlsbDogI2ZmNTYzMDsKICAgICAgfQoKICAgICAgLmNscy00IHsKICAgICAgICBmaWxsOiAjZGZlMWU1OwogICAgICAgIG1peC1ibGVuZC1tb2RlOiBtdWx0aXBseTsKICAgICAgfQoKICAgICAgLmNscy01IHsKICAgICAgICBmaWxsOiAjZmFmYmZjOwogICAgICB9CgogICAgICAuY2xzLTYgewogICAgICAgIGZpbGw6ICNlYmVjZjA7CiAgICAgIH0KCiAgICAgIC5jbHMtNyB7CiAgICAgICAgZmlsbDogbm9uZTsKICAgICAgICBzdHJva2U6ICMwMDY1ZmY7CiAgICAgICAgc3Ryb2tlLW1pdGVybGltaXQ6IDEwOwogICAgICAgIHN0cm9rZS13aWR0aDogMnB4OwogICAgICB9CgogICAgICAuY2xzLTggewogICAgICAgIGZpbGw6ICM1ZTZjODQ7CiAgICAgIH0KCiAgICAgIC5jbHMtOSB7CiAgICAgICAgZmlsbDogIzI1Mzg1ODsKICAgICAgfQoKICAgICAgLmNscy0xMCB7CiAgICAgICAgZmlsbDogIzI2ODRmZjsKICAgICAgfQoKICAgICAgLmNscy0xMSB7CiAgICAgICAgZmlsbDogIzAwNjVmZjsKICAgICAgfQogICAgPC9zdHlsZT4KICA8L2RlZnM+CiAgPHRpdGxlPlNlY3VyaXR5IHdpdGggS2V5PC90aXRsZT4KICA8ZyBjbGFzcz0iY2xzLTEiPgogICAgPGcgaWQ9IkxheWVyXzIiIGRhdGEtbmFtZT0iTGF5ZXIgMiI+CiAgICAgIDxnIGlkPSJPYmplY3RzIj4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik00Mi4wNjcyLDBoLjYxMTRhOCw4LDAsMCwxLDgsOFYyMy4yMzM4YTAsMCwwLDAsMSwwLDBIMzQuMDY3MmEwLDAsMCwwLDEsMCwwVjhBOCw4LDAsMCwxLDQyLjA2NzIsMFoiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik0xMDguMjIsMGguNjExNGE4LDgsMCwwLDEsOCw4VjIzLjIzMzhhMCwwLDAsMCwxLDAsMEgxMDAuMjJhMCwwLDAsMCwxLDAsMFY4QTgsOCwwLDAsMSwxMDguMjIsMFoiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik0xNzQuMzcyMiwwaC42MTE0YTgsOCwwLDAsMSw4LDhWMjMuMjMzOGEwLDAsMCwwLDEsMCwwSDE2Ni4zNzIyYTAsMCwwLDAsMSwwLDBWOEE4LDgsMCwwLDEsMTc0LjM3MjIsMFoiLz4KICAgICAgICA8cmVjdCBjbGFzcz0iY2xzLTIiIHg9IjM0LjA2NzIiIHk9IjIzLjIzMzgiIHdpZHRoPSIxNjMuNTgiIGhlaWdodD0iMTYzLjU4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0yIiBkPSJNNDIuMDY3MiwwSDU5LjI5YTgsOCwwLDAsMSw4LDhWMjMuMjIyOGEwLDAsMCwwLDEsMCwwSDM0LjA2NzJhMCwwLDAsMCwxLDAsMFY4YTgsOCwwLDAsMSw4LThaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0yIiBkPSJNMTA3LjI0NTgsMGgxNy4yMjI4YTgsOCwwLDAsMSw4LDhWMjMuMjIyOGEwLDAsMCwwLDEsMCwwSDk5LjI0NThhMCwwLDAsMCwxLDAsMFY4YTgsOCwwLDAsMSw4LThaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0yIiBkPSJNMTcyLjQyNDQsMGgxNy4yMjI4YTgsOCwwLDAsMSw4LDhWMjMuMjIyOGEwLDAsMCwwLDEsMCwwSDE2NC40MjQ0YTAsMCwwLDAsMSwwLDBWOGE4LDgsMCwwLDEsOC04WiIvPgogICAgICAgIDxyZWN0IGNsYXNzPSJjbHMtMyIgeD0iMTcuNDU1OCIgeT0iMjMuMjMzOCIgd2lkdGg9IjE2My41OCIgaGVpZ2h0PSIxNjMuNTgiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTMiIGQ9Ik0yNS40NTU4LDBINDIuNjc4NmE4LDgsMCwwLDEsOCw4VjIzLjIyMjhhMCwwLDAsMCwxLDAsMEgxNy40NTU4YTAsMCwwLDAsMSwwLDBWOEE4LDgsMCwwLDEsMjUuNDU1OCwwWiIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtMyIgZD0iTTkwLjYzNDQsMGgxNy4yMjI4YTgsOCwwLDAsMSw4LDhWMjMuMjIyOGEwLDAsMCwwLDEsMCwwSDgyLjYzNDRhMCwwLDAsMCwxLDAsMFY4QTgsOCwwLDAsMSw5MC42MzQ0LDBaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0zIiBkPSJNMTU1LjgxMywwaDE3LjIyMjhhOCw4LDAsMCwxLDgsOFYyMy4yMjI4YTAsMCwwLDAsMSwwLDBIMTQ3LjgxM2EwLDAsMCwwLDEsMCwwVjhBOCw4LDAsMCwxLDE1NS44MTMsMFoiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTMiIGQ9Ik0yNS40NTU4LDBINDIuNjc4NmE4LDgsMCwwLDEsOCw4VjIzLjIyMjhhMCwwLDAsMCwxLDAsMEgxNy40NTU4YTAsMCwwLDAsMSwwLDBWOEE4LDgsMCwwLDEsMjUuNDU1OCwwWiIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtMyIgZD0iTTkwLjYzNDQsMGgxNy4yMjI4YTgsOCwwLDAsMSw4LDhWMjMuMjIyOGEwLDAsMCwwLDEsMCwwSDgyLjYzNDRhMCwwLDAsMCwxLDAsMFY4QTgsOCwwLDAsMSw5MC42MzQ0LDBaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0zIiBkPSJNMTU1LjgxMywwaDE3LjIyMjhhOCw4LDAsMCwxLDgsOFYyMy4yMjI4YTAsMCwwLDAsMSwwLDBIMTQ3LjgxM2EwLDAsMCwwLDEsMCwwVjhBOCw4LDAsMCwxLDE1NS44MTMsMFoiLz4KICAgICAgICA8cmVjdCBjbGFzcz0iY2xzLTIiIHg9IjM1Ljc1OTYiIHk9IjU2LjgwNjUiIHdpZHRoPSIzMy4yMjI4IiBoZWlnaHQ9IjE1LjYwMzgiLz4KICAgICAgICA8cmVjdCBjbGFzcz0iY2xzLTIiIHg9IjEzMS4yMDE2IiB5PSIxMzYuOTYxNSIgd2lkdGg9IjMzLjIyMjgiIGhlaWdodD0iMTUuNjAzOCIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtNCIgZD0iTTU3LjM3MDksNzEuNjAzNmg3MC43NWE5LDksMCwwLDEsOSw5djM1LjM3NDlhNDQuMzc0OCw0NC4zNzQ4LDAsMCwxLTQ0LjM3NDgsNDQuMzc0OGgwYTQ0LjM3NDgsNDQuMzc0OCwwLDAsMS00NC4zNzQ4LTQ0LjM3NDhWODAuNjAzNkE5LDksMCwwLDEsNTcuMzcwOSw3MS42MDM2WiIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtNSIgZD0iTTY2LjM3MSw2Ni42NjE3aDcwLjc1YTksOSwwLDAsMSw5LDl2MzUuMzc0OWE0NC4zNzQ4LDQ0LjM3NDgsMCwwLDEtNDQuMzc0OCw0NC4zNzQ4aDBBNDQuMzc0OCw0NC4zNzQ4LDAsMCwxLDU3LjM3MSwxMTEuMDM2NlY3NS42NjE3YTksOSwwLDAsMSw5LTlaIi8+CiAgICAgICAgPHBhdGggaWQ9Il9SZWN0YW5nbGVfIiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTYiIGQ9Ik02MS4zNzEsNjYuNjYxN2g3MC43NWE5LDksMCwwLDEsOSw5djM1LjM3NDlhNDQuMzc0OCw0NC4zNzQ4LDAsMCwxLTQ0LjM3NDgsNDQuMzc0OGgwQTQ0LjM3NDgsNDQuMzc0OCwwLDAsMSw1Mi4zNzEsMTExLjAzNjZWNzUuNjYxN0E5LDksMCwwLDEsNjEuMzcxLDY2LjY2MTdaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy03IiBkPSJNOTYuNzQ1OSwxNDcuNzQ0MWEzNi43NDg3LDM2Ljc0ODcsMCwwLDEtMzYuNzA3NC0zNi43MDc0Vjc4LjA1ODRhMy43MzMzLDMuNzMzMywwLDAsMSwzLjcyOS0zLjcyOWg2NS45NTYzYTMuNzMzMywzLjczMzMsMCwwLDEsMy43MjksMy43Mjl2MzIuOTc4NEEzNi43NDg2LDM2Ljc0ODYsMCwwLDEsOTYuNzQ1OSwxNDcuNzQ0MVoiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTQiIGQ9Ik0xMDAuNjg5MywxNjMuMzE2N1YxMTEuMDk3M2EzLjk0NDMsMy45NDQzLDAsMCwwLTcuODg4NywwdjUyLjIyYTIyLjUyNTIsMjIuNTI1MiwwLDAsMC0xOC41NDc5LDIyLjE0YzAsLjQ1Ni4wMTc4LjkwNzguMDQ0NywxLjM1NzFIODIuMjFjLS4wNDE0LS40NDc0LS4wNjg4LS44OTktLjA2ODgtMS4zNTcxYTE0LjYyLDE0LjYyLDAsMCwxLDE0LjU5NzQtMTQuNjA0MWwuMDA2MS4wMDA2LjAwNjgtLjAwMDdBMTQuNjIxMSwxNC42MjExLDAsMCwxLDExMS4zNSwxODUuNDU2NmMwLC40NTgxLS4wMjczLjkxLS4wNjg4LDEuMzU3MWg3LjkxMjhjLjAyNjktLjQ0OTMuMDQ0Ny0uOTAxMS4wNDQ3LTEuMzU3MUEyMi41MjU5LDIyLjUyNTksMCwwLDAsMTAwLjY4OTMsMTYzLjMxNjdaIi8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0yIiB4PSIxNy40NTU4IiB5PSIzNi40NzAyIiB3aWR0aD0iMzMuMjIyOCIgaGVpZ2h0PSIxNS42MDM4Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0yIiB4PSIxNy40NTU4IiB5PSIxNTguMTIxNyIgd2lkdGg9IjMzLjIyMjgiIGhlaWdodD0iMTUuNjAzOCIvPgogICAgICAgIDxyZWN0IGNsYXNzPSJjbHMtMiIgeD0iMTQ3LjgxMyIgeT0iMzYuNDcwMiIgd2lkdGg9IjMzLjIyMjgiIGhlaWdodD0iMTUuNjAzOCIvPgogICAgICAgIDxyZWN0IGNsYXNzPSJjbHMtMiIgeD0iMTUwLjA2NDMiIHk9IjE1Ny41NTEzIiB3aWR0aD0iMzMuMjIyOCIgaGVpZ2h0PSIxNS42MDM4Ii8+CiAgICAgICAgPHBhdGggaWQ9Il9QYXRoXyIgZGF0YS1uYW1lPSImbHQ7UGF0aCZndDsiIGNsYXNzPSJjbHMtOCIgZD0iTTEwNy41MjU0LDEwMS4wMDI3YTExLjc3OTQsMTEuNzc5NCwwLDEsMC0xOS44Niw4LjU1NDhBNC4wNDE3LDQuMDQxNywwLDAsMSw4OC44NSwxMTMuNjJsLTIuMTA0LDcuMjY4MWEzLDMsMCwwLDAsMi44ODE3LDMuODM0MmgxMi4yMzcxYTMsMywwLDAsMCwyLjg4MTctMy44MzQybC0yLjA5NTktNy4yNGE0LjA3NDMsNC4wNzQzLDAsMCwxLDEuMTgwOC00LjA5NDVBMTEuNzE3MiwxMS43MTcyLDAsMCwwLDEwNy41MjU0LDEwMS4wMDI3WiIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtOSIgZD0iTTEwNC43NDYxLDEyMC44ODc3bC0yLjA5NTktNy4yNGE0LjA3NDQsNC4wNzQ0LDAsMCwxLDEuMTgwOC00LjA5NDUsMTEuNzYyOSwxMS43NjI5LDAsMCwwLTUuMDYtMTkuOTMxMywxMS45MSwxMS45MSwwLDAsMC04Ljc5OCwxMC45OTQ5LDExLjcxODUsMTEuNzE4NSwwLDAsMCwzLjY5MjksOC45NDFBNC4wNDE2LDQuMDQxNiwwLDAsMSw5NC44NSwxMTMuNjJsLTMuMjE0LDExLjEwMjNoMTAuMjI4OEEzLDMsMCwwLDAsMTA0Ljc0NjEsMTIwLjg4NzdaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0xMCIgZD0iTTgxLjc5NzUsMTAwLjMxYTMuOTQzOSwzLjk0MzksMCwwLDAtMy45NDQzLTMuOTQ0M0g0MS4wNDE3YTMuOTQ0MywzLjk0NDMsMCwwLDAsMCw3Ljg4ODdINzcuODUzMkEzLjk0MzksMy45NDM5LDAsMCwwLDgxLjc5NzUsMTAwLjMxWiIvPgogICAgICAgIDxwYXRoIGlkPSJfUGF0aF8yIiBkYXRhLW5hbWU9IiZsdDtQYXRoJmd0OyIgY2xhc3M9ImNscy0xMSIgZD0iTTQxLjA0MTYsMTA0LjI1MzlIOTYuODUzMmEzLjk0NDMsMy45NDQzLDAsMCwwLDAtNy44ODg3SDQxLjA0MTZhMy45NDQzLDMuOTQ0MywwLDAsMCwwLDcuODg4N1oiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTEwIiBkPSJNODEuNzk3NSwxMDAuMzFhMy45NDM5LDMuOTQzOSwwLDAsMC0zLjk0NDMtMy45NDQzSDQxLjA0MTdhMy45NDQzLDMuOTQ0MywwLDAsMCwwLDcuODg4N0g3Ny44NTMyQTMuOTQzOSwzLjk0MzksMCwwLDAsODEuNzk3NSwxMDAuMzFaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0xMCIgZD0iTTIyLjQ5MzIsMTIyLjgwMjlBMjIuNDkyOSwyMi40OTI5LDAsMSwxLDQ0Ljk4NTgsMTAwLjMxLDIyLjUxODUsMjIuNTE4NSwwLDAsMSwyMi40OTMyLDEyMi44MDI5Wm0wLTM3LjA5NzJBMTQuNjA0MiwxNC42MDQyLDAsMSwwLDM3LjA5NzIsMTAwLjMxLDE0LjYyMDcsMTQuNjIwNywwLDAsMCwyMi40OTMyLDg1LjcwNTdaIi8+CiAgICAgIDwvZz4KICAgIDwvZz4KICA8L2c+Cjwvc3ZnPgo='" - body: "\nThe purpose of this section is to describe how to authenticate when making\ - \ API calls using the Bitbucket REST API.\n\n-----\n\n* [Oauth 2](#oauth-2)\n\ - \ * [Making requests](#making-requests)\n * [Repository cloning](#repository-cloning)\n\ - \ * [Refresh tokens](#refresh-tokens)\n* [Scopes](#scopes)\n* [Basic auth](#basic-auth)\n\ - * [Repository Access Tokens](#repository-access-tokens)\n* [App passwords](#app-passwords)\n\ - \n---\n\n### OAuth 2.0\n\nOur OAuth 2 implementation is merged in with our existing\ - \ OAuth 1 in\nsuch a way that existing OAuth 1 consumers automatically become\n\ - valid OAuth 2 clients. The only thing you need to do is edit your\nexisting\ - \ consumer and configure a callback URL.\n\nOnce that is in place, you'll have\ - \ the following 2 URLs:\n\n https://bitbucket.org/site/oauth2/authorize\n\ - \ https://bitbucket.org/site/oauth2/access_token\n\nFor obtaining access/bearer\ - \ tokens, we support three of RFC-6749's grant\nflows, plus a custom Bitbucket\ - \ flow for exchanging JWT tokens for access tokens.\nNote that Resource Owner\ - \ Password Credentials Grant (4.3) is no longer supported.\n\n\n#### 1. Authorization\ - \ Code Grant (4.1)\n\nThe full-blown 3-LO flow. Request authorization from the\ - \ end user by\nsending their browser to:\n\n https://bitbucket.org/site/oauth2/authorize?client_id={client_id}&response_type=code\n\ - \nThe callback includes the `?code={}` query parameter that you can swap\nfor\ - \ an access token:\n\n $ curl -X POST -u \"client_id:secret\" \\\n https://bitbucket.org/site/oauth2/access_token\ - \ \\\n -d grant_type=authorization_code -d code={code}\n\n\n#### 2. Implicit\ - \ Grant (4.2)\n\nThis flow is useful for browser-based add-ons that operate\ - \ without server-side backends.\n\nRequest the end user for authorization by\ - \ directing the browser to:\n\n https://bitbucket.org/site/oauth2/authorize?client_id={client_id}&response_type=token\n\ - \nThat will redirect to your preconfigured callback URL with a fragment\ncontaining\ - \ the access token\n(`#access_token={token}&token_type=bearer`) where your page's\ - \ js can\npull it out of the URL.\n\n\n#### 3. Client Credentials Grant (4.4)\n\ - \nSomewhat like our existing \"2-LO\" flow for OAuth 1. Obtain an access\ntoken\ - \ that represents not an end user, but the owner of the\nclient/consumer:\n\n\ - \ $ curl -X POST -u \"client_id:secret\" \\\n https://bitbucket.org/site/oauth2/access_token\ - \ \\\n -d grant_type=client_credentials\n\n\n#### 4. Bitbucket Cloud JWT\ - \ Grant (urn:bitbucket:oauth2:jwt)\n\nIf your Atlassian Connect add-on uses\ - \ JWT authentication, you can swap a\nJWT for an OAuth access token. The resulting\ - \ access token represents the\naccount for which the add-on is installed.\n\n\ - Make sure you send the JWT token in the Authorization request header\nusing\ - \ the \"JWT\" scheme (case sensitive). Note that this custom scheme\nmakes this\ - \ different from HTTP Basic Auth (and so you cannot use \"curl\n-u\").\n\n \ - \ $ curl -X POST -H \"Authorization: JWT {jwt_token}\" \\\n https://bitbucket.org/site/oauth2/access_token\ - \ \\\n -d grant_type=urn:bitbucket:oauth2:jwt\n\n\n#### Making Requests\n\ - \nOnce you have an access token, as per RFC-6750, you can use it in a request\ - \ in any of\nthe following ways (in decreasing order of desirability):\n\n1.\ - \ Send it in a request header: `Authorization: Bearer {access_token}`\n2. Include\ - \ it in a (application/x-www-form-urlencoded) POST body as `access_token={access_token}`\n\ - 3. Put it in the query string of a non-POST: `?access_token={access_token}`\n\ - \n\n#### Repository Cloning\n\nSince add-ons will not be able to upload their\ - \ own SSH keys to clone\nwith, access tokens can be used as Basic HTTP Auth\ - \ credentials to\nclone securely over HTTPS. This is much like GitHub, yet slightly\n\ - different:\n\n $ git clone https://x-token-auth:{access_token}@bitbucket.org/user/repo.git\n\ - \nThe literal string `x-token-auth` as a substitute for username is\nrequired\ - \ (note the difference with GitHub where the actual token is in\nthe username\ - \ field).\n\n\n#### Refresh Tokens\n\nOur access tokens expire in one hour.\ - \ When this happens you'll get 401\nresponses.\n\nMost access tokens grant responses\ - \ (Implicit and JWT excluded). Therefore, you should include a\nrefresh token\ - \ that can then be used to generate a new access token,\nwithout the need for\ - \ end user participation:\n\n $ curl -X POST -u \"client_id:secret\" \\\n\ - \ https://bitbucket.org/site/oauth2/access_token \\\n -d grant_type=refresh_token\ - \ -d refresh_token={refresh_token}\n\n\n### Scopes\n\nBitbucket's API applies\ - \ a number of privilege scopes to endpoints. In order to access an endpoint,\ - \ a request will need to have the necessary scopes.\n\nScopes are declared in\ - \ the descriptor as a list of strings, with each string being the name of a\ - \ unique scope.\n\nA descriptor lacking the `scopes` element is implicitly assumed\ - \ to require all scopes and as a result, Bitbucket will require end users authorizing/installing\ - \ the add-on\nto explicitly accept all scopes.\n\nOur best practice suggests\ - \ you add the scopes your add-on needs, but no more than it needs.\n\nInvalid\ - \ scope strings will cause the descriptor to be rejected and the installation\ - \ to fail.\n\nThe available scopes are:\n\n- [project](#project)\n- [project:write](#project-write)\n\ - - [project:admin](#project-admin)\n- [repository](#repository)\n- [repository:write](#repository-write)\n\ - - [repository:admin](#repository-admin)\n- [repository:delete](#repository-delete)\n\ - - [pullrequest](#pullrequest)\n- [pullrequest:write](#pullrequest-write)\n-\ - \ [issue](#issue)\n- [issue:write](#issue-write)\n- [wiki](#wiki)\n- [webhook](#webhook)\n\ - - [snippet](#snippet)\n- [snippet:write](#snippet-write)\n- [email](#email)\n\ - - [account](#account)\n- [account:write](#account-write)\n- [pipeline](#pipeline)\n\ - - [pipeline:write](#pipeline-write)\n- [pipeline:variable](#pipeline-variable)\n\ - - [runner](#runner)\n- [runner:write](#runner-write)\n\n#### project\n\nProvides\ - \ the [`repository`](#repository) scope permission for every repository under\ - \ a project or projects.\n\n#### project:write\n\nThis scope is deprecated,\ - \ and has been made obsolete by `project:admin`. Please see the deprecation\ - \ notice [here](/cloud/bitbucket/deprecation-notice-project-write-scope).\n\n\ - #### project:admin\n\nProvides admin access to a project or projects. No distinction\ - \ is made between public and private projects. This scope doesn't implicitly\ - \ grant the [`project`](#project) scope or the [`repository:write`](#repository-write)\ - \ scope on any repositories under the project. It gives access to the admin\ - \ features of a project only, not direct access to its repositories' contents.\n\ - \n* ability to create the project\n* ability to update the project\n* ability\ - \ to delete the project\n\n#### repository\n\nProvides read access to a repository\ - \ or repositories.\nNote that this scope does not give access to a repository's\ - \ pull requests.\n\n* access to the repo's source code\n* clone over HTTPS\n\ - * access the file browsing API\n* download zip archives of the repo's contents\n\ - * the ability to view and use the issue tracker on any repo (created issues,\ - \ comment, vote, etc)\n* the ability to view and use the wiki on any repo (create/edit\ - \ pages)\n\n#### repository:write\n\nProvides write (not admin) access to a\ - \ repository or repositories. No distinction is made between public and private\ - \ repositories. This scope implicitly grants the [`repository`](#repository)\ - \ scope, which does not need to be requested separately.\nThis scope alone does\ - \ not give access to the pull requests API.\n\n* push access over HTTPS\n* fork\ - \ repos\n\n#### repository:admin\n\nProvides admin access to a repository or\ - \ repositories. No distinction is made between public and private repositories.\ - \ This scope doesn't implicitly grant the [`repository`](#repository) or the\ - \ [`repository:write`](#repository-write) scopes. It gives access to the admin\ - \ features of a repo only, not direct access to its contents. This scope can\ - \ be used or misused to grant read access to other users, who can then clone\ - \ the repo, but users that need to read and write source code would also request\ - \ explicit read or write.\nThis scope comes with access to the following functionality:\n\ - \n* view and manipulate committer mappings\n* list and edit deploy keys\n* ability\ - \ to delete the repo\n* view and edit repo permissions\n* view and edit branch\ - \ permissions\n* import and export the issue tracker\n* enable and disable the\ - \ issue tracker\n* list and edit issue tracker version, milestones and components\n\ - * enable and disable the wiki\n* list and edit default reviewers\n* list and\ - \ edit repo links (Jira/Bamboo/Custom)\n* list and edit the repository webhooks\n\ - * initiate a repo ownership transfer\n\n#### repository:delete\n\nProvides access\ - \ to delete a repository or repositories.\n\n#### pullrequest\n\nProvides read\ - \ access to pull requests.\nThis scope implies the [`repository`](#repository)\ - \ scope, giving read access to the pull request's destination repository.\n\n\ - * see and list pull requests\n* create and resolve tasks\n* comment on pull\ - \ requests\n\n#### pullrequest:write\n\nImplicitly grants the [`pullrequest`](#pullrequest)\ - \ scope and adds the ability to create, merge and decline pull requests.\nThis\ - \ scope also implicitly grants the [`repository:write`](#repository-write) scope,\ - \ giving write access to the pull request's destination repository. This is\ - \ necessary to allow merging.\n\n* merge pull requests\n* decline pull requests\n\ - * create pull requests\n* approve pull requests\n\n#### issue\n\nAbility to\ - \ interact with issue trackers the way non-repo members can.\nThis scope doesn't\ - \ implicitly grant any other scopes and doesn't give implicit access to the\ - \ repository.\n\n* view, list and search issues\n* create new issues\n* comment\ - \ on issues\n* watch issues\n* vote for issues\n\n#### issue:write\n\nThis scope\ - \ implicitly grants the [`issue`](#issue) scope and adds the ability to transition\ - \ and delete issues.\nThis scope doesn't implicitly grant any other scopes and\ - \ doesn't give implicit access to the repository.\n\n* transition issues\n*\ - \ delete issues\n\n#### wiki\n\nProvides access to wikis. This scope provides\ - \ both read and write access (wikis are always editable by anyone with access\ - \ to them).\nThis scope doesn't implicitly grant any other scopes and doesn't\ - \ give implicit access to the repository.\n\n* view wikis\n* create pages\n\ - * edit pages\n* push to wikis\n* clone wikis\n\n#### webhook\n\nGives access\ - \ to webhooks. This scope is required for any webhook-related operation.\n\n\ - This scope gives read access to existing webhook subscriptions on all\nresources\ - \ the authorization mechanism can access, without needing further scopes. \n\ - For example:\n\n- A client can list all existing webhook subscriptions on a\ - \ repository. The [`repository`](#repository) scope is not required.\n- Existing\ - \ webhook subscriptions for the issue tracker on a repo can be retrieved without\ - \ the [`issue`](#issue) scope. All that is required is the `webhook` scope.\n\ - \nTo create webhooks, the client will need read access to the resource. Such\ - \ as: for [`issue:created`](#issue-created), the client will need to\nhave both\ - \ the `webhook` and the [`issue`](#issue) scope.\n\n* list webhook subscriptions\ - \ on any accessible repository, user, team, or snippet\n* create/update/delete\ - \ webhook subscriptions.\n\n#### snippet\n\nProvides read access to snippets.\n\ - No distinction is made between public and private snippets (public snippets\ - \ are accessible without any form of authentication).\n\n* view any snippet\n\ - * create snippet comments\n\n#### snippet:write\n\nProvides write access to\ - \ snippets.\nNo distinction is made between public and private snippets (public\ - \ snippets are accessible without any form of authentication).\nThis scope implicitly\ - \ grants the [`snippet`](#snippet) scope which does not need to be requested\ - \ separately.\n\n* create snippets\n* edit snippets\n* delete snippets\n\n####\ - \ email\n\nAbility to see the user's primary email address. This should make\ - \ it easier to use Bitbucket Cloud as a login provider for apps or external\ - \ applications.\n\n#### account\n\nAbility to see all the user's account information.\ - \ Note that this doesn't include any ability to change any of the data.\n\n\ - * see all email addresses\n* language\n* location\n* website\n* full name\n\ - * SSH keys\n* user groups\n\n#### account:write\n\nAbility to change properties\ - \ on the user's account.\n\n* delete the authorizing user's account\n* manage\ - \ the user's groups\n* change a user's email addresses\n* change username, display\ - \ name and avatar\n\n#### pipeline\n\nGives read-only access to pipelines, steps,\ - \ deployment environments and variables.\n\n#### pipeline:write\n\nGives write\ - \ access to pipelines. This scope allows a user to:\n* Stop pipelines\n* Rerun\ - \ failed pipelines\n* Resume halted pipelines\n* Trigger manual pipelines.\n\ - \nThis scope is not needed to trigger a build using a push. Performing a `git\ - \ push` (or equivalent actions) will trigger the build. The token doing the\ - \ push only needs the [`repository:write`](#repository-write) scope.\n\nThis\ - \ doesn't give write access to create variables.\n\n#### pipeline:variable\n\ - \nGives write access to create variables in pipelines at the various levels:\n\ - * Workspace\n* Repository\n* Deployment\n\n#### runner\n\nGives read-only access\ - \ to pipelines runners setup against a workspace or repository.\n\n#### runner:write\n\ - \nGives write access to create/edit/disable/delete pipelines runners setup against\ - \ a workspace or repository.\n\n### Basic auth\n\nBasic HTTP Authentication\ - \ as per [RFC-2617](https://tools.ietf.org/html/rfc2617) (Digest not supported).\ - \ Note that Basic Auth is available only with username and [app password](https://bitbucket.org/account/settings/app-passwords/)\ - \ as credentials.\n\n### Repository Access Tokens\n\nRepository Access Tokens\ - \ are passwords (or tokens) that provide access to\n_a single repository_. These\ - \ tokens can authenticate with Bitbucket APIs for\nscripting, CI/CD tools, Bitbucket\ - \ Cloud-connected apps, and Bitbucket Cloud\nintegrations. The level of access\ - \ provided by the token is set when a repository\nadmin creates it, by setting\ - \ permission scopes. Repository Access Tokens are\nlinked to their repository,\ - \ not a user or a workspace, preventing them from\nbeing used to access any\ - \ other repositories or workspaces.\n\nWhen using Bitbucket APIs with a Repository\ - \ Access Token, the token will be\ntreated as the \"user\" in the Bitbucket\ - \ UI and Bitbucket logs. This includes\nusing the Repository Access Token to\ - \ leave a comment on a pull request, push a\ncommit, or merge a pull request.\ - \ The Bitbucket UI and API responses will show\nthe Repository Access Token\ - \ as a user. This user uses the Repository Access\nToken name and a custom icon\ - \ to differentiate it from a regular user in the UI.\n\nFor details on creating,\ - \ managing, and using Repository Access Tokens, visit\n[Repository Access Tokens](https://support.atlassian.com/bitbucket-cloud/docs/repository-access-tokens/).\n\ - \n#### Considerations for using Repository Access Tokens\n\n* After creation,\ - \ a Repository Access Token can't be viewed or modified. The\ntoken's name,\ - \ created date, last accessed date, and scopes are visible on the\nRepository\ - \ Access Token page.\n* Repository Access Tokens can only be granted a limited\ - \ set of Bitbucket's \npermission scopes.\n* Provided you set the correct permission\ - \ scopes, you can use a Repository Access\nToken to clone (`repository`) and\ - \ push (`repository:write`) code to the\ntoken's corresponding repository.\n\ - * You can't use a Repository Access Token to log into the Bitbucket website.\n\ - * Repository Access Tokens don't require two-step verification.\n* You can set\ - \ permission scopes (specific access rights) for each Repository\nAccess Token.\n\ - * You can't use a Repository Access Token to manipulate or query repository\n\ - permissions.\n* Repository Access Tokens will not be listed in any repository\ - \ or workspace \npermission API response.\n* Repository Access Tokens are deactivated\ - \ when a repository is transferred or deleted.\n* Any content created by the\ - \ Repository Access Token will persist after the\nRepository Access Token has\ - \ been revoked.\n\n#### Available permissions scopes\n\nThe available scopes\ - \ for Repository Access Tokens are:\n\n- [repository](#repository)\n- [repository:write](#repository-write)\n\ - - [repository:admin](#repository-admin)\n- [repository:delete](#repository-delete)\n\ - - [pullrequest](#pullrequest)\n- [pullrequest:write](#pullrequest-write)\n-\ - \ [webhook](#webhook)\n- [pipeline](#pipeline)\n- [pipeline:write](#pipeline-write)\n\ - - [pipeline:variable](#pipeline-variable)\n- [runner](#runner)\n- [runner:write](#runner-write)\n\ - \nThere are some APIs which are inaccessible for Repository Access Tokens, these\ - \ are: \n\n* [Add a repository deploy key](/cloud/bitbucket/rest/api-group-deployments/#api-repositories-workspace-repo-slug-deploy-keys-post)\n\ - * [Update a repository deploy key](/cloud/bitbucket/rest/api-group-deployments/#api-repositories-workspace-repo-slug-deploy-keys-key-id-put)\n\ - * [Delete a repository deploy key](/cloud/bitbucket/rest/api-group-deployments/#api-repositories-workspace-repo-slug-deploy-keys-key-id-delete)\n\ - \n### App passwords\n\nApp passwords allow users to make API calls to their\ - \ Bitbucket account through apps such as Sourcetree.\n\nSome important points\ - \ about app passwords:\n\n* You cannot view an app password or adjust permissions\ - \ after you create the app password. Because app passwords are encrypted on\ - \ our database and cannot be viewed by anyone. They are essentially designed\ - \ to be disposable. If you need to change the scopes or lost the password just\ - \ create a new one.\n* You cannot use them to log into your Bitbucket account.\n\ - * You cannot use app passwords to manage team actions.\n\n App passwords\ - \ are tied to an individual account's credentials and should not be shared.\ - \ If you're sharing your app password you're essentially giving direct, authenticated,\ - \ access to everything that password has been scoped to do with the Bitbucket\ - \ API's.\n\n* You can use them for API call authentication, even if you don't\ - \ have two-step verification enabled.\n* You can set permission scopes (specific\ - \ access rights) for each app password.\n\n#### Create an app password\n\nTo\ - \ create an app password:\n\n1. Select **Avatar > Bitbucket settings**.\n2.\ - \ [Click **App passwords** in the Access management section.](https://bitbucket.org/account/settings/app-passwords/)\n\ - 3. Click **Create app password**.\n4. Give the app password a name related to\ - \ the application that will use the password.\n5. Select the specific access\ - \ and permissions you want this application password to have.\n6. Copy the generated\ - \ password and either record or paste it into the application you want to give\ - \ access. The password is only displayed this one time.\n\nThat's all there\ - \ is to creating an app password. See your applications documentation for how\ - \ to apply the app password for a specific application." + body: |2 + + The purpose of this section is to describe how to authenticate when making API calls using the Bitbucket REST API. + + ----- + + * [Oauth 2](#oauth-2) + * [Making requests](#making-requests) + * [Repository cloning](#repository-cloning) + * [Refresh tokens](#refresh-tokens) + * [Scopes](#scopes) + * [Basic auth](#basic-auth) + * [Access Tokens](#access-tokens) + * [Repository Access Tokens](#repository-access-tokens) + * [Project Access Tokens](#project-access-tokens) + * [Workspace Access Tokens](#workspace-access-tokens) + * [App passwords](#app-passwords) + + --- + + ### OAuth 2.0 + + Our OAuth 2 implementation is merged in with our existing OAuth 1 in + such a way that existing OAuth 1 consumers automatically become + valid OAuth 2 clients. The only thing you need to do is edit your + existing consumer and configure a callback URL. + + Once that is in place, you'll have the following 2 URLs: + + https://bitbucket.org/site/oauth2/authorize + https://bitbucket.org/site/oauth2/access_token + + For obtaining access/bearer tokens, we support three of RFC-6749's grant + flows, plus a custom Bitbucket flow for exchanging JWT tokens for access tokens. + Note that Resource Owner Password Credentials Grant (4.3) is no longer supported. + + + #### 1. Authorization Code Grant (4.1) + + The full-blown 3-LO flow. Request authorization from the end user by + sending their browser to: + + https://bitbucket.org/site/oauth2/authorize?client_id={client_id}&response_type=code + + The callback includes the `?code={}` query parameter that you can swap + for an access token: + + $ curl -X POST -u "client_id:secret" \ + https://bitbucket.org/site/oauth2/access_token \ + -d grant_type=authorization_code -d code={code} + + + #### 2. Implicit Grant (4.2) + + This flow is useful for browser-based add-ons that operate without server-side backends. + + Request the end user for authorization by directing the browser to: + + https://bitbucket.org/site/oauth2/authorize?client_id={client_id}&response_type=token + + That will redirect to your preconfigured callback URL with a fragment + containing the access token + (`#access_token={token}&token_type=bearer`) where your page's js can + pull it out of the URL. + + + #### 3. Client Credentials Grant (4.4) + + Somewhat like our existing "2-LO" flow for OAuth 1. Obtain an access + token that represents not an end user, but the owner of the + client/consumer: + + $ curl -X POST -u "client_id:secret" \ + https://bitbucket.org/site/oauth2/access_token \ + -d grant_type=client_credentials + + + #### 4. Bitbucket Cloud JWT Grant (urn:bitbucket:oauth2:jwt) + + If your Atlassian Connect add-on uses JWT authentication, you can swap a + JWT for an OAuth access token. The resulting access token represents the + account for which the add-on is installed. + + Make sure you send the JWT token in the Authorization request header + using the "JWT" scheme (case sensitive). Note that this custom scheme + makes this different from HTTP Basic Auth (and so you cannot use "curl + -u"). + + $ curl -X POST -H "Authorization: JWT {jwt_token}" \ + https://bitbucket.org/site/oauth2/access_token \ + -d grant_type=urn:bitbucket:oauth2:jwt + + + #### Making Requests + + Once you have an access token, as per RFC-6750, you can use it in a request in any of + the following ways (in decreasing order of desirability): + + 1. Send it in a request header: `Authorization: Bearer {access_token}` + 2. Include it in a (application/x-www-form-urlencoded) POST body as `access_token={access_token}` + 3. Put it in the query string of a non-POST: `?access_token={access_token}` + + + #### Repository Cloning + + Since add-ons will not be able to upload their own SSH keys to clone + with, access tokens can be used as Basic HTTP Auth credentials to + clone securely over HTTPS. This is much like GitHub, yet slightly + different: + + $ git clone https://x-token-auth:{access_token}@bitbucket.org/user/repo.git + + The literal string `x-token-auth` as a substitute for username is + required (note the difference with GitHub where the actual token is in + the username field). + + + #### Refresh Tokens + + Our access tokens expire in one hour. When this happens you'll get 401 + responses. + + Most access tokens grant responses (Implicit and JWT excluded). Therefore, you should include a + refresh token that can then be used to generate a new access token, + without the need for end user participation: + + $ curl -X POST -u "client_id:secret" \ + https://bitbucket.org/site/oauth2/access_token \ + -d grant_type=refresh_token -d refresh_token={refresh_token} + + + ### Scopes + + Bitbucket's API applies a number of privilege scopes to endpoints. In order to access an endpoint, a request will need to have the necessary scopes. + + Scopes are declared in the descriptor as a list of strings, with each string being the name of a unique scope. + + A descriptor lacking the `scopes` element is implicitly assumed to require all scopes and as a result, Bitbucket will require end users authorizing/installing the add-on + to explicitly accept all scopes. + + Our best practice suggests you add the scopes your add-on needs, but no more than it needs. + + Invalid scope strings will cause the descriptor to be rejected and the installation to fail. + + The available scopes are: + + - [project](#project) + - [project:write](#project-write) + - [project:admin](#project-admin) + - [repository](#repository) + - [repository:write](#repository-write) + - [repository:admin](#repository-admin) + - [repository:delete](#repository-delete) + - [pullrequest](#pullrequest) + - [pullrequest:write](#pullrequest-write) + - [issue](#issue) + - [issue:write](#issue-write) + - [wiki](#wiki) + - [webhook](#webhook) + - [snippet](#snippet) + - [snippet:write](#snippet-write) + - [email](#email) + - [account](#account) + - [account:write](#account-write) + - [pipeline](#pipeline) + - [pipeline:write](#pipeline-write) + - [pipeline:variable](#pipeline-variable) + - [runner](#runner) + - [runner:write](#runner-write) + + #### project + + Provides access to view the project or projects. + This scope implies the [`repository`](#repository) scope, giving read access to all the repositories in a project or projects. + + #### project:write + + This scope is deprecated, and has been made obsolete by `project:admin`. Please see the deprecation notice [here](/cloud/bitbucket/deprecation-notice-project-write-scope). + + #### project:admin + + Provides admin access to a project or projects. No distinction is made between public and private projects. This scope doesn't implicitly grant the [`project`](#project) scope or the [`repository:write`](#repository-write) scope on any repositories under the project. It gives access to the admin features of a project only, not direct access to its repositories' contents. + + * ability to create the project + * ability to update the project + * ability to delete the project + + #### repository + + Provides read access to a repository or repositories. + Note that this scope does not give access to a repository's pull requests. + + * access to the repo's source code + * clone over HTTPS + * access the file browsing API + * download zip archives of the repo's contents + * the ability to view and use the issue tracker on any repo (created issues, comment, vote, etc) + * the ability to view and use the wiki on any repo (create/edit pages) + + #### repository:write + + Provides write (not admin) access to a repository or repositories. No distinction is made between public and private repositories. This scope implicitly grants the [`repository`](#repository) scope, which does not need to be requested separately. + This scope alone does not give access to the pull requests API. + + * push access over HTTPS + * fork repos + + #### repository:admin + + Provides admin access to a repository or repositories. No distinction is made between public and private repositories. This scope doesn't implicitly grant the [`repository`](#repository) or the [`repository:write`](#repository-write) scopes. It gives access to the admin features of a repo only, not direct access to its contents. This scope can be used or misused to grant read access to other users, who can then clone the repo, but users that need to read and write source code would also request explicit read or write. + This scope comes with access to the following functionality: + + * View and manipulate committer mappings + * List and edit deploy keys + * Ability to delete the repo + * View and edit repo permissions + * View and edit branch permissions + * Import and export the issue tracker + * Enable and disable the issue tracker + * List and edit issue tracker version, milestones and components + * Enable and disable the wiki + * List and edit default reviewers + * List and edit repo links (Jira/Bamboo/Custom) + * List and edit the repository webhooks + * Initiate a repo ownership transfer + + #### repository:delete + + Provides access to delete a repository or repositories. + + #### pullrequest + + Provides read access to pull requests. + This scope implies the [`repository`](#repository) scope, giving read access to the pull request's destination repository. + + * see and list pull requests + * create and resolve tasks + * comment on pull requests + + #### pullrequest:write + + Implicitly grants the [`pullrequest`](#pullrequest) scope and adds the ability to create, merge and decline pull requests. + This scope also implicitly grants the [`repository:write`](#repository-write) scope, giving write access to the pull request's destination repository. This is necessary to allow merging. + + * merge pull requests + * decline pull requests + * create pull requests + * approve pull requests + + #### issue + + Ability to interact with issue trackers the way non-repo members can. + This scope doesn't implicitly grant any other scopes and doesn't give implicit access to the repository. + + * view, list and search issues + * create new issues + * comment on issues + * watch issues + * vote for issues + + #### issue:write + + This scope implicitly grants the [`issue`](#issue) scope and adds the ability to transition and delete issues. + This scope doesn't implicitly grant any other scopes and doesn't give implicit access to the repository. + + * transition issues + * delete issues + + #### wiki + + Provides access to wikis. This scope provides both read and write access (wikis are always editable by anyone with access to them). + This scope doesn't implicitly grant any other scopes and doesn't give implicit access to the repository. + + * view wikis + * create pages + * edit pages + * push to wikis + * clone wikis + + #### webhook + + Gives access to webhooks. This scope is required for any webhook-related operation. + + This scope gives read access to existing webhook subscriptions on all + resources the authorization mechanism can access, without needing further scopes. + For example: + + - A client can list all existing webhook subscriptions on a repository. The [`repository`](#repository) scope is not required. + - Existing webhook subscriptions for the issue tracker on a repo can be retrieved without the [`issue`](#issue) scope. All that is required is the `webhook` scope. + + To create webhooks, the client will need read access to the resource. Such as: for [`issue:created`](#issue-created), the client will need to + have both the `webhook` and the [`issue`](#issue) scope. + + * list webhook subscriptions on any accessible repository, user, team, or snippet + * create/update/delete webhook subscriptions. + + #### snippet + + Provides read access to snippets. + No distinction is made between public and private snippets (public snippets are accessible without any form of authentication). + + * view any snippet + * create snippet comments + + #### snippet:write + + Provides write access to snippets. + No distinction is made between public and private snippets (public snippets are accessible without any form of authentication). + This scope implicitly grants the [`snippet`](#snippet) scope which does not need to be requested separately. + + * create snippets + * edit snippets + * delete snippets + + #### email + + Ability to see the user's primary email address. This should make it easier to use Bitbucket Cloud as a login provider for apps or external applications. + + #### account + + When used for: + * **user-related APIs** — Gives read-only access to the user's account information. + Note that this doesn't include any ability to change any of the data. This scope allows you to view the user's: + * email addresses + * language + * location + * website + * full name + * SSH keys + * user groups + * **workspace-related APIs** — Grants access to view the workspace's: + * users + * user permissions + * projects + + #### account:write + + Ability to change properties on the user's account. + + * delete the authorizing user's account + * manage the user's groups + * change a user's email addresses + * change username, display name and avatar + + #### pipeline + + Gives read-only access to pipelines, steps, deployment environments and variables. + + #### pipeline:write + + Gives write access to pipelines. This scope allows a user to: + * Stop pipelines + * Rerun failed pipelines + * Resume halted pipelines + * Trigger manual pipelines. + + This scope is not needed to trigger a build using a push. Performing a `git push` (or equivalent actions) will trigger the build. The token doing the push only needs the [`repository:write`](#repository-write) scope. + + This doesn't give write access to create variables. + + #### pipeline:variable + + Gives write access to create variables in pipelines at the various levels: + * Workspace + * Repository + * Deployment + + #### runner + + Gives read-only access to pipelines runners setup against a workspace or repository. + + #### runner:write + + Gives write access to create/edit/disable/delete pipelines runners setup against a workspace or repository. + + ### Basic auth + + Basic HTTP Authentication as per [RFC-2617](https://tools.ietf.org/html/rfc2617) (Digest not supported). + Note that Basic Auth is available only with username and [app password](https://bitbucket.org/account/settings/app-passwords/) as credentials. + + ### Access Tokens + + Access Tokens are passwords (or tokens) that provide access to a _single_ repository, project or workspace. + These tokens can authenticate with Bitbucket APIs for scripting, CI/CD tools, Bitbucket Cloud-connected apps, + and Bitbucket Cloud integrations. + + Access Tokens are linked to a repository, project, or workspace, not a user account. + The level of access provided by the token is set when a repository, or workspace admin creates it, + by setting permission scopes. + + There are three types of Access Token: + + * **Repository Access Tokens** can connect to a single repository, preventing them from accessing any other repositories or workspaces. + * **Project Access Tokens** can connect to a project, providing access to any repositories within the project. + * **Workspace Access Tokens** can connect to a single workspace and have access to any projects and repositories within that workspace. + + When using Bitbucket APIs with an Access Token, the token will be treated as the "user" in the + Bitbucket UI and Bitbucket logs. This includes when using the Access Token to leave a comment on a pull request, + push a commit, or merge a pull request. The Bitbucket UI and API responses will show the + Repository/Project/Workspace Access Token as a user. The username shown in the Bitbucket UI is the Access + Token _name_, and a custom icon is used to differentiate it from a regular user in the UI. + + #### Considerations for using Access Tokens + + * After creation, an Access Token can't be viewed or modified. The token's name, created date, + last accessed date, and scopes are visible on the repository, project, or workspace **Access Tokens** page. + * Access Tokens can access a limited set of Bitbucket's permission scopes. + * Provided you set the correct permission scopes, you can use an Access Token to clone (`repository`) + and push (`repository:write`) code to the token's repository or the repositories the token can access. + * You can't use an Access Token to log into the Bitbucket website. + * Access Tokens don't require two-step verification. + * You can set permission scopes (specific access rights) for each Access Token. + * You can't use an Access Token to manipulate or query repository, project, or workspace permissions. + * Access Tokens are not listed in any repository or workspace permission API response. + * Access Tokens are deactivated when deleting the resource tied to it (a repository, project, or workspace). + Repository Access Tokens are also revoked when transferring the repository to another workspace. + * Any content created by the Access Token will persist after the Access Token has been revoked. + * Access Tokens can interact with branch restriction APIs, but the token can't be configured as a user with merge access when using branch restrictions. + + There are some APIs which are inaccessible for Access Tokens, these are: + + * [Add a repository deploy key](/cloud/bitbucket/rest/api-group-deployments/#api-repositories-workspace-repo-slug-deploy-keys-post) + * [Update a repository deploy key](/cloud/bitbucket/rest/api-group-deployments/#api-repositories-workspace-repo-slug-deploy-keys-key-id-put) + * [Delete a repository deploy key](/cloud/bitbucket/rest/api-group-deployments/#api-repositories-workspace-repo-slug-deploy-keys-key-id-delete) + + #### Repository Access Tokens + + For details on creating, managing, and using Repository Access Tokens, visit + [Repository Access Tokens](https://support.atlassian.com/bitbucket-cloud/docs/repository-access-tokens/). + + The available scopes for Repository Access Tokens are: + + - [`repository`](#repository) + - [`repository:write`](#repository-write) + - [`repository:admin`](#repository-admin) + - [`repository:delete`](#repository-delete) + - [`pullrequest`](#pullrequest) + - [`pullrequest:write`](#pullrequest-write) + - [`webhook`](#webhook) + - [`pipeline`](#pipeline) + - [`pipeline:write`](#pipeline-write) + - [`pipeline:variable`](#pipeline-variable) + - [`runner`](#runner) + - [`runner:write`](#runner-write) + + #### Project Access Tokens + + For details on creating, managing, and using Project Access Tokens, visit + [Project Access Tokens](https://support.atlassian.com/bitbucket-cloud/docs/project-access-tokens/). + + The available scopes for Project Access Tokens are: + + - [`project`](#project) + - [`repository`](#repository) + - [`repository:write`](#repository-write) + - [`repository:admin`](#repository-admin) + - [`repository:delete`](#repository-delete) + - [`pullrequest`](#pullrequest) + - [`pullrequest:write`](#pullrequest-write) + - [`webhook`](#webhook) + - [`pipeline`](#pipeline) + - [`pipeline:write`](#pipeline-write) + - [`pipeline:variable`](#pipeline-variable) + - [`runner`](#runner) + - [`runner:write`](#runner-write) + + #### Workspace Access Tokens + + For details on creating, managing, and using Workspace Access Tokens, visit + [Workspace Access Tokens](https://support.atlassian.com/bitbucket-cloud/docs/workspace-access-tokens/). + + The available scopes for Workspace Access Tokens are: + + - [`project`](#project) + - [`project:admin`](#project-admin) + - [`repository`](#repository) + - [`repository:write`](#repository-write) + - [`repository:admin`](#repository-admin) + - [`repository:delete`](#repository-delete) + - [`pullrequest`](#pullrequest) + - [`pullrequest:write`](#pullrequest-write) + - [`webhook`](#webhook) + - [`account`](#account) + - [`pipeline`](#pipeline) + - [`pipeline:write`](#pipeline-write) + - [`pipeline:variable`](#pipeline-variable) + - [`runner`](#runner) + - [`runner:write`](#runner-write) + + ### App passwords + + App passwords allow users to make API calls to their Bitbucket account through apps such as Sourcetree. + + Some important points about app passwords: + + * You cannot view an app password or adjust permissions after you create the app password. Because app passwords are encrypted on our database and cannot be viewed by anyone. They are essentially designed to be disposable. If you need to change the scopes or lost the password just create a new one. + * You cannot use them to log into your Bitbucket account. + * You cannot use app passwords to manage team actions. + + App passwords are tied to an individual account's credentials and should not be shared. If you're sharing your app password you're essentially giving direct, authenticated, access to everything that password has been scoped to do with the Bitbucket API's. + + * You can use them for API call authentication, even if you don't have two-step verification enabled. + * You can set permission scopes (specific access rights) for each app password. + + For details on creating, managing, and using App passwords, visit + [App passwords](https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/). - anchor: filtering title: Filter and sort API objects description: Query the 2.0 API for specific objects @@ -29906,4 +31323,5 @@ x-atlassian-narrative: For complete information see: [Atlassian Connect for Bitbucket Cloud](https://developer.atlassian.com/bitbucket/index.html) +x-revision: f3ec4be6bef2 x-original-swagger-version: "2.0" diff --git a/api_branch_restrictions.go b/api_branch_restrictions.go index aeab5b2..c322c8a 100644 --- a/api_branch_restrictions.go +++ b/api_branch_restrictions.go @@ -12,11 +12,12 @@ package bitbucket import ( "context" "fmt" - "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/antihax/optional" ) // Linger please diff --git a/api_commit_statuses.go b/api_commit_statuses.go index 1949845..d3fd6a5 100644 --- a/api_commit_statuses.go +++ b/api_commit_statuses.go @@ -12,11 +12,12 @@ package bitbucket import ( "context" "fmt" - "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/antihax/optional" ) // Linger please diff --git a/api_commits.go b/api_commits.go index f97a45c..a93ff44 100644 --- a/api_commits.go +++ b/api_commits.go @@ -12,11 +12,12 @@ package bitbucket import ( "context" "fmt" - "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/antihax/optional" ) // Linger please @@ -1081,6 +1082,91 @@ func (a *CommitsApiService) RepositoriesWorkspaceRepoSlugCommitCommitApprovePost return localVarReturnValue, localVarHttpResponse, nil } +/* +CommitsApiService Delete a commit comment +Deletes the specified commit comment. Note that deleting comments that have visible replies that point to them will not really delete the resource. This is to retain the integrity of the original comment tree. Instead, the `deleted` element is set to `true` and the content is blanked out. The comment will continue to be returned by the collections and self endpoints. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param commentId The id of the comment. + - @param commit The commit's SHA1. + - @param repoSlug This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. + - @param workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. +*/ +func (a *CommitsApiService) RepositoriesWorkspaceRepoSlugCommitCommitCommentsCommentIdDelete(ctx context.Context, commentId int32, commit string, repoSlug string, workspace string) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/commit/{commit}/comments/{comment_id}" + localVarPath = strings.Replace(localVarPath, "{"+"comment_id"+"}", fmt.Sprintf("%v", commentId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"commit"+"}", fmt.Sprintf("%v", commit), -1) + localVarPath = strings.Replace(localVarPath, "{"+"repo_slug"+"}", fmt.Sprintf("%v", repoSlug), -1) + localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + /* CommitsApiService Get a commit comment Returns the specified commit comment. @@ -1187,6 +1273,94 @@ func (a *CommitsApiService) RepositoriesWorkspaceRepoSlugCommitCommitCommentsCom return localVarReturnValue, localVarHttpResponse, nil } +/* +CommitsApiService Update a commit comment +Used to update the contents of a comment. Only the content of the comment can be updated. ``` $ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/commit/7f71b5/comments/5728901 \\ -X PUT -u evzijst \\ -H 'Content-Type: application/json' \\ -d '{\"content\": {\"raw\": \"One more thing!\"}' ``` + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param body The updated comment. + - @param commentId The id of the comment. + - @param commit The commit's SHA1. + - @param repoSlug This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. + - @param workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. +*/ +func (a *CommitsApiService) RepositoriesWorkspaceRepoSlugCommitCommitCommentsCommentIdPut(ctx context.Context, body CommitComment, commentId int32, commit string, repoSlug string, workspace string) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/commit/{commit}/comments/{comment_id}" + localVarPath = strings.Replace(localVarPath, "{"+"comment_id"+"}", fmt.Sprintf("%v", commentId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"commit"+"}", fmt.Sprintf("%v", commit), -1) + localVarPath = strings.Replace(localVarPath, "{"+"repo_slug"+"}", fmt.Sprintf("%v", repoSlug), -1) + localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + /* CommitsApiService List a commit's comments 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. @@ -1731,10 +1905,10 @@ func (a *CommitsApiService) RepositoriesWorkspaceRepoSlugCommitsPost(ctx context /* CommitsApiService List commits for revision -These are the repository's commits. They are paginated and returned in reverse chronological order, similar to the output of `git log`. Like these tools, the DAG can be filtered. #### GET /repositories/{workspace}/{repo_slug}/commits/master Returns all commits on rev `master` (similar to `git log master`). #### GET /repositories/{workspace}/{repo_slug}/commits/dev?include=foo&exclude=master Returns all commits on ref `dev` or `foo`, except those that are reachable on `master` (similar to `git log dev foo ^master`). 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/dev?path=README.md&include=foo&include=bar&exclude=master Returns all commits that are on refs `dev` or `foo` or `bar`, but not on `master` that changed the file README.md. #### GET /repositories/{workspace}/{repo_slug}/commits/dev?path=src/&include=foo&exclude=master Returns all commits that are on refs `dev` or `foo`, 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. +These are the repository's commits. They are paginated and returned in reverse chronological order, similar to the output of `git log`. Like these tools, the DAG can be filtered. #### GET /repositories/{workspace}/{repo_slug}/commits/master Returns all commits on ref `master` (similar to `git log master`). #### GET /repositories/{workspace}/{repo_slug}/commits/dev?include=foo&exclude=master Returns all commits on ref `dev` or `foo`, except those that are reachable on `master` (similar to `git log dev foo ^master`). 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/dev?path=README.md&include=foo&include=bar&exclude=master Returns all commits that are on refs `dev` or `foo` or `bar`, but not on `master` that changed the file README.md. #### GET /repositories/{workspace}/{repo_slug}/commits/dev?path=src/&include=foo&exclude=master Returns all commits that are on refs `dev` or `foo`, 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. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param repoSlug This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. - - @param revision The commit's SHA1. + - @param revision A commit SHA1 or ref name. - @param workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. @return PaginatedChangeset @@ -1848,7 +2022,7 @@ CommitsApiService List commits for revision using include/exclude Identical to `GET /repositories/{workspace}/{repo_slug}/commits/{revision}`, 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.** - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param repoSlug This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. - - @param revision The commit's SHA1. + - @param revision A commit SHA1 or ref name. - @param workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. @return PaginatedChangeset diff --git a/api_deployments.go b/api_deployments.go index c93b2cd..90a54f9 100644 --- a/api_deployments.go +++ b/api_deployments.go @@ -45,7 +45,7 @@ func (a *DeploymentsApiService) CreateEnvironment(ctx context.Context, body Depl ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/environments/" + localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/environments" localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) localVarPath = strings.Replace(localVarPath, "{"+"repo_slug"+"}", fmt.Sprintf("%v", repoSlug), -1) @@ -337,7 +337,7 @@ func (a *DeploymentsApiService) GetDeploymentsForRepository(ctx context.Context, ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/deployments/" + localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/deployments" localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) localVarPath = strings.Replace(localVarPath, "{"+"repo_slug"+"}", fmt.Sprintf("%v", repoSlug), -1) @@ -527,7 +527,7 @@ func (a *DeploymentsApiService) GetEnvironmentsForRepository(ctx context.Context ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/environments/" + localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/environments" localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) localVarPath = strings.Replace(localVarPath, "{"+"repo_slug"+"}", fmt.Sprintf("%v", repoSlug), -1) @@ -1169,7 +1169,7 @@ func (a *DeploymentsApiService) UpdateEnvironmentForRepository(ctx context.Conte ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/environments/{environment_uuid}/changes/" + localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/environments/{environment_uuid}/changes" localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) localVarPath = strings.Replace(localVarPath, "{"+"repo_slug"+"}", fmt.Sprintf("%v", repoSlug), -1) localVarPath = strings.Replace(localVarPath, "{"+"environment_uuid"+"}", fmt.Sprintf("%v", environmentUuid), -1) diff --git a/api_issue_tracker.go b/api_issue_tracker.go index a17994a..13c8cc3 100644 --- a/api_issue_tracker.go +++ b/api_issue_tracker.go @@ -12,11 +12,12 @@ package bitbucket import ( "context" "fmt" - "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/antihax/optional" ) // Linger please @@ -259,7 +260,7 @@ A POST request to this endpoint initiates a new background celery task that arch * @param repoSlug This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. * @param workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. * @param optional nil or *IssueTrackerApiRepositoriesWorkspaceRepoSlugIssuesExportPostOpts - Optional Parameters: - * @param "Body" (optional.Interface of 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. + * @param "Body" (optional.Interface of ModelError) - 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. */ @@ -1315,15 +1316,15 @@ Returns the specified issue change object. This resource is only available on r - @param repoSlug This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. - @param workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. -@return IssueChange +@return ModelError */ -func (a *IssueTrackerApiService) RepositoriesWorkspaceRepoSlugIssuesIssueIdChangesChangeIdGet(ctx context.Context, changeId string, issueId string, repoSlug string, workspace string) (IssueChange, *http.Response, error) { +func (a *IssueTrackerApiService) RepositoriesWorkspaceRepoSlugIssuesIssueIdChangesChangeIdGet(ctx context.Context, changeId string, issueId string, repoSlug string, workspace string) (ModelError, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - localVarReturnValue IssueChange + localVarReturnValue ModelError ) // create path and map variables @@ -1397,7 +1398,7 @@ func (a *IssueTrackerApiService) RepositoriesWorkspaceRepoSlugIssuesIssueIdChang error: localVarHttpResponse.Status, } if localVarHttpResponse.StatusCode == 200 { - var v IssueChange + var v ModelError err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -1559,15 +1560,15 @@ Makes a change to the specified issue. For example, to change an issue's s - @param repoSlug This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. - @param workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. -@return IssueChange +@return ModelError */ -func (a *IssueTrackerApiService) RepositoriesWorkspaceRepoSlugIssuesIssueIdChangesPost(ctx context.Context, body IssueChange, issueId string, repoSlug string, workspace string) (IssueChange, *http.Response, error) { +func (a *IssueTrackerApiService) RepositoriesWorkspaceRepoSlugIssuesIssueIdChangesPost(ctx context.Context, body ModelError, issueId string, repoSlug string, workspace string) (ModelError, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - localVarReturnValue IssueChange + localVarReturnValue ModelError ) // create path and map variables @@ -1642,7 +1643,7 @@ func (a *IssueTrackerApiService) RepositoriesWorkspaceRepoSlugIssuesIssueIdChang error: localVarHttpResponse.Status, } if localVarHttpResponse.StatusCode == 201 { - var v IssueChange + var v ModelError err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() diff --git a/api_pipelines.go b/api_pipelines.go index d1fa5fa..1a6eb6d 100644 --- a/api_pipelines.go +++ b/api_pipelines.go @@ -161,7 +161,7 @@ func (a *PipelinesApiService) CreatePipelineForRepository(ctx context.Context, b ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/pipelines/" + localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/pipelines" localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) localVarPath = strings.Replace(localVarPath, "{"+"repo_slug"+"}", fmt.Sprintf("%v", repoSlug), -1) @@ -277,7 +277,7 @@ func (a *PipelinesApiService) CreatePipelineVariableForTeam(ctx context.Context, ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/teams/{username}/pipelines_config/variables/" + localVarPath := a.client.cfg.BasePath + "/teams/{username}/pipelines_config/variables" localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", fmt.Sprintf("%v", username), -1) localVarHeaderParams := make(map[string]string) @@ -396,7 +396,7 @@ func (a *PipelinesApiService) CreatePipelineVariableForUser(ctx context.Context, ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/users/{selected_user}/pipelines_config/variables/" + localVarPath := a.client.cfg.BasePath + "/users/{selected_user}/pipelines_config/variables" localVarPath = strings.Replace(localVarPath, "{"+"selected_user"+"}", fmt.Sprintf("%v", selectedUser), -1) localVarHeaderParams := make(map[string]string) @@ -630,7 +630,7 @@ func (a *PipelinesApiService) CreateRepositoryPipelineKnownHost(ctx context.Cont ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/" + localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts" localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) localVarPath = strings.Replace(localVarPath, "{"+"repo_slug"+"}", fmt.Sprintf("%v", repoSlug), -1) @@ -732,7 +732,7 @@ Create a schedule for the given repository. @return PipelineSchedule */ -func (a *PipelinesApiService) CreateRepositoryPipelineSchedule(ctx context.Context, body PipelineSchedule, workspace string, repoSlug string) (PipelineSchedule, *http.Response, error) { +func (a *PipelinesApiService) CreateRepositoryPipelineSchedule(ctx context.Context, body PipelineSchedulePostRequestBody, workspace string, repoSlug string) (PipelineSchedule, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} @@ -742,7 +742,7 @@ func (a *PipelinesApiService) CreateRepositoryPipelineSchedule(ctx context.Conte ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/" + localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules" localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) localVarPath = strings.Replace(localVarPath, "{"+"repo_slug"+"}", fmt.Sprintf("%v", repoSlug), -1) @@ -864,7 +864,7 @@ func (a *PipelinesApiService) CreateRepositoryPipelineVariable(ctx context.Conte ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/pipelines_config/variables/" + localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/pipelines_config/variables" localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) localVarPath = strings.Replace(localVarPath, "{"+"repo_slug"+"}", fmt.Sprintf("%v", repoSlug), -1) @@ -1352,6 +1352,86 @@ func (a *PipelinesApiService) DeleteRepositoryPipelineCache(ctx context.Context, return localVarHttpResponse, nil } +/* +PipelinesApiService Delete caches +Delete repository cache versions by name. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param workspace The account. + - @param repoSlug The repository. + - @param name The cache name. +*/ +func (a *PipelinesApiService) DeleteRepositoryPipelineCaches(ctx context.Context, workspace string, repoSlug string, name string) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/pipelines-config/caches" + localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) + localVarPath = strings.Replace(localVarPath, "{"+"repo_slug"+"}", fmt.Sprintf("%v", repoSlug), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + localVarQueryParams.Add("name", parameterToString(name, "")) + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + /* PipelinesApiService Delete SSH key pair Delete the repository SSH key pair. @@ -1690,7 +1770,7 @@ func (a *PipelinesApiService) GetDeploymentVariables(ctx context.Context, worksp ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables?pagelen=50" + localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables" localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) localVarPath = strings.Replace(localVarPath, "{"+"repo_slug"+"}", fmt.Sprintf("%v", repoSlug), -1) localVarPath = strings.Replace(localVarPath, "{"+"environment_uuid"+"}", fmt.Sprintf("%v", environmentUuid), -1) @@ -2323,7 +2403,7 @@ func (a *PipelinesApiService) GetPipelineStepsForRepository(ctx context.Context, ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/" + localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps" localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) localVarPath = strings.Replace(localVarPath, "{"+"repo_slug"+"}", fmt.Sprintf("%v", repoSlug), -1) localVarPath = strings.Replace(localVarPath, "{"+"pipeline_uuid"+"}", fmt.Sprintf("%v", pipelineUuid), -1) @@ -2954,7 +3034,7 @@ func (a *PipelinesApiService) GetPipelineVariablesForTeam(ctx context.Context, u ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/teams/{username}/pipelines_config/variables/" + localVarPath := a.client.cfg.BasePath + "/teams/{username}/pipelines_config/variables" localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", fmt.Sprintf("%v", username), -1) localVarHeaderParams := make(map[string]string) @@ -3041,7 +3121,7 @@ func (a *PipelinesApiService) GetPipelineVariablesForUser(ctx context.Context, s ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/users/{selected_user}/pipelines_config/variables/" + localVarPath := a.client.cfg.BasePath + "/users/{selected_user}/pipelines_config/variables" localVarPath = strings.Replace(localVarPath, "{"+"selected_user"+"}", fmt.Sprintf("%v", selectedUser), -1) localVarHeaderParams := make(map[string]string) @@ -3216,7 +3296,7 @@ func (a *PipelinesApiService) GetPipelinesForRepository(ctx context.Context, wor ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/pipelines/" + localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/pipelines" localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) localVarPath = strings.Replace(localVarPath, "{"+"repo_slug"+"}", fmt.Sprintf("%v", repoSlug), -1) @@ -3406,7 +3486,7 @@ func (a *PipelinesApiService) GetRepositoryPipelineCaches(ctx context.Context, w ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/pipelines-config/caches/" + localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/pipelines-config/caches" localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) localVarPath = strings.Replace(localVarPath, "{"+"repo_slug"+"}", fmt.Sprintf("%v", repoSlug), -1) @@ -3695,7 +3775,7 @@ func (a *PipelinesApiService) GetRepositoryPipelineKnownHosts(ctx context.Contex ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/" + localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts" localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) localVarPath = strings.Replace(localVarPath, "{"+"repo_slug"+"}", fmt.Sprintf("%v", repoSlug), -1) @@ -3886,7 +3966,7 @@ func (a *PipelinesApiService) GetRepositoryPipelineScheduleExecutions(ctx contex ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}/executions/" + localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}/executions" localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) localVarPath = strings.Replace(localVarPath, "{"+"repo_slug"+"}", fmt.Sprintf("%v", repoSlug), -1) localVarPath = strings.Replace(localVarPath, "{"+"schedule_uuid"+"}", fmt.Sprintf("%v", scheduleUuid), -1) @@ -3986,7 +4066,7 @@ func (a *PipelinesApiService) GetRepositoryPipelineSchedules(ctx context.Context ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/" + localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules" localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) localVarPath = strings.Replace(localVarPath, "{"+"repo_slug"+"}", fmt.Sprintf("%v", repoSlug), -1) @@ -4285,7 +4365,7 @@ func (a *PipelinesApiService) GetRepositoryPipelineVariables(ctx context.Context ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/pipelines_config/variables/" + localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/pipelines_config/variables" localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) localVarPath = strings.Replace(localVarPath, "{"+"repo_slug"+"}", fmt.Sprintf("%v", repoSlug), -1) @@ -5278,7 +5358,7 @@ Update a schedule. @return PipelineSchedule */ -func (a *PipelinesApiService) UpdateRepositoryPipelineSchedule(ctx context.Context, body PipelineSchedule, workspace string, repoSlug string, scheduleUuid string) (PipelineSchedule, *http.Response, error) { +func (a *PipelinesApiService) UpdateRepositoryPipelineSchedule(ctx context.Context, body PipelineSchedulePutRequestBody, workspace string, repoSlug string, scheduleUuid string) (PipelineSchedule, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} diff --git a/api_projects.go b/api_projects.go index e901f78..1775568 100644 --- a/api_projects.go +++ b/api_projects.go @@ -884,6 +884,1072 @@ func (a *ProjectsApiService) WorkspacesWorkspaceProjectsProjectKeyGet(ctx contex return localVarReturnValue, localVarHttpResponse, nil } +/* +ProjectsApiService List explicit group permissions for a project +Returns a paginated list of explicit group permissions for the given project. This endpoint does not support BBQL features. Example: ``` $ curl https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/groups HTTP/1.1 200 Location: https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/groups { \"pagelen\": 10, \"values\": [ { \"type\": \"project_group_permission\", \"group\": { \"type\": \"group\", \"name\": \"Administrators\", \"slug\": \"administrators\" }, \"permission\": \"admin\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ permissions-config/groups/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\" } } }, { \"type\": \"project_group_permission\", \"group\": { \"type\": \"group\", \"name\": \"Developers\", \"slug\": \"developers\" }, \"permission\": \"write\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ permissions-config/groups/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324c\" } } } ], \"page\": 1, \"size\": 2 } ``` + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectKey The project in question. This is the actual key assigned to the project. + - @param workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. + +@return PaginatedProjectGroupPermissions +*/ +func (a *ProjectsApiService) WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigGroupsGet(ctx context.Context, projectKey string, workspace string) (PaginatedProjectGroupPermissions, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue PaginatedProjectGroupPermissions + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/workspaces/{workspace}/projects/{project_key}/permissions-config/groups" + localVarPath = strings.Replace(localVarPath, "{"+"project_key"+"}", fmt.Sprintf("%v", projectKey), -1) + localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v PaginatedProjectGroupPermissions + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +ProjectsApiService Delete an explicit group permission for a project +Deletes the project group permission between the requested project and group, if one exists. Only users with admin permission for the project may access this resource. Example: $ curl -X DELETE https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/ projects/PRJ/permissions-config/groups/developers HTTP/1.1 204 + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param groupSlug Slug of the requested group. + - @param projectKey The project in question. This is the actual key assigned to the project. + - @param workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. +*/ +func (a *ProjectsApiService) WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigGroupsGroupSlugDelete(ctx context.Context, groupSlug string, projectKey string, workspace string) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/workspaces/{workspace}/projects/{project_key}/permissions-config/groups/{group_slug}" + localVarPath = strings.Replace(localVarPath, "{"+"group_slug"+"}", fmt.Sprintf("%v", groupSlug), -1) + localVarPath = strings.Replace(localVarPath, "{"+"project_key"+"}", fmt.Sprintf("%v", projectKey), -1) + localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + +/* +ProjectsApiService Get an explicit group permission for a project +Returns the group permission for a given group and project. Only users with admin permission for the project may access this resource. Permissions can be: * `admin` * `create-repo` * `write` * `read` * `none` Example: ``` $ curl https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ permissions-config/groups/administrators HTTP/1.1 200 Location: https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ permissions-config/groups/administrators { \"type\": \"project_group_permission\", \"group\": { \"type\": \"group\", \"name\": \"Administrators\", \"slug\": \"administrators\" }, \"permission\": \"admin\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ permissions-config/groups/administrators\" } } } ``` + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param groupSlug Slug of the requested group. + - @param projectKey The project in question. This is the actual key assigned to the project. + - @param workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. + +@return ModelError +*/ +func (a *ProjectsApiService) WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigGroupsGroupSlugGet(ctx context.Context, groupSlug string, projectKey string, workspace string) (ModelError, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ModelError + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/workspaces/{workspace}/projects/{project_key}/permissions-config/groups/{group_slug}" + localVarPath = strings.Replace(localVarPath, "{"+"group_slug"+"}", fmt.Sprintf("%v", groupSlug), -1) + localVarPath = strings.Replace(localVarPath, "{"+"project_key"+"}", fmt.Sprintf("%v", projectKey), -1) + localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +ProjectsApiService Update an explicit group permission for a project +Updates the group permission if it exists. Only users with admin permission for the project may access this resource. Due to security concerns, the JWT and OAuth authentication methods are unsupported. This is to ensure integrations and add-ons are not allowed to change permissions. Permissions can be: * `admin` * `create-repo` * `write` * `read` Example: ``` $ curl -X PUT -H \"Content-Type: application/json\" https://api.bitbucket.org/2.0/ workspaces/atlassian_tutorial/projects/PRJ/permissions-config/groups/administrators -d '{ \"permission\": \"write\" }' HTTP/1.1 200 Location: https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ permissions-config/groups/administrators { \"type\": \"project_group_permission\", \"group\": { \"type\": \"group\", \"name\": \"Administrators\", \"slug\": \"administrators\" }, \"permission\": \"write\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ permissions-config/groups/administrators\" } } } ``` + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param groupSlug Slug of the requested group. + - @param projectKey The project in question. This is the actual key assigned to the project. + - @param workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. + +@return ModelError +*/ +func (a *ProjectsApiService) WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigGroupsGroupSlugPut(ctx context.Context, groupSlug string, projectKey string, workspace string) (ModelError, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ModelError + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/workspaces/{workspace}/projects/{project_key}/permissions-config/groups/{group_slug}" + localVarPath = strings.Replace(localVarPath, "{"+"group_slug"+"}", fmt.Sprintf("%v", groupSlug), -1) + localVarPath = strings.Replace(localVarPath, "{"+"project_key"+"}", fmt.Sprintf("%v", projectKey), -1) + localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 402 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +ProjectsApiService List explicit user permissions for a project +Returns a paginated list of explicit user permissions for the given project. This endpoint does not support BBQL features. Example: ``` $ curl https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/users HTTP/1.1 200 Location: https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/users { \"pagelen\": 10, \"values\": [ { \"type\": \"project_user_permission\", \"user\": { \"type\": \"user\", \"display_name\": \"Colin Cameron\", \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\", \"account_id\": \"557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\" }, \"permission\": \"admin\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\" } } }, { \"type\": \"project_user_permission\", \"user\": { \"type\": \"user\", \"display_name\": \"Sean Conaty\", \"uuid\": \"{504c3b62-8120-4f0c-a7bc-87800b9d6f70}\", \"account_id\": \"557058:ba8948b2-49da-43a9-9e8b-e7249b8e324c\" }, \"permission\": \"write\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324c\" } } } ], \"page\": 1, \"size\": 2 } ``` + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectKey The project in question. This is the actual key assigned to the project. + - @param workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. + +@return PaginatedProjectUserPermissions +*/ +func (a *ProjectsApiService) WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigUsersGet(ctx context.Context, projectKey string, workspace string) (PaginatedProjectUserPermissions, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue PaginatedProjectUserPermissions + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/workspaces/{workspace}/projects/{project_key}/permissions-config/users" + localVarPath = strings.Replace(localVarPath, "{"+"project_key"+"}", fmt.Sprintf("%v", projectKey), -1) + localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v PaginatedProjectUserPermissions + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +ProjectsApiService Delete an explicit user permission for a project +Deletes the project user permission between the requested project and user, if one exists. Only users with admin permission for the project may access this resource. Due to security concerns, the JWT and OAuth authentication methods are unsupported. This is to ensure integrations and add-ons are not allowed to change permissions. ``` $ curl -X DELETE https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a HTTP/1.1 204 ``` + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectKey The project in question. This is the actual key assigned to the project. + - @param selectedUserId This can either be the username, the user's UUID surrounded by curly-braces, for example: {account UUID}, or the user's Atlassian ID. + - @param workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. +*/ +func (a *ProjectsApiService) WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigUsersSelectedUserIdDelete(ctx context.Context, projectKey string, selectedUserId string, workspace string) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/workspaces/{workspace}/projects/{project_key}/permissions-config/users/{selected_user_id}" + localVarPath = strings.Replace(localVarPath, "{"+"project_key"+"}", fmt.Sprintf("%v", projectKey), -1) + localVarPath = strings.Replace(localVarPath, "{"+"selected_user_id"+"}", fmt.Sprintf("%v", selectedUserId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + +/* +ProjectsApiService Get an explicit user permission for a project +Returns the explicit user permission for a given user and project. Only users with admin permission for the project may access this resource. Permissions can be: * `admin` * `create-repo` * `write` * `read` * `none` Example: ``` $ curl 'https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/ PRJ/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a' HTTP/1.1 200 Location: 'https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/ PRJ/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a' { \"type\": \"project_user_permission\", \"user\": { \"type\": \"user\", \"display_name\": \"Colin Cameron\", \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\", \"account_id\": \"557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\" }, \"permission\": \"admin\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/ PRJ/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\" } } } ``` # + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectKey The project in question. This is the actual key assigned to the project. + - @param selectedUserId This can either be the username, the user's UUID surrounded by curly-braces, for example: {account UUID}, or the user's Atlassian ID. + - @param workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. + +@return ModelError +*/ +func (a *ProjectsApiService) WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigUsersSelectedUserIdGet(ctx context.Context, projectKey string, selectedUserId string, workspace string) (ModelError, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ModelError + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/workspaces/{workspace}/projects/{project_key}/permissions-config/users/{selected_user_id}" + localVarPath = strings.Replace(localVarPath, "{"+"project_key"+"}", fmt.Sprintf("%v", projectKey), -1) + localVarPath = strings.Replace(localVarPath, "{"+"selected_user_id"+"}", fmt.Sprintf("%v", selectedUserId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +ProjectsApiService Update an explicit user permission for a project +Updates the explicit user permission for a given user and project. The selected user must be a member of the workspace, and cannot be the workspace owner. Only users with admin permission for the project may access this resource. Due to security concerns, the JWT and OAuth authentication methods are unsupported. This is to ensure integrations and add-ons are not allowed to change permissions. Permissions can be: * `admin` * `create-repo` * `write` * `read` Example: ``` $ curl -X PUT -H \"Content-Type: application/json\" https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a -d { \"permission\": \"write\" } HTTP/1.1 200 Location: https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a { \"type\": \"project_user_permission\", \"user\": { \"type\": \"user\", \"display_name\": \"Colin Cameron\", \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\", \"account_id\": \"557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\" }, \"permission\": \"write\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\" } } } ``` + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectKey The project in question. This is the actual key assigned to the project. + - @param selectedUserId This can either be the username, the user's UUID surrounded by curly-braces, for example: {account UUID}, or the user's Atlassian ID. + - @param workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. + +@return ModelError +*/ +func (a *ProjectsApiService) WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigUsersSelectedUserIdPut(ctx context.Context, projectKey string, selectedUserId string, workspace string) (ModelError, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ModelError + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/workspaces/{workspace}/projects/{project_key}/permissions-config/users/{selected_user_id}" + localVarPath = strings.Replace(localVarPath, "{"+"project_key"+"}", fmt.Sprintf("%v", projectKey), -1) + localVarPath = strings.Replace(localVarPath, "{"+"selected_user_id"+"}", fmt.Sprintf("%v", selectedUserId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 402 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + /* ProjectsApiService Update a project for a workspace Since this endpoint can be used to both update and to create a project, the request body depends on the intent. #### Creation See the POST documentation for the project collection for an example of the request body. Note: The `key` should not be specified in the body of request (since it is already present in the URL). The `name` is required, everything else is optional. #### Update See the POST documentation for the project collection for an example of the request body. Note: The key is not required in the body (since it is already in the URL). The key may be specified in the body, if the intent is to change the key itself. In such a scenario, the location of the project is changed and is returned in the `Location` header of the response. diff --git a/api_properties.go b/api_properties.go index 75c597f..67ec6c6 100644 --- a/api_properties.go +++ b/api_properties.go @@ -325,15 +325,15 @@ Retrieve an [application property](/cloud/bitbucket/application-properties/) val - @param appKey The key of the Connect app. - @param propertyName The name of the property. -@return ApplicationProperty +@return ModelError */ -func (a *PropertiesApiService) GetCommitHostedPropertyValue(ctx context.Context, workspace string, repoSlug string, commit string, appKey string, propertyName string) (ApplicationProperty, *http.Response, error) { +func (a *PropertiesApiService) GetCommitHostedPropertyValue(ctx context.Context, workspace string, repoSlug string, commit string, appKey string, propertyName string) (ModelError, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - localVarReturnValue ApplicationProperty + localVarReturnValue ModelError ) // create path and map variables @@ -395,7 +395,7 @@ func (a *PropertiesApiService) GetCommitHostedPropertyValue(ctx context.Context, error: localVarHttpResponse.Status, } if localVarHttpResponse.StatusCode == 200 { - var v ApplicationProperty + var v ModelError err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -420,15 +420,15 @@ Retrieve an [application property](/cloud/bitbucket/application-properties/) val - @param appKey The key of the Connect app. - @param propertyName The name of the property. -@return ApplicationProperty +@return ModelError */ -func (a *PropertiesApiService) GetPullRequestHostedPropertyValue(ctx context.Context, workspace string, repoSlug string, pullrequestId string, appKey string, propertyName string) (ApplicationProperty, *http.Response, error) { +func (a *PropertiesApiService) GetPullRequestHostedPropertyValue(ctx context.Context, workspace string, repoSlug string, pullrequestId string, appKey string, propertyName string) (ModelError, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - localVarReturnValue ApplicationProperty + localVarReturnValue ModelError ) // create path and map variables @@ -490,7 +490,7 @@ func (a *PropertiesApiService) GetPullRequestHostedPropertyValue(ctx context.Con error: localVarHttpResponse.Status, } if localVarHttpResponse.StatusCode == 200 { - var v ApplicationProperty + var v ModelError err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -514,15 +514,15 @@ Retrieve an [application property](/cloud/bitbucket/application-properties/) val - @param appKey The key of the Connect app. - @param propertyName The name of the property. -@return ApplicationProperty +@return ModelError */ -func (a *PropertiesApiService) GetRepositoryHostedPropertyValue(ctx context.Context, workspace string, repoSlug string, appKey string, propertyName string) (ApplicationProperty, *http.Response, error) { +func (a *PropertiesApiService) GetRepositoryHostedPropertyValue(ctx context.Context, workspace string, repoSlug string, appKey string, propertyName string) (ModelError, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - localVarReturnValue ApplicationProperty + localVarReturnValue ModelError ) // create path and map variables @@ -583,7 +583,7 @@ func (a *PropertiesApiService) GetRepositoryHostedPropertyValue(ctx context.Cont error: localVarHttpResponse.Status, } if localVarHttpResponse.StatusCode == 200 { - var v ApplicationProperty + var v ModelError err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -606,15 +606,15 @@ Retrieve an [application property](/cloud/bitbucket/application-properties/) val - @param appKey The key of the Connect app. - @param propertyName The name of the property. -@return ApplicationProperty +@return ModelError */ -func (a *PropertiesApiService) RetrieveUserHostedPropertyValue(ctx context.Context, selectedUser string, appKey string, propertyName string) (ApplicationProperty, *http.Response, error) { +func (a *PropertiesApiService) RetrieveUserHostedPropertyValue(ctx context.Context, selectedUser string, appKey string, propertyName string) (ModelError, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - localVarReturnValue ApplicationProperty + localVarReturnValue ModelError ) // create path and map variables @@ -674,7 +674,7 @@ func (a *PropertiesApiService) RetrieveUserHostedPropertyValue(ctx context.Conte error: localVarHttpResponse.Status, } if localVarHttpResponse.StatusCode == 200 { - var v ApplicationProperty + var v ModelError err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -700,7 +700,7 @@ Update an [application property](/cloud/bitbucket/application-properties/) value - @param appKey The key of the Connect app. - @param propertyName The name of the property. */ -func (a *PropertiesApiService) UpdateCommitHostedPropertyValue(ctx context.Context, body ApplicationProperty, workspace string, repoSlug string, commit string, appKey string, propertyName string) (*http.Response, error) { +func (a *PropertiesApiService) UpdateCommitHostedPropertyValue(ctx context.Context, body ModelError, workspace string, repoSlug string, commit string, appKey string, propertyName string) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} @@ -777,7 +777,7 @@ Update an [application property](/cloud/bitbucket/application-properties/) value - @param appKey The key of the Connect app. - @param propertyName The name of the property. */ -func (a *PropertiesApiService) UpdatePullRequestHostedPropertyValue(ctx context.Context, body ApplicationProperty, workspace string, repoSlug string, pullrequestId string, appKey string, propertyName string) (*http.Response, error) { +func (a *PropertiesApiService) UpdatePullRequestHostedPropertyValue(ctx context.Context, body ModelError, workspace string, repoSlug string, pullrequestId string, appKey string, propertyName string) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} @@ -853,7 +853,7 @@ Update an [application property](/cloud/bitbucket/application-properties/) value - @param appKey The key of the Connect app. - @param propertyName The name of the property. */ -func (a *PropertiesApiService) UpdateRepositoryHostedPropertyValue(ctx context.Context, body ApplicationProperty, workspace string, repoSlug string, appKey string, propertyName string) (*http.Response, error) { +func (a *PropertiesApiService) UpdateRepositoryHostedPropertyValue(ctx context.Context, body ModelError, workspace string, repoSlug string, appKey string, propertyName string) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} @@ -927,7 +927,7 @@ Update an [application property](/cloud/bitbucket/application-properties/) value - @param appKey The key of the Connect app. - @param propertyName The name of the property. */ -func (a *PropertiesApiService) UpdateUserHostedPropertyValue(ctx context.Context, body ApplicationProperty, selectedUser string, appKey string, propertyName string) (*http.Response, error) { +func (a *PropertiesApiService) UpdateUserHostedPropertyValue(ctx context.Context, body ModelError, selectedUser string, appKey string, propertyName string) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} diff --git a/api_pullrequests.go b/api_pullrequests.go index 14ddb39..e920c60 100644 --- a/api_pullrequests.go +++ b/api_pullrequests.go @@ -12,11 +12,12 @@ package bitbucket import ( "context" "fmt" - "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/antihax/optional" ) // Linger please @@ -1375,6 +1376,16 @@ func (a *PullrequestsApiService) RepositoriesWorkspaceRepoSlugPullrequestsPullRe body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } if localVarHttpResponse.StatusCode == 401 { var v ModelError err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -1885,6 +1896,245 @@ func (a *PullrequestsApiService) RepositoriesWorkspaceRepoSlugPullrequestsPullRe return localVarReturnValue, localVarHttpResponse, nil } +/* +PullrequestsApiService Reopen a comment thread + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param commentId The id of the comment. + - @param pullRequestId The id of the pull request. + - @param repoSlug This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. + - @param workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. +*/ +func (a *PullrequestsApiService) RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdResolveDelete(ctx context.Context, commentId int32, pullRequestId int32, repoSlug string, workspace string) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}/resolve" + localVarPath = strings.Replace(localVarPath, "{"+"comment_id"+"}", fmt.Sprintf("%v", commentId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pull_request_id"+"}", fmt.Sprintf("%v", pullRequestId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"repo_slug"+"}", fmt.Sprintf("%v", repoSlug), -1) + localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + +/* +PullrequestsApiService Resolve a comment thread + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param commentId The id of the comment. + - @param pullRequestId The id of the pull request. + - @param repoSlug This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. + - @param workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. + +@return ModelError +*/ +func (a *PullrequestsApiService) RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdResolvePost(ctx context.Context, commentId int32, pullRequestId int32, repoSlug string, workspace string) (ModelError, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ModelError + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}/resolve" + localVarPath = strings.Replace(localVarPath, "{"+"comment_id"+"}", fmt.Sprintf("%v", commentId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pull_request_id"+"}", fmt.Sprintf("%v", pullRequestId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"repo_slug"+"}", fmt.Sprintf("%v", repoSlug), -1) + localVarPath = strings.Replace(localVarPath, "{"+"workspace"+"}", fmt.Sprintf("%v", workspace), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 409 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + /* PullrequestsApiService List comments on a pull request Returns a paginated list of the pull request's comments. This includes both global, inline comments and replies. The default sorting is oldest to newest and can be overridden with the `sort` query parameter. This endpoint also supports filtering and sorting of the results. See [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details. @@ -2641,7 +2891,7 @@ Merges the pull request. * @param repoSlug This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. * @param workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. * @param optional nil or *PullrequestsApiRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergePostOpts - Optional Parameters: - * @param "Body" (optional.Interface of PullrequestMergeParameters) - + * @param "Body" (optional.Interface of ModelError) - * @param "Async" (optional.Bool) - Default value is false. When set to true, runs merge asynchronously and immediately returns a 202 with polling link to the task-status API in the Location header. When set to false, runs merge and waits for it to complete, returning 200 when it succeeds. If the duration of the merge exceeds a timeout threshold, the API returns a 202 with polling link to the task-status API in the Location header. @return Pullrequest */ @@ -3154,6 +3404,16 @@ func (a *PullrequestsApiService) RepositoriesWorkspaceRepoSlugPullrequestsPullRe body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } if localVarHttpResponse.StatusCode == 401 { var v ModelError err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -3277,6 +3537,16 @@ func (a *PullrequestsApiService) RepositoriesWorkspaceRepoSlugPullrequestsPullRe newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } if localVarHttpResponse.StatusCode == 401 { var v ModelError err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) diff --git a/api_refs.go b/api_refs.go index 04d51cf..9cbcf01 100644 --- a/api_refs.go +++ b/api_refs.go @@ -12,11 +12,12 @@ package bitbucket import ( "context" "fmt" - "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/antihax/optional" ) // Linger please diff --git a/api_repositories.go b/api_repositories.go index c5b329e..0935724 100644 --- a/api_repositories.go +++ b/api_repositories.go @@ -12,11 +12,12 @@ package bitbucket import ( "context" "fmt" - "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/antihax/optional" ) // Linger please @@ -1482,15 +1483,15 @@ RepositoriesApiService Retrieve the inheritance state for repository settings - @param repoSlug This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. - @param workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. -@return RepositoryInheritanceState +@return ModelError */ -func (a *RepositoriesApiService) RepositoriesWorkspaceRepoSlugOverrideSettingsGet(ctx context.Context, repoSlug string, workspace string) (RepositoryInheritanceState, *http.Response, error) { +func (a *RepositoriesApiService) RepositoriesWorkspaceRepoSlugOverrideSettingsGet(ctx context.Context, repoSlug string, workspace string) (ModelError, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - localVarReturnValue RepositoryInheritanceState + localVarReturnValue ModelError ) // create path and map variables @@ -1562,7 +1563,7 @@ func (a *RepositoriesApiService) RepositoriesWorkspaceRepoSlugOverrideSettingsGe error: localVarHttpResponse.Status, } if localVarHttpResponse.StatusCode == 200 { - var v RepositoryInheritanceState + var v ModelError err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -1930,15 +1931,15 @@ Returns the group permission for a given group slug and repository Only users w - @param repoSlug This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. - @param workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. -@return RepositoryGroupPermission +@return ModelError */ -func (a *RepositoriesApiService) RepositoriesWorkspaceRepoSlugPermissionsConfigGroupsGroupSlugGet(ctx context.Context, groupSlug string, repoSlug string, workspace string) (RepositoryGroupPermission, *http.Response, error) { +func (a *RepositoriesApiService) RepositoriesWorkspaceRepoSlugPermissionsConfigGroupsGroupSlugGet(ctx context.Context, groupSlug string, repoSlug string, workspace string) (ModelError, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - localVarReturnValue RepositoryGroupPermission + localVarReturnValue ModelError ) // create path and map variables @@ -2011,7 +2012,7 @@ func (a *RepositoriesApiService) RepositoriesWorkspaceRepoSlugPermissionsConfigG error: localVarHttpResponse.Status, } if localVarHttpResponse.StatusCode == 200 { - var v RepositoryGroupPermission + var v ModelError err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -2064,15 +2065,15 @@ Updates the group permission if it exists. Only users with admin permission for - @param repoSlug This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. - @param workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. -@return RepositoryGroupPermission +@return ModelError */ -func (a *RepositoriesApiService) RepositoriesWorkspaceRepoSlugPermissionsConfigGroupsGroupSlugPut(ctx context.Context, groupSlug string, repoSlug string, workspace string) (RepositoryGroupPermission, *http.Response, error) { +func (a *RepositoriesApiService) RepositoriesWorkspaceRepoSlugPermissionsConfigGroupsGroupSlugPut(ctx context.Context, groupSlug string, repoSlug string, workspace string) (ModelError, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - localVarReturnValue RepositoryGroupPermission + localVarReturnValue ModelError ) // create path and map variables @@ -2145,7 +2146,7 @@ func (a *RepositoriesApiService) RepositoriesWorkspaceRepoSlugPermissionsConfigG error: localVarHttpResponse.Status, } if localVarHttpResponse.StatusCode == 200 { - var v RepositoryGroupPermission + var v ModelError err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -2463,15 +2464,15 @@ Returns the explicit user permission for a given user and repository. Only user - @param selectedUserId This can either be the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`, OR an Atlassian Account ID. - @param workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. -@return RepositoryUserPermission +@return ModelError */ -func (a *RepositoriesApiService) RepositoriesWorkspaceRepoSlugPermissionsConfigUsersSelectedUserIdGet(ctx context.Context, repoSlug string, selectedUserId string, workspace string) (RepositoryUserPermission, *http.Response, error) { +func (a *RepositoriesApiService) RepositoriesWorkspaceRepoSlugPermissionsConfigUsersSelectedUserIdGet(ctx context.Context, repoSlug string, selectedUserId string, workspace string) (ModelError, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - localVarReturnValue RepositoryUserPermission + localVarReturnValue ModelError ) // create path and map variables @@ -2544,7 +2545,7 @@ func (a *RepositoriesApiService) RepositoriesWorkspaceRepoSlugPermissionsConfigU error: localVarHttpResponse.Status, } if localVarHttpResponse.StatusCode == 200 { - var v RepositoryUserPermission + var v ModelError err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -2597,15 +2598,15 @@ Updates the explicit user permission for a given user and repository. The select - @param selectedUserId This can either be the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`, OR an Atlassian Account ID. - @param workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. -@return RepositoryUserPermission +@return ModelError */ -func (a *RepositoriesApiService) RepositoriesWorkspaceRepoSlugPermissionsConfigUsersSelectedUserIdPut(ctx context.Context, repoSlug string, selectedUserId string, workspace string) (RepositoryUserPermission, *http.Response, error) { +func (a *RepositoriesApiService) RepositoriesWorkspaceRepoSlugPermissionsConfigUsersSelectedUserIdPut(ctx context.Context, repoSlug string, selectedUserId string, workspace string) (ModelError, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - localVarReturnValue RepositoryUserPermission + localVarReturnValue ModelError ) // create path and map variables @@ -2678,7 +2679,7 @@ func (a *RepositoriesApiService) RepositoriesWorkspaceRepoSlugPermissionsConfigU error: localVarHttpResponse.Status, } if localVarHttpResponse.StatusCode == 200 { - var v RepositoryUserPermission + var v ModelError err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() diff --git a/api_search.go b/api_search.go index c7d0225..952d8e5 100644 --- a/api_search.go +++ b/api_search.go @@ -12,11 +12,12 @@ package bitbucket import ( "context" "fmt" - "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/antihax/optional" ) // Linger please diff --git a/api_snippets.go b/api_snippets.go index b4d6414..674bc57 100644 --- a/api_snippets.go +++ b/api_snippets.go @@ -12,11 +12,12 @@ package bitbucket import ( "context" "fmt" - "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/antihax/optional" ) // Linger please diff --git a/api_source.go b/api_source.go index 10206d6..6c93aef 100644 --- a/api_source.go +++ b/api_source.go @@ -12,11 +12,12 @@ package bitbucket import ( "context" "fmt" - "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/antihax/optional" ) // Linger please diff --git a/api_ssh.go b/api_ssh.go index a3a81c2..1a7a9ce 100644 --- a/api_ssh.go +++ b/api_ssh.go @@ -12,11 +12,12 @@ package bitbucket import ( "context" "fmt" - "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/antihax/optional" ) // Linger please diff --git a/api_workspaces.go b/api_workspaces.go index df1418d..1dcd2de 100644 --- a/api_workspaces.go +++ b/api_workspaces.go @@ -12,11 +12,12 @@ package bitbucket import ( "context" "fmt" - "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/antihax/optional" ) // Linger please diff --git a/docs/Account.md b/docs/Account.md index d6dac4a..4c5fe04 100644 --- a/docs/Account.md +++ b/docs/Account.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type_** | **string** | | [default to null] -**Links** | [***AccountLinks**](account_links.md) | | [optional] [default to null] +**Links** | [***ModelError**](map.md) | | [optional] [default to null] **CreatedOn** | [**time.Time**](time.Time.md) | | [optional] [default to null] **DisplayName** | **string** | | [optional] [default to null] **Username** | **string** | | [optional] [default to null] diff --git a/docs/AppUser.md b/docs/AppUser.md index 493329b..13191ff 100644 --- a/docs/AppUser.md +++ b/docs/AppUser.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Links** | [***AccountLinks**](account_links.md) | | [optional] [default to null] +**Links** | [***ModelError**](map.md) | | [optional] [default to null] **CreatedOn** | [**time.Time**](time.Time.md) | | [optional] [default to null] **DisplayName** | **string** | | [optional] [default to null] **Username** | **string** | | [optional] [default to null] diff --git a/docs/BaseCommit.md b/docs/BaseCommit.md index e0537c4..d776866 100644 --- a/docs/BaseCommit.md +++ b/docs/BaseCommit.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **Date** | [**time.Time**](time.Time.md) | | [optional] [default to null] **Author** | [***Author**](author.md) | | [optional] [default to null] **Message** | **string** | | [optional] [default to null] -**Summary** | [***RenderedPullRequestMarkupTitle**](Rendered Pull Request Markup_title.md) | | [optional] [default to null] +**Summary** | [***interface{}**](interface{}.md) | | [optional] [default to null] **Parents** | [**[]BaseCommit**](base_commit.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Branch.md b/docs/Branch.md index ab16037..3fb3090 100644 --- a/docs/Branch.md +++ b/docs/Branch.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type_** | **string** | | [default to null] -**Links** | [***RefLinks**](ref_links.md) | | [optional] [default to null] +**Links** | [***interface{}**](interface{}.md) | | [optional] [default to null] **Name** | **string** | The name of the ref. | [optional] [default to null] **Target** | [***Commit**](commit.md) | | [optional] [default to null] **MergeStrategies** | **[]string** | Available merge strategies for pull requests targeting this branch. | [optional] [default to null] diff --git a/docs/BranchingModel.md b/docs/BranchingModel.md index c2a88fc..b4b39cd 100644 --- a/docs/BranchingModel.md +++ b/docs/BranchingModel.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type_** | **string** | | [default to null] -**BranchTypes** | [**[]BranchingModelBranchTypes**](branching_model_branch_types.md) | The active branch types. | [optional] [default to null] -**Development** | [***BranchingModelDevelopment**](branching_model_development.md) | | [optional] [default to null] -**Production** | [***BranchingModelDevelopment**](branching_model_development.md) | | [optional] [default to null] +**BranchTypes** | [**[]interface{}**](interface{}.md) | The active branch types. | [optional] [default to null] +**Development** | [***interface{}**](interface{}.md) | | [optional] [default to null] +**Production** | [***interface{}**](interface{}.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BranchingModelSettings.md b/docs/BranchingModelSettings.md index aebaaa0..7e02c03 100644 --- a/docs/BranchingModelSettings.md +++ b/docs/BranchingModelSettings.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type_** | **string** | | [default to null] -**Links** | [***VersionLinks**](version_links.md) | | [optional] [default to null] -**BranchTypes** | [**[]BranchingModelSettingsBranchTypes**](branching_model_settings_branch_types.md) | | [optional] [default to null] -**Development** | [***BranchingModelSettingsDevelopment**](branching_model_settings_development.md) | | [optional] [default to null] -**Production** | [***BranchingModelSettingsProduction**](branching_model_settings_production.md) | | [optional] [default to null] +**Links** | [***interface{}**](interface{}.md) | | [optional] [default to null] +**BranchTypes** | [**[]interface{}**](interface{}.md) | | [optional] [default to null] +**Development** | [***interface{}**](interface{}.md) | | [optional] [default to null] +**Production** | [***interface{}**](interface{}.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Comment.md b/docs/Comment.md index 5d8bc06..ad27ae9 100644 --- a/docs/Comment.md +++ b/docs/Comment.md @@ -7,12 +7,12 @@ Name | Type | Description | Notes **Id** | **int32** | | [optional] [default to null] **CreatedOn** | [**time.Time**](time.Time.md) | | [optional] [default to null] **UpdatedOn** | [**time.Time**](time.Time.md) | | [optional] [default to null] -**Content** | [***RenderedPullRequestMarkupTitle**](Rendered Pull Request Markup_title.md) | | [optional] [default to null] +**Content** | [***interface{}**](interface{}.md) | | [optional] [default to null] **User** | [***Account**](account.md) | | [optional] [default to null] **Deleted** | **bool** | | [optional] [default to null] **Parent** | [***Comment**](comment.md) | | [optional] [default to null] -**Inline** | [***CommentInline**](comment_inline.md) | | [optional] [default to null] -**Links** | [***CommentLinks**](comment_links.md) | | [optional] [default to null] +**Inline** | [***interface{}**](interface{}.md) | | [optional] [default to null] +**Links** | [***interface{}**](interface{}.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Commit.md b/docs/Commit.md index 5d6b4d1..a188cfb 100644 --- a/docs/Commit.md +++ b/docs/Commit.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **Date** | [**time.Time**](time.Time.md) | | [optional] [default to null] **Author** | [***Author**](author.md) | | [optional] [default to null] **Message** | **string** | | [optional] [default to null] -**Summary** | [***RenderedPullRequestMarkupTitle**](Rendered Pull Request Markup_title.md) | | [optional] [default to null] +**Summary** | [***interface{}**](interface{}.md) | | [optional] [default to null] **Parents** | [**[]BaseCommit**](base_commit.md) | | [optional] [default to null] **Repository** | [***Repository**](repository.md) | | [optional] [default to null] **Participants** | [**[]Participant**](participant.md) | | [optional] [default to null] diff --git a/docs/CommitComment.md b/docs/CommitComment.md index a27fca0..c1a154b 100644 --- a/docs/CommitComment.md +++ b/docs/CommitComment.md @@ -6,12 +6,12 @@ Name | Type | Description | Notes **Id** | **int32** | | [optional] [default to null] **CreatedOn** | [**time.Time**](time.Time.md) | | [optional] [default to null] **UpdatedOn** | [**time.Time**](time.Time.md) | | [optional] [default to null] -**Content** | [***RenderedPullRequestMarkupTitle**](Rendered Pull Request Markup_title.md) | | [optional] [default to null] +**Content** | [***interface{}**](interface{}.md) | | [optional] [default to null] **User** | [***Account**](account.md) | | [optional] [default to null] **Deleted** | **bool** | | [optional] [default to null] **Parent** | [***Comment**](comment.md) | | [optional] [default to null] -**Inline** | [***CommentInline**](comment_inline.md) | | [optional] [default to null] -**Links** | [***CommentLinks**](comment_links.md) | | [optional] [default to null] +**Inline** | [***interface{}**](interface{}.md) | | [optional] [default to null] +**Links** | [***interface{}**](interface{}.md) | | [optional] [default to null] **Commit** | [***Commit**](commit.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CommitsApi.md b/docs/CommitsApi.md index 2d1e6b1..14fe1b9 100644 --- a/docs/CommitsApi.md +++ b/docs/CommitsApi.md @@ -15,7 +15,9 @@ Method | HTTP request | Description [**GetReportsForCommit**](CommitsApi.md#GetReportsForCommit) | **Get** /repositories/{workspace}/{repo_slug}/commit/{commit}/reports | List reports [**RepositoriesWorkspaceRepoSlugCommitCommitApproveDelete**](CommitsApi.md#RepositoriesWorkspaceRepoSlugCommitCommitApproveDelete) | **Delete** /repositories/{workspace}/{repo_slug}/commit/{commit}/approve | Unapprove a commit [**RepositoriesWorkspaceRepoSlugCommitCommitApprovePost**](CommitsApi.md#RepositoriesWorkspaceRepoSlugCommitCommitApprovePost) | **Post** /repositories/{workspace}/{repo_slug}/commit/{commit}/approve | Approve a commit +[**RepositoriesWorkspaceRepoSlugCommitCommitCommentsCommentIdDelete**](CommitsApi.md#RepositoriesWorkspaceRepoSlugCommitCommitCommentsCommentIdDelete) | **Delete** /repositories/{workspace}/{repo_slug}/commit/{commit}/comments/{comment_id} | Delete a commit comment [**RepositoriesWorkspaceRepoSlugCommitCommitCommentsCommentIdGet**](CommitsApi.md#RepositoriesWorkspaceRepoSlugCommitCommitCommentsCommentIdGet) | **Get** /repositories/{workspace}/{repo_slug}/commit/{commit}/comments/{comment_id} | Get a commit comment +[**RepositoriesWorkspaceRepoSlugCommitCommitCommentsCommentIdPut**](CommitsApi.md#RepositoriesWorkspaceRepoSlugCommitCommitCommentsCommentIdPut) | **Put** /repositories/{workspace}/{repo_slug}/commit/{commit}/comments/{comment_id} | Update a commit comment [**RepositoriesWorkspaceRepoSlugCommitCommitCommentsGet**](CommitsApi.md#RepositoriesWorkspaceRepoSlugCommitCommitCommentsGet) | **Get** /repositories/{workspace}/{repo_slug}/commit/{commit}/comments | List a commit's comments [**RepositoriesWorkspaceRepoSlugCommitCommitCommentsPost**](CommitsApi.md#RepositoriesWorkspaceRepoSlugCommitCommitCommentsPost) | **Post** /repositories/{workspace}/{repo_slug}/commit/{commit}/comments | Create comment for a commit [**RepositoriesWorkspaceRepoSlugCommitCommitGet**](CommitsApi.md#RepositoriesWorkspaceRepoSlugCommitCommitGet) | **Get** /repositories/{workspace}/{repo_slug}/commit/{commit} | Get a commit @@ -372,6 +374,37 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **RepositoriesWorkspaceRepoSlugCommitCommitCommentsCommentIdDelete** +> RepositoriesWorkspaceRepoSlugCommitCommitCommentsCommentIdDelete(ctx, commentId, commit, repoSlug, workspace) +Delete a commit comment + +Deletes the specified commit comment. Note that deleting comments that have visible replies that point to them will not really delete the resource. This is to retain the integrity of the original comment tree. Instead, the `deleted` element is set to `true` and the content is blanked out. The comment will continue to be returned by the collections and self endpoints. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **commentId** | **int32**| The id of the comment. | + **commit** | **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}`. | + +### Return type + + (empty response body) + +### Authorization + +[api_key](../README.md#api_key), [basic](../README.md#basic), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **RepositoriesWorkspaceRepoSlugCommitCommitCommentsCommentIdGet** > CommitComment RepositoriesWorkspaceRepoSlugCommitCommitCommentsCommentIdGet(ctx, commentId, commit, repoSlug, workspace) Get a commit comment @@ -403,6 +436,38 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **RepositoriesWorkspaceRepoSlugCommitCommitCommentsCommentIdPut** +> RepositoriesWorkspaceRepoSlugCommitCommitCommentsCommentIdPut(ctx, body, commentId, commit, repoSlug, workspace) +Update a commit comment + +Used to update the contents of a comment. Only the content of the comment can be updated. ``` $ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/commit/7f71b5/comments/5728901 \\ -X PUT -u evzijst \\ -H 'Content-Type: application/json' \\ -d '{\"content\": {\"raw\": \"One more thing!\"}' ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**CommitComment**](CommitComment.md)| The updated comment. | + **commentId** | **int32**| The id of the comment. | + **commit** | **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}`. | + +### Return type + + (empty response body) + +### Authorization + +[api_key](../README.md#api_key), [basic](../README.md#basic), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **RepositoriesWorkspaceRepoSlugCommitCommitCommentsGet** > PaginatedCommitComments RepositoriesWorkspaceRepoSlugCommitCommitCommentsGet(ctx, commit, repoSlug, workspace, optional) List a commit's comments @@ -567,7 +632,7 @@ Name | Type | Description | Notes > PaginatedChangeset RepositoriesWorkspaceRepoSlugCommitsRevisionGet(ctx, repoSlug, revision, workspace) List commits for revision -These are the repository's commits. They are paginated and returned in reverse chronological order, similar to the output of `git log`. Like these tools, the DAG can be filtered. #### GET /repositories/{workspace}/{repo_slug}/commits/master Returns all commits on rev `master` (similar to `git log master`). #### GET /repositories/{workspace}/{repo_slug}/commits/dev?include=foo&exclude=master Returns all commits on ref `dev` or `foo`, except those that are reachable on `master` (similar to `git log dev foo ^master`). 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/dev?path=README.md&include=foo&include=bar&exclude=master Returns all commits that are on refs `dev` or `foo` or `bar`, but not on `master` that changed the file README.md. #### GET /repositories/{workspace}/{repo_slug}/commits/dev?path=src/&include=foo&exclude=master Returns all commits that are on refs `dev` or `foo`, 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. +These are the repository's commits. They are paginated and returned in reverse chronological order, similar to the output of `git log`. Like these tools, the DAG can be filtered. #### GET /repositories/{workspace}/{repo_slug}/commits/master Returns all commits on ref `master` (similar to `git log master`). #### GET /repositories/{workspace}/{repo_slug}/commits/dev?include=foo&exclude=master Returns all commits on ref `dev` or `foo`, except those that are reachable on `master` (similar to `git log dev foo ^master`). 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/dev?path=README.md&include=foo&include=bar&exclude=master Returns all commits that are on refs `dev` or `foo` or `bar`, but not on `master` that changed the file README.md. #### GET /repositories/{workspace}/{repo_slug}/commits/dev?path=src/&include=foo&exclude=master Returns all commits that are on refs `dev` or `foo`, 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. ### Required Parameters @@ -575,7 +640,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **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**| The commit's SHA1. | + **revision** | **string**| A commit SHA1 or ref name. | **workspace** | **string**| This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. | ### Return type @@ -605,7 +670,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **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**| The commit's SHA1. | + **revision** | **string**| A commit SHA1 or ref name. | **workspace** | **string**| This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. | ### Return type diff --git a/docs/Commitstatus.md b/docs/Commitstatus.md index 236d210..12864cc 100644 --- a/docs/Commitstatus.md +++ b/docs/Commitstatus.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type_** | **string** | | [default to null] -**Links** | [***CommitstatusLinks**](commitstatus_links.md) | | [optional] [default to null] +**Links** | [***interface{}**](interface{}.md) | | [optional] [default to null] **Uuid** | **string** | The commit status' id. | [optional] [default to null] **Key** | **string** | An identifier for the status that's unique to its type (current \"build\" is the only supported type) and the vendor, e.g. BB-DEPLOY | [optional] [default to null] **Refname** | **string** | The name of the ref that pointed to this commit at the time the status object was created. Note that this the ref may since have moved off of the commit. This optional field can be useful for build systems whose build triggers and configuration are branch-dependent (e.g. a Pipeline build). It is legitimate for this field to not be set, or even apply (e.g. a static linting job). | [optional] [default to null] diff --git a/docs/Component.md b/docs/Component.md index 5a7fc34..2bc84a2 100644 --- a/docs/Component.md +++ b/docs/Component.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type_** | **string** | | [default to null] -**Links** | [***VersionLinks**](version_links.md) | | [optional] [default to null] +**Links** | [***interface{}**](interface{}.md) | | [optional] [default to null] **Name** | **string** | | [optional] [default to null] **Id** | **int32** | | [optional] [default to null] diff --git a/docs/DeployKey.md b/docs/DeployKey.md index 5cc39b7..b14ce88 100644 --- a/docs/DeployKey.md +++ b/docs/DeployKey.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **Label** | **string** | The user-defined label for the deploy key | [optional] [default to null] **AddedOn** | [**time.Time**](time.Time.md) | | [optional] [default to null] **LastUsed** | [**time.Time**](time.Time.md) | | [optional] [default to null] -**Links** | [***VersionLinks**](version_links.md) | | [optional] [default to null] +**Links** | [***interface{}**](interface{}.md) | | [optional] [default to null] **Owner** | [***Account**](account.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeploymentsApi.md b/docs/DeploymentsApi.md index 09c5c51..7b4c36d 100644 --- a/docs/DeploymentsApi.md +++ b/docs/DeploymentsApi.md @@ -4,18 +4,18 @@ All URIs are relative to *https://api.bitbucket.org/2.0* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CreateEnvironment**](DeploymentsApi.md#CreateEnvironment) | **Post** /repositories/{workspace}/{repo_slug}/environments/ | Create an environment +[**CreateEnvironment**](DeploymentsApi.md#CreateEnvironment) | **Post** /repositories/{workspace}/{repo_slug}/environments | Create an environment [**DeleteEnvironmentForRepository**](DeploymentsApi.md#DeleteEnvironmentForRepository) | **Delete** /repositories/{workspace}/{repo_slug}/environments/{environment_uuid} | Delete an environment [**GetDeploymentForRepository**](DeploymentsApi.md#GetDeploymentForRepository) | **Get** /repositories/{workspace}/{repo_slug}/deployments/{deployment_uuid} | Get a deployment -[**GetDeploymentsForRepository**](DeploymentsApi.md#GetDeploymentsForRepository) | **Get** /repositories/{workspace}/{repo_slug}/deployments/ | List deployments +[**GetDeploymentsForRepository**](DeploymentsApi.md#GetDeploymentsForRepository) | **Get** /repositories/{workspace}/{repo_slug}/deployments | List deployments [**GetEnvironmentForRepository**](DeploymentsApi.md#GetEnvironmentForRepository) | **Get** /repositories/{workspace}/{repo_slug}/environments/{environment_uuid} | Get an environment -[**GetEnvironmentsForRepository**](DeploymentsApi.md#GetEnvironmentsForRepository) | **Get** /repositories/{workspace}/{repo_slug}/environments/ | List environments +[**GetEnvironmentsForRepository**](DeploymentsApi.md#GetEnvironmentsForRepository) | **Get** /repositories/{workspace}/{repo_slug}/environments | List environments [**RepositoriesWorkspaceRepoSlugDeployKeysGet**](DeploymentsApi.md#RepositoriesWorkspaceRepoSlugDeployKeysGet) | **Get** /repositories/{workspace}/{repo_slug}/deploy-keys | List repository deploy keys [**RepositoriesWorkspaceRepoSlugDeployKeysKeyIdDelete**](DeploymentsApi.md#RepositoriesWorkspaceRepoSlugDeployKeysKeyIdDelete) | **Delete** /repositories/{workspace}/{repo_slug}/deploy-keys/{key_id} | Delete a repository deploy key [**RepositoriesWorkspaceRepoSlugDeployKeysKeyIdGet**](DeploymentsApi.md#RepositoriesWorkspaceRepoSlugDeployKeysKeyIdGet) | **Get** /repositories/{workspace}/{repo_slug}/deploy-keys/{key_id} | Get a repository deploy key [**RepositoriesWorkspaceRepoSlugDeployKeysKeyIdPut**](DeploymentsApi.md#RepositoriesWorkspaceRepoSlugDeployKeysKeyIdPut) | **Put** /repositories/{workspace}/{repo_slug}/deploy-keys/{key_id} | Update a repository deploy key [**RepositoriesWorkspaceRepoSlugDeployKeysPost**](DeploymentsApi.md#RepositoriesWorkspaceRepoSlugDeployKeysPost) | **Post** /repositories/{workspace}/{repo_slug}/deploy-keys | Add a repository deploy key -[**UpdateEnvironmentForRepository**](DeploymentsApi.md#UpdateEnvironmentForRepository) | **Post** /repositories/{workspace}/{repo_slug}/environments/{environment_uuid}/changes/ | Update an environment +[**UpdateEnvironmentForRepository**](DeploymentsApi.md#UpdateEnvironmentForRepository) | **Post** /repositories/{workspace}/{repo_slug}/environments/{environment_uuid}/changes | Update an environment [**WorkspacesWorkspaceProjectsProjectKeyDeployKeysGet**](DeploymentsApi.md#WorkspacesWorkspaceProjectsProjectKeyDeployKeysGet) | **Get** /workspaces/{workspace}/projects/{project_key}/deploy-keys | List project deploy keys [**WorkspacesWorkspaceProjectsProjectKeyDeployKeysKeyIdDelete**](DeploymentsApi.md#WorkspacesWorkspaceProjectsProjectKeyDeployKeysKeyIdDelete) | **Delete** /workspaces/{workspace}/projects/{project_key}/deploy-keys/{key_id} | Delete a deploy key from a project [**WorkspacesWorkspaceProjectsProjectKeyDeployKeysKeyIdGet**](DeploymentsApi.md#WorkspacesWorkspaceProjectsProjectKeyDeployKeysKeyIdGet) | **Get** /workspaces/{workspace}/projects/{project_key}/deploy-keys/{key_id} | Get a project deploy key diff --git a/docs/EffectiveRepoBranchingModel.md b/docs/EffectiveRepoBranchingModel.md index d78c415..501bac6 100644 --- a/docs/EffectiveRepoBranchingModel.md +++ b/docs/EffectiveRepoBranchingModel.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type_** | **string** | | [default to null] -**BranchTypes** | [**[]BranchingModelBranchTypes**](branching_model_branch_types.md) | The active branch types. | [optional] [default to null] -**Development** | [***BranchingModelDevelopment**](branching_model_development.md) | | [optional] [default to null] -**Production** | [***BranchingModelDevelopment**](branching_model_development.md) | | [optional] [default to null] +**BranchTypes** | [**[]interface{}**](interface{}.md) | The active branch types. | [optional] [default to null] +**Development** | [***interface{}**](interface{}.md) | | [optional] [default to null] +**Production** | [***interface{}**](interface{}.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Group.md b/docs/Group.md index 493f884..09f428a 100644 --- a/docs/Group.md +++ b/docs/Group.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type_** | **string** | | [default to null] -**Links** | [***GroupLinks**](group_links.md) | | [optional] [default to null] +**Links** | [***interface{}**](interface{}.md) | | [optional] [default to null] **Owner** | [***Account**](account.md) | | [optional] [default to null] **Workspace** | [***Workspace**](workspace.md) | | [optional] [default to null] **Name** | **string** | | [optional] [default to null] diff --git a/docs/Issue.md b/docs/Issue.md index 0adceb4..52c7239 100644 --- a/docs/Issue.md +++ b/docs/Issue.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type_** | **string** | | [default to null] -**Links** | [***IssueLinks**](issue_links.md) | | [optional] [default to null] +**Links** | [***interface{}**](interface{}.md) | | [optional] [default to null] **Id** | **int32** | | [optional] [default to null] **Repository** | [***Repository**](repository.md) | | [optional] [default to null] **Title** | **string** | | [optional] [default to null] @@ -20,7 +20,7 @@ Name | Type | Description | Notes **Version** | [***Version**](version.md) | | [optional] [default to null] **Component** | [***Component**](component.md) | | [optional] [default to null] **Votes** | **int32** | | [optional] [default to null] -**Content** | [***RenderedPullRequestMarkupTitle**](Rendered Pull Request Markup_title.md) | | [optional] [default to null] +**Content** | [***interface{}**](interface{}.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/IssueAttachment.md b/docs/IssueAttachment.md index 30d404d..c407e57 100644 --- a/docs/IssueAttachment.md +++ b/docs/IssueAttachment.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type_** | **string** | | [default to null] -**Links** | [***VersionLinks**](version_links.md) | | [optional] [default to null] +**Links** | [***interface{}**](interface{}.md) | | [optional] [default to null] **Name** | **string** | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/IssueComment.md b/docs/IssueComment.md index 0a3f95c..e9de21a 100644 --- a/docs/IssueComment.md +++ b/docs/IssueComment.md @@ -6,12 +6,12 @@ Name | Type | Description | Notes **Id** | **int32** | | [optional] [default to null] **CreatedOn** | [**time.Time**](time.Time.md) | | [optional] [default to null] **UpdatedOn** | [**time.Time**](time.Time.md) | | [optional] [default to null] -**Content** | [***RenderedPullRequestMarkupTitle**](Rendered Pull Request Markup_title.md) | | [optional] [default to null] +**Content** | [***interface{}**](interface{}.md) | | [optional] [default to null] **User** | [***Account**](account.md) | | [optional] [default to null] **Deleted** | **bool** | | [optional] [default to null] **Parent** | [***Comment**](comment.md) | | [optional] [default to null] -**Inline** | [***CommentInline**](comment_inline.md) | | [optional] [default to null] -**Links** | [***CommentLinks**](comment_links.md) | | [optional] [default to null] +**Inline** | [***interface{}**](interface{}.md) | | [optional] [default to null] +**Links** | [***interface{}**](interface{}.md) | | [optional] [default to null] **Issue** | [***Issue**](issue.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/IssueTrackerApi.md b/docs/IssueTrackerApi.md index 4e2bc94..5f30c86 100644 --- a/docs/IssueTrackerApi.md +++ b/docs/IssueTrackerApi.md @@ -118,7 +118,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**optional.Interface of ExportOptions**](ExportOptions.md)| 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. | + **body** | [**optional.Interface of ModelError**](map.md)| 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. | ### Return type @@ -376,7 +376,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **RepositoriesWorkspaceRepoSlugIssuesIssueIdChangesChangeIdGet** -> IssueChange RepositoriesWorkspaceRepoSlugIssuesIssueIdChangesChangeIdGet(ctx, changeId, issueId, repoSlug, workspace) +> ModelError RepositoriesWorkspaceRepoSlugIssuesIssueIdChangesChangeIdGet(ctx, changeId, issueId, repoSlug, workspace) Get issue change object Returns the specified issue change object. This resource is only available on repositories that have the issue tracker enabled. @@ -393,7 +393,7 @@ Name | Type | Description | Notes ### Return type -[**IssueChange**](issue_change.md) +[**ModelError**](map.md) ### Authorization @@ -448,7 +448,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **RepositoriesWorkspaceRepoSlugIssuesIssueIdChangesPost** -> IssueChange RepositoriesWorkspaceRepoSlugIssuesIssueIdChangesPost(ctx, body, issueId, repoSlug, workspace) +> ModelError RepositoriesWorkspaceRepoSlugIssuesIssueIdChangesPost(ctx, body, issueId, repoSlug, workspace) Modify the state of an issue Makes a change to the specified issue. For example, to change an issue's state and assignee, create a new change object that modifies these fields: ``` curl https://api.bitbucket.org/2.0/site/master/issues/1234/changes \\ -s -u evzijst -X POST -H \"Content-Type: application/json\" \\ -d '{ \"changes\": { \"assignee_account_id\": { \"new\": \"557058:c0b72ad0-1cb5-4018-9cdc-0cde8492c443\" }, \"state\": { \"new\": 'resolved\" } } \"message\": { \"raw\": \"This is now resolved.\" } }' ``` The above example also includes a custom comment to go alongside the change. This comment will also be visible on the issue page in the UI. The fields of the `changes` object are strings, not objects. This allows for immutable change log records, even after user accounts, milestones, or other objects recorded in a change entry, get renamed or deleted. The `assignee_account_id` field stores the account id. When POSTing a new change and changing the assignee, the client should therefore use the user's account_id in the `changes.assignee_account_id.new` field. This call requires authentication. Private repositories or private issue trackers require the caller to authenticate with an account that has appropriate authorization. @@ -458,14 +458,14 @@ Makes a change to the specified issue. For example, to change an issue's state Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**IssueChange**](IssueChange.md)| The new issue state change. The only required elements are `changes.[].new`. All other elements can be omitted from the body. | + **body** | [**ModelError**](map.md)| The new issue state change. The only required elements are `changes.[].new`. All other elements can be omitted from the body. | **issueId** | **string**| The issue id | **repoSlug** | **string**| This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. | **workspace** | **string**| This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. | ### Return type -[**IssueChange**](issue_change.md) +[**ModelError**](map.md) ### Authorization @@ -750,7 +750,7 @@ Name | Type | Description | Notes ### Return type -[**ModelError**](error.md) +[**ModelError**](map.md) ### Authorization @@ -780,7 +780,7 @@ Name | Type | Description | Notes ### Return type -[**ModelError**](error.md) +[**ModelError**](map.md) ### Authorization @@ -810,7 +810,7 @@ Name | Type | Description | Notes ### Return type -[**ModelError**](error.md) +[**ModelError**](map.md) ### Authorization @@ -840,7 +840,7 @@ Name | Type | Description | Notes ### Return type -[**ModelError**](error.md) +[**ModelError**](map.md) ### Authorization @@ -870,7 +870,7 @@ Name | Type | Description | Notes ### Return type -[**ModelError**](error.md) +[**ModelError**](map.md) ### Authorization @@ -900,7 +900,7 @@ Name | Type | Description | Notes ### Return type -[**ModelError**](error.md) +[**ModelError**](map.md) ### Authorization diff --git a/docs/Milestone.md b/docs/Milestone.md index 6476c52..a60cc94 100644 --- a/docs/Milestone.md +++ b/docs/Milestone.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type_** | **string** | | [default to null] -**Links** | [***VersionLinks**](version_links.md) | | [optional] [default to null] +**Links** | [***interface{}**](interface{}.md) | | [optional] [default to null] **Name** | **string** | | [optional] [default to null] **Id** | **int32** | | [optional] [default to null] diff --git a/docs/PaginatedDefaultReviewerAndType.md b/docs/PaginatedDefaultReviewerAndType.md index ed979b7..71609fc 100644 --- a/docs/PaginatedDefaultReviewerAndType.md +++ b/docs/PaginatedDefaultReviewerAndType.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **Pagelen** | **int32** | Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. | [optional] [default to null] **Next** | **string** | Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. | [optional] [default to null] **Previous** | **string** | Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. | [optional] [default to null] -**Values** | [**[]DefaultReviewerAndType**](default_reviewer_and_type.md) | | [optional] [default to null] +**Values** | [**[]ModelError**](map.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedDiffstats.md b/docs/PaginatedDiffstats.md index 9a78695..4dda7f9 100644 --- a/docs/PaginatedDiffstats.md +++ b/docs/PaginatedDiffstats.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **Pagelen** | **int32** | Current number of objects on the existing page. The default value is 500 with 5000 being the maximum allowed value. | [optional] [default to null] **Next** | **string** | Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. | [optional] [default to null] **Previous** | **string** | Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. | [optional] [default to null] -**Values** | [**[]Diffstat**](diffstat.md) | | [optional] [default to null] +**Values** | [**[]ModelError**](map.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedFiles.md b/docs/PaginatedFiles.md index de8aa63..f80d249 100644 --- a/docs/PaginatedFiles.md +++ b/docs/PaginatedFiles.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **Pagelen** | **int32** | Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. | [optional] [default to null] **Next** | **string** | Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. | [optional] [default to null] **Previous** | **string** | Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. | [optional] [default to null] -**Values** | [**[]CommitFile**](commit_file.md) | | [optional] [default to null] +**Values** | [**[]ModelError**](map.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedLogEntries.md b/docs/PaginatedLogEntries.md index cd4ba97..944194a 100644 --- a/docs/PaginatedLogEntries.md +++ b/docs/PaginatedLogEntries.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **Pagelen** | **int32** | Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. | [optional] [default to null] **Next** | **string** | Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. | [optional] [default to null] **Previous** | **string** | Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. | [optional] [default to null] -**Values** | [**[]IssueChange**](issue_change.md) | | [optional] [default to null] +**Values** | [**[]ModelError**](map.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedProjectGroupPermissions.md b/docs/PaginatedProjectGroupPermissions.md new file mode 100644 index 0000000..a7896de --- /dev/null +++ b/docs/PaginatedProjectGroupPermissions.md @@ -0,0 +1,14 @@ +# PaginatedProjectGroupPermissions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Size** | **int32** | Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. | [optional] [default to null] +**Page** | **int32** | Page number of the current results. This is an optional element that is not provided in all responses. | [optional] [default to null] +**Pagelen** | **int32** | Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. | [optional] [default to null] +**Next** | **string** | Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. | [optional] [default to null] +**Previous** | **string** | Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. | [optional] [default to null] +**Values** | [**[]ModelError**](map.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/PaginatedProjectUserPermissions.md b/docs/PaginatedProjectUserPermissions.md new file mode 100644 index 0000000..61100d2 --- /dev/null +++ b/docs/PaginatedProjectUserPermissions.md @@ -0,0 +1,14 @@ +# PaginatedProjectUserPermissions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Size** | **int32** | Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. | [optional] [default to null] +**Page** | **int32** | Page number of the current results. This is an optional element that is not provided in all responses. | [optional] [default to null] +**Pagelen** | **int32** | Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. | [optional] [default to null] +**Next** | **string** | Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. | [optional] [default to null] +**Previous** | **string** | Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. | [optional] [default to null] +**Values** | [**[]ModelError**](map.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/PaginatedRefs.md b/docs/PaginatedRefs.md index 9e5ce21..a7eb07b 100644 --- a/docs/PaginatedRefs.md +++ b/docs/PaginatedRefs.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **Pagelen** | **int32** | Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. | [optional] [default to null] **Next** | **string** | Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. | [optional] [default to null] **Previous** | **string** | Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. | [optional] [default to null] -**Values** | [**[]Ref**](ref.md) | | [optional] [default to null] +**Values** | [**[]ModelError**](map.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedRepositoryGroupPermissions.md b/docs/PaginatedRepositoryGroupPermissions.md index ade8c4b..0fafb96 100644 --- a/docs/PaginatedRepositoryGroupPermissions.md +++ b/docs/PaginatedRepositoryGroupPermissions.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **Pagelen** | **int32** | Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. | [optional] [default to null] **Next** | **string** | Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. | [optional] [default to null] **Previous** | **string** | Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. | [optional] [default to null] -**Values** | [**[]RepositoryGroupPermission**](repository_group_permission.md) | | [optional] [default to null] +**Values** | [**[]ModelError**](map.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedRepositoryPermissions.md b/docs/PaginatedRepositoryPermissions.md index 84a0cc4..959fa3b 100644 --- a/docs/PaginatedRepositoryPermissions.md +++ b/docs/PaginatedRepositoryPermissions.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **Pagelen** | **int32** | Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. | [optional] [default to null] **Next** | **string** | Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. | [optional] [default to null] **Previous** | **string** | Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. | [optional] [default to null] -**Values** | [**[]RepositoryPermission**](repository_permission.md) | | [optional] [default to null] +**Values** | [**[]ModelError**](map.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedRepositoryUserPermissions.md b/docs/PaginatedRepositoryUserPermissions.md index 35d0105..e223e41 100644 --- a/docs/PaginatedRepositoryUserPermissions.md +++ b/docs/PaginatedRepositoryUserPermissions.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **Pagelen** | **int32** | Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. | [optional] [default to null] **Next** | **string** | Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. | [optional] [default to null] **Previous** | **string** | Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. | [optional] [default to null] -**Values** | [**[]RepositoryUserPermission**](repository_user_permission.md) | | [optional] [default to null] +**Values** | [**[]ModelError**](map.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedTreeentries.md b/docs/PaginatedTreeentries.md index 6ac826b..a87e345 100644 --- a/docs/PaginatedTreeentries.md +++ b/docs/PaginatedTreeentries.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **Pagelen** | **int32** | Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. | [optional] [default to null] **Next** | **string** | Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. | [optional] [default to null] **Previous** | **string** | Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. | [optional] [default to null] -**Values** | [**[]Treeentry**](treeentry.md) | | [optional] [default to null] +**Values** | [**[]ModelError**](map.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PipelineCache.md b/docs/PipelineCache.md index 5b05bcc..dd36fc7 100644 --- a/docs/PipelineCache.md +++ b/docs/PipelineCache.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes **PipelineUuid** | **string** | The UUID of the pipeline that created the cache. | [optional] [default to null] **StepUuid** | **string** | The uuid of the step that created the cache. | [optional] [default to null] **Name** | **string** | The name of the cache. | [optional] [default to null] +**KeyHash** | **string** | The key hash of the cache version. | [optional] [default to null] **Path** | **string** | The path where the cache contents were retrieved from. | [optional] [default to null] **FileSizeBytes** | **int32** | The size of the file containing the archive of the cache. | [optional] [default to null] **CreatedOn** | [**time.Time**](time.Time.md) | The timestamp when the cache was created. | [optional] [default to null] diff --git a/docs/PipelineSchedule.md b/docs/PipelineSchedule.md index e9fa17b..fd3d8e9 100644 --- a/docs/PipelineSchedule.md +++ b/docs/PipelineSchedule.md @@ -6,9 +6,8 @@ Name | Type | Description | Notes **Type_** | **string** | | [default to null] **Uuid** | **string** | The UUID identifying the schedule. | [optional] [default to null] **Enabled** | **bool** | Whether the schedule is enabled. | [optional] [default to null] -**Target** | [***PipelineTarget**](pipeline_target.md) | | [optional] [default to null] -**Selector** | [***PipelineSelector**](pipeline_selector.md) | | [optional] [default to null] -**CronPattern** | **string** | The cron expression that the schedule applies. | [optional] [default to null] +**Target** | [***PipelineRefTarget**](pipeline_ref_target.md) | | [optional] [default to null] +**CronPattern** | **string** | The cron expression with second precision (7 fields) that the schedule applies. For example, for expression: 0 0 12 * * ? *, will execute at 12pm UTC every day. | [optional] [default to null] **CreatedOn** | [**time.Time**](time.Time.md) | The timestamp when the schedule was created. | [optional] [default to null] **UpdatedOn** | [**time.Time**](time.Time.md) | The timestamp when the schedule was updated. | [optional] [default to null] diff --git a/docs/PipelineSchedulePostRequestBody.md b/docs/PipelineSchedulePostRequestBody.md new file mode 100644 index 0000000..ae9a485 --- /dev/null +++ b/docs/PipelineSchedulePostRequestBody.md @@ -0,0 +1,12 @@ +# PipelineSchedulePostRequestBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type_** | **string** | | [default to null] +**Target** | [***PipelineSchedulePostRequestBodyTarget**](pipeline_schedule_post_request_body_target.md) | | [default to null] +**Enabled** | **bool** | Whether the schedule is enabled. | [optional] [default to null] +**CronPattern** | **string** | The cron expression with second precision (7 fields) that the schedule applies. For example, for expression: 0 0 12 * * ? *, will execute at 12pm UTC every day. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/PipelineSchedulePostRequestBodyTarget.md b/docs/PipelineSchedulePostRequestBodyTarget.md new file mode 100644 index 0000000..c4ac649 --- /dev/null +++ b/docs/PipelineSchedulePostRequestBodyTarget.md @@ -0,0 +1,11 @@ +# PipelineSchedulePostRequestBodyTarget + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Selector** | [***PipelineSelector**](pipeline_selector.md) | | [default to null] +**RefName** | **string** | The name of the reference. | [default to null] +**RefType** | **string** | The type of reference (branch only). | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/PipelineSchedulePutRequestBody.md b/docs/PipelineSchedulePutRequestBody.md new file mode 100644 index 0000000..b0d8048 --- /dev/null +++ b/docs/PipelineSchedulePutRequestBody.md @@ -0,0 +1,10 @@ +# PipelineSchedulePutRequestBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type_** | **string** | | [default to null] +**Enabled** | **bool** | Whether the schedule is enabled. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/PipelinesApi.md b/docs/PipelinesApi.md index 65b9bff..21815e2 100644 --- a/docs/PipelinesApi.md +++ b/docs/PipelinesApi.md @@ -5,18 +5,19 @@ All URIs are relative to *https://api.bitbucket.org/2.0* Method | HTTP request | Description ------------- | ------------- | ------------- [**CreateDeploymentVariable**](PipelinesApi.md#CreateDeploymentVariable) | **Post** /repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables | Create a variable for an environment -[**CreatePipelineForRepository**](PipelinesApi.md#CreatePipelineForRepository) | **Post** /repositories/{workspace}/{repo_slug}/pipelines/ | Run a pipeline -[**CreatePipelineVariableForTeam**](PipelinesApi.md#CreatePipelineVariableForTeam) | **Post** /teams/{username}/pipelines_config/variables/ | Create a variable for a user -[**CreatePipelineVariableForUser**](PipelinesApi.md#CreatePipelineVariableForUser) | **Post** /users/{selected_user}/pipelines_config/variables/ | Create a variable for a user +[**CreatePipelineForRepository**](PipelinesApi.md#CreatePipelineForRepository) | **Post** /repositories/{workspace}/{repo_slug}/pipelines | Run a pipeline +[**CreatePipelineVariableForTeam**](PipelinesApi.md#CreatePipelineVariableForTeam) | **Post** /teams/{username}/pipelines_config/variables | Create a variable for a user +[**CreatePipelineVariableForUser**](PipelinesApi.md#CreatePipelineVariableForUser) | **Post** /users/{selected_user}/pipelines_config/variables | Create a variable for a user [**CreatePipelineVariableForWorkspace**](PipelinesApi.md#CreatePipelineVariableForWorkspace) | **Post** /workspaces/{workspace}/pipelines-config/variables | Create a variable for a workspace -[**CreateRepositoryPipelineKnownHost**](PipelinesApi.md#CreateRepositoryPipelineKnownHost) | **Post** /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/ | Create a known host -[**CreateRepositoryPipelineSchedule**](PipelinesApi.md#CreateRepositoryPipelineSchedule) | **Post** /repositories/{workspace}/{repo_slug}/pipelines_config/schedules/ | Create a schedule -[**CreateRepositoryPipelineVariable**](PipelinesApi.md#CreateRepositoryPipelineVariable) | **Post** /repositories/{workspace}/{repo_slug}/pipelines_config/variables/ | Create a variable for a repository +[**CreateRepositoryPipelineKnownHost**](PipelinesApi.md#CreateRepositoryPipelineKnownHost) | **Post** /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts | Create a known host +[**CreateRepositoryPipelineSchedule**](PipelinesApi.md#CreateRepositoryPipelineSchedule) | **Post** /repositories/{workspace}/{repo_slug}/pipelines_config/schedules | Create a schedule +[**CreateRepositoryPipelineVariable**](PipelinesApi.md#CreateRepositoryPipelineVariable) | **Post** /repositories/{workspace}/{repo_slug}/pipelines_config/variables | Create a variable for a repository [**DeleteDeploymentVariable**](PipelinesApi.md#DeleteDeploymentVariable) | **Delete** /repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables/{variable_uuid} | Delete a variable for an environment [**DeletePipelineVariableForTeam**](PipelinesApi.md#DeletePipelineVariableForTeam) | **Delete** /teams/{username}/pipelines_config/variables/{variable_uuid} | Delete a variable for a team [**DeletePipelineVariableForUser**](PipelinesApi.md#DeletePipelineVariableForUser) | **Delete** /users/{selected_user}/pipelines_config/variables/{variable_uuid} | Delete a variable for a user [**DeletePipelineVariableForWorkspace**](PipelinesApi.md#DeletePipelineVariableForWorkspace) | **Delete** /workspaces/{workspace}/pipelines-config/variables/{variable_uuid} | Delete a variable for a workspace [**DeleteRepositoryPipelineCache**](PipelinesApi.md#DeleteRepositoryPipelineCache) | **Delete** /repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid} | Delete a cache +[**DeleteRepositoryPipelineCaches**](PipelinesApi.md#DeleteRepositoryPipelineCaches) | **Delete** /repositories/{workspace}/{repo_slug}/pipelines-config/caches | Delete caches [**DeleteRepositoryPipelineKeyPair**](PipelinesApi.md#DeleteRepositoryPipelineKeyPair) | **Delete** /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/key_pair | Delete SSH key pair [**DeleteRepositoryPipelineKnownHost**](PipelinesApi.md#DeleteRepositoryPipelineKnownHost) | **Delete** /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/{known_host_uuid} | Delete a known host [**DeleteRepositoryPipelineSchedule**](PipelinesApi.md#DeleteRepositoryPipelineSchedule) | **Delete** /repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid} | Delete a schedule @@ -28,28 +29,28 @@ Method | HTTP request | Description [**GetPipelineForRepository**](PipelinesApi.md#GetPipelineForRepository) | **Get** /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid} | Get a pipeline [**GetPipelineStepForRepository**](PipelinesApi.md#GetPipelineStepForRepository) | **Get** /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid} | Get a step of a pipeline [**GetPipelineStepLogForRepository**](PipelinesApi.md#GetPipelineStepLogForRepository) | **Get** /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/log | Get log file for a step -[**GetPipelineStepsForRepository**](PipelinesApi.md#GetPipelineStepsForRepository) | **Get** /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/ | List steps for a pipeline +[**GetPipelineStepsForRepository**](PipelinesApi.md#GetPipelineStepsForRepository) | **Get** /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps | List steps for a pipeline [**GetPipelineTestReportTestCaseReasons**](PipelinesApi.md#GetPipelineTestReportTestCaseReasons) | **Get** /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports/test_cases/{test_case_uuid}/test_case_reasons | Get test case reasons (output) for a given test case in a step of a pipeline. [**GetPipelineTestReportTestCases**](PipelinesApi.md#GetPipelineTestReportTestCases) | **Get** /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports/test_cases | Get test cases for a given step of a pipeline. [**GetPipelineTestReports**](PipelinesApi.md#GetPipelineTestReports) | **Get** /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports | Get a summary of test reports for a given step of a pipeline. [**GetPipelineVariableForTeam**](PipelinesApi.md#GetPipelineVariableForTeam) | **Get** /teams/{username}/pipelines_config/variables/{variable_uuid} | Get a variable for a team [**GetPipelineVariableForUser**](PipelinesApi.md#GetPipelineVariableForUser) | **Get** /users/{selected_user}/pipelines_config/variables/{variable_uuid} | Get a variable for a user [**GetPipelineVariableForWorkspace**](PipelinesApi.md#GetPipelineVariableForWorkspace) | **Get** /workspaces/{workspace}/pipelines-config/variables/{variable_uuid} | Get variable for a workspace -[**GetPipelineVariablesForTeam**](PipelinesApi.md#GetPipelineVariablesForTeam) | **Get** /teams/{username}/pipelines_config/variables/ | List variables for an account -[**GetPipelineVariablesForUser**](PipelinesApi.md#GetPipelineVariablesForUser) | **Get** /users/{selected_user}/pipelines_config/variables/ | List variables for a user +[**GetPipelineVariablesForTeam**](PipelinesApi.md#GetPipelineVariablesForTeam) | **Get** /teams/{username}/pipelines_config/variables | List variables for an account +[**GetPipelineVariablesForUser**](PipelinesApi.md#GetPipelineVariablesForUser) | **Get** /users/{selected_user}/pipelines_config/variables | List variables for a user [**GetPipelineVariablesForWorkspace**](PipelinesApi.md#GetPipelineVariablesForWorkspace) | **Get** /workspaces/{workspace}/pipelines-config/variables | List variables for a workspace -[**GetPipelinesForRepository**](PipelinesApi.md#GetPipelinesForRepository) | **Get** /repositories/{workspace}/{repo_slug}/pipelines/ | List pipelines +[**GetPipelinesForRepository**](PipelinesApi.md#GetPipelinesForRepository) | **Get** /repositories/{workspace}/{repo_slug}/pipelines | List pipelines [**GetRepositoryPipelineCacheContentURI**](PipelinesApi.md#GetRepositoryPipelineCacheContentURI) | **Get** /repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}/content-uri | Get cache content URI -[**GetRepositoryPipelineCaches**](PipelinesApi.md#GetRepositoryPipelineCaches) | **Get** /repositories/{workspace}/{repo_slug}/pipelines-config/caches/ | List caches +[**GetRepositoryPipelineCaches**](PipelinesApi.md#GetRepositoryPipelineCaches) | **Get** /repositories/{workspace}/{repo_slug}/pipelines-config/caches | List caches [**GetRepositoryPipelineConfig**](PipelinesApi.md#GetRepositoryPipelineConfig) | **Get** /repositories/{workspace}/{repo_slug}/pipelines_config | Get configuration [**GetRepositoryPipelineKnownHost**](PipelinesApi.md#GetRepositoryPipelineKnownHost) | **Get** /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/{known_host_uuid} | Get a known host -[**GetRepositoryPipelineKnownHosts**](PipelinesApi.md#GetRepositoryPipelineKnownHosts) | **Get** /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/ | List known hosts +[**GetRepositoryPipelineKnownHosts**](PipelinesApi.md#GetRepositoryPipelineKnownHosts) | **Get** /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts | List known hosts [**GetRepositoryPipelineSchedule**](PipelinesApi.md#GetRepositoryPipelineSchedule) | **Get** /repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid} | Get a schedule -[**GetRepositoryPipelineScheduleExecutions**](PipelinesApi.md#GetRepositoryPipelineScheduleExecutions) | **Get** /repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}/executions/ | List executions of a schedule -[**GetRepositoryPipelineSchedules**](PipelinesApi.md#GetRepositoryPipelineSchedules) | **Get** /repositories/{workspace}/{repo_slug}/pipelines_config/schedules/ | List schedules +[**GetRepositoryPipelineScheduleExecutions**](PipelinesApi.md#GetRepositoryPipelineScheduleExecutions) | **Get** /repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}/executions | List executions of a schedule +[**GetRepositoryPipelineSchedules**](PipelinesApi.md#GetRepositoryPipelineSchedules) | **Get** /repositories/{workspace}/{repo_slug}/pipelines_config/schedules | List schedules [**GetRepositoryPipelineSshKeyPair**](PipelinesApi.md#GetRepositoryPipelineSshKeyPair) | **Get** /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/key_pair | Get SSH key pair [**GetRepositoryPipelineVariable**](PipelinesApi.md#GetRepositoryPipelineVariable) | **Get** /repositories/{workspace}/{repo_slug}/pipelines_config/variables/{variable_uuid} | Get a variable for a repository -[**GetRepositoryPipelineVariables**](PipelinesApi.md#GetRepositoryPipelineVariables) | **Get** /repositories/{workspace}/{repo_slug}/pipelines_config/variables/ | List variables for a repository +[**GetRepositoryPipelineVariables**](PipelinesApi.md#GetRepositoryPipelineVariables) | **Get** /repositories/{workspace}/{repo_slug}/pipelines_config/variables | List variables for a repository [**StopPipeline**](PipelinesApi.md#StopPipeline) | **Post** /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/stopPipeline | Stop a pipeline [**UpdateDeploymentVariable**](PipelinesApi.md#UpdateDeploymentVariable) | **Put** /repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables/{variable_uuid} | Update a variable for an environment [**UpdatePipelineVariableForTeam**](PipelinesApi.md#UpdatePipelineVariableForTeam) | **Put** /teams/{username}/pipelines_config/variables/{variable_uuid} | Update a variable for a team @@ -272,7 +273,7 @@ Create a schedule for the given repository. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**PipelineSchedule**](PipelineSchedule.md)| The schedule to create. | + **body** | [**PipelineSchedulePostRequestBody**](PipelineSchedulePostRequestBody.md)| The schedule to create. | **workspace** | **string**| This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. | **repoSlug** | **string**| The repository. | @@ -469,6 +470,36 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **DeleteRepositoryPipelineCaches** +> DeleteRepositoryPipelineCaches(ctx, workspace, repoSlug, name) +Delete caches + +Delete repository cache versions by name. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **workspace** | **string**| The account. | + **repoSlug** | **string**| The repository. | + **name** | **string**| The cache name. | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **DeleteRepositoryPipelineKeyPair** > DeleteRepositoryPipelineKeyPair(ctx, workspace, repoSlug) Delete SSH key pair @@ -1724,7 +1755,7 @@ Update a schedule. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**PipelineSchedule**](PipelineSchedule.md)| The schedule to update. | + **body** | [**PipelineSchedulePutRequestBody**](PipelineSchedulePutRequestBody.md)| The schedule to update. | **workspace** | **string**| This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. | **repoSlug** | **string**| The repository. | **scheduleUuid** | **string**| The uuid of the schedule. | diff --git a/docs/Project.md b/docs/Project.md index 083d4ea..d0a1824 100644 --- a/docs/Project.md +++ b/docs/Project.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type_** | **string** | | [default to null] -**Links** | [***ProjectLinks**](project_links.md) | | [optional] [default to null] +**Links** | [***interface{}**](interface{}.md) | | [optional] [default to null] **Uuid** | **string** | The project's immutable id. | [optional] [default to null] **Key** | **string** | The project's key. | [optional] [default to null] **Owner** | [***Team**](team.md) | | [optional] [default to null] diff --git a/docs/ProjectBranchingModel.md b/docs/ProjectBranchingModel.md index 5e79636..02651c4 100644 --- a/docs/ProjectBranchingModel.md +++ b/docs/ProjectBranchingModel.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type_** | **string** | | [default to null] -**BranchTypes** | [**[]BranchingModelBranchTypes**](branching_model_branch_types.md) | The active branch types. | [optional] [default to null] -**Development** | [***ProjectBranchingModelDevelopment**](project_branching_model_development.md) | | [optional] [default to null] -**Production** | [***ProjectBranchingModelDevelopment**](project_branching_model_development.md) | | [optional] [default to null] +**BranchTypes** | [**[]interface{}**](interface{}.md) | The active branch types. | [optional] [default to null] +**Development** | [***interface{}**](interface{}.md) | | [optional] [default to null] +**Production** | [***interface{}**](interface{}.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ProjectDeployKey.md b/docs/ProjectDeployKey.md index 1eaa6ec..0cc1702 100644 --- a/docs/ProjectDeployKey.md +++ b/docs/ProjectDeployKey.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **Label** | **string** | The user-defined label for the deploy key | [optional] [default to null] **AddedOn** | [**time.Time**](time.Time.md) | | [optional] [default to null] **LastUsed** | [**time.Time**](time.Time.md) | | [optional] [default to null] -**Links** | [***VersionLinks**](version_links.md) | | [optional] [default to null] +**Links** | [***interface{}**](interface{}.md) | | [optional] [default to null] **CreatedBy** | [***Account**](account.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ProjectsApi.md b/docs/ProjectsApi.md index bd35305..64f73d5 100644 --- a/docs/ProjectsApi.md +++ b/docs/ProjectsApi.md @@ -11,6 +11,14 @@ Method | HTTP request | Description [**WorkspacesWorkspaceProjectsProjectKeyDefaultReviewersSelectedUserPut**](ProjectsApi.md#WorkspacesWorkspaceProjectsProjectKeyDefaultReviewersSelectedUserPut) | **Put** /workspaces/{workspace}/projects/{project_key}/default-reviewers/{selected_user} | Add the specific user as a default reviewer for the project [**WorkspacesWorkspaceProjectsProjectKeyDelete**](ProjectsApi.md#WorkspacesWorkspaceProjectsProjectKeyDelete) | **Delete** /workspaces/{workspace}/projects/{project_key} | Delete a project for a workspace [**WorkspacesWorkspaceProjectsProjectKeyGet**](ProjectsApi.md#WorkspacesWorkspaceProjectsProjectKeyGet) | **Get** /workspaces/{workspace}/projects/{project_key} | Get a project for a workspace +[**WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigGroupsGet**](ProjectsApi.md#WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigGroupsGet) | **Get** /workspaces/{workspace}/projects/{project_key}/permissions-config/groups | List explicit group permissions for a project +[**WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigGroupsGroupSlugDelete**](ProjectsApi.md#WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigGroupsGroupSlugDelete) | **Delete** /workspaces/{workspace}/projects/{project_key}/permissions-config/groups/{group_slug} | Delete an explicit group permission for a project +[**WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigGroupsGroupSlugGet**](ProjectsApi.md#WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigGroupsGroupSlugGet) | **Get** /workspaces/{workspace}/projects/{project_key}/permissions-config/groups/{group_slug} | Get an explicit group permission for a project +[**WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigGroupsGroupSlugPut**](ProjectsApi.md#WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigGroupsGroupSlugPut) | **Put** /workspaces/{workspace}/projects/{project_key}/permissions-config/groups/{group_slug} | Update an explicit group permission for a project +[**WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigUsersGet**](ProjectsApi.md#WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigUsersGet) | **Get** /workspaces/{workspace}/projects/{project_key}/permissions-config/users | List explicit user permissions for a project +[**WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigUsersSelectedUserIdDelete**](ProjectsApi.md#WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigUsersSelectedUserIdDelete) | **Delete** /workspaces/{workspace}/projects/{project_key}/permissions-config/users/{selected_user_id} | Delete an explicit user permission for a project +[**WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigUsersSelectedUserIdGet**](ProjectsApi.md#WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigUsersSelectedUserIdGet) | **Get** /workspaces/{workspace}/projects/{project_key}/permissions-config/users/{selected_user_id} | Get an explicit user permission for a project +[**WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigUsersSelectedUserIdPut**](ProjectsApi.md#WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigUsersSelectedUserIdPut) | **Put** /workspaces/{workspace}/projects/{project_key}/permissions-config/users/{selected_user_id} | Update an explicit user permission for a project [**WorkspacesWorkspaceProjectsProjectKeyPut**](ProjectsApi.md#WorkspacesWorkspaceProjectsProjectKeyPut) | **Put** /workspaces/{workspace}/projects/{project_key} | Update a project for a workspace # **WorkspacesWorkspaceProjectsPost** @@ -219,6 +227,244 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigGroupsGet** +> PaginatedProjectGroupPermissions WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigGroupsGet(ctx, projectKey, workspace) +List explicit group permissions for a project + +Returns a paginated list of explicit group permissions for the given project. This endpoint does not support BBQL features. Example: ``` $ curl https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/groups HTTP/1.1 200 Location: https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/groups { \"pagelen\": 10, \"values\": [ { \"type\": \"project_group_permission\", \"group\": { \"type\": \"group\", \"name\": \"Administrators\", \"slug\": \"administrators\" }, \"permission\": \"admin\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ permissions-config/groups/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\" } } }, { \"type\": \"project_group_permission\", \"group\": { \"type\": \"group\", \"name\": \"Developers\", \"slug\": \"developers\" }, \"permission\": \"write\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ permissions-config/groups/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324c\" } } } ], \"page\": 1, \"size\": 2 } ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectKey** | **string**| The project in question. This is the actual key assigned to the project. | + **workspace** | **string**| This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. | + +### Return type + +[**PaginatedProjectGroupPermissions**](paginated_project_group_permissions.md) + +### Authorization + +[api_key](../README.md#api_key), [basic](../README.md#basic), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigGroupsGroupSlugDelete** +> WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigGroupsGroupSlugDelete(ctx, groupSlug, projectKey, workspace) +Delete an explicit group permission for a project + +Deletes the project group permission between the requested project and group, if one exists. Only users with admin permission for the project may access this resource. Example: $ curl -X DELETE https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/ projects/PRJ/permissions-config/groups/developers HTTP/1.1 204 + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **groupSlug** | **string**| Slug of the requested group. | + **projectKey** | **string**| The project in question. This is the actual key assigned to the project. | + **workspace** | **string**| This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. | + +### Return type + + (empty response body) + +### Authorization + +[api_key](../README.md#api_key), [basic](../README.md#basic), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigGroupsGroupSlugGet** +> ModelError WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigGroupsGroupSlugGet(ctx, groupSlug, projectKey, workspace) +Get an explicit group permission for a project + +Returns the group permission for a given group and project. Only users with admin permission for the project may access this resource. Permissions can be: * `admin` * `create-repo` * `write` * `read` * `none` Example: ``` $ curl https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ permissions-config/groups/administrators HTTP/1.1 200 Location: https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ permissions-config/groups/administrators { \"type\": \"project_group_permission\", \"group\": { \"type\": \"group\", \"name\": \"Administrators\", \"slug\": \"administrators\" }, \"permission\": \"admin\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ permissions-config/groups/administrators\" } } } ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **groupSlug** | **string**| Slug of the requested group. | + **projectKey** | **string**| The project in question. This is the actual key assigned to the project. | + **workspace** | **string**| This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. | + +### Return type + +[**ModelError**](map.md) + +### Authorization + +[api_key](../README.md#api_key), [basic](../README.md#basic), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigGroupsGroupSlugPut** +> ModelError WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigGroupsGroupSlugPut(ctx, groupSlug, projectKey, workspace) +Update an explicit group permission for a project + +Updates the group permission if it exists. Only users with admin permission for the project may access this resource. Due to security concerns, the JWT and OAuth authentication methods are unsupported. This is to ensure integrations and add-ons are not allowed to change permissions. Permissions can be: * `admin` * `create-repo` * `write` * `read` Example: ``` $ curl -X PUT -H \"Content-Type: application/json\" https://api.bitbucket.org/2.0/ workspaces/atlassian_tutorial/projects/PRJ/permissions-config/groups/administrators -d '{ \"permission\": \"write\" }' HTTP/1.1 200 Location: https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ permissions-config/groups/administrators { \"type\": \"project_group_permission\", \"group\": { \"type\": \"group\", \"name\": \"Administrators\", \"slug\": \"administrators\" }, \"permission\": \"write\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ permissions-config/groups/administrators\" } } } ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **groupSlug** | **string**| Slug of the requested group. | + **projectKey** | **string**| The project in question. This is the actual key assigned to the project. | + **workspace** | **string**| This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. | + +### Return type + +[**ModelError**](map.md) + +### Authorization + +[api_key](../README.md#api_key), [basic](../README.md#basic), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigUsersGet** +> PaginatedProjectUserPermissions WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigUsersGet(ctx, projectKey, workspace) +List explicit user permissions for a project + +Returns a paginated list of explicit user permissions for the given project. This endpoint does not support BBQL features. Example: ``` $ curl https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/users HTTP/1.1 200 Location: https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/users { \"pagelen\": 10, \"values\": [ { \"type\": \"project_user_permission\", \"user\": { \"type\": \"user\", \"display_name\": \"Colin Cameron\", \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\", \"account_id\": \"557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\" }, \"permission\": \"admin\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\" } } }, { \"type\": \"project_user_permission\", \"user\": { \"type\": \"user\", \"display_name\": \"Sean Conaty\", \"uuid\": \"{504c3b62-8120-4f0c-a7bc-87800b9d6f70}\", \"account_id\": \"557058:ba8948b2-49da-43a9-9e8b-e7249b8e324c\" }, \"permission\": \"write\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324c\" } } } ], \"page\": 1, \"size\": 2 } ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectKey** | **string**| The project in question. This is the actual key assigned to the project. | + **workspace** | **string**| This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. | + +### Return type + +[**PaginatedProjectUserPermissions**](paginated_project_user_permissions.md) + +### Authorization + +[api_key](../README.md#api_key), [basic](../README.md#basic), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigUsersSelectedUserIdDelete** +> WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigUsersSelectedUserIdDelete(ctx, projectKey, selectedUserId, workspace) +Delete an explicit user permission for a project + +Deletes the project user permission between the requested project and user, if one exists. Only users with admin permission for the project may access this resource. Due to security concerns, the JWT and OAuth authentication methods are unsupported. This is to ensure integrations and add-ons are not allowed to change permissions. ``` $ curl -X DELETE https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a HTTP/1.1 204 ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectKey** | **string**| The project in question. This is the actual key assigned to the project. | + **selectedUserId** | **string**| This can either be the username, the user's UUID surrounded by curly-braces, for example: {account UUID}, or the user's Atlassian ID. | + **workspace** | **string**| This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. | + +### Return type + + (empty response body) + +### Authorization + +[api_key](../README.md#api_key), [basic](../README.md#basic), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigUsersSelectedUserIdGet** +> ModelError WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigUsersSelectedUserIdGet(ctx, projectKey, selectedUserId, workspace) +Get an explicit user permission for a project + +Returns the explicit user permission for a given user and project. Only users with admin permission for the project may access this resource. Permissions can be: * `admin` * `create-repo` * `write` * `read` * `none` Example: ``` $ curl 'https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/ PRJ/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a' HTTP/1.1 200 Location: 'https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/ PRJ/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a' { \"type\": \"project_user_permission\", \"user\": { \"type\": \"user\", \"display_name\": \"Colin Cameron\", \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\", \"account_id\": \"557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\" }, \"permission\": \"admin\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/ PRJ/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\" } } } ``` # + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectKey** | **string**| The project in question. This is the actual key assigned to the project. | + **selectedUserId** | **string**| This can either be the username, the user's UUID surrounded by curly-braces, for example: {account UUID}, or the user's Atlassian ID. | + **workspace** | **string**| This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. | + +### Return type + +[**ModelError**](map.md) + +### Authorization + +[api_key](../README.md#api_key), [basic](../README.md#basic), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigUsersSelectedUserIdPut** +> ModelError WorkspacesWorkspaceProjectsProjectKeyPermissionsConfigUsersSelectedUserIdPut(ctx, projectKey, selectedUserId, workspace) +Update an explicit user permission for a project + +Updates the explicit user permission for a given user and project. The selected user must be a member of the workspace, and cannot be the workspace owner. Only users with admin permission for the project may access this resource. Due to security concerns, the JWT and OAuth authentication methods are unsupported. This is to ensure integrations and add-ons are not allowed to change permissions. Permissions can be: * `admin` * `create-repo` * `write` * `read` Example: ``` $ curl -X PUT -H \"Content-Type: application/json\" https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a -d { \"permission\": \"write\" } HTTP/1.1 200 Location: https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a { \"type\": \"project_user_permission\", \"user\": { \"type\": \"user\", \"display_name\": \"Colin Cameron\", \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\", \"account_id\": \"557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\" }, \"permission\": \"write\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/ permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\" } } } ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectKey** | **string**| The project in question. This is the actual key assigned to the project. | + **selectedUserId** | **string**| This can either be the username, the user's UUID surrounded by curly-braces, for example: {account UUID}, or the user's Atlassian ID. | + **workspace** | **string**| This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. | + +### Return type + +[**ModelError**](map.md) + +### Authorization + +[api_key](../README.md#api_key), [basic](../README.md#basic), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **WorkspacesWorkspaceProjectsProjectKeyPut** > Project WorkspacesWorkspaceProjectsProjectKeyPut(ctx, body, projectKey, workspace) Update a project for a workspace diff --git a/docs/PropertiesApi.md b/docs/PropertiesApi.md index 4b790ba..a03e544 100644 --- a/docs/PropertiesApi.md +++ b/docs/PropertiesApi.md @@ -143,7 +143,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **GetCommitHostedPropertyValue** -> ApplicationProperty GetCommitHostedPropertyValue(ctx, workspace, repoSlug, commit, appKey, propertyName) +> ModelError GetCommitHostedPropertyValue(ctx, workspace, repoSlug, commit, appKey, propertyName) Get a commit application property Retrieve an [application property](/cloud/bitbucket/application-properties/) value stored against a commit. @@ -161,7 +161,7 @@ Name | Type | Description | Notes ### Return type -[**ApplicationProperty**](application_property.md) +[**ModelError**](map.md) ### Authorization @@ -175,7 +175,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **GetPullRequestHostedPropertyValue** -> ApplicationProperty GetPullRequestHostedPropertyValue(ctx, workspace, repoSlug, pullrequestId, appKey, propertyName) +> ModelError GetPullRequestHostedPropertyValue(ctx, workspace, repoSlug, pullrequestId, appKey, propertyName) Get a pull request application property Retrieve an [application property](/cloud/bitbucket/application-properties/) value stored against a pull request. @@ -193,7 +193,7 @@ Name | Type | Description | Notes ### Return type -[**ApplicationProperty**](application_property.md) +[**ModelError**](map.md) ### Authorization @@ -207,7 +207,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **GetRepositoryHostedPropertyValue** -> ApplicationProperty GetRepositoryHostedPropertyValue(ctx, workspace, repoSlug, appKey, propertyName) +> ModelError GetRepositoryHostedPropertyValue(ctx, workspace, repoSlug, appKey, propertyName) Get a repository application property Retrieve an [application property](/cloud/bitbucket/application-properties/) value stored against a repository. @@ -224,7 +224,7 @@ Name | Type | Description | Notes ### Return type -[**ApplicationProperty**](application_property.md) +[**ModelError**](map.md) ### Authorization @@ -238,7 +238,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **RetrieveUserHostedPropertyValue** -> ApplicationProperty RetrieveUserHostedPropertyValue(ctx, selectedUser, appKey, propertyName) +> ModelError RetrieveUserHostedPropertyValue(ctx, selectedUser, appKey, propertyName) Get a user application property Retrieve an [application property](/cloud/bitbucket/application-properties/) value stored against a user. @@ -254,7 +254,7 @@ Name | Type | Description | Notes ### Return type -[**ApplicationProperty**](application_property.md) +[**ModelError**](map.md) ### Authorization @@ -278,7 +278,7 @@ Update an [application property](/cloud/bitbucket/application-properties/) value Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**ApplicationProperty**](ApplicationProperty.md)| The application property to create or update. | + **body** | [**ModelError**](map.md)| The application property to create or update. | **workspace** | **string**| The repository container; either the workspace slug or the UUID in curly braces. | **repoSlug** | **string**| The repository. | **commit** | **string**| The commit. | @@ -311,7 +311,7 @@ Update an [application property](/cloud/bitbucket/application-properties/) value Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**ApplicationProperty**](ApplicationProperty.md)| The application property to create or update. | + **body** | [**ModelError**](map.md)| The application property to create or update. | **workspace** | **string**| The repository container; either the workspace slug or the UUID in curly braces. | **repoSlug** | **string**| The repository. | **pullrequestId** | **string**| The pull request ID. | @@ -344,7 +344,7 @@ Update an [application property](/cloud/bitbucket/application-properties/) value Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**ApplicationProperty**](ApplicationProperty.md)| The application property to create or update. | + **body** | [**ModelError**](map.md)| The application property to create or update. | **workspace** | **string**| The repository container; either the workspace slug or the UUID in curly braces. | **repoSlug** | **string**| The repository. | **appKey** | **string**| The key of the Connect app. | @@ -376,7 +376,7 @@ Update an [application property](/cloud/bitbucket/application-properties/) value Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**ApplicationProperty**](ApplicationProperty.md)| The application property to create or update. | + **body** | [**ModelError**](map.md)| The application property to create or update. | **selectedUser** | **string**| Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID. | **appKey** | **string**| The key of the Connect app. | **propertyName** | **string**| The name of the property. | diff --git a/docs/Pullrequest.md b/docs/Pullrequest.md index f06c81e..1dc7de5 100644 --- a/docs/Pullrequest.md +++ b/docs/Pullrequest.md @@ -4,16 +4,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type_** | **string** | | [default to null] -**Links** | [***PullrequestLinks**](pullrequest_links.md) | | [optional] [default to null] +**Links** | [***interface{}**](interface{}.md) | | [optional] [default to null] **Id** | **int32** | The pull request's unique ID. Note that pull request IDs are only unique within their associated repository. | [optional] [default to null] **Title** | **string** | Title of the pull request. | [optional] [default to null] -**Rendered** | [***RenderedPullRequestMarkup**](Rendered Pull Request Markup.md) | | [optional] [default to null] -**Summary** | [***RenderedPullRequestMarkupTitle**](Rendered Pull Request Markup_title.md) | | [optional] [default to null] +**Rendered** | [***interface{}**](interface{}.md) | User provided pull request text, interpreted in a markup language and rendered in HTML | [optional] [default to null] +**Summary** | [***interface{}**](interface{}.md) | | [optional] [default to null] **State** | **string** | The pull request's current status. | [optional] [default to null] **Author** | [***Account**](account.md) | | [optional] [default to null] **Source** | [***PullrequestEndpoint**](pullrequest_endpoint.md) | | [optional] [default to null] **Destination** | [***PullrequestEndpoint**](pullrequest_endpoint.md) | | [optional] [default to null] -**MergeCommit** | [***PullRequestCommit**](Pull Request Commit.md) | | [optional] [default to null] +**MergeCommit** | [***interface{}**](interface{}.md) | | [optional] [default to null] **CommentCount** | **int32** | The number of comments for a specific pull request. | [optional] [default to null] **TaskCount** | **int32** | The number of open tasks for a specific pull request. | [optional] [default to null] **CloseSourceBranch** | **bool** | A boolean flag indicating if merging the pull request closes the source branch. | [optional] [default to null] diff --git a/docs/PullrequestComment.md b/docs/PullrequestComment.md index 09a12e4..cfdf6ad 100644 --- a/docs/PullrequestComment.md +++ b/docs/PullrequestComment.md @@ -6,13 +6,14 @@ Name | Type | Description | Notes **Id** | **int32** | | [optional] [default to null] **CreatedOn** | [**time.Time**](time.Time.md) | | [optional] [default to null] **UpdatedOn** | [**time.Time**](time.Time.md) | | [optional] [default to null] -**Content** | [***RenderedPullRequestMarkupTitle**](Rendered Pull Request Markup_title.md) | | [optional] [default to null] +**Content** | [***interface{}**](interface{}.md) | | [optional] [default to null] **User** | [***Account**](account.md) | | [optional] [default to null] **Deleted** | **bool** | | [optional] [default to null] **Parent** | [***Comment**](comment.md) | | [optional] [default to null] -**Inline** | [***CommentInline**](comment_inline.md) | | [optional] [default to null] -**Links** | [***CommentLinks**](comment_links.md) | | [optional] [default to null] +**Inline** | [***interface{}**](interface{}.md) | | [optional] [default to null] +**Links** | [***interface{}**](interface{}.md) | | [optional] [default to null] **Pullrequest** | [***Pullrequest**](pullrequest.md) | | [optional] [default to null] +**Resolution** | [***ModelError**](map.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PullrequestEndpoint.md b/docs/PullrequestEndpoint.md index 40763fe..8926748 100644 --- a/docs/PullrequestEndpoint.md +++ b/docs/PullrequestEndpoint.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Repository** | [***Repository**](repository.md) | | [optional] [default to null] -**Branch** | [***PullRequestBranch**](Pull Request Branch.md) | | [optional] [default to null] -**Commit** | [***PullRequestCommit**](Pull Request Commit.md) | | [optional] [default to null] +**Branch** | [***interface{}**](interface{}.md) | | [optional] [default to null] +**Commit** | [***interface{}**](interface{}.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PullrequestsApi.md b/docs/PullrequestsApi.md index 2e2004a..c4dd7a6 100644 --- a/docs/PullrequestsApi.md +++ b/docs/PullrequestsApi.md @@ -20,6 +20,8 @@ Method | HTTP request | Description [**RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdDelete**](PullrequestsApi.md#RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdDelete) | **Delete** /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id} | Delete a comment on a pull request [**RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdGet**](PullrequestsApi.md#RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdGet) | **Get** /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id} | Get a comment on a pull request [**RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut**](PullrequestsApi.md#RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut) | **Put** /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id} | Update a comment on a pull request +[**RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdResolveDelete**](PullrequestsApi.md#RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdResolveDelete) | **Delete** /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}/resolve | Reopen a comment thread +[**RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdResolvePost**](PullrequestsApi.md#RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdResolvePost) | **Post** /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}/resolve | Resolve a comment thread [**RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsGet**](PullrequestsApi.md#RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsGet) | **Get** /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments | List comments on a pull request [**RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsPost**](PullrequestsApi.md#RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsPost) | **Post** /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments | Create a comment on a pull request [**RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommitsGet**](PullrequestsApi.md#RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommitsGet) | **Get** /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/commits | List commits on a pull request @@ -553,6 +555,64 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdResolveDelete** +> RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdResolveDelete(ctx, commentId, pullRequestId, repoSlug, workspace) +Reopen a comment thread + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **commentId** | **int32**| The id of the comment. | + **pullRequestId** | **int32**| The id of the pull request. | + **repoSlug** | **string**| This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. | + **workspace** | **string**| This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. | + +### Return type + + (empty response body) + +### Authorization + +[api_key](../README.md#api_key), [basic](../README.md#basic), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdResolvePost** +> ModelError RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdResolvePost(ctx, commentId, pullRequestId, repoSlug, workspace) +Resolve a comment thread + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **commentId** | **int32**| The id of the comment. | + **pullRequestId** | **int32**| The id of the pull request. | + **repoSlug** | **string**| This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. | + **workspace** | **string**| This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. | + +### Return type + +[**ModelError**](map.md) + +### Authorization + +[api_key](../README.md#api_key), [basic](../README.md#basic), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsGet** > PaginatedPullrequestComments RepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsGet(ctx, pullRequestId, repoSlug, workspace) List comments on a pull request @@ -787,7 +847,7 @@ Name | Type | Description | Notes - **body** | [**optional.Interface of PullrequestMergeParameters**](PullrequestMergeParameters.md)| | + **body** | [**optional.Interface of ModelError**](map.md)| | **async** | **optional.**| Default value is false. When set to true, runs merge asynchronously and immediately returns a 202 with polling link to the task-status API in the Location header. When set to false, runs merge and waits for it to complete, returning 200 when it succeeds. If the duration of the merge exceeds a timeout threshold, the API returns a 202 with polling link to the task-status API in the Location header. | ### Return type diff --git a/docs/RepositoriesApi.md b/docs/RepositoriesApi.md index fd72922..ba912e9 100644 --- a/docs/RepositoriesApi.md +++ b/docs/RepositoriesApi.md @@ -447,7 +447,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **RepositoriesWorkspaceRepoSlugOverrideSettingsGet** -> RepositoryInheritanceState RepositoriesWorkspaceRepoSlugOverrideSettingsGet(ctx, repoSlug, workspace) +> ModelError RepositoriesWorkspaceRepoSlugOverrideSettingsGet(ctx, repoSlug, workspace) Retrieve the inheritance state for repository settings ### Required Parameters @@ -460,7 +460,7 @@ Name | Type | Description | Notes ### Return type -[**RepositoryInheritanceState**](repository_inheritance_state.md) +[**ModelError**](map.md) ### Authorization @@ -560,7 +560,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **RepositoriesWorkspaceRepoSlugPermissionsConfigGroupsGroupSlugGet** -> RepositoryGroupPermission RepositoriesWorkspaceRepoSlugPermissionsConfigGroupsGroupSlugGet(ctx, groupSlug, repoSlug, workspace) +> ModelError RepositoriesWorkspaceRepoSlugPermissionsConfigGroupsGroupSlugGet(ctx, groupSlug, repoSlug, workspace) Get an explicit group permission for a repository Returns the group permission for a given group slug and repository Only users with admin permission for the repository may access this resource. Permissions can be: * `admin` * `write` * `read` * `none` Example: ``` $ curl https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers HTTP/1.1 200 Location: https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers { \"type\": \"repository_group_permission\", \"group\": { \"type\": \"group\", \"name\": \"Developers\", \"slug\": \"developers\" }, \"repository\": { \"type\": \"repository\", \"name\": \"geordi\", \"full_name\": \"atlassian_tutorial/geordi\", \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\" }, \"permission\": \"read\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers\" } } } ``` @@ -576,7 +576,7 @@ Name | Type | Description | Notes ### Return type -[**RepositoryGroupPermission**](repository_group_permission.md) +[**ModelError**](map.md) ### Authorization @@ -590,7 +590,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **RepositoriesWorkspaceRepoSlugPermissionsConfigGroupsGroupSlugPut** -> RepositoryGroupPermission RepositoriesWorkspaceRepoSlugPermissionsConfigGroupsGroupSlugPut(ctx, groupSlug, repoSlug, workspace) +> ModelError RepositoriesWorkspaceRepoSlugPermissionsConfigGroupsGroupSlugPut(ctx, groupSlug, repoSlug, workspace) Update an explicit group permission for a repository Updates the group permission if it exists. Only users with admin permission for the repository may access this resource. The only authentication method supported for this endpoint is via app passwords. Permissions can be: * `admin` * `write` * `read` Example: ``` $ curl -X PUT -H \"Content-Type: application/json\" https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers -d '{ \"permission\": \"write\" }' HTTP/1.1 200 Location: https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers { \"type\": \"repository_group_permission\", \"group\": { \"type\": \"group\", \"name\": \"Developers\", \"slug\": \"developers\" }, \"repository\": { \"type\": \"repository\", \"name\": \"geordi\", \"full_name\": \"atlassian_tutorial/geordi\", \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\" }, \"permission\": \"write\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers\" } } } ``` @@ -606,7 +606,7 @@ Name | Type | Description | Notes ### Return type -[**RepositoryGroupPermission**](repository_group_permission.md) +[**ModelError**](map.md) ### Authorization @@ -679,7 +679,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **RepositoriesWorkspaceRepoSlugPermissionsConfigUsersSelectedUserIdGet** -> RepositoryUserPermission RepositoriesWorkspaceRepoSlugPermissionsConfigUsersSelectedUserIdGet(ctx, repoSlug, selectedUserId, workspace) +> ModelError RepositoriesWorkspaceRepoSlugPermissionsConfigUsersSelectedUserIdGet(ctx, repoSlug, selectedUserId, workspace) Get an explicit user permission for a repository Returns the explicit user permission for a given user and repository. Only users with admin permission for the repository may access this resource. Permissions can be: * `admin` * `write` * `read` * `none` Example: ``` $ curl 'https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/ permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a' HTTP/1.1 200 Location: 'https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/ permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a' { \"type\": \"repository_user_permission\", \"user\": { \"type\": \"user\", \"display_name\": \"Colin Cameron\", \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\", \"account_id\": \"557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\" }, \"repository\": { \"type\": \"repository\", \"name\": \"geordi\", \"full_name\": \"atlassian_tutorial/geordi\", \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\" }, \"permission\": \"admin\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/ permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\" } } } ``` @@ -695,7 +695,7 @@ Name | Type | Description | Notes ### Return type -[**RepositoryUserPermission**](repository_user_permission.md) +[**ModelError**](map.md) ### Authorization @@ -709,7 +709,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **RepositoriesWorkspaceRepoSlugPermissionsConfigUsersSelectedUserIdPut** -> RepositoryUserPermission RepositoriesWorkspaceRepoSlugPermissionsConfigUsersSelectedUserIdPut(ctx, repoSlug, selectedUserId, workspace) +> ModelError RepositoriesWorkspaceRepoSlugPermissionsConfigUsersSelectedUserIdPut(ctx, repoSlug, selectedUserId, workspace) Update an explicit user permission for a repository Updates the explicit user permission for a given user and repository. The selected user must be a member of the workspace, and cannot be the workspace owner. Only users with admin permission for the repository may access this resource. The only authentication method for this endpoint is via app passwords. Permissions can be: * `admin` * `write` * `read` Example: ``` $ curl -X PUT -H \"Content-Type: application/json\" 'https://api.bitbucket.org/2.0/repositories/ atlassian_tutorial/geordi/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a' -d '{ \"permission\": \"write\" }' HTTP/1.1 200 Location: 'https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/ permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a' { \"type\": \"repository_user_permission\", \"user\": { \"type\": \"user\", \"display_name\": \"Colin Cameron\", \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\", \"account_id\": \"557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\" }, \"repository\": { \"type\": \"repository\", \"name\": \"geordi\", \"full_name\": \"atlassian_tutorial/geordi\", \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\" }, \"permission\": \"write\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/ permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\" } } } ``` @@ -725,7 +725,7 @@ Name | Type | Description | Notes ### Return type -[**RepositoryUserPermission**](repository_user_permission.md) +[**ModelError**](map.md) ### Authorization diff --git a/docs/Repository.md b/docs/Repository.md index f560241..0a1bf5c 100644 --- a/docs/Repository.md +++ b/docs/Repository.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **HasWiki** | **bool** | | [optional] [default to null] **IsPrivate** | **bool** | | [optional] [default to null] **Language** | **string** | | [optional] [default to null] -**Links** | [***RepositoryLinks**](repository_links.md) | | [optional] [default to null] +**Links** | [***interface{}**](interface{}.md) | | [optional] [default to null] **Mainbranch** | [***Branch**](branch.md) | | [optional] [default to null] **Name** | **string** | | [optional] [default to null] **Owner** | [***Account**](account.md) | | [optional] [default to null] diff --git a/docs/SearchCodeSearchResult.md b/docs/SearchCodeSearchResult.md index 7e4f8de..38a5894 100644 --- a/docs/SearchCodeSearchResult.md +++ b/docs/SearchCodeSearchResult.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **ContentMatchCount** | **int64** | | [optional] [default to null] **ContentMatches** | [**[]SearchContentMatch**](search_content_match.md) | | [optional] [default to null] **PathMatches** | [**[]SearchSegment**](search_segment.md) | | [optional] [default to null] -**File** | [***CommitFile**](commit_file.md) | | [optional] [default to null] +**File** | [***ModelError**](map.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SnippetComment.md b/docs/SnippetComment.md index 7816bfc..de013a2 100644 --- a/docs/SnippetComment.md +++ b/docs/SnippetComment.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type_** | **string** | | [default to null] -**Links** | [***GroupLinks**](group_links.md) | | [optional] [default to null] +**Links** | [***interface{}**](interface{}.md) | | [optional] [default to null] **Snippet** | [***Snippet**](snippet.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SnippetCommit.md b/docs/SnippetCommit.md index 8f03f59..5bd359b 100644 --- a/docs/SnippetCommit.md +++ b/docs/SnippetCommit.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes **Date** | [**time.Time**](time.Time.md) | | [optional] [default to null] **Author** | [***Author**](author.md) | | [optional] [default to null] **Message** | **string** | | [optional] [default to null] -**Summary** | [***RenderedPullRequestMarkupTitle**](Rendered Pull Request Markup_title.md) | | [optional] [default to null] +**Summary** | [***interface{}**](interface{}.md) | | [optional] [default to null] **Parents** | [**[]BaseCommit**](base_commit.md) | | [optional] [default to null] -**Links** | [***SnippetCommitLinks**](snippet_commit_links.md) | | [optional] [default to null] +**Links** | [***interface{}**](interface{}.md) | | [optional] [default to null] **Snippet** | [***Snippet**](snippet.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SshAccountKey.md b/docs/SshAccountKey.md index e88ae34..aa60742 100644 --- a/docs/SshAccountKey.md +++ b/docs/SshAccountKey.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **Label** | **string** | The user-defined label for the SSH key | [optional] [default to null] **CreatedOn** | [**time.Time**](time.Time.md) | | [optional] [default to null] **LastUsed** | [**time.Time**](time.Time.md) | | [optional] [default to null] -**Links** | [***VersionLinks**](version_links.md) | | [optional] [default to null] +**Links** | [***interface{}**](interface{}.md) | | [optional] [default to null] **Owner** | [***Account**](account.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SshKey.md b/docs/SshKey.md index 5c1c85d..99b728e 100644 --- a/docs/SshKey.md +++ b/docs/SshKey.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **Label** | **string** | The user-defined label for the SSH key | [optional] [default to null] **CreatedOn** | [**time.Time**](time.Time.md) | | [optional] [default to null] **LastUsed** | [**time.Time**](time.Time.md) | | [optional] [default to null] -**Links** | [***VersionLinks**](version_links.md) | | [optional] [default to null] +**Links** | [***interface{}**](interface{}.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubjectTypes.md b/docs/SubjectTypes.md index b4d99f4..084fc34 100644 --- a/docs/SubjectTypes.md +++ b/docs/SubjectTypes.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Repository** | [***SubjectTypesRepository**](subject_types_repository.md) | | [optional] [default to null] -**Workspace** | [***SubjectTypesRepository**](subject_types_repository.md) | | [optional] [default to null] +**Repository** | [***interface{}**](interface{}.md) | | [optional] [default to null] +**Workspace** | [***interface{}**](interface{}.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Tag.md b/docs/Tag.md index a7ecd0b..c805fc4 100644 --- a/docs/Tag.md +++ b/docs/Tag.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type_** | **string** | | [default to null] -**Links** | [***RefLinks**](ref_links.md) | | [optional] [default to null] +**Links** | [***interface{}**](interface{}.md) | | [optional] [default to null] **Name** | **string** | The name of the ref. | [optional] [default to null] **Target** | [***Commit**](commit.md) | | [optional] [default to null] **Message** | **string** | The message associated with the tag, if available. | [optional] [default to null] diff --git a/docs/UsersApi.md b/docs/UsersApi.md index 1985597..843dd0f 100644 --- a/docs/UsersApi.md +++ b/docs/UsersApi.md @@ -24,7 +24,7 @@ Name | Type | Description | Notes ### Return type -[**ModelError**](error.md) +[**ModelError**](map.md) ### Authorization @@ -48,7 +48,7 @@ This endpoint does not need any parameter. ### Return type -[**ModelError**](error.md) +[**ModelError**](map.md) ### Authorization diff --git a/docs/Version.md b/docs/Version.md index f798c68..1ecf700 100644 --- a/docs/Version.md +++ b/docs/Version.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type_** | **string** | | [default to null] -**Links** | [***VersionLinks**](version_links.md) | | [optional] [default to null] +**Links** | [***interface{}**](interface{}.md) | | [optional] [default to null] **Name** | **string** | | [optional] [default to null] **Id** | **int32** | | [optional] [default to null] diff --git a/docs/WebhookSubscription.md b/docs/WebhookSubscription.md index a4900c8..a800614 100644 --- a/docs/WebhookSubscription.md +++ b/docs/WebhookSubscription.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **Url** | **string** | The URL events get delivered to. | [optional] [default to null] **Description** | **string** | A user-defined description of the webhook. | [optional] [default to null] **SubjectType** | **string** | The type of entity. Set to either `repository` or `workspace` based on where the subscription is defined. | [optional] [default to null] -**Subject** | [***interface{}**](interface{}.md) | | [optional] [default to null] +**Subject** | [***ModelError**](map.md) | | [optional] [default to null] **Active** | **bool** | | [optional] [default to null] **CreatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null] **Events** | **[]string** | The events this webhook is subscribed to. | [optional] [default to null] diff --git a/docs/Workspace.md b/docs/Workspace.md index 3489366..1f0139c 100644 --- a/docs/Workspace.md +++ b/docs/Workspace.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type_** | **string** | | [default to null] -**Links** | [***WorkspaceLinks**](workspace_links.md) | | [optional] [default to null] +**Links** | [***interface{}**](interface{}.md) | | [optional] [default to null] **Uuid** | **string** | The workspace's immutable id. | [optional] [default to null] **Name** | **string** | The name of the workspace. | [optional] [default to null] **Slug** | **string** | The short label that identifies this workspace. | [optional] [default to null] diff --git a/docs/WorkspaceMembership.md b/docs/WorkspaceMembership.md index 5d13503..8e43a27 100644 --- a/docs/WorkspaceMembership.md +++ b/docs/WorkspaceMembership.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type_** | **string** | | [default to null] -**Links** | [***VersionLinks**](version_links.md) | | [optional] [default to null] +**Links** | [***interface{}**](interface{}.md) | | [optional] [default to null] **User** | [***Account**](account.md) | | [optional] [default to null] **Workspace** | [***Workspace**](workspace.md) | | [optional] [default to null] diff --git a/model_account.go b/model_account.go index 04ccbf9..ac4096c 100644 --- a/model_account.go +++ b/model_account.go @@ -14,10 +14,10 @@ import ( ) type Account struct { - Type_ string `json:"type"` - Links *AccountLinks `json:"links,omitempty"` - CreatedOn time.Time `json:"created_on,omitempty"` - DisplayName string `json:"display_name,omitempty"` - Username string `json:"username,omitempty"` - Uuid string `json:"uuid,omitempty"` + Type_ string `json:"type"` + Links *ModelError `json:"links,omitempty"` + CreatedOn time.Time `json:"created_on,omitempty"` + DisplayName string `json:"display_name,omitempty"` + Username string `json:"username,omitempty"` + Uuid string `json:"uuid,omitempty"` } diff --git a/model_app_user.go b/model_app_user.go index 01a58ec..b242fb2 100644 --- a/model_app_user.go +++ b/model_app_user.go @@ -14,11 +14,11 @@ import ( ) type AppUser struct { - Links *AccountLinks `json:"links,omitempty"` - CreatedOn time.Time `json:"created_on,omitempty"` - DisplayName string `json:"display_name,omitempty"` - Username string `json:"username,omitempty"` - Uuid string `json:"uuid,omitempty"` + Links *ModelError `json:"links,omitempty"` + CreatedOn time.Time `json:"created_on,omitempty"` + DisplayName string `json:"display_name,omitempty"` + Username string `json:"username,omitempty"` + Uuid string `json:"uuid,omitempty"` // The user's Atlassian account ID. AccountId string `json:"account_id,omitempty"` // The status of the account. Currently the only possible value is \"active\", but more values may be added in the future. diff --git a/model_base_commit.go b/model_base_commit.go index 90a510d..4b42f5f 100644 --- a/model_base_commit.go +++ b/model_base_commit.go @@ -14,11 +14,11 @@ import ( ) type BaseCommit struct { - Type_ string `json:"type"` - Hash string `json:"hash,omitempty"` - Date time.Time `json:"date,omitempty"` - Author *Author `json:"author,omitempty"` - Message string `json:"message,omitempty"` - Summary *RenderedPullRequestMarkupTitle `json:"summary,omitempty"` - Parents []BaseCommit `json:"parents,omitempty"` + Type_ string `json:"type"` + Hash string `json:"hash,omitempty"` + Date time.Time `json:"date,omitempty"` + Author *Author `json:"author,omitempty"` + Message string `json:"message,omitempty"` + Summary *interface{} `json:"summary,omitempty"` + Parents []BaseCommit `json:"parents,omitempty"` } diff --git a/model_branch.go b/model_branch.go index 8a68309..b536fd7 100644 --- a/model_branch.go +++ b/model_branch.go @@ -10,8 +10,8 @@ package bitbucket type Branch struct { - Type_ string `json:"type"` - Links *RefLinks `json:"links,omitempty"` + Type_ string `json:"type"` + Links *interface{} `json:"links,omitempty"` // The name of the ref. Name string `json:"name,omitempty"` Target *Commit `json:"target,omitempty"` diff --git a/model_comment.go b/model_comment.go index b26cbaf..31540b3 100644 --- a/model_comment.go +++ b/model_comment.go @@ -14,14 +14,14 @@ import ( ) type Comment struct { - Type_ string `json:"type"` - Id int32 `json:"id,omitempty"` - CreatedOn time.Time `json:"created_on,omitempty"` - UpdatedOn time.Time `json:"updated_on,omitempty"` - Content *RenderedPullRequestMarkupTitle `json:"content,omitempty"` - User *Account `json:"user,omitempty"` - Deleted bool `json:"deleted,omitempty"` - Parent *Comment `json:"parent,omitempty"` - Inline *CommentInline `json:"inline,omitempty"` - Links *CommentLinks `json:"links,omitempty"` + Type_ string `json:"type"` + Id int32 `json:"id,omitempty"` + CreatedOn time.Time `json:"created_on,omitempty"` + UpdatedOn time.Time `json:"updated_on,omitempty"` + Content *interface{} `json:"content,omitempty"` + User *Account `json:"user,omitempty"` + Deleted bool `json:"deleted,omitempty"` + Parent *Comment `json:"parent,omitempty"` + Inline *interface{} `json:"inline,omitempty"` + Links *interface{} `json:"links,omitempty"` } diff --git a/model_commit.go b/model_commit.go index 5e90715..4c09644 100644 --- a/model_commit.go +++ b/model_commit.go @@ -14,12 +14,12 @@ import ( ) type Commit struct { - Hash string `json:"hash,omitempty"` - Date time.Time `json:"date,omitempty"` - Author *Author `json:"author,omitempty"` - Message string `json:"message,omitempty"` - Summary *RenderedPullRequestMarkupTitle `json:"summary,omitempty"` - Parents []BaseCommit `json:"parents,omitempty"` - Repository *Repository `json:"repository,omitempty"` - Participants []Participant `json:"participants,omitempty"` + Hash string `json:"hash,omitempty"` + Date time.Time `json:"date,omitempty"` + Author *Author `json:"author,omitempty"` + Message string `json:"message,omitempty"` + Summary *interface{} `json:"summary,omitempty"` + Parents []BaseCommit `json:"parents,omitempty"` + Repository *Repository `json:"repository,omitempty"` + Participants []Participant `json:"participants,omitempty"` } diff --git a/model_commit_comment.go b/model_commit_comment.go index 099fbb6..388be15 100644 --- a/model_commit_comment.go +++ b/model_commit_comment.go @@ -14,14 +14,14 @@ import ( ) type CommitComment struct { - Id int32 `json:"id,omitempty"` - CreatedOn time.Time `json:"created_on,omitempty"` - UpdatedOn time.Time `json:"updated_on,omitempty"` - Content *RenderedPullRequestMarkupTitle `json:"content,omitempty"` - User *Account `json:"user,omitempty"` - Deleted bool `json:"deleted,omitempty"` - Parent *Comment `json:"parent,omitempty"` - Inline *CommentInline `json:"inline,omitempty"` - Links *CommentLinks `json:"links,omitempty"` - Commit *Commit `json:"commit,omitempty"` + Id int32 `json:"id,omitempty"` + CreatedOn time.Time `json:"created_on,omitempty"` + UpdatedOn time.Time `json:"updated_on,omitempty"` + Content *interface{} `json:"content,omitempty"` + User *Account `json:"user,omitempty"` + Deleted bool `json:"deleted,omitempty"` + Parent *Comment `json:"parent,omitempty"` + Inline *interface{} `json:"inline,omitempty"` + Links *interface{} `json:"links,omitempty"` + Commit *Commit `json:"commit,omitempty"` } diff --git a/model_commitstatus.go b/model_commitstatus.go index d855875..c9440be 100644 --- a/model_commitstatus.go +++ b/model_commitstatus.go @@ -14,8 +14,8 @@ import ( ) type Commitstatus struct { - Type_ string `json:"type"` - Links *CommitstatusLinks `json:"links,omitempty"` + Type_ string `json:"type"` + Links *interface{} `json:"links,omitempty"` // The commit status' id. Uuid string `json:"uuid,omitempty"` // An identifier for the status that's unique to its type (current \"build\" is the only supported type) and the vendor, e.g. BB-DEPLOY diff --git a/model_component.go b/model_component.go index 4da281f..98e468b 100644 --- a/model_component.go +++ b/model_component.go @@ -10,8 +10,8 @@ package bitbucket type Component struct { - Type_ string `json:"type"` - Links *VersionLinks `json:"links,omitempty"` - Name string `json:"name,omitempty"` - Id int32 `json:"id,omitempty"` + Type_ string `json:"type"` + Links *interface{} `json:"links,omitempty"` + Name string `json:"name,omitempty"` + Id int32 `json:"id,omitempty"` } diff --git a/model_deploy_key.go b/model_deploy_key.go index 90a7314..6e42194 100644 --- a/model_deploy_key.go +++ b/model_deploy_key.go @@ -21,9 +21,9 @@ type DeployKey struct { // The comment parsed from the deploy key (if present) Comment string `json:"comment,omitempty"` // The user-defined label for the deploy key - Label string `json:"label,omitempty"` - AddedOn time.Time `json:"added_on,omitempty"` - LastUsed time.Time `json:"last_used,omitempty"` - Links *VersionLinks `json:"links,omitempty"` - Owner *Account `json:"owner,omitempty"` + Label string `json:"label,omitempty"` + AddedOn time.Time `json:"added_on,omitempty"` + LastUsed time.Time `json:"last_used,omitempty"` + Links *interface{} `json:"links,omitempty"` + Owner *Account `json:"owner,omitempty"` } diff --git a/model_group.go b/model_group.go index 48a2289..7fe5d8e 100644 --- a/model_group.go +++ b/model_group.go @@ -10,11 +10,11 @@ package bitbucket type Group struct { - Type_ string `json:"type"` - Links *GroupLinks `json:"links,omitempty"` - Owner *Account `json:"owner,omitempty"` - Workspace *Workspace `json:"workspace,omitempty"` - Name string `json:"name,omitempty"` + Type_ string `json:"type"` + Links *interface{} `json:"links,omitempty"` + Owner *Account `json:"owner,omitempty"` + Workspace *Workspace `json:"workspace,omitempty"` + Name string `json:"name,omitempty"` // The \"sluggified\" version of the group's name. This contains only ASCII characters and can therefore be slightly different than the name Slug string `json:"slug,omitempty"` // The concatenation of the workspace's slug and the group's slug, separated with a colon (e.g. `acme:developers`) diff --git a/model_issue.go b/model_issue.go index d9c5d11..9840c33 100644 --- a/model_issue.go +++ b/model_issue.go @@ -14,22 +14,22 @@ import ( ) type Issue struct { - Type_ string `json:"type"` - Links *IssueLinks `json:"links,omitempty"` - Id int32 `json:"id,omitempty"` - Repository *Repository `json:"repository,omitempty"` - Title string `json:"title,omitempty"` - Reporter *Account `json:"reporter,omitempty"` - Assignee *Account `json:"assignee,omitempty"` - CreatedOn time.Time `json:"created_on,omitempty"` - UpdatedOn time.Time `json:"updated_on,omitempty"` - EditedOn time.Time `json:"edited_on,omitempty"` - State string `json:"state,omitempty"` - Kind string `json:"kind,omitempty"` - Priority string `json:"priority,omitempty"` - Milestone *Milestone `json:"milestone,omitempty"` - Version *Version `json:"version,omitempty"` - Component *Component `json:"component,omitempty"` - Votes int32 `json:"votes,omitempty"` - Content *RenderedPullRequestMarkupTitle `json:"content,omitempty"` + Type_ string `json:"type"` + Links *interface{} `json:"links,omitempty"` + Id int32 `json:"id,omitempty"` + Repository *Repository `json:"repository,omitempty"` + Title string `json:"title,omitempty"` + Reporter *Account `json:"reporter,omitempty"` + Assignee *Account `json:"assignee,omitempty"` + CreatedOn time.Time `json:"created_on,omitempty"` + UpdatedOn time.Time `json:"updated_on,omitempty"` + EditedOn time.Time `json:"edited_on,omitempty"` + State string `json:"state,omitempty"` + Kind string `json:"kind,omitempty"` + Priority string `json:"priority,omitempty"` + Milestone *Milestone `json:"milestone,omitempty"` + Version *Version `json:"version,omitempty"` + Component *Component `json:"component,omitempty"` + Votes int32 `json:"votes,omitempty"` + Content *interface{} `json:"content,omitempty"` } diff --git a/model_issue_attachment.go b/model_issue_attachment.go index 89bbea8..cc380d2 100644 --- a/model_issue_attachment.go +++ b/model_issue_attachment.go @@ -10,7 +10,7 @@ package bitbucket type IssueAttachment struct { - Type_ string `json:"type"` - Links *VersionLinks `json:"links,omitempty"` - Name string `json:"name,omitempty"` + Type_ string `json:"type"` + Links *interface{} `json:"links,omitempty"` + Name string `json:"name,omitempty"` } diff --git a/model_issue_comment.go b/model_issue_comment.go index f94aa21..489c888 100644 --- a/model_issue_comment.go +++ b/model_issue_comment.go @@ -14,14 +14,14 @@ import ( ) type IssueComment struct { - Id int32 `json:"id,omitempty"` - CreatedOn time.Time `json:"created_on,omitempty"` - UpdatedOn time.Time `json:"updated_on,omitempty"` - Content *RenderedPullRequestMarkupTitle `json:"content,omitempty"` - User *Account `json:"user,omitempty"` - Deleted bool `json:"deleted,omitempty"` - Parent *Comment `json:"parent,omitempty"` - Inline *CommentInline `json:"inline,omitempty"` - Links *CommentLinks `json:"links,omitempty"` - Issue *Issue `json:"issue,omitempty"` + Id int32 `json:"id,omitempty"` + CreatedOn time.Time `json:"created_on,omitempty"` + UpdatedOn time.Time `json:"updated_on,omitempty"` + Content *interface{} `json:"content,omitempty"` + User *Account `json:"user,omitempty"` + Deleted bool `json:"deleted,omitempty"` + Parent *Comment `json:"parent,omitempty"` + Inline *interface{} `json:"inline,omitempty"` + Links *interface{} `json:"links,omitempty"` + Issue *Issue `json:"issue,omitempty"` } diff --git a/model_milestone.go b/model_milestone.go index 9125ea3..ddc0f0b 100644 --- a/model_milestone.go +++ b/model_milestone.go @@ -10,8 +10,8 @@ package bitbucket type Milestone struct { - Type_ string `json:"type"` - Links *VersionLinks `json:"links,omitempty"` - Name string `json:"name,omitempty"` - Id int32 `json:"id,omitempty"` + Type_ string `json:"type"` + Links *interface{} `json:"links,omitempty"` + Name string `json:"name,omitempty"` + Id int32 `json:"id,omitempty"` } diff --git a/model_paginated_diffstats.go b/model_paginated_diffstats.go index 04449ec..8b110ef 100644 --- a/model_paginated_diffstats.go +++ b/model_paginated_diffstats.go @@ -20,6 +20,6 @@ type PaginatedDiffstats struct { // Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. Next string `json:"next,omitempty"` // Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. - Previous string `json:"previous,omitempty"` - Values []Diffstat `json:"values,omitempty"` + Previous string `json:"previous,omitempty"` + Values []ModelError `json:"values,omitempty"` } diff --git a/model_paginated_files.go b/model_paginated_files.go index 0e51c30..e9f0dc3 100644 --- a/model_paginated_files.go +++ b/model_paginated_files.go @@ -21,5 +21,5 @@ type PaginatedFiles struct { Next string `json:"next,omitempty"` // Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. Previous string `json:"previous,omitempty"` - Values []CommitFile `json:"values,omitempty"` + Values []ModelError `json:"values,omitempty"` } diff --git a/model_paginated_log_entries.go b/model_paginated_log_entries.go index e437f91..59bcbb6 100644 --- a/model_paginated_log_entries.go +++ b/model_paginated_log_entries.go @@ -20,6 +20,6 @@ type PaginatedLogEntries struct { // Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. Next string `json:"next,omitempty"` // Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. - Previous string `json:"previous,omitempty"` - Values []IssueChange `json:"values,omitempty"` + Previous string `json:"previous,omitempty"` + Values []ModelError `json:"values,omitempty"` } diff --git a/model_paginated_project_group_permissions.go b/model_paginated_project_group_permissions.go new file mode 100644 index 0000000..df5893d --- /dev/null +++ b/model_paginated_project_group_permissions.go @@ -0,0 +1,25 @@ +/* + * Bitbucket API + * + * Code against the Bitbucket API to automate simple tasks, embed Bitbucket data into your own site, build mobile or desktop apps, or even add custom UI add-ons into Bitbucket itself using the Connect framework. + * + * API version: 2.0 + * Contact: support@bitbucket.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package bitbucket + +// A paginated list of project group permissions. +type PaginatedProjectGroupPermissions struct { + // Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. + Size int32 `json:"size,omitempty"` + // Page number of the current results. This is an optional element that is not provided in all responses. + Page int32 `json:"page,omitempty"` + // Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. + Pagelen int32 `json:"pagelen,omitempty"` + // Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + Next string `json:"next,omitempty"` + // Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + Previous string `json:"previous,omitempty"` + Values []ModelError `json:"values,omitempty"` +} diff --git a/model_paginated_project_user_permissions.go b/model_paginated_project_user_permissions.go new file mode 100644 index 0000000..29331dc --- /dev/null +++ b/model_paginated_project_user_permissions.go @@ -0,0 +1,25 @@ +/* + * Bitbucket API + * + * Code against the Bitbucket API to automate simple tasks, embed Bitbucket data into your own site, build mobile or desktop apps, or even add custom UI add-ons into Bitbucket itself using the Connect framework. + * + * API version: 2.0 + * Contact: support@bitbucket.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package bitbucket + +// A paginated list of project user permissions. +type PaginatedProjectUserPermissions struct { + // Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. + Size int32 `json:"size,omitempty"` + // Page number of the current results. This is an optional element that is not provided in all responses. + Page int32 `json:"page,omitempty"` + // Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. + Pagelen int32 `json:"pagelen,omitempty"` + // Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + Next string `json:"next,omitempty"` + // Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + Previous string `json:"previous,omitempty"` + Values []ModelError `json:"values,omitempty"` +} diff --git a/model_paginated_refs.go b/model_paginated_refs.go index 75dcbcf..1e97d01 100644 --- a/model_paginated_refs.go +++ b/model_paginated_refs.go @@ -20,6 +20,6 @@ type PaginatedRefs struct { // Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. Next string `json:"next,omitempty"` // Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. - Previous string `json:"previous,omitempty"` - Values []Ref `json:"values,omitempty"` + Previous string `json:"previous,omitempty"` + Values []ModelError `json:"values,omitempty"` } diff --git a/model_paginated_repository_group_permissions.go b/model_paginated_repository_group_permissions.go index ba54044..a5dc759 100644 --- a/model_paginated_repository_group_permissions.go +++ b/model_paginated_repository_group_permissions.go @@ -20,6 +20,6 @@ type PaginatedRepositoryGroupPermissions struct { // Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. Next string `json:"next,omitempty"` // Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. - Previous string `json:"previous,omitempty"` - Values []RepositoryGroupPermission `json:"values,omitempty"` + Previous string `json:"previous,omitempty"` + Values []ModelError `json:"values,omitempty"` } diff --git a/model_paginated_repository_permissions.go b/model_paginated_repository_permissions.go index 6d668be..639733c 100644 --- a/model_paginated_repository_permissions.go +++ b/model_paginated_repository_permissions.go @@ -20,6 +20,6 @@ type PaginatedRepositoryPermissions struct { // Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. Next string `json:"next,omitempty"` // Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. - Previous string `json:"previous,omitempty"` - Values []RepositoryPermission `json:"values,omitempty"` + Previous string `json:"previous,omitempty"` + Values []ModelError `json:"values,omitempty"` } diff --git a/model_paginated_repository_user_permissions.go b/model_paginated_repository_user_permissions.go index 74cbc3b..bdbc0f6 100644 --- a/model_paginated_repository_user_permissions.go +++ b/model_paginated_repository_user_permissions.go @@ -20,6 +20,6 @@ type PaginatedRepositoryUserPermissions struct { // Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. Next string `json:"next,omitempty"` // Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. - Previous string `json:"previous,omitempty"` - Values []RepositoryUserPermission `json:"values,omitempty"` + Previous string `json:"previous,omitempty"` + Values []ModelError `json:"values,omitempty"` } diff --git a/model_paginated_treeentries.go b/model_paginated_treeentries.go index e959246..3c9a459 100644 --- a/model_paginated_treeentries.go +++ b/model_paginated_treeentries.go @@ -20,6 +20,6 @@ type PaginatedTreeentries struct { // Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. Next string `json:"next,omitempty"` // Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. - Previous string `json:"previous,omitempty"` - Values []Treeentry `json:"values,omitempty"` + Previous string `json:"previous,omitempty"` + Values []ModelError `json:"values,omitempty"` } diff --git a/model_pipeline_cache.go b/model_pipeline_cache.go index fad46f2..6f35482 100644 --- a/model_pipeline_cache.go +++ b/model_pipeline_cache.go @@ -23,6 +23,8 @@ type PipelineCache struct { StepUuid string `json:"step_uuid,omitempty"` // The name of the cache. Name string `json:"name,omitempty"` + // The key hash of the cache version. + KeyHash string `json:"key_hash,omitempty"` // The path where the cache contents were retrieved from. Path string `json:"path,omitempty"` // The size of the file containing the archive of the cache. diff --git a/model_pipeline_schedule_post_request_body.go b/model_pipeline_schedule_post_request_body.go new file mode 100644 index 0000000..f525aa2 --- /dev/null +++ b/model_pipeline_schedule_post_request_body.go @@ -0,0 +1,19 @@ +/* + * Bitbucket API + * + * Code against the Bitbucket API to automate simple tasks, embed Bitbucket data into your own site, build mobile or desktop apps, or even add custom UI add-ons into Bitbucket itself using the Connect framework. + * + * API version: 2.0 + * Contact: support@bitbucket.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package bitbucket + +type PipelineSchedulePostRequestBody struct { + Type_ string `json:"type"` + Target *PipelineSchedulePostRequestBodyTarget `json:"target"` + // Whether the schedule is enabled. + Enabled bool `json:"enabled,omitempty"` + // The cron expression with second precision (7 fields) that the schedule applies. For example, for expression: 0 0 12 * * ? *, will execute at 12pm UTC every day. + CronPattern string `json:"cron_pattern"` +} diff --git a/model_pipeline_schedule_post_request_body_target.go b/model_pipeline_schedule_post_request_body_target.go new file mode 100644 index 0000000..14d4370 --- /dev/null +++ b/model_pipeline_schedule_post_request_body_target.go @@ -0,0 +1,19 @@ +/* + * Bitbucket API + * + * Code against the Bitbucket API to automate simple tasks, embed Bitbucket data into your own site, build mobile or desktop apps, or even add custom UI add-ons into Bitbucket itself using the Connect framework. + * + * API version: 2.0 + * Contact: support@bitbucket.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package bitbucket + +// The target on which the schedule will be executed. +type PipelineSchedulePostRequestBodyTarget struct { + Selector *PipelineSelector `json:"selector"` + // The name of the reference. + RefName string `json:"ref_name"` + // The type of reference (branch only). + RefType string `json:"ref_type"` +} diff --git a/model_pipeline_schedule_put_request_body.go b/model_pipeline_schedule_put_request_body.go new file mode 100644 index 0000000..ff9186d --- /dev/null +++ b/model_pipeline_schedule_put_request_body.go @@ -0,0 +1,16 @@ +/* + * Bitbucket API + * + * Code against the Bitbucket API to automate simple tasks, embed Bitbucket data into your own site, build mobile or desktop apps, or even add custom UI add-ons into Bitbucket itself using the Connect framework. + * + * API version: 2.0 + * Contact: support@bitbucket.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package bitbucket + +type PipelineSchedulePutRequestBody struct { + Type_ string `json:"type"` + // Whether the schedule is enabled. + Enabled bool `json:"enabled,omitempty"` +} diff --git a/model_project_deploy_key.go b/model_project_deploy_key.go index bebf36e..2ccee8b 100644 --- a/model_project_deploy_key.go +++ b/model_project_deploy_key.go @@ -21,9 +21,9 @@ type ProjectDeployKey struct { // The comment parsed from the deploy key (if present) Comment string `json:"comment,omitempty"` // The user-defined label for the deploy key - Label string `json:"label,omitempty"` - AddedOn time.Time `json:"added_on,omitempty"` - LastUsed time.Time `json:"last_used,omitempty"` - Links *VersionLinks `json:"links,omitempty"` - CreatedBy *Account `json:"created_by,omitempty"` + Label string `json:"label,omitempty"` + AddedOn time.Time `json:"added_on,omitempty"` + LastUsed time.Time `json:"last_used,omitempty"` + Links *interface{} `json:"links,omitempty"` + CreatedBy *Account `json:"created_by,omitempty"` } diff --git a/model_pullrequest.go b/model_pullrequest.go index 668dd72..4807099 100644 --- a/model_pullrequest.go +++ b/model_pullrequest.go @@ -14,20 +14,21 @@ import ( ) type Pullrequest struct { - Type_ string `json:"type"` - Links *PullrequestLinks `json:"links,omitempty"` + Type_ string `json:"type"` + Links *interface{} `json:"links,omitempty"` // The pull request's unique ID. Note that pull request IDs are only unique within their associated repository. Id int32 `json:"id,omitempty"` // Title of the pull request. - Title string `json:"title,omitempty"` - Rendered *RenderedPullRequestMarkup `json:"rendered,omitempty"` - Summary *RenderedPullRequestMarkupTitle `json:"summary,omitempty"` + Title string `json:"title,omitempty"` + // User provided pull request text, interpreted in a markup language and rendered in HTML + Rendered *interface{} `json:"rendered,omitempty"` + Summary *interface{} `json:"summary,omitempty"` // The pull request's current status. State string `json:"state,omitempty"` Author *Account `json:"author,omitempty"` Source *PullrequestEndpoint `json:"source,omitempty"` Destination *PullrequestEndpoint `json:"destination,omitempty"` - MergeCommit *PullRequestCommit `json:"merge_commit,omitempty"` + MergeCommit *interface{} `json:"merge_commit,omitempty"` // The number of comments for a specific pull request. CommentCount int32 `json:"comment_count,omitempty"` // The number of open tasks for a specific pull request. diff --git a/model_pullrequest_comment.go b/model_pullrequest_comment.go index 54542d7..e103212 100644 --- a/model_pullrequest_comment.go +++ b/model_pullrequest_comment.go @@ -14,14 +14,15 @@ import ( ) type PullrequestComment struct { - Id int32 `json:"id,omitempty"` - CreatedOn time.Time `json:"created_on,omitempty"` - UpdatedOn time.Time `json:"updated_on,omitempty"` - Content *RenderedPullRequestMarkupTitle `json:"content,omitempty"` - User *Account `json:"user,omitempty"` - Deleted bool `json:"deleted,omitempty"` - Parent *Comment `json:"parent,omitempty"` - Inline *CommentInline `json:"inline,omitempty"` - Links *CommentLinks `json:"links,omitempty"` - Pullrequest *Pullrequest `json:"pullrequest,omitempty"` + Id int32 `json:"id,omitempty"` + CreatedOn time.Time `json:"created_on,omitempty"` + UpdatedOn time.Time `json:"updated_on,omitempty"` + Content *interface{} `json:"content,omitempty"` + User *Account `json:"user,omitempty"` + Deleted bool `json:"deleted,omitempty"` + Parent *Comment `json:"parent,omitempty"` + Inline *interface{} `json:"inline,omitempty"` + Links *interface{} `json:"links,omitempty"` + Pullrequest *Pullrequest `json:"pullrequest,omitempty"` + Resolution *ModelError `json:"resolution,omitempty"` } diff --git a/model_pullrequest_endpoint.go b/model_pullrequest_endpoint.go index 5337e0a..b52d62d 100644 --- a/model_pullrequest_endpoint.go +++ b/model_pullrequest_endpoint.go @@ -10,7 +10,7 @@ package bitbucket type PullrequestEndpoint struct { - Repository *Repository `json:"repository,omitempty"` - Branch *PullRequestBranch `json:"branch,omitempty"` - Commit *PullRequestCommit `json:"commit,omitempty"` + Repository *Repository `json:"repository,omitempty"` + Branch *interface{} `json:"branch,omitempty"` + Commit *interface{} `json:"commit,omitempty"` } diff --git a/model_search_code_search_result.go b/model_search_code_search_result.go index 28ec679..ab0d2eb 100644 --- a/model_search_code_search_result.go +++ b/model_search_code_search_result.go @@ -14,5 +14,5 @@ type SearchCodeSearchResult struct { ContentMatchCount int64 `json:"content_match_count,omitempty"` ContentMatches []SearchContentMatch `json:"content_matches,omitempty"` PathMatches []SearchSegment `json:"path_matches,omitempty"` - File *CommitFile `json:"file,omitempty"` + File *ModelError `json:"file,omitempty"` } diff --git a/model_snippet_comment.go b/model_snippet_comment.go index ceefef4..f1a878a 100644 --- a/model_snippet_comment.go +++ b/model_snippet_comment.go @@ -10,7 +10,7 @@ package bitbucket type SnippetComment struct { - Type_ string `json:"type"` - Links *GroupLinks `json:"links,omitempty"` - Snippet *Snippet `json:"snippet,omitempty"` + Type_ string `json:"type"` + Links *interface{} `json:"links,omitempty"` + Snippet *Snippet `json:"snippet,omitempty"` } diff --git a/model_snippet_commit.go b/model_snippet_commit.go index 065783c..f56f224 100644 --- a/model_snippet_commit.go +++ b/model_snippet_commit.go @@ -14,12 +14,12 @@ import ( ) type SnippetCommit struct { - Hash string `json:"hash,omitempty"` - Date time.Time `json:"date,omitempty"` - Author *Author `json:"author,omitempty"` - Message string `json:"message,omitempty"` - Summary *RenderedPullRequestMarkupTitle `json:"summary,omitempty"` - Parents []BaseCommit `json:"parents,omitempty"` - Links *SnippetCommitLinks `json:"links,omitempty"` - Snippet *Snippet `json:"snippet,omitempty"` + Hash string `json:"hash,omitempty"` + Date time.Time `json:"date,omitempty"` + Author *Author `json:"author,omitempty"` + Message string `json:"message,omitempty"` + Summary *interface{} `json:"summary,omitempty"` + Parents []BaseCommit `json:"parents,omitempty"` + Links *interface{} `json:"links,omitempty"` + Snippet *Snippet `json:"snippet,omitempty"` } diff --git a/model_ssh_account_key.go b/model_ssh_account_key.go index 4df8d43..3a717ca 100644 --- a/model_ssh_account_key.go +++ b/model_ssh_account_key.go @@ -21,9 +21,9 @@ type SshAccountKey struct { // The comment parsed from the SSH key (if present) Comment string `json:"comment,omitempty"` // The user-defined label for the SSH key - Label string `json:"label,omitempty"` - CreatedOn time.Time `json:"created_on,omitempty"` - LastUsed time.Time `json:"last_used,omitempty"` - Links *VersionLinks `json:"links,omitempty"` - Owner *Account `json:"owner,omitempty"` + Label string `json:"label,omitempty"` + CreatedOn time.Time `json:"created_on,omitempty"` + LastUsed time.Time `json:"last_used,omitempty"` + Links *interface{} `json:"links,omitempty"` + Owner *Account `json:"owner,omitempty"` } diff --git a/model_ssh_key.go b/model_ssh_key.go index ad93ec2..afd9762 100644 --- a/model_ssh_key.go +++ b/model_ssh_key.go @@ -22,8 +22,8 @@ type SshKey struct { // The comment parsed from the SSH key (if present) Comment string `json:"comment,omitempty"` // The user-defined label for the SSH key - Label string `json:"label,omitempty"` - CreatedOn time.Time `json:"created_on,omitempty"` - LastUsed time.Time `json:"last_used,omitempty"` - Links *VersionLinks `json:"links,omitempty"` + Label string `json:"label,omitempty"` + CreatedOn time.Time `json:"created_on,omitempty"` + LastUsed time.Time `json:"last_used,omitempty"` + Links *interface{} `json:"links,omitempty"` } diff --git a/model_tag.go b/model_tag.go index e36dd7a..96e5cd4 100644 --- a/model_tag.go +++ b/model_tag.go @@ -14,8 +14,8 @@ import ( ) type Tag struct { - Type_ string `json:"type"` - Links *RefLinks `json:"links,omitempty"` + Type_ string `json:"type"` + Links *interface{} `json:"links,omitempty"` // The name of the ref. Name string `json:"name,omitempty"` Target *Commit `json:"target,omitempty"` diff --git a/model_version.go b/model_version.go index 4e9ad84..1311cf4 100644 --- a/model_version.go +++ b/model_version.go @@ -10,8 +10,8 @@ package bitbucket type Version struct { - Type_ string `json:"type"` - Links *VersionLinks `json:"links,omitempty"` - Name string `json:"name,omitempty"` - Id int32 `json:"id,omitempty"` + Type_ string `json:"type"` + Links *interface{} `json:"links,omitempty"` + Name string `json:"name,omitempty"` + Id int32 `json:"id,omitempty"` } diff --git a/model_workspace.go b/model_workspace.go index 6e4ac5e..169528d 100644 --- a/model_workspace.go +++ b/model_workspace.go @@ -14,8 +14,8 @@ import ( ) type Workspace struct { - Type_ string `json:"type"` - Links *WorkspaceLinks `json:"links,omitempty"` + Type_ string `json:"type"` + Links *interface{} `json:"links,omitempty"` // The workspace's immutable id. Uuid string `json:"uuid,omitempty"` // The name of the workspace. diff --git a/model_workspace_membership.go b/model_workspace_membership.go index 74fadc8..e769ebe 100644 --- a/model_workspace_membership.go +++ b/model_workspace_membership.go @@ -10,8 +10,8 @@ package bitbucket type WorkspaceMembership struct { - Type_ string `json:"type"` - Links *VersionLinks `json:"links,omitempty"` - User *Account `json:"user,omitempty"` - Workspace *Workspace `json:"workspace,omitempty"` + Type_ string `json:"type"` + Links *interface{} `json:"links,omitempty"` + User *Account `json:"user,omitempty"` + Workspace *Workspace `json:"workspace,omitempty"` }