POST

Post branch-utils latest projects {projectKey} repos {repositorySlug} branches

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.

Request

Path parameters

projectKey

string

Required
repositorySlug

string

Required

Request bodyapplication/json

empty

boolean

name

string

startPoint

string

Additional Properties

object

Responses

JSON representation of the newly created branch

application/json;charset=UTF-8

RestBranch
POST/branch-utils/latest/projects/{projectKey}/repos/{repositorySlug}/branches
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>" }'
DEL

Delete branch-utils latest projects {projectKey} repos {repositorySlug} branches

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.

Request

Path parameters

projectKey

string

Required
repositorySlug

string

Required

Request bodyapplication/json

dryRun

boolean

empty

boolean

endPoint

string

name

string

Additional Properties

object

Responses

An empty response indicating that the branch no longer exists in the repository

DEL/branch-utils/latest/projects/{projectKey}/repos/{repositorySlug}/branches
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>" }'
GET

Get branch-utils latest projects {projectKey} repos {repositorySlug} branches info {commitId}

Gets the branch information associated with a single commit from a given repository.

Request

Path parameters

projectKey

string

Required
repositorySlug

string

Required
commitId

string

Required

Query parameters

limit

integer

start

integer

Responses

a page of branch refs associated with the commit

application/json;charset=UTF-8

PageOfRefs

Page of refs

GET/branch-utils/latest/projects/{projectKey}/repos/{repositorySlug}/branches/info/{commitId}
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: