diff options
| author | Barry Warsaw | 2014-04-14 23:00:41 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2014-04-14 23:00:41 -0400 |
| commit | 00ea00ffa489501993035bb96734506bbe939ab9 (patch) | |
| tree | 35b25abcef92ff627b586b791f1a0adbc1260689 /src/mailman/rest/docs | |
| parent | 243b4dd66d1c6bd412ae0ce3770e36aebd3b6a36 (diff) | |
| parent | 5b3b837431f24fd7afdbd368d6d6b7989d1fd54a (diff) | |
| download | mailman-00ea00ffa489501993035bb96734506bbe939ab9.tar.gz mailman-00ea00ffa489501993035bb96734506bbe939ab9.tar.zst mailman-00ea00ffa489501993035bb96734506bbe939ab9.zip | |
Add an email address to an existing user via the REST API.
Diffstat (limited to 'src/mailman/rest/docs')
| -rw-r--r-- | src/mailman/rest/docs/addresses.rst | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/mailman/rest/docs/addresses.rst b/src/mailman/rest/docs/addresses.rst index f05b6b9b2..be01dd623 100644 --- a/src/mailman/rest/docs/addresses.rst +++ b/src/mailman/rest/docs/addresses.rst @@ -173,6 +173,59 @@ addresses live in the /addresses namespace. registered_on: 2005-08-01T07:49:23 self_link: http://localhost:9001/3.0/addresses/dave@example.com +A user can be associated with multiple email addresses. You can add new +addresses to an existing user. + + >>> dump_json( + ... 'http://localhost:9001/3.0/users/dave@example.com/addresses', { + ... 'email': 'dave.person@example.org' + ... }) + content-length: 0 + date: ... + location: http://localhost:9001/3.0/addresses/dave.person@example.org + server: ... + status: 201 + +When you add the new address, you can give it an optional display name. + + >>> dump_json( + ... 'http://localhost:9001/3.0/users/dave@example.com/addresses', { + ... 'email': 'dp@example.org', + ... 'display_name': 'Davie P', + ... }) + content-length: 0 + date: ... + location: http://localhost:9001/3.0/addresses/dp@example.org + server: ... + status: 201 + +The user controls these new addresses. + + >>> dump_json('http://localhost:9001/3.0/users/dave@example.com/addresses') + entry 0: + email: dave.person@example.org + http_etag: "..." + original_email: dave.person@example.org + registered_on: 2005-08-01T07:49:23 + self_link: http://localhost:9001/3.0/addresses/dave.person@example.org + entry 1: + display_name: Dave Person + email: dave@example.com + http_etag: "..." + original_email: dave@example.com + registered_on: 2005-08-01T07:49:23 + self_link: http://localhost:9001/3.0/addresses/dave@example.com + entry 2: + display_name: Davie P + email: dp@example.org + http_etag: "..." + original_email: dp@example.org + registered_on: 2005-08-01T07:49:23 + self_link: http://localhost:9001/3.0/addresses/dp@example.org + http_etag: "..." + start: 0 + total_size: 3 + Memberships =========== |
