Interface UsersApi


@Path("/users/{username}") @Generated(value="org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", date="2025-07-17T16:07:08.420911588+02:00[Europe/Stockholm]", comments="Generator version: 7.14.0") public interface UsersApi
Represents a collection of functions to interact with the API endpoints.
  • Method Details

    • createPipelineVariableForUser

      @POST @Path("/pipelines_config/variables/") @Consumes("application/json") @Produces("application/json") PipelineVariable createPipelineVariableForUser(@PathParam("username") String username, @Valid @Valid PipelineVariable pipelineVariable)
      Create a user level variable.
      Parameters:
      username - The account.
      pipelineVariable - The variable to create.
      Returns:
      The created variable.
    • deletePipelineVariableForUser

      @DELETE @Path("/pipelines_config/variables/{variable_uuid}") @Produces("application/json") void deletePipelineVariableForUser(@PathParam("username") String username, @PathParam("variable_uuid") String variableUuid)
      Delete an account level variable.
      Parameters:
      username - The account.
      variableUuid - The UUID of the variable to delete.
    • deleteUserHostedPropertyValue

      @DELETE @Path("/properties/{app_key}/{property_name}") void deleteUserHostedPropertyValue(@PathParam("username") String username, @PathParam("app_key") String appKey, @PathParam("property_name") String propertyName)
      Delete an application property value stored against a user.
      Parameters:
      username - The user.
      appKey - The key of the Connect app.
      propertyName - The name of the property.
    • getPipelineVariableForUser

      @GET @Path("/pipelines_config/variables/{variable_uuid}") @Produces("application/json") PipelineVariable getPipelineVariableForUser(@PathParam("username") String username, @PathParam("variable_uuid") String variableUuid)
      Retrieve a user level variable.
      Parameters:
      username - The account.
      variableUuid - The UUID of the variable to retrieve.
      Returns:
      The variable.
    • getPipelineVariablesForUser

      @GET @Path("/pipelines_config/variables/") @Produces("application/json") PaginatedPipelineVariables getPipelineVariablesForUser(@PathParam("username") String username)
      Find user level variables.
      Parameters:
      username - The account.
      Returns:
      The found user level variables.
    • retrieveUserHostedPropertyValue

      @GET @Path("/properties/{app_key}/{property_name}") void retrieveUserHostedPropertyValue(@PathParam("username") String username, @PathParam("app_key") String appKey, @PathParam("property_name") String propertyName)
      Retrieve an application property value stored against a user.
      Parameters:
      username - The user.
      appKey - The key of the Connect app.
      propertyName - The name of the property.
    • searchAccount

      @GET @Path("/search/code") @Produces("application/json") SearchResultPage searchAccount(@PathParam("username") String username, @QueryParam("search_query") @NotNull @NotNull String searchQuery, @QueryParam("page") @DefaultValue("1") Integer page, @QueryParam("pagelen") @DefaultValue("10") Integer pagelen)
      Parameters:
      username - The account to search in; either the username or the UUID in curly braces
      searchQuery - The search query
      page - Which page of the search results to retrieve
      pagelen - How many search results to retrieve per page
      Returns:
      Successful search
    • updatePipelineVariableForUser

      @PUT @Path("/pipelines_config/variables/{variable_uuid}") @Consumes("application/json") @Produces("application/json") PipelineVariable updatePipelineVariableForUser(@PathParam("username") String username, @PathParam("variable_uuid") String variableUuid, @Valid @NotNull @Valid @NotNull PipelineVariable pipelineVariable)
      Update a user level variable.
      Parameters:
      username - The account.
      variableUuid - The UUID of the variable.
      pipelineVariable - The updated variable.
      Returns:
      The variable was updated.
    • updateUserHostedPropertyValue

      @PUT @Path("/properties/{app_key}/{property_name}") void updateUserHostedPropertyValue(@PathParam("username") String username, @PathParam("app_key") String appKey, @PathParam("property_name") String propertyName)
      Update an application property value stored against a user.
      Parameters:
      username - The user.
      appKey - The key of the Connect app.
      propertyName - The name of the property.
    • usersUsernameFollowersGet

      @GET @Path("/followers") @Produces("application/json") PaginatedUsers usersUsernameFollowersGet(@PathParam("username") String username)
      Returns the list of accounts that are following this user. This operation has been deprecated due to privacy changes. See the [announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/) for details.
      Parameters:
      username - The account's username
      Returns:
      A paginated list of user objects.
    • usersUsernameFollowingGet

      @GET @Path("/following") @Produces("application/json") PaginatedUsers usersUsernameFollowingGet(@PathParam("username") String username)
      Returns the list of accounts this user is following. This operation has been deprecated due to privacy changes. See the [announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/) for details.
      Parameters:
      username - The user's username
      Returns:
      A paginated list of user objects.
    • usersUsernameGet

      @GET @Produces("application/json") User usersUsernameGet(@PathParam("username") String username)
      Gets the public information associated with a user account. If the user's profile is private, `location`, `website` and `created_on` elements are omitted. Note that the user object returned by this operation is changing significantly, due to privacy changes. See the [announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#changes-to-bitbucket-user-objects) for details.
      Parameters:
      username - The account's UUID, account_id, or username. Note that username has been deprecated due to [privacy changes](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#removal-of-usernames-from-user-referencing-apis).
      Returns:
      The user object
    • usersUsernameHooksGet

      @GET @Path("/hooks") @Produces("application/json") PaginatedWebhookSubscriptions usersUsernameHooksGet(@PathParam("username") String username)
      Returns a paginated list of webhooks installed on this user account. Note that the username path parameter has been deprecated due to [privacy changes](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#removal-of-usernames-from-user-referencing-apis). Use the account's UUID or account_id instead.
      Parameters:
      username -
      Returns:
      The paginated list of installed webhooks.
    • usersUsernameHooksPost

      @POST @Path("/hooks") @Produces("application/json") WebhookSubscription usersUsernameHooksPost(@PathParam("username") String username)
      Creates a new webhook on the specified user account. Account-level webhooks are fired for events from all repositories belonging to that account. Note that one can only register webhooks on one's own account, not that of others. Also, note that the username path parameter has been deprecated due to [privacy changes](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#removal-of-usernames-from-user-referencing-apis). Use the account's UUID or account_id instead.
      Parameters:
      username -
      Returns:
      The newly installed webhook.
    • usersUsernameHooksUidDelete

      @DELETE @Path("/hooks/{uid}") @Produces("application/json") void usersUsernameHooksUidDelete(@PathParam("username") String username, @PathParam("uid") String uid)
      Deletes the specified webhook subscription from the given user account. Note that the username path parameter has been deprecated due to [privacy changes](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#removal-of-usernames-from-user-referencing-apis). Use the account's UUID or account_id instead.
      Parameters:
      username -
      uid - The installed webhook's id
    • usersUsernameHooksUidGet

      @GET @Path("/hooks/{uid}") @Produces("application/json") WebhookSubscription usersUsernameHooksUidGet(@PathParam("username") String username, @PathParam("uid") String uid)
      Returns the webhook with the specified id installed on the given user account. Note that the username path parameter has been deprecated due to [privacy changes](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#removal-of-usernames-from-user-referencing-apis). Use the account's UUID or account_id instead.
      Parameters:
      username -
      uid - The installed webhook's id.
      Returns:
      The webhook subscription object.
    • usersUsernameHooksUidPut

      @PUT @Path("/hooks/{uid}") @Produces("application/json") WebhookSubscription usersUsernameHooksUidPut(@PathParam("username") String username, @PathParam("uid") String uid)
      Updates the specified webhook subscription. The following properties can be mutated: * `description` * `url` * `active` * `events` Note that the username path parameter has been deprecated due to [privacy changes](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#removal-of-usernames-from-user-referencing-apis). Use the account's UUID or account_id instead.
      Parameters:
      username -
      uid - The installed webhook's id
      Returns:
      The webhook subscription object.
    • usersUsernameMembersGet

      @GET @Path("/members") @Produces("application/json") User usersUsernameMembersGet(@PathParam("username") String username)
      Returns all members of the specified team. Any member of any of the team's groups is considered a member of the team. This includes users in groups that may not actually have access to any of the team's repositories. This operation has been deprecated due to privacy changes. See the [announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/) for details.
      Parameters:
      username -
      Returns:
      All members
    • usersUsernameRepositoriesGet

      @GET @Path("/repositories") @Produces("application/json") Error usersUsernameRepositoriesGet(@PathParam("username") String username)
      All repositories owned by a user/team. This includes private repositories, but filtered down to the ones that the calling user has access to.
      Parameters:
      username -
      Returns:
      Unexpected error.
    • usersUsernameSshKeysDelete

      @DELETE @Path("/ssh-keys/") @Produces("application/json") void usersUsernameSshKeysDelete(@PathParam("username") String username, @PathParam("key_id") String keyId)
      Deletes a specific SSH public key from a user's account Example: ``` $ curl -X DELETE https://api.bitbucket.org/2.0/users/markadams-atl/ssh-keys/{b15b6026-9c02-4626-b4ad-b905f99f763a} ```
      Parameters:
      username - The account's username or UUID.
      keyId - The SSH key's UUID value.
    • usersUsernameSshKeysGet

      @GET @Path("/ssh-keys/") @Produces("application/json") SshAccountKey usersUsernameSshKeysGet(@PathParam("username") String username, @PathParam("key_id") String keyId)
      Returns a specific SSH public key belonging to a user. Example: ``` $ curl https://api.bitbucket.org/2.0/users/markadams-atl/ssh-keys/{fbe4bbab-f6f7-4dde-956b-5c58323c54b3} { \"comment\": \"user@myhost\", \"created_on\": \"2018-03-14T13:17:05.196003+00:00\", \"key\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY\", \"label\": \"\", \"last_used\": \"2018-03-20T13:18:05.196003+00:00\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/users/markadams-atl/ssh-keys/b15b6026-9c02-4626-b4ad-b905f99f763a\" } }, \"owner\": { \"display_name\": \"Mark Adams\", \"links\": { \"avatar\": { \"href\": \"https://bitbucket.org/account/markadams-atl/avatar/32/\" }, \"html\": { \"href\": \"https://bitbucket.org/markadams-atl/\" }, \"self\": { \"href\": \"https://api.bitbucket.org/2.0/users/markadams-atl\" } }, \"type\": \"user\", \"username\": \"markadams-atl\", \"nickname\": \"markadams-atl\", \"uuid\": \"{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}\" }, \"type\": \"ssh_key\", \"uuid\": \"{b15b6026-9c02-4626-b4ad-b905f99f763a}\" } ```
      Parameters:
      username - The account's username or UUID.
      keyId - The SSH key's UUID value.
      Returns:
      The specific SSH key matching the user and UUID
    • usersUsernameSshKeysGet_1

      @GET @Path("/ssh-keys") @Produces("application/json") PaginatedSshUserKeys usersUsernameSshKeysGet_1(@PathParam("username") String username)
      Returns a paginated list of the user's SSH public keys. Example: ``` $ curl https://api.bitbucket.org/2.0/users/markadams-atl/ssh-keys { \"page\": 1, \"pagelen\": 10, \"size\": 1, \"values\": [ { \"comment\": \"user@myhost\", \"created_on\": \"2018-03-14T13:17:05.196003+00:00\", \"key\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY\", \"label\": \"\", \"last_used\": \"2018-03-20T13:18:05.196003+00:00\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/users/markadams-atl/ssh-keys/b15b6026-9c02-4626-b4ad-b905f99f763a\" } }, \"owner\": { \"display_name\": \"Mark Adams\", \"links\": { \"avatar\": { \"href\": \"https://bitbucket.org/account/markadams-atl/avatar/32/\" }, \"html\": { \"href\": \"https://bitbucket.org/markadams-atl/\" }, \"self\": { \"href\": \"https://api.bitbucket.org/2.0/users/markadams-atl\" } }, \"type\": \"user\", \"username\": \"markadams-atl\", \"nickname\": \"markadams-atl\", \"uuid\": \"{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}\" }, \"type\": \"ssh_key\", \"uuid\": \"{b15b6026-9c02-4626-b4ad-b905f99f763a}\" } ] } ```
      Parameters:
      username - The account's UUID, account_id, or username. Note that username has been deprecated due to [privacy changes](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#removal-of-usernames-from-user-referencing-apis).
      Returns:
      A list of the SSH keys associated with the account.
    • usersUsernameSshKeysPost

      @POST @Path("/ssh-keys") @Consumes("application/json") @Produces("application/json") SshAccountKey usersUsernameSshKeysPost(@PathParam("username") String username, @Valid @Valid SshAccountKey sshAccountKey)
      Adds a new SSH public key to the specified user account and returns the resulting key. Example: ``` $ curl -X POST -H \"Content-Type: application/json\" -d '{\"key\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY user@myhost\"}' https://api.bitbucket.org/2.0/users/markadams-atl/ssh-keys { \"comment\": \"user@myhost\", \"created_on\": \"2018-03-14T13:17:05.196003+00:00\", \"key\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY\", \"label\": \"\", \"last_used\": \"2018-03-20T13:18:05.196003+00:00\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/users/markadams-atl/ssh-keys/b15b6026-9c02-4626-b4ad-b905f99f763a\" } }, \"owner\": { \"display_name\": \"Mark Adams\", \"links\": { \"avatar\": { \"href\": \"https://bitbucket.org/account/markadams-atl/avatar/32/\" }, \"html\": { \"href\": \"https://bitbucket.org/markadams-atl/\" }, \"self\": { \"href\": \"https://api.bitbucket.org/2.0/users/markadams-atl\" } }, \"type\": \"user\", \"username\": \"markadams-atl\", \"nickname\": \"markadams-atl\", \"uuid\": \"{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}\" }, \"type\": \"ssh_key\", \"uuid\": \"{b15b6026-9c02-4626-b4ad-b905f99f763a}\" } ```
      Parameters:
      username - The account's UUID, account_id, or username. Note that username has been deprecated due to [privacy changes](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#removal-of-usernames-from-user-referencing-apis).
      sshAccountKey - The new SSH key object. Note that the username property has been deprecated due to [privacy changes](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#removal-of-usernames-from-user-referencing-apis).
      Returns:
      The newly created SSH key.
    • usersUsernameSshKeysPut

      @PUT @Path("/ssh-keys/") @Consumes("application/json") @Produces("application/json") SshAccountKey usersUsernameSshKeysPut(@PathParam("username") String username, @PathParam("key_id") String keyId, @Valid @Valid SshAccountKey sshAccountKey)
      Updates a specific SSH public key on a user's account Note: Only the 'comment' field can be updated using this API. To modify the key or comment values, you must delete and add the key again. Example: ``` $ curl -X PUT -H \"Content-Type: application/json\" -d '{\"label\": \"Work key\"}' https://api.bitbucket.org/2.0/users/markadams-atl/ssh-keys/{b15b6026-9c02-4626-b4ad-b905f99f763a} { \"comment\": \"\", \"created_on\": \"2018-03-14T13:17:05.196003+00:00\", \"key\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY\", \"label\": \"Work key\", \"last_used\": \"2018-03-20T13:18:05.196003+00:00\", \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/users/markadams-atl/ssh-keys/b15b6026-9c02-4626-b4ad-b905f99f763a\" } }, \"owner\": { \"display_name\": \"Mark Adams\", \"links\": { \"avatar\": { \"href\": \"https://bitbucket.org/account/markadams-atl/avatar/32/\" }, \"html\": { \"href\": \"https://bitbucket.org/markadams-atl/\" }, \"self\": { \"href\": \"https://api.bitbucket.org/2.0/users/markadams-atl\" } }, \"type\": \"user\", \"username\": \"markadams-atl\", \"nickname\": \"markadams-atl\", \"uuid\": \"{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}\" }, \"type\": \"ssh_key\", \"uuid\": \"{b15b6026-9c02-4626-b4ad-b905f99f763a}\" } ```
      Parameters:
      username - The account's username or UUID.
      keyId - The SSH key's UUID value.
      sshAccountKey - The updated SSH key object
      Returns:
      The newly updated SSH key.