...
Code Block |
---|
curl -u username:password http://bitbucket-host/bitbucket/rest/awesome-graphs/latest/emails |
...
Code Block |
---|
curl -u username:password -G -d user=john http://bitbucket-host/bitbucket/rest/awesome-graphs/latest/emails |
...
Code Block |
---|
curl -u username:password -X PUT -G -d email=jsmith@example.com http://bitbucket-host/bitbucket/rest/awesome-graphs/latest/emails |
...
Code Block |
---|
curl -u username:password -X PUT -G -d user=john -d email=jsmith@example.com http://bitbucket-host/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 display name and the link to the user profile of the current owner of this alias:
Code Block |
---|
{"name": "User", "link": "http://bitbucket-host/bitbucket/users/user"} |
Deleting aliases
Here is the curl command for deleting your own alias:
Code Block |
---|
curl -u username:password -X DELETE -G -d email=jsmith@example.com http://bitbucket-host/bitbucket/rest/awesome-graphs/latest/emails |
...
Code Block |
---|
curl -u username:password -X DELETE -G -d user=john -d email=jsmith@example.com http://bitbucket-host/bitbucket/rest/awesome-graphs/latest/emails |
...