Support to register a new email address via REST
By PUT on /accounts/<account-id>/emails/<email-id> a new email address
can be registered for an account. A verification email is sent with a
link that needs to be visited to confirm the email address.
The WebUI was adapted to use this REST endpoint for registering email
addresses. The old RPC to do this was removed.
Change-Id: I39c1f72a0c3e0d50883c76c975bbd464f1894095
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
diff --git a/Documentation/rest-api-accounts.txt b/Documentation/rest-api-accounts.txt
index 2b583aa..9794666 100644
--- a/Documentation/rest-api-accounts.txt
+++ b/Documentation/rest-api-accounts.txt
@@ -224,6 +224,38 @@
}
----
+[[create-account-email]]
+Create Account Email
+~~~~~~~~~~~~~~~~~~~~
+[verse]
+'PUT /accounts/link:#account-id[\{account-id\}]/emails/link:#email-id[\{email-id\}]'
+
+Registers a new email address for the user. A verification email is
+sent with a link that needs to be visited to confirm the email address,
+unless `DEVELOPMENT_BECOME_ANY_ACCOUNT` is used as authentication type.
+For the development mode email addresses are directly added without
+confirmation.
+
+.Request
+----
+ PUT /accounts/self/emails/john.doe@example.com HTTP/1.0
+----
+
+As response the new email address is returned as
+link:#email-info[EmailInfo] entity.
+
+.Response
+----
+ HTTP/1.1 201 Created
+ Content-Disposition: attachment
+ Content-Type: application/json;charset=UTF-8
+
+ )]}'
+ {
+ "email": "john.doe@example.com"
+ }
+----
+
[[set-preferred-email]]
Set Preferred Email
~~~~~~~~~~~~~~~~~~~