Fetches a single HTTP access token by id.
GET /rest/access-tokens/latest/users/{slug}/{tokenId}
The token id
The access token metadata (without the raw token secret)
Fetches the HTTP access tokens associated with this user.
GET /rest/access-tokens/latest/users/{slug}
Optionalparams: PaginationParamsOptional pagination: limit, start
A paged response of access tokens (without the raw token secrets)
Adds a GPG key to this user's account.
POST /rest/gpg/latest/keys?user={slug}
Adding a key to another user's account requires admin permission.
The key to add: text (the ASCII-armored public key)
The created GPG key
Adds an SSH key to this user's account.
POST /rest/ssh/latest/keys?user={slug}
Adding a key to another user's account requires admin permission.
The key to add: text, and optionally label and expiryDays
The created SSH key
Creates an HTTP access token for this user.
PUT /rest/access-tokens/latest/users/{slug} — note that, unusually,
this endpoint creates with PUT (and updates with POST).
The response is the only place the raw token secret is ever returned —
store it immediately, it cannot be retrieved again.
The token to create: name, permissions, and optionally expiryDays
The created token, including the raw token secret
Revokes an HTTP access token.
DELETE /rest/access-tokens/latest/users/{slug}/{tokenId}
The token id
Deletes a GPG key.
DELETE /rest/gpg/latest/keys/{fingerprintOrId}
The key's fingerprint or id (see UserResource.gpgKeys)
Deletes an SSH key.
DELETE /rest/ssh/latest/keys/{keyId}
The id of the key to delete (see UserResource.sshKeys)
Fetches the user details.
GET /rest/api/latest/users/{slug}
The user object
Fetches the GPG keys associated with this user.
GET /rest/gpg/latest/keys?user={slug}
Optionalparams: PaginationParamsOptional pagination: limit, start
A paged response of GPG keys
Returns a RepositoryResource for a given repository slug under this user,
providing access to all repository sub-resources including raw, commits, branches, etc.
The repository slug
A chainable repository resource
Fetches repositories belonging to this user.
Personal repositories live in the user's personal project (~{slug}), so
this method queries the documented project repos endpoint.
GET /rest/api/latest/projects/~{slug}/repos
Optionalparams: ReposParamsOptional filters: limit, start, name, permission
A paged response of repositories
Fetches the settings of this user.
GET /rest/api/latest/users/{slug}/settings
The user settings object
Fetches the SSH keys associated with this user.
GET /rest/ssh/latest/keys?user={slug}
Optionalparams: PaginationParamsOptional pagination: limit, start
A paged response of SSH keys
Allows the resource to be awaited directly, resolving with the user info. Delegates to UserResource.get.
Optionalonfulfilled: ((value: BitbucketUser) => TResult1 | PromiseLike<TResult1>) | nullOptionalonrejected: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | nullUpdates an HTTP access token's name, permissions, and/or expiry.
POST /rest/access-tokens/latest/users/{slug}/{tokenId} — note that,
unusually, this endpoint updates with POST (and creates with PUT).
The token id
The fields to update
The updated token metadata (without the raw token secret)
Updates entries of this user's settings map. Only the keys present in
settings are touched; other entries are left as they are.
PUT /rest/api/latest/users/{slug}/settings
The setting key/value pairs to update
Represents a Bitbucket user resource.
Implements
PromiseLike<BitbucketUser>so it can be awaited directly to fetch user info.Example