Versions Compared

Key

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

...

The REST API for managing user aliases is located at <bitbucket-host>/rest/awesome-graphs/latest/emails

Talk
idtalk-686

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

Talk
idtalk-687
administrators can manage aliases of other users as well.

...

Here is the curl command for viewing your own user aliases:

Talk
idtalk-688

Code Block
curl -u username:password http://aquila:7990/bitbucket/rest/awesome-graphs/latest/emails

...

Code Block
{
  "start": 0,
  "limit": 25,
  "size": 2,
  "isLastPage": true,
  "values": [
    {"email": "john.smith@gmail.com", "automatically": false},  
    {"email": "John.Smith@gmail.com", "automatically": true}
  ]
}

An alias has 2 fields

Talk
idtalk-689

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., John.Johnson@stiltsoft.com and john.johnson@stiltsoft.com), and adds this detected email as an automatically linked alias.

...

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

Talk
idtalk-690

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

...

When you attempt to add an email address that is already used (by another Bitbucket user or already linked as an alias), you will see the response with displayName

Talk
idtalk-691
and the link to the user profile of the current owner of this alias:

...