-
Notifications
You must be signed in to change notification settings - Fork 1k
URLS
Bjarni R. Einarsson edited this page Jun 5, 2014
·
21 revisions
The URL space is divided into three main classes:
- Versioned API endpoints
- Nice looking shortcuts to common data
- Shorthand paths to API endpoints (current version only)
Depending on the endpoint, it is often possible to request alternate
rendering templates or generate output in a variety of machine readable
formats, such as JSON, XML or VCard. This is done by appending a
psuedo-filename to the path. If ending in .html
, the full filename is
used to choose an alternate rendering template, for other extensions the
name is ignored but the extension used to choose an output format.
The default rendering for API endpoints is JSON, for other endpoints it is HTML. It is strongly recommended that only the versioned API endpoints be used for automation.
/api/0/contacts/ [--lines]/[<terms>]/
?q=[search terms]&count=[how many to display (default=40)]&offset=[skip how many in the display (default=0)]&format=[lines or mpCard (default)]
/api/0/contacts/add/ <msgs>/
... POST only: mid=[Message ID]&email=[e-mail address]&name=[Contact name]
/api/0/contacts/import/ [<parameters>]/
/api/0/contacts/importers/
/api/0/contacts/view/ [<email>]/
/api/0/crypto/gpg/keylist/<address>/
?address=[E-mail address]
/api/0/crypto/gpg/searchkey/<terms>/
?q=[search terms]
/api/0/crypto/gpg/statistics/<address>/
?address=[E-mail address]
/api/0/crypto_policy/ [<emailaddresses>]/
/api/0/eventlog/ [incomplete]/[wait]/[<count>]/[<field>=<val>/...]/
?private_data=[var:value]&source=[source class]&flag=[require a flag]&flags=[match all flags]&since=[wait for new data?]&data=[var:value]&incomplete=[incomplete events only?]&wait=[wait for new data?]
/api/0/filter/list/ [<search>|=<id>|@<type>]/
?search=[Text to search for]&type=[Filter type]&id=[Filter ID]
/api/0/help/ [<command-group>]/
/api/0/help/splash/
/api/0/help/urlmap/
/api/0/help/variables/
/api/0/jsapi/
/api/0/message/ [raw]/<message>/
?mid=[metadata-ID]
/api/0/message/download/ <msgs>/<att>/[><fn>]/
/api/0/message/draft/ [<messages>]/
?mid=[metadata-ID]
/api/0/page/
/api/0/plugins/ [<plugins>]/
/api/0/plugins/disable/ <plugin>/
/api/0/plugins/load/ <plugin>/
/api/0/search/ [@<start>]/<terms>/
?qr=[search refinements]&end=[end position]&q=[search terms]&start=[start position]&full=[return all metadata]&order=[sort order]
/api/0/search/address/ [<terms>]/
?q=[search terms]&count=[number of results]&offset=[offset results]
/api/0/settings/ <var>/
?var=[section.variable]
/api/0/tags/ [<wanted>|!<wanted>]/[...]/
/api/0/tags/add/ <tag>/
... POST only: magic_terms=[magic search terms associated with this tag]&label_color=[03-gray-dark]&name=[tag name]&template=[tag template type]&display=[tag display type]&parent=[parent tag ID]&label=[display as label in search results, or not]&search_terms=[default search associated with this tag]&slug=[tag slug]&icon=[icon-tag]
/api/0/contacts/add/ <msgs>/
... POST only: mid=[Message ID]&email=[e-mail address]&name=[Contact name]
/api/0/contacts/addline/ <email>/<lines>/
/api/0/contacts/remove/ <email>/
/api/0/crypto/gpg/importkey/<key_file>/
?key_data=[Contents of public key to be imported]&key_file=[Location of file containing the public key]
/api/0/crypto/gpg/importkeyfrommail/<mid>/
?att=[Attachment ID]&mid=[Message ID]
/api/0/crypto/gpg/receivekey/<keyid>/
?keyid=[ID of key to fetch]
/api/0/crypto/gpg/signkey/<keyid>/[<signingkey>]/
?signingkey=[The key to sign with]&keyid=[The key to sign]
/api/0/crypto/nicknym/getkey/<address>/[<keytype>]/[<server>]/
?keytype=[What type of key to import (defaults to OpenPGP)]&server=[The Nicknym server to use (defaults to autodetect)]&address=[The nick/address to fetch a key for]
/api/0/crypto/nicknym/refreshkeys/
/api/0/crypto_policy/set/ <email/address>/none|sign|encrypt|sign-encrypt|default/
?policy=[new policy]&email=[contact email]
/api/0/filter/list/ [<search>|=<id>|@<type>]/
?search=[Text to search for]&type=[Filter type]&id=[Filter ID]
/api/0/message/attach/ <messages>/[<path/to/file>]/
... POST only: file-data=[file data]&mid=[metadata-ID]
/api/0/message/compose/ [ephemeral]/
... POST only: body=[..]&from=[..]&cid=[canned response metadata-ID]&cc=[..]&encryption=[..]&mid=[metadata-ID]&bcc=[..]&to=[..]&subject=[..]
/api/0/message/forward/ [att|ephemeral]/<messages>/
?atts=[forward attachments]&ephemeral=[ephemerality]&mid=[metadata-ID]&cid=[canned response metadata-ID]
/api/0/message/reply/ [all|ephemeral]/<messages>/
?reply_all=[reply to all]&ephemeral=[ephemerality]&mid=[metadata-ID]&cid=[canned response metadata-ID]
/api/0/message/send/ <messages>/[<emails>]/
... POST only: to=[recipients]&mid=[metadata-ID]
/api/0/message/unthread/
... POST only: mid=[message-id]
/api/0/message/update/ <messages>/<<filename>/
... POST only: body=[..]&file-data=[file data]&from=[..]&cc=[..]&encryption=[..]&mid=[metadata-ID]&bcc=[..]&to=[..]&subject=[..]
/api/0/message/update/send/
... POST only: body=[..]&file-data=[file data]&from=[..]&cc=[..]&encryption=[..]&mid=[metadata-ID]&bcc=[..]&to=[..]&subject=[..]
/api/0/settings/add/ <section.variable>/<value>/
... POST only: section.variable=[value|json-string]
/api/0/settings/set/ <section.variable>/<value>/
... POST only: section.variable=[value|json-string]
/api/0/settings/unset/ <var>/
... POST only: var=[section.variables]
/api/0/tag/ <[+|-]tags>/<msgs>/
... POST only: add=[tags]&del=[tags]&mid=[message-ids]
/api/0/tags/add/ <tag>/
... POST only: magic_terms=[magic search terms associated with this tag]&label_color=[03-gray-dark]&name=[tag name]&template=[tag template type]&display=[tag display type]&parent=[parent tag ID]&label=[display as label in search results, or not]&search_terms=[default search associated with this tag]&slug=[tag slug]&icon=[icon-tag]
/api/0/tags/delete/ <tag>/
... POST only: tag=[tag(s) to delete]
/api/0/contacts/addline/ <email>/<lines>/
/api/0/message/attach/ <messages>/[<path/to/file>]/
... POST only: file-data=[file data]&mid=[metadata-ID]
/api/0/message/unthread/
... POST only: mid=[message-id]
/api/0/message/update/ <messages>/<<filename>/
... POST only: body=[..]&file-data=[file data]&from=[..]&cc=[..]&encryption=[..]&mid=[metadata-ID]&bcc=[..]&to=[..]&subject=[..]
/api/0/message/update/send/
... POST only: body=[..]&file-data=[file data]&from=[..]&cc=[..]&encryption=[..]&mid=[metadata-ID]&bcc=[..]&to=[..]&subject=[..]
/api/0/settings/add/ <section.variable>/<value>/
... POST only: section.variable=[value|json-string]
/api/0/settings/set/ <section.variable>/<value>/
... POST only: section.variable=[value|json-string]
/api/0/contacts/remove/ <email>/
/api/0/tags/delete/ <tag>/
... POST only: tag=[tag(s) to delete]
/ Redirects to /in/inbox/ for now. (FIXME)
/in/ Map /in/TAG_NAME/[@<pos>]/ to tag searches.
/static/ RESERVED FOR LATER.
/thread/ Map /thread/METADATA_ID/... to view or extract commands.
These accept the same arguments as the API calls above.
/contacts/
/contacts/add/
/contacts/addline/
/contacts/import/
/contacts/importers/
/contacts/remove/
/contacts/view/
/crypto/gpg/importkey/
/crypto/gpg/importkeyfrommail/
/crypto/gpg/keylist/
/crypto/gpg/receivekey/
/crypto/gpg/searchkey/
/crypto/gpg/signkey/
/crypto/gpg/statistics/
/crypto/nicknym/getkey/
/crypto/nicknym/refreshkeys/
/crypto_policy/
/crypto_policy/set/
/eventlog/
/filter/list/
/help/
/help/splash/
/help/urlmap/
/help/variables/
/jsapi/
/message/
/message/attach/
/message/compose/
/message/download/
/message/draft/
/message/forward/
/message/reply/
/message/send/
/message/unthread/
/message/update/
/message/update/send/
/page/
/plugins/
/plugins/disable/
/plugins/load/
/search/
/search/address/
/settings/
/settings/add/
/settings/set/
/settings/unset/
/tag/
/tags/
/tags/add/
/tags/delete/