Fetches this project's auto-decline settings (automatic declining of inactive pull requests).
GET /rest/api/latest/projects/{key}/settings/auto-decline
The effective auto-decline settings
Fetches this project's pull request auto-merge settings.
GET /rest/api/latest/projects/{key}/settings/auto-merge
The effective auto-merge settings
Fetches a single ref restriction by id.
GET /rest/branch-permissions/latest/projects/{key}/restrictions/{id}
The restriction's numeric id
The restriction
Fetches the ref restrictions (branch permissions) configured on this project.
GET /rest/branch-permissions/latest/projects/{key}/restrictions
Optionalparams: RefRestrictionsParamsOptional filters: limit, start, matcherType, matcherId, type
A paged response of restrictions
Creates a ref restriction (branch permission) on this project.
POST /rest/branch-permissions/latest/projects/{key}/restrictions
type, matcher, and optional userSlugs/groupNames/accessKeyIds exemptions
The created restriction
Creates a default reviewer condition on this project.
POST /rest/default-reviewers/latest/projects/{key}/condition
sourceMatcher, targetMatcher, reviewers/reviewerGroups, requiredApprovals
The created condition
Creates a default task on this project.
POST /rest/default-tasks/latest/projects/{key}/tasks
description, plus optional sourceMatcher/targetMatcher
The created task
Creates a repository in this project.
POST /rest/api/latest/projects/{key}/repos
name, plus optional scmId, slug, defaultBranch, description,
forkable, and public
The created repository
Creates a reviewer group on this project.
POST /rest/api/latest/projects/{key}/settings/reviewer-groups
name, plus optional description and users
The created reviewer group
Creates a webhook on this project.
POST /rest/api/latest/projects/{key}/webhooks
name, events, and url, plus optional active, sslVerificationRequired,
configuration, and credentials
The created webhook
Fetches the default reviewer conditions configured on this project.
GET /rest/default-reviewers/latest/projects/{key}/conditions
An array of conditions (not paged)
Fetches the default tasks configured on this project.
GET /rest/default-tasks/latest/projects/{key}/tasks
Optionalparams: DefaultTasksParamsOptional limit, start, and markup ('true' to render HTML)
A paged response of default tasks
Deletes this project.
DELETE /rest/api/latest/projects/{key}
Deletes all default tasks from this project.
DELETE /rest/default-tasks/latest/projects/{key}/tasks
Deletes this project's auto-decline settings, falling back to the instance-level default.
DELETE /rest/api/latest/projects/{key}/settings/auto-decline
Deletes this project's pull request auto-merge settings, falling back to the instance-level default.
DELETE /rest/api/latest/projects/{key}/settings/auto-merge
Deletes a ref restriction from this project.
DELETE /rest/branch-permissions/latest/projects/{key}/restrictions/{id}
The restriction's numeric id
Deletes a default reviewer condition from this project.
DELETE /rest/default-reviewers/latest/projects/{key}/condition/{id}
The condition's numeric id
Deletes a default task from this project.
DELETE /rest/default-tasks/latest/projects/{key}/tasks/{taskId}
The task's numeric id
Deletes a reviewer group from this project.
DELETE /rest/api/latest/projects/{key}/settings/reviewer-groups/{id}
The reviewer group's numeric id
Deletes a webhook from this project.
DELETE /rest/api/latest/projects/{key}/webhooks/{webhookId}
The webhook's numeric id
Disables a repository hook on this project.
DELETE /rest/api/latest/projects/{key}/settings/hooks/{hookKey}/enabled
The hook's module key
The updated hook state
Enables a repository hook on this project.
PUT /rest/api/latest/projects/{key}/settings/hooks/{hookKey}/enabled
The hook's module key
The updated hook state
Fetches the project details.
GET /rest/api/latest/projects/{key}
The project object
Fetches groups with explicit permissions on this project.
GET /rest/api/latest/projects/{key}/permissions/groups
Optionalparams: ProjectGroupsParamsOptional filters: limit, start, filter, permission
A paged response of group–permission pairs
Fetches a single repository hook by its module key.
GET /rest/api/latest/projects/{key}/settings/hooks/{hookKey}
The hook's module key
The hook and its state at this project's scope
Fetches the repository hooks available on this project and their state.
GET /rest/api/latest/projects/{key}/settings/hooks
Optionalparams: HooksParamsOptional filters: limit, start, type
A paged response of hooks
Fetches the settings stored for a repository hook on this project.
GET /rest/api/latest/projects/{key}/settings/hooks/{hookKey}/settings
The hook's module key
The hook's settings (shape defined by the hook itself)
Revokes all of a group's permissions on this project.
DELETE /rest/api/latest/projects/{key}/permissions/groups?name={name}
The group's name
Revokes all of a user's permissions on this project.
DELETE /rest/api/latest/projects/{key}/permissions/users?name={name}
The user's username/slug
Returns a RepositoryResource for a given repository slug, providing access to repository-level data and sub-resources (pull requests, commits, etc.).
The returned resource can be awaited directly to fetch repository info, or chained to access nested resources.
The repository slug (e.g., 'my-repo')
A chainable repository resource
Fetches repositories belonging to this project.
GET /rest/api/latest/projects/{key}/repos
Optionalparams: ReposParamsOptional filters: limit, start, slug, name, permission
An array of repositories
Fetches a single reviewer group by id.
GET /rest/api/latest/projects/{key}/settings/reviewer-groups/{id}
The reviewer group's numeric id
The reviewer group
Fetches the reviewer groups configured on this project.
GET /rest/api/latest/projects/{key}/settings/reviewer-groups
Optionalparams: PaginationParamsOptional limit and start
A paged response of reviewer groups
Searches direct and implied permissions of users and groups on this project. Returns a superset of the results returned by ProjectResource.users and ProjectResource.groups, as it includes entities with implied (e.g. global or admin) permissions.
GET /rest/api/latest/projects/{key}/permissions/search
Optionalparams: PermissionSearchParamsOptional filters: permission (one or many), filterText, type
A paged response of permitted users/groups
Atlassian does not publish a response schema for this endpoint; the entry shape is typed defensively — see PermittedEntity.
Grants or changes a group's permission level on this project.
PUT /rest/api/latest/projects/{key}/permissions/groups?name={name}&permission={permission}
The group's name
'PROJECT_READ', 'PROJECT_WRITE', or 'PROJECT_ADMIN'
Grants or changes a user's permission level on this project.
PUT /rest/api/latest/projects/{key}/permissions/users?name={name}&permission={permission}
The user's username/slug
'PROJECT_READ', 'PROJECT_WRITE', or 'PROJECT_ADMIN'
Tests connectivity to a webhook target, either an existing webhook (webhookId) or a
candidate URL (url) before creating one.
POST /rest/api/latest/projects/{key}/webhooks/test
webhookId or url (query), sslVerificationRequired (query), and optional
username/password Basic auth credentials (body)
The result of the connectivity test
Allows the resource to be awaited directly, resolving with the project info. Delegates to ProjectResource.get.
Optionalonfulfilled: ((value: BitbucketProject) => TResult1 | PromiseLike<TResult1>) | nullOptionalonrejected: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | nullUpdates this project's avatar (and, nominally, its key).
PUT /rest/api/latest/projects/{key}
Fields to change; only supplied fields are updated
The updated project
name, public, and type are read-only on this endpoint and
cannot be changed here — see UpdateProjectData.
Creates or updates this project's auto-decline settings.
PUT /rest/api/latest/projects/{key}/settings/auto-decline
enabled and/or inactivityWeeks (1, 2, 4, 8, or 12)
The updated settings
Creates or updates this project's pull request auto-merge settings.
PUT /rest/api/latest/projects/{key}/settings/auto-merge
enabled and/or restrictionAction
The updated settings
Updates a default reviewer condition on this project.
PUT /rest/default-reviewers/latest/projects/{key}/condition/{id}
The condition's numeric id
The full replacement condition definition
The updated condition
Updates a default task on this project.
PUT /rest/default-tasks/latest/projects/{key}/tasks/{taskId}
The task's numeric id
The full replacement task definition
The updated task
Replaces the settings stored for a repository hook on this project.
PUT /rest/api/latest/projects/{key}/settings/hooks/{hookKey}/settings
The hook's module key
The full replacement settings object
The stored settings
Updates a reviewer group on this project.
PUT /rest/api/latest/projects/{key}/settings/reviewer-groups/{id}
The reviewer group's numeric id
The full replacement group definition
The updated reviewer group
Updates a webhook on this project.
PUT /rest/api/latest/projects/{key}/webhooks/{webhookId}
The webhook's numeric id
The full replacement webhook definition
The updated webhook
Fetches users with explicit permissions on this project.
GET /rest/api/latest/projects/{key}/permissions/users
Optionalparams: ProjectUsersParamsOptional filters: limit, start, filter, permission
An array of user–permission pairs
Fetches webhooks configured on this project.
GET /rest/api/latest/projects/{key}/webhooks
Optionalparams: WebhooksParamsOptional filters: limit, start, event
A paged response of webhooks
Represents a Bitbucket project resource with chainable async methods.
Implements
PromiseLike<BitbucketProject>so it can be awaited directly to fetch the project info, while also exposing sub-resource methods.Example