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.
string
Requiredstring
Requiredboolean
string
string
object
JSON representation of the newly created branch
1
2
3
4
5
6
7
8
9
curl --request POST \
--url 'http://{baseurl}/rest/branch-utils/latest/projects/{projectKey}/repos/{repositorySlug}/branches' \
--header 'Accept: application/json;charset=UTF-8' \
--header 'Content-Type: application/json' \
--data '{
"empty": true,
"name": "<string>",
"startPoint": "<string>"
}'
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.
string
Requiredstring
Requiredboolean
boolean
string
string
object
An empty response indicating that the branch no longer exists in the repository
1
2
3
4
5
6
7
8
9
curl --request DELETE \
--url 'http://{baseurl}/rest/branch-utils/latest/projects/{projectKey}/repos/{repositorySlug}/branches' \
--header 'Content-Type: application/json' \
--data '{
"dryRun": true,
"empty": true,
"endPoint": "<string>",
"name": "<string>"
}'
Gets the branch information associated with a single commit from a given repository.
string
Requiredstring
Requiredstring
Requiredinteger
integer
a page of branch refs associated with the commit
Page of refs
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/branch-utils/latest/projects/{projectKey}/repos/{repositorySlug}/branches/info/{commitId}' \
--header 'Accept: application/json;charset=UTF-8'
Rate this page: