Optionaloptions: FilterAndSortOptions & PartialResponseOptionsOptionaloptions: FilterAndSortOptions & PartialResponseOptionsOptionaloptions: FilterAndSortOptions & PartialResponseOptionsThe workspace slug or UUID.
The repository slug.
A branch name, tag, or commit hash. This is one path
segment. A branch name that contains / has to be that branch's commit
hash, because the source API reads only the first segment as the commit.
The directory path from the repository root.
Optionaloptions: FilterAndSortOptions & PartialResponseOptionsReturns whether a file exists at filePath on commit.
Calls GET /2.0/repositories/{workspace}/{repo_slug}/src/{commit}/{path}?format=meta.
A missing path answers 404 and this method returns false. A directory
at that path also returns false.
The workspace slug or UUID.
The repository slug.
A branch name, tag, or commit hash. This is one path
segment. A branch name that contains / has to be that branch's commit
hash, because the source API reads only the first segment as the commit.
The file path from the repository root.
Optionaloptions: FilterAndSortOptions & PartialResponseOptionsOptionalpagelen: numberBitbucket Cloud removes the endpoint
GET /2.0/workspaces/{workspace}/search/code on 2026-11-15.
Use BitbucketCloudClient.searchWorkspaceCode instead.
Searches code in all repositories of a workspace with the endpoint
POST /2.0/workspaces/{workspace}/codesearch, and yields each page of
results.
The endpoint needs a credential that identifies a user, with the scopes
read:repository:bitbucket and read:workspace:bitbucket.
Bitbucket Cloud rejects app passwords, legacy OAuth consumers, and API
keys for this endpoint with BitbucketCloudApiError status 403.
An API token without read:workspace:bitbucket is rejected with the same
status. Adding that scope makes workspace code search available again.
The workspace slug or UUID.
The search term and the optional filters.
Optionaloptions: { maxResults?: number }
maxResults sets the number of results per page (1 to 100).
Staticfrom
Lists the files and directories inside one directory.
Calls
GET /2.0/repositories/{workspace}/{repo_slug}/src/{commit}/{path}and followsnext. The repository root is an emptydirectoryPath; the source API requires a trailing slash for that listing. A missing path yields no entries.