Fetches branches for this repository.
GET /rest/api/latest/projects/{key}/repos/{slug}/branches
Optionalparams: BranchesParamsOptional filters: limit, start, filterText, orderBy, details, base, boostMatches
An array of branches
Browses the contents of a directory or file in this repository.
GET /rest/api/latest/projects/{key}/repos/{slug}/browse/{srcPath}
OptionalsrcPath: stringPath to browse (e.g., 'src' or 'src/index.ts'). Omit to browse the root.
Optionalparams: BrowseParamsOptional: at (branch/tag/commit), type, blame, noContent, limit, start
The browse response with path info and children
Fetches commits for this repository.
GET /rest/api/latest/projects/{key}/repos/{slug}/commits
Optionalparams: CommitsParamsOptional filters: limit, start, until, since, path, merges, followRenames, ignoreMissing
An array of commits
Fetches the default branch of this repository.
GET /rest/api/latest/projects/{key}/repos/{slug}/branches/default
The default branch object
Creates or updates a file in this repository.
PUT /rest/api/latest/projects/{key}/repos/{slug}/browse/{path}
Path to the file (e.g., 'src/index.ts')
File content, commit message, branch, and source commit ID
The commit created by this edit
Fetches the forks of this repository.
GET /rest/api/latest/projects/{key}/repos/{slug}/forks
Optionalparams: PaginationParamsOptional pagination: limit, start
A paged response of forked repositories
Fetches the repository details.
GET /rest/api/latest/projects/{key}/repos/{slug}
The repository object
Fetches the files last modified in this repository along with the commit that last touched each.
GET /rest/api/latest/projects/{key}/repos/{slug}/last-modified
Optionalparams: LastModifiedParamsOptional filters: limit, start, at
An array of last-modified entries
Fetches pull requests for this repository.
GET /rest/api/latest/projects/{key}/repos/{slug}/pull-requests
Optionalparams: PullRequestsParamsOptional filters: limit, start, state, direction, at, order
A paged response of pull requests
Fetches the raw content of a file in this repository.
GET /rest/api/latest/projects/{key}/repos/{slug}/raw/{path}
Path to the file (e.g., 'src/index.ts')
Optionalparams: RawFileParamsOptional: at (branch, tag, or commit SHA)
The raw file content as a string
Fetches the pull-request settings for this repository.
GET /rest/api/latest/projects/{key}/repos/{slug}/settings/pull-requests
The repository pull-request settings object
Fetches the size of this repository.
GET /rest/api/latest/projects/{key}/repos/{slug}/sizes
The repository size object
Fetches tags for this repository.
GET /rest/api/latest/projects/{key}/repos/{slug}/tags
Optionalparams: TagsParamsOptional filters: limit, start, filterText, orderBy
A paged response of tags
Fetches tags associated with a list of commits.
POST /rest/api/latest/projects/{key}/repos/{slug}/tags
Array of commit SHAs to look up tags for
Optionaloptions: { apiPath?: string }Optional overrides (e.g. apiPath to target a different API version)
A paged response of tags
Allows the resource to be awaited directly, resolving with the repository info. Delegates to RepositoryResource.get.
Optionalonfulfilled: ((value: BitbucketRepository) => TResult1 | PromiseLike<TResult1>) | nullOptionalonrejected: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | nullFetches webhooks configured on this repository.
GET /rest/api/latest/projects/{key}/repos/{slug}/webhooks/search
Optionalparams: WebhooksParamsOptional filters: limit, start, event
A paged response of webhooks
Represents a Bitbucket repository resource with chainable async methods.
Implements
PromiseLike<BitbucketRepository>so it can be awaited directly to fetch repository info, while also exposing sub-resource methods.Example