Connection and authentication options
Searches for code across all repositories visible to the authenticated
user, using Bitbucket's search query syntax (e.g.
'jwt project:PROJ ext:ts').
POST /rest/search/latest/search
The search query
Optionalparams: CodeSearchParamsOptional paging for the code results: start, limit
The search result, with code hits under code.values
This is an internal Bitbucket UI endpoint, not part of Atlassian's public REST API specification. It may change or disappear between Bitbucket versions. The response is typed defensively — see CodeSearchResult.
Creates a new project.
POST /rest/api/latest/projects
Requires global PROJECT_CREATE permission.
The project to create: key, name, and optionally description and avatar
The created project
Fetches the currently authenticated user.
Bitbucket Data Center has no documented "whoami" endpoint, so this method
resolves the username from the X-AUSERNAME header that Bitbucket attaches
to every authenticated response, and then looks the user up via
GET /rest/api/latest/users?filter={username} (two requests).
The authenticated user object
Fetches pull requests across all repositories where the authenticated user participates (as author, reviewer, etc.).
GET /rest/api/latest/dashboard/pull-requests
Optionalparams: DashboardPullRequestsParamsOptional filters: state, role, participantStatus, closedSince, limit, start
A paged response of pull requests
Fetches the names of all groups visible to the authenticated user.
GET /rest/api/latest/groups
Optionalparams: GroupsParamsOptional filters: filter (group name prefix), limit, start
A paged response of group names (plain strings)
Fetches pull requests that require the authenticated user's attention (e.g. awaiting their review, or theirs and blocked/needing changes).
GET /rest/api/latest/inbox/pull-requests
Optionalparams: InboxPullRequestsParamsOptional filters: role, filterText, limit, start
A paged response of pull requests
Fetches the count of pull requests in the authenticated user's inbox.
GET /rest/api/latest/inbox/pull-requests/count
Optionalparams: Pick<InboxPullRequestsParams, "role" | "filterText">Optional filters: role, filterText
The inbox pull request count
Renders a preview of the given markup (e.g. Markdown) as HTML.
POST /rest/api/latest/markup/preview
The markup is sent as the raw request body (not JSON-encoded).
The raw markup to render
Optionalparams: MarkupPreviewParamsOptional rendering options: urlMode, htmlEscape, includeHeadingId, hardwrap
The rendered HTML
Fetches email notification preferences for the authenticated user.
GET /rest/notification/1.0/settings
Pull request author and watcher subscription groups
Subscribes to a client event.
Returns a ProjectResource for a given project key, providing access to project-level data and sub-resources.
The returned resource can be awaited directly to fetch project info, or chained to access nested resources.
The project key (e.g., 'PROJ')
A chainable project resource
Fetches all projects accessible to the authenticated user.
GET /rest/api/latest/projects
Optionalparams: ProjectsParamsOptional filters: limit, start, name, permission
An array of projects
Fetches pull request suggestions for the authenticated user, based on their recent pushes to branches without an open pull request.
GET /rest/api/latest/dashboard/pull-request-suggestions
Optionalparams: PullRequestSuggestionsParamsOptional filters: changesSince (elapsed seconds before now), limit
A paged response of pull request suggestions
Fetches repositories across all projects, mapping the documented
GET /rest/api/latest/repos parameters 1:1 (no transformation is applied).
The response is paginated (isLastPage, nextPageStart, values[]) and
every repository embeds its project, so results spanning several projects
can be filtered or grouped client-side by project.key.
Note that projectname matches the project name partially and
case-insensitively (not its key); when syncing across projects prefer
projectkey or validate project.key on each result.
Optionalparams: GlobalReposParamsOptional filters: name, projectkey, projectname, permission, visibility, state, archived, limit, start
A paged response of repositories
Searches for repositories across all projects.
GET /rest/api/latest/repos
The name parameter is automatically prefixed with % to perform a
contains-style match rather than a prefix match. For a 1:1 mapping of the
documented endpoint parameters use BitbucketClient.repos instead.
Optionalparams: SearchReposParamsOptional filters: name, projectkey, projectname, permission, visibility, state, limit, start
A paged response of repositories
Updates email notification preferences for the authenticated user.
PUT /rest/notification/1.0/settings
Author and/or watcher subscription groups
The updated notification settings
Returns a UserResource for a given user slug, providing access to user data.
The returned resource can be awaited directly to fetch user info.
The user slug (e.g., 'pilmee')
A chainable user resource
Fetches all users accessible to the authenticated user.
GET /rest/api/latest/users
Optionalparams: UsersParamsOptional filters: limit, start, filter
An array of users
Main entry point for the Bitbucket Data Center REST API client.
Example