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
Returns a CommitResource for a given commit SHA, providing access to commit data and sub-resources (changes, diff).
The returned resource can be awaited directly to fetch commit info, or chained to access nested resources.
The commit SHA (e.g., 'abc123def456')
A chainable commit resource
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 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
An array 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 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: null | (value: BitbucketRepository) => TResult1 | PromiseLike<TResult1>Optionalonrejected: null | (reason: unknown) => TResult2 | PromiseLike<TResult2>Fetches 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