Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Via this REST API it is possible to view, add, delete email aliases of Bitbucket Server users. Regular users can perform these operations with their own aliases while Bitbucket global administrators can manage aliases of other users as well.

...

For administrators, to view user aliases of others, the curl command is supposed needs to include an additional parameter 'user', which value is the username of the user whose alias an administrator needs wants to view:

curl -u username:password -G -d user=john http://aquila:7990/bitbucket/rest/awesome-graphs/latest/emails

...

An alias has 2 fields: 
email - user email address
automatically - 'false' means that an alias is added manually by a user or via REST API ; 'true' means that an alias was automatically linked by Awesome Graphs, which happens when a new email alias is being added and the add-on detects that such an email already exists in the database, but differs in case (e.g.,  AndreyJohn.Breslav@jetbrains.com and andrey.breslav@jetbrainsJohnson@stiltsoft.com and john.johnson@jetbrains.com), and adds this detected email as an automatically linked alias.

...

Here is the curl command for adding a user to add a new user alias for yourselfhim/herself:

curl -u username:password -X PUT -G -d email=jsmith@example.com http://aquila:7990/bitbucket/rest/awesome-graphs/latest/emails

...

curl -u username:password -X DELETE -G -d user=john -d email=jsmith@example.com http://aquila:7990/bitbucket/rest/awesome-graphs/latest/emails

...

Info

When deleting aliases, it is not possible to delete automatically linked aliases. But when deleting an alias that was added manually or via REST API, a case insensitive search

...

is performed that

...

deletes all found aliases.

In case adding or deleting of aliases is successful, you will get

...

a 200 status code to your HTTP request. When a not existing username is used, you will get

...

a 204 status code.