blob: a3ee56568a04b77d522f397a2dcf5f35ed00ad66 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
REST server
===========
Mailman exposes a REST HTTP server for administrative control.
>>> from mailman.rest.testing.server import TestableServer
>>> server = TestableServer()
>>> server.start()
The server listens for connections on a configurable host name and port.
Because the REST server has full administrative access, it should always be
run only on localhost, unless you really know what you're doing. The Mailman
major and minor version numbers are in the URL.
System information can be retrieved from the server. By default JSON is
returned.
>>> dump_json('http://localhost:8001/3.0/system')
http_etag: "..."
mailman_version: GNU Mailman 3.0... (...)
python_version: ...
resource_type_link: https://localhost:8001/3.0/#system
self_link: https://localhost:8001/3.0/system
Cleanup
-------
>>> server.stop()
|