diff options
| author | Pierre-Yves Chibon <pingou@pingoured.fr> | 2012-03-28 21:41:03 +0200 |
|---|---|---|
| committer | Pierre-Yves Chibon <pingou@pingoured.fr> | 2012-03-28 21:41:03 +0200 |
| commit | d0382f6e6b681d84e6f048b725741bb9ee1a946c (patch) | |
| tree | 67749ad4e3ea7ec1ced2e709ef2580bac837c4d7 /templates/api.html | |
| parent | 4650f5f405e8c71fa96e88cde546e096bb3a9811 (diff) | |
Add a /api information page
Diffstat (limited to 'templates/api.html')
| -rw-r--r-- | templates/api.html | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/templates/api.html b/templates/api.html new file mode 100644 index 0000000..ba3abb4 --- /dev/null +++ b/templates/api.html @@ -0,0 +1,59 @@ +{% extends "base.html" %} + +{% block title %}{{ app_name }}{% endblock %} + +{% block additional_headers %} + <link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/thread.css" /> +{% endblock %} + +{% block content %} + <h2>REST API</h2> + <p> + HyperKitty comes with a small REST API allowing you to programatically retrieve + emails and information. + </p> + + <div class="odd" style="padding-left: 1em"> + <h3>Formats</h3> + <p> + This REST API can return the information into several formats. + The default format is html to allow human readibility.<br /> + To change the format, just add + <span style="font-style:italic">?format=<FORMAT></span> to the url + </p> + <p>The list of available formats is:</p> + <ul> + <li>json <a>(?format=json)</a></li> + <li>json-p <a>(?format=json-p)</a></li> + <li>txt <a>(?format=txt)</a></li> + <li>xml <a>(?format=xml)</a></li> + <li>html <a>(?format=html)</a></li> + <li>xhtml <a>(?format=xhtml)</a></li> + </ul> + </div> + + <div class="even" style="padding-left: 1em"> + <h3>Emails <a>/api/email/<list name>/<Message-ID></a></h3> + <p> +Using the address /api/email/<list name>/<Message-ID> you will be able to +retrieve the information known about a specific email on the specified mailing-list. + </p> + <p> For example: <a href="/api/email/devel@fp.o/<1312985457.28933.34.camel@ankur.pc>/"> + /api/email/devel@fp.o/<1312985457.28933.34.camel@ankur.pc>/ + </a> + </p> + </div> + <div class="odd" style="padding-left: 1em"> + <h3>Threads <a>/api/thread/<list name>/<ThreadID></a></h3> + <p> + </p> + <p> +Using the address /api/thread/<list name>/<Message-ID> you will be able to +retrieve the all the email for a specific thread on the specified mailing-list. + </p> + <p> For example: <a href="/api/thread/devel@fp.o/1/"> + /api/email/devel@fp.o/1/ + </a> + </p> + </div> +{% endblock %} |
