blob: 753738179cf21dd08a7a0d22b9cafee20da3371a (
plain)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
{% extends "base.html" %}
{% load url from future %}
{% 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>Lists <a>/api/list/</a></h3>
<p>
Using the address /api/list/ you will be able to
retrieve the information known about all the mailing-lists.
</p>
<p> For example: <a href="{% url 'api_list' %}?format=api">
{% url 'api_list' %}
</a>
</p>
</div>
<div class="odd" 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="{% url 'api_email' mlist_fqdn='devel@fp.o' messageid='13129854572893334' %}?format=api">
{% url 'api_email' mlist_fqdn='devel@fp.o' messageid='13129854572893334' %}
</a>
</p>
</div>
<div class="even" style="padding-left: 1em">
<h3>Threads <a>/api/thread/<list name>/<ThreadID></a></h3>
<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="{% url 'api_thread' mlist_fqdn='devel@fp.o' threadid='13129854572893334' %}?format=api">
{% url 'api_thread' mlist_fqdn='devel@fp.o' threadid='13129854572893334' %}
</a>
</p>
</div>
<div class="odd" style="padding-left: 1em">
<h3>Search <a>/api/search/<list name>/<field>/<keyword></a></h3>
<p>
Using the address /api/search/<list name>/<field>/<keyword> 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="{% url 'api_search' mlist_fqdn='devel@fp.o' field='From' keyword='pingoured' %}?format=api">
{% url 'api_search' mlist_fqdn='devel@fp.o' field='From' keyword='pingoured' %}
</a>
</p>
</div>
<div class="even" style="padding-left: 1em">
<h3>Tags <a>/api/tag/</a></h3>
<p>
Using the address /api/tag/ you will be able to
retrieve the list of tags.
</p>
<p> For example: <a href="{% url 'api_tag' %}?format=api">
{% url 'api_tag' %}
</a>
</p>
</div>
{% endblock %}
|