Repositories

Update a repository

Changed on

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.

put/repositories/{workspace}/{repo_slug}

Request

  • Base URL
    https://api.bitbucket.org/2.0
  • URL
    https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}
  • Auth
    • OAuth 2
      Authorization code: https://bitbucket.org/site/oauth2/authorize
      Token URL: https://bitbucket.org/site/oauth2/access_token scopes: repository:admin
    • or HTTP basic
    • or API key in header Authorization

Request body

typestring required
uuidstring

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.

full_namestring

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.

is_privateboolean
parentRepository circular
scm'git'
namestring
descriptionstring
created_onstring date-time
updated_onstring date-time
sizeinteger
languagestring
has_issuesboolean

The issue tracker for this repository is enabled. Issue Tracker features are not supported for repositories in workspaces administered through admin.atlassian.com.

has_wikiboolean

The wiki for this repository is enabled. Wiki features are not supported for repositories in workspaces administered through admin.atlassian.com.

fork_policy'allow_forks' | 'no_public_forks' | 'no_forks'

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

Response

The existing repository has been updated

typestring required
uuidstring

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.

full_namestring

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.

is_privateboolean
parentRepository circular
scm'git'
namestring
descriptionstring
created_onstring date-time
updated_onstring date-time
sizeinteger
languagestring
has_issuesboolean

The issue tracker for this repository is enabled. Issue Tracker features are not supported for repositories in workspaces administered through admin.atlassian.com.

has_wikiboolean

The wiki for this repository is enabled. Wiki features are not supported for repositories in workspaces administered through admin.atlassian.com.

fork_policy'allow_forks' | 'no_public_forks' | 'no_forks'

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

Changes

    • warning

      removed the request property /////////////

    • warning

      removed the request property //////////

    • warning

      removed the request property ///

    • warning

      removed the request property /////////

    • warning

      removed the optional property ///////////// from the response with the status

    • warning

      removed the optional property ///////////// from the response with the status

    • warning

      removed the optional property ////////// from the response with the status

    • warning

      removed the optional property ////////// from the response with the status

    • warning

      removed the optional property /// from the response with the status

    • warning

      removed the optional property /// from the response with the status

    • warning

      removed the optional property ///////// from the response with the status

    • warning

      removed the optional property ///////// from the response with the status

    • warning

      added the new rebase_fast_forward enum value to the //// response property for the response status

    • warning

      added the new rebase_fast_forward enum value to the //// response property for the response status

    • warning

      added the new rebase_merge enum value to the //// response property for the response status

    • warning

      added the new rebase_merge enum value to the //// response property for the response status

    • warning

      added the new squash_fast_forward enum value to the //// response property for the response status

    • warning

      added the new squash_fast_forward enum value to the //// response property for the response status

    • info

      added the new optional request property /////////

    • info

      added the new rebase_fast_forward enum value to the request property ////

    • info

      added the new rebase_merge enum value to the request property ////

    • info

      added the new squash_fast_forward enum value to the request property ////

    • info

      added the optional property ///////// to the response with the status

    • info

      added the optional property ///////// to the response with the status