summaryrefslogtreecommitdiffstats
path: root/hyperkitty/templates/api.html
diff options
context:
space:
mode:
authorAamir Khan <syst3m.w0rm@gmail.com>2012-07-24 17:00:25 -0400
committerAamir Khan <syst3m.w0rm@gmail.com>2012-07-24 17:00:25 -0400
commit9f18a590819a01017c15169d82763680a72848fb (patch)
tree9c781cd677eeae9b1e50e986647e1929e99bdac7 /hyperkitty/templates/api.html
parentae77d9901e2a466622818f95d784fb85b5296727 (diff)
downloadhyperkitty-9f18a590819a01017c15169d82763680a72848fb.tar.gz
hyperkitty-9f18a590819a01017c15169d82763680a72848fb.tar.xz
hyperkitty-9f18a590819a01017c15169d82763680a72848fb.zip
Packaging hyperkitty
Diffstat (limited to 'hyperkitty/templates/api.html')
-rw-r--r--hyperkitty/templates/api.html77
1 files changed, 77 insertions, 0 deletions
diff --git a/hyperkitty/templates/api.html b/hyperkitty/templates/api.html
new file mode 100644
index 0000000..85f3cf0
--- /dev/null
+++ b/hyperkitty/templates/api.html
@@ -0,0 +1,77 @@
+{% extends "base.html" %}
+
+{% block additional_stylesheets %}
+ <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=&lt;FORMAT&gt;</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/&lt;list name&gt;/&lt;Message-ID&gt;</a></h3>
+ <p>
+Using the address /api/email/&lt;list name&gt;/&lt;Message-ID&gt; 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/&lt;1312985457.28933.34.camel@ankur.pc&gt;/
+ </a>
+ </p>
+ </div>
+ <div class="odd" style="padding-left: 1em">
+ <h3>Threads <a>/api/thread/&lt;list name&gt;/&lt;ThreadID&gt;</a></h3>
+ <p>
+ </p>
+ <p>
+Using the address /api/thread/&lt;list name&gt;/&lt;Message-ID&gt; 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>
+ <div class="even" style="padding-left: 1em">
+ <h3>Search <a>/api/search/&lt;list name&gt;/&lt;field&gt;/&lt;keyword&gt;</a></h3>
+ <p>
+ </p>
+ <p>
+Using the address /api/search/&lt;list name&gt;/&lt;field&gt;/&lt;keyword&gt; you will be able to
+search for all emails of the specified mailing-list containing the provided keyword in the given field.
+ </p>
+ <p>The list of available field is:</p>
+ <ul>
+ <li>From</li>
+ <li>Subject</li>
+ <li>Content</li>
+ <li>SubjectContent</li>
+ </ul>
+ <p> For example: <a href="/api/search/devel@fp.o/From/pingoured">
+ /api/search/devel@fp.o/From/pingoured
+ </a>
+ </p>
+ </div>
+{% endblock %}