Get the branching model for a project
Return the branching model set at the project level. This view is read-only. The branching model settings can be changed using the settings API.
The returned object:
- Always has a
developmentproperty.development.nameis the user-specified branch that can be inherited by an individual repository’s branching model. - Might have a
productionproperty.productionwill not be present whenproductionis disabled.production.nameis the user-specified branch that can be inherited by an individual repository’s branching model. - Always has a
branch_typesarray which contains all enabled branch types.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The project in question. This is the actual key assigned
to the project.
This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: {workspace UUID}.
Responses
Section titled “ Responses ”The branching model object
object
The active branch types.
object
The kind of branch.
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.
object
Name of the target branch. If inherited by a repository, it will default to the main branch if the specified branch does not exist.
Indicates if the setting points at an explicit branch (false) or tracks the main branch (true).
object
Name of the target branch. If inherited by a repository, it will default to the main branch if the specified branch does not exist.
Indicates if the setting points at an explicit branch (false) or tracks the main branch (true).
Examples
{ "development": { "name": "master", "use_mainbranch": true }, "production": { "name": "production", "use_mainbranch": false }, "branch_types": [ { "kind": "release", "prefix": "release/" }, { "kind": "hotfix", "prefix": "hotfix/" }, { "kind": "feature", "prefix": "feature/" }, { "kind": "bugfix", "prefix": "bugfix/" } ], "type": "project_branching_model", "links": { "self": { "href": "https://api.bitbucket.org/.../branching-model" } }}If the request was not authenticated
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.
object
object
Optional structured data that is endpoint-specific.
object
Example generated
{ "type": "example", "error": { "message": "example", "detail": "example", "data": {} }}If the authenticated user does not have read access to the project
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.
object
object
Optional structured data that is endpoint-specific.
object
Example generated
{ "type": "example", "error": { "message": "example", "detail": "example", "data": {} }}If the project does not exist
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.
object
object
Optional structured data that is endpoint-specific.
object
Example generated
{ "type": "example", "error": { "message": "example", "detail": "example", "data": {} }}