In this article we are going to analyze the Item methods of the Zimbra REST API. For an overview and in-depth coverage about it, we refer you to the related article in our technical blog.
This method retrieves items. The HTTP method to read data is
The basic URL structure is the following one:
This method requires the id of the item to be retrieved:
The supported formats vary depending on the type of object being recovered. Below is a table that summarizes the different types to choose from:
|e-mail Message||json, xml, rss, atom, zip, tar, tgz, sync||Default format is MIME|
|Appointment||json, xml, ics||Default format is ics|
|Contact||json, xml, vcf||Default format is vcf|
|Task||json, xml, ics, rss, atom||Default format is ics|
We have different parameters for this method. The basic ones are:
id– the message id is required.
fmt– the reply format is optional.
There are also two Mail Message Parameters, both optional:
imap_id– this specifies an IMAP id
part– this specifies which part of the MIME message to retrieve.
To retrieve an email message with id 55 as default MIME RFC822 format:
If you want to retrieve the contact with id 712 in XML format: