Get the branching model config for a project
Return the branching model configuration for a project. The returned object:
- Always has a
developmentproperty for the development branch. - Always a
productionproperty for the production branch. The production branch can be disabled. - The
branch_typescontains all the branch types. default_branch_deletionindicates whether branches will be deleted by default on merge.
This is the raw configuration for the branching model. A client wishing to see the branching model with its actual current branches may find the active model API more useful.
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 configuration
object
object
A link to a resource related to this object.
object
object
Whether the branch type is enabled or not. A disabled branch type may contain an invalid prefix.
The kind of the branch type.
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.
object
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.
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.
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.
object
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.
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.
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.
Indicates if branch is enabled or not.
Examples
{ "development": { "name": "null", "use_mainbranch": true }, "production": { "name": "production", "use_mainbranch": false, "enabled": false }, "branch_types": [ { "kind": "release", "enabled": true, "prefix": "release/" }, { "kind": "hotfix", "enabled": true, "prefix": "hotfix/" }, { "kind": "feature", "enabled": true, "prefix": "feature/" }, { "kind": "bugfix", "enabled": false, "prefix": "bugfix/" } ], "type": "branching_model_settings", "links": { "self": { "href": "https://api.bitbucket.org/.../branching-model/settings" } }, "default_branch_deletion": "false"}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 admin 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": {} }}