Skip to main content
PATCH
Update Repository Settings

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

repo_name
string
required

Repository name. Names that contain / or any other character that is not safe in a URL path segment must be URL encoded so the value occupies a single path segment. For example pierre/example is sent as pierre%2Fexample. Plain names such as example can be sent as-is. The server URL-decodes the value before resolving the repository.

Body

application/json

Repository settings to change. default_branch is the only supported field and must be a non-empty branch name.

Repository settings to patch, such as the default branch.

default_branch
string

New default branch name for the Code Storage repository.

Example:

"main"

Response

Default branch updated. Returns the repository ID, its URL path, and the branch name now recorded as the default.

Repository state after applying the patch.

default_branch
string
required

Updated default branch name.

Example:

"main"

id
string
required

Internal repository ID.

Example:

"repo_7f2b3d9"

url
string
required

Repository URL path. Matches the JWT repo claim.

Example:

"pierre/sdk-documentation"