Zimbra REST API Reference: Difference between revisions
Line 79: | Line 79: | ||
|- | |- | ||
|<code>xml</code> | |<code>xml</code> | ||
| | |Extensible Markup Language file format. See the Wikipedia article [http://en.wikipedia.org/wiki/XML http://en.wikipedia.org/wiki/XML] | ||
|- | |- | ||
|<code>json</code> | |<code>json</code> | ||
| | |JavaScript Object Notation file format. See [http://www.json.org http://www.json.org] | ||
|- | |- | ||
|<code>rss</code> | |<code>rss</code> | ||
<code>atom</code> | <code>atom</code> | ||
| | |Really Simple Syndication web feed format. See [http://en.wikipedia.org/wiki/RSS http://en.wikipedia.org/wiki/RSS] | ||
|- | |- | ||
|<code>html</code> | |<code>html</code> | ||
| | |Hyper Text Markup Language file format. Produced the output as a web page. | ||
|- | |- | ||
|<code>zip</code> | |<code>zip</code> | ||
| | |Data compression and archive format. | ||
|- | |- | ||
|<code>tar</code> | |<code>tar</code> | ||
| | |Data compression and archive format ("tarball"). | ||
|- | |- | ||
|<code>tgz</code> | |<code>tgz</code> | ||
| | |Compressed <code>tar</code> file. | ||
|- | |- | ||
|<code>ics</code> | |<code>ics</code> | ||
|iCalendar. See the Wikipedia article [http://en.wikipedia.org/wiki/ICalendar http://en.wikipedia.org/wiki/ICalendar] | |iCalendar file format. See the Wikipedia article [http://en.wikipedia.org/wiki/ICalendar http://en.wikipedia.org/wiki/ICalendar] | ||
|- | |- | ||
|<code>csv</code> | |<code>csv</code> | ||
|Common Separated Values | |Common Separated Values file format. | ||
|} | |} | ||
Revision as of 21:21, 16 January 2010
Zimbra exposes its data via a REST API. This document is the reference for that functionality.
REST (REpresentational State Transfer) is an approach for building application services that make resources available via a URL. For example, the following REST command retrieves all inbox items as a simple RSS feed:
http://localhost:7070/home/user1/inbox.rss
Learn more about REST at the Wikipedia article Representational State Transfer.
Overview
Command Format
The format of a Zimbra REST command is:
{protocol}://{host}:{port}/home/{user}/{object}?{params}
The following describes the components of the REST command:
Component | Description |
protocol
|
The transport protocol, for example, http .
|
host
|
The host name or IP address of the Zimbra Collaboration Suite server |
port
|
The port number, for example, 7070. |
user
|
The user. To load an explicit user account, specify the user in one of the following formats:
http://localhost:7070/home/john.doe@mydomain.com/inbox.rss You can also use "~" as a shortcut to the current user. For example: http://localhost:7070/home/~/inbox.rss |
object
|
Designates the object to perform the command against. This might be a folder (such as inbox or drafts) or omitted (to download a specific item). If omitted, the query parameters will provide the information the command requires.
For example, to download the inbox folder as XML: http://localhost:7070/home/john.doe/inbox.rss For example, to download an item: http://localhost:7070/home/john.doe/?id=657 |
params
|
A list of command-specific URL parameters. See the specific command for a list of the required and optional parameters. |
Response Formats
The following describes the various response formats. Not all command support all formats. See your specific command for a list of supported formats:
Format | Description |
xml
|
Extensible Markup Language file format. See the Wikipedia article http://en.wikipedia.org/wiki/XML |
json
|
JavaScript Object Notation file format. See http://www.json.org |
rss
|
Really Simple Syndication web feed format. See http://en.wikipedia.org/wiki/RSS |
html
|
Hyper Text Markup Language file format. Produced the output as a web page. |
zip
|
Data compression and archive format. |
tar
|
Data compression and archive format ("tarball"). |
tgz
|
Compressed tar file.
|
ics
|
iCalendar file format. See the Wikipedia article http://en.wikipedia.org/wiki/ICalendar |
csv
|
Common Separated Values file format. |
Authentication
XYZ
Methods
The API supports the following methods to retrieve Zimbra data.
Mail Methods
Address Book Methods
Calendar Methods
Item Methods