Update a repository
Since this endpoint can be used to both update and to create a repository, the request body depends on the intent.
Creation
See the POST documentation for the repository endpoint for an example of the request body.
Update
Note: Changing the name of the repository will cause the location to
be changed. This is because the URL of the repo is derived from the
name (a process called slugification). In such a scenario, it is
possible for the request to fail if the newly created slug conflicts
with an existing repository’s slug. But if there is no conflict,
the new location will be returned in the Location header of the
response.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.
This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: {workspace UUID}.
Request Body
Section titled “ Request Body ”The repository that is to be updated.
Note that the elements “owner” and “full_name” are ignored since the URL implies them.
object
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
The repository’s immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.
The concatenation of the repository owner’s username and the slugified name, e.g. “evzijst/interruptingcow”. This is the same string used in Bitbucket URLs.
object
Links related to an Account.
object
A link to a resource related to this object.
object
The issue tracker for this repository is enabled. Issue Tracker features are not supported for repositories in workspaces administered through admin.atlassian.com.
The wiki for this repository is enabled. Wiki features are not supported for repositories in workspaces administered through admin.atlassian.com.
Controls the rules for forking this repository.
- allow_forks: unrestricted forking
- no_public_forks: restrict forking to private forks (forks cannot be made public later)
- no_forks: deny all forking
object
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
The project’s immutable id.
The project’s key.
object
Links related to an Account.
object
A link to a resource related to this object.
object
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
The name of the project.
Indicates whether the project is publicly accessible, or whether it is private to the team and consequently only visible to team members. Note that private projects cannot contain public repositories.
Indicates whether the project contains publicly visible repositories. Note that private projects cannot contain public repositories.
object
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
The name of the ref.
object
object
The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.
object
Links related to an Account.
object
A link to a resource related to this object.
object
object
The raw committer value from the repository. This may be the only value available if the committer does not match a user in Bitbucket.
object
Links related to an Account.
object
A link to a resource related to this object.
object
object
The text as it was typed by a user.
The type of markup language the raw content is to be interpreted in.
The user’s content rendered as HTML.
object
object
Links related to an Account.
object
A link to a resource related to this object.
object
The ISO8601 timestamp of the participant’s action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented.
Available merge strategies for pull requests targeting this branch.
The default merge strategy for pull requests targeting this branch.
Responses
Section titled “ Responses ”The existing repository has been updated
object
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
The repository’s immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.
The concatenation of the repository owner’s username and the slugified name, e.g. “evzijst/interruptingcow”. This is the same string used in Bitbucket URLs.
object
Links related to an Account.
object
A link to a resource related to this object.
object
The issue tracker for this repository is enabled. Issue Tracker features are not supported for repositories in workspaces administered through admin.atlassian.com.
The wiki for this repository is enabled. Wiki features are not supported for repositories in workspaces administered through admin.atlassian.com.
Controls the rules for forking this repository.
- allow_forks: unrestricted forking
- no_public_forks: restrict forking to private forks (forks cannot be made public later)
- no_forks: deny all forking
object
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
The project’s immutable id.
The project’s key.
object
Links related to an Account.
object
A link to a resource related to this object.
object
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
The name of the project.
Indicates whether the project is publicly accessible, or whether it is private to the team and consequently only visible to team members. Note that private projects cannot contain public repositories.
Indicates whether the project contains publicly visible repositories. Note that private projects cannot contain public repositories.
object
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
The name of the ref.
object
object
The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.
object
Links related to an Account.
object
A link to a resource related to this object.
object
object
The raw committer value from the repository. This may be the only value available if the committer does not match a user in Bitbucket.
object
Links related to an Account.
object
A link to a resource related to this object.
object
object
The text as it was typed by a user.
The type of markup language the raw content is to be interpreted in.
The user’s content rendered as HTML.
object
object
Links related to an Account.
object
A link to a resource related to this object.
object
The ISO8601 timestamp of the participant’s action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented.
Available merge strategies for pull requests targeting this branch.
The default merge strategy for pull requests targeting this branch.
Example
{ "scm": "git", "fork_policy": "allow_forks", "mainbranch": { "target": { "summary": { "markup": "markdown" }, "participants": [ { "role": "PARTICIPANT", "state": "approved" } ] }, "merge_strategies": [ "merge_commit" ] }}Headers
Section titled “ Headers ”The location of the repository. This header is only provided when the repository’s name is changed.
A new repository has been created
object
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
The repository’s immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.
The concatenation of the repository owner’s username and the slugified name, e.g. “evzijst/interruptingcow”. This is the same string used in Bitbucket URLs.
object
Links related to an Account.
object
A link to a resource related to this object.
object
The issue tracker for this repository is enabled. Issue Tracker features are not supported for repositories in workspaces administered through admin.atlassian.com.
The wiki for this repository is enabled. Wiki features are not supported for repositories in workspaces administered through admin.atlassian.com.
Controls the rules for forking this repository.
- allow_forks: unrestricted forking
- no_public_forks: restrict forking to private forks (forks cannot be made public later)
- no_forks: deny all forking
object
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
The project’s immutable id.
The project’s key.
object
Links related to an Account.
object
A link to a resource related to this object.
object
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
The name of the project.
Indicates whether the project is publicly accessible, or whether it is private to the team and consequently only visible to team members. Note that private projects cannot contain public repositories.
Indicates whether the project contains publicly visible repositories. Note that private projects cannot contain public repositories.
object
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
The name of the ref.
object
object
The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.
object
Links related to an Account.
object
A link to a resource related to this object.
object
object
The raw committer value from the repository. This may be the only value available if the committer does not match a user in Bitbucket.
object
Links related to an Account.
object
A link to a resource related to this object.
object
object
The text as it was typed by a user.
The type of markup language the raw content is to be interpreted in.
The user’s content rendered as HTML.
object
object
Links related to an Account.
object
A link to a resource related to this object.
object
The ISO8601 timestamp of the participant’s action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented.
Available merge strategies for pull requests targeting this branch.
The default merge strategy for pull requests targeting this branch.
Example
{ "scm": "git", "fork_policy": "allow_forks", "mainbranch": { "target": { "summary": { "markup": "markdown" }, "participants": [ { "role": "PARTICIPANT", "state": "approved" } ] }, "merge_strategies": [ "merge_commit" ] }}Headers
Section titled “ Headers ”The location of the newly created repository
If the input document was invalid, or if the caller lacks the privilege to create repositories under the targeted account.
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 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": {} }}