WebService::BitbucketServer::Branch::V1 - Bindings for a Bitbucket Server REST API
version 0.605
my $stash = WebService::BitbucketServer->new( base_url => 'https://stash.example.com/', username => 'bob', password => 'secret', ); my $api = $stash->branch;
This is a Bitbucket Server REST API for Branch::V1.
Original API documentation created by and copyright Atlassian.
Get the instance of WebService::BitbucketServer passed to "new".
$api = WebService::BitbucketServer::Branch::V1->new(context => $webservice_bitbucketserver_obj);
Create a new API.
Normally you would use $webservice_bitbucketserver_obj->branch instead.
$webservice_bitbucketserver_obj->branch
Creates a branch in the specified repository.
The authenticated user must have an effective REPO_WRITE permission to call this resource. If branch permissions are set up in the repository, the authenticated user must also have access to the branch name that is to be created.
POST branch-utils/1.0/projects/{projectKey}/repos/{repositorySlug}/branches
Responses:
201 - data, type: application/json
201
a JSON representation of the newly created branch
400 - errors, type: application/json
400
the branch was not created because the request was invalid, e.g. the provided ref name already existed in the repository, or was not a valid ref name in the repository
401 - errors, type: application/json
401
The currently authenticated user has insufficient permissions to create a branch. This could be due to insufficient repository permissions, or lack of branch permission for the provided ref name
Deletes a branch in the specified repository.
If the branch does not exist, this operation will not raise an error. In other words after calling this resource and receiving a 204 response the branch provided in the request is guaranteed to not exist in the specified repository any more, regardless of its existence beforehand.
The optional 'endPoint' parameter of the request may contain a commit ID that the provided ref name is expected to point to. Should the ref point to a different commit ID, a 400 response will be returned with appropriate error details.
The authenticated user must have an effective REPO_WRITE permission to call this resource. If branch permissions are set up in the repository, the authenticated user must also have access to the branch name that is to be deleted.
DELETE branch-utils/1.0/projects/{projectKey}/repos/{repositorySlug}/branches
the branch was not deleted because the request was invalid, e.g. no ref name to delete was provided, or the provided ref name points to the default branch in the repository that cannot be deleted
The currently authenticated user has insufficient permissions to delete a branch. This could be due to insufficient repository permissions, or lack of branch permission for the provided ref name.
204 - data, type: unknown
204
an empty response indicating that the branch no longer exists in the repository
Gets the branch information associated with a single commit from a given repository.
GET branch-utils/1.0/projects/{projectKey}/repos/{repositorySlug}/branches/info/{commitId}
Parameters:
commitId - string, default: none
commitId
full SHA1 of the commit (ex: e00cf62997a027bbf785614a93e2e55bb331d268)
e00cf62997a027bbf785614a93e2e55bb331d268
200 - data, type: application/json
200
a page of branch refs associated with the commit
500 - errors, type: application/json
500
The request has timed out processing the branch request
Get the {@link BranchModel} associated with the repository.
The authenticated user must have the REPO_READ (or higher) permission for the specified repository to call this resource.
GET branch-utils/1.0/projects/{projectKey}/repos/{repositorySlug}/branchmodel
The branch model associated with the specified repository.
The currently authenticated user does not have sufficient permission (REPO_READ) to query the branch model of the repository.
409 - errors, type: application/json
409
The specified repository is empty - the branch model cannot be constructed
WebService::BitbucketServer
https://developer.atlassian.com/bitbucket/server/docs/latest/
Please report any bugs or feature requests on the bugtracker website https://github.com/chazmcgarvey/WebService-BitbucketServer/issues
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
Charles McGarvey <chazmcgarvey@brokenzipper.com>
This software is copyright (c) 2018 by Charles McGarvey.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install WebService::BitbucketServer, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::BitbucketServer
CPAN shell
perl -MCPAN -e shell install WebService::BitbucketServer
For more information on module installation, please visit the detailed CPAN module installation guide.