...
The REST API for managing user aliases is located at <bitbucket-host>/rest/awesome-graphs/latest/emails Talk id talk-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 | ||
---|---|---|
|
...
Here is the curl command for viewing your own user aliases:
Talk | ||
---|---|---|
|
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 | ||
---|---|---|
|
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 | ||
---|---|---|
|
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 | ||
---|---|---|
|
...