diff options
Diffstat (limited to 'src/mailman/rest/docs/lists.txt')
| -rw-r--r-- | src/mailman/rest/docs/lists.txt | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/mailman/rest/docs/lists.txt b/src/mailman/rest/docs/lists.txt index 460ca3585..6abf29a1d 100644 --- a/src/mailman/rest/docs/lists.txt +++ b/src/mailman/rest/docs/lists.txt @@ -7,8 +7,8 @@ top level collection that can return all the mailing lists. There aren't any yet though. >>> dump_json('http://localhost:8001/3.0/lists') - resource_type_link: http://localhost:8001/3.0/#lists - start: None + http_etag: "..." + start: 0 total_size: 0 Create a mailing list in a domain and it's accessible via the API. @@ -24,9 +24,8 @@ Create a mailing list in a domain and it's accessible via the API. http_etag: "..." list_name: test-one real_name: Test-one - resource_type_link: http://localhost:8001/3.0/#list self_link: http://localhost:8001/3.0/lists/test-one@example.com - resource_type_link: http://localhost:8001/3.0/#lists + http_etag: "..." start: 0 total_size: 1 @@ -35,21 +34,15 @@ Creating lists via the API ========================== New mailing lists can also be created through the API, by posting to the -'lists' URL. However lazr.restful requires us to use a 'named operation' -instead of posting directly to the URL. +'lists' URL. >>> dump_json('http://localhost:8001/3.0/lists', { - ... 'ws.op': 'new', ... 'fqdn_listname': 'test-two@example.com', ... }) - URL: http://localhost:8001/3.0/lists content-length: 0 - content-type: text/plain;charset=utf-8 date: ... location: http://localhost:8001/3.0/lists/test-two@example.com - server: WSGIServer/... Python/... - x-content-type-warning: guessed from content - x-powered-by: Zope (www.zope.org), Python (www.python.org) + ... The mailing list exists in the database. @@ -70,14 +63,12 @@ It is also available via the location given in the response. http_etag: "..." list_name: test-two real_name: Test-two - resource_type_link: http://localhost:8001/3.0/#list self_link: http://localhost:8001/3.0/lists/test-two@example.com However, you are not allowed to create a mailing list in a domain that does not exist. >>> dump_json('http://localhost:8001/3.0/lists', { - ... 'ws.op': 'new', ... 'fqdn_listname': 'test-three@example.org', ... }) Traceback (most recent call last): @@ -87,7 +78,6 @@ not exist. Nor can you create a mailing list that already exists. >>> dump_json('http://localhost:8001/3.0/lists', { - ... 'ws.op': 'new', ... 'fqdn_listname': 'test-one@example.com', ... }) Traceback (most recent call last): |
