REST Api

Have a great idea for extending Zimbra? Share ideas, ask questions, contribute, and get feedback.
stiller
Advanced member
Advanced member
Posts: 84
Joined: Fri Sep 12, 2014 11:32 pm

REST Api

Postby stiller » Thu Nov 05, 2009 11:37 am

We would like to create some webservices around the zimbra backend, preferably using the REST interface for CRUD. Having searched the forums, read the wiki on user migration, the documentation and various blogposts (thanks Roland), it's still unclear which parts can or can't be reached through REST. Some parts seem to support remote queries, and some parts even support create/update operations through POST. As an NE customer, we've contacted support and even they can't seem to provide us with a clear answer.
Of course, there's always SOAP, but that would require a lot of study, since it looks pretty closely bound to the client and we have no way of telling how stable and consistent it will prove to be.
So hopefully, some internal documentation on REST exists which is more complete than the very specific examples found online. And finally, are there plans to expose more if not all of the zimbra functionality through REST?
Zimbra will prove to be a fantastic webservices platform, if these aspects are publicized in a clear and consistent manner.


stiller
Advanced member
Advanced member
Posts: 84
Joined: Fri Sep 12, 2014 11:32 pm

REST Api

Postby stiller » Fri Nov 20, 2009 6:37 am

Sorry to bump own post, but I think the REST API deserves some discussion.

After having worked my way through the somewhat terse REST.txt documentation and experimenting with the various calls, I have come to a few conclusions:
- The JSON returned through the REST interface is not deemed valid by several frameworks and online tools. Not sure why.

- Zimbra does not seem to support sending messages through a POST interface

- POSTing new content only seems to be supported for a few object types such as MIME or vcards? Allowing zimbra to create contacts, tasks, events etc. through JSON REST calls would be much more flexible.

- No DELETE?

- Updating an item is not an explicit function, but simply posting it again with a modify flag. Should be PUT.
That's all the time I had. Meanwhile, using a competing product and some JS frameworks, I was able to create a proof-of-concept client in a week. These are some very powerful concepts without the tight coupling of the XML/JSON API.
sposetti
Advanced member
Advanced member
Posts: 103
Joined: Sat Sep 13, 2014 12:51 am

REST Api

Postby sposetti » Fri Feb 19, 2010 1:34 pm

Not sure if you got the information you need but as an FYI: we published a Zimbra REST API Reference page here:
ZCS 6.0:Zimbra REST API Reference - Zimbra :: Wiki
Also, to your question about the SOAP APIs, there are a couple things to know:
- The Zimbra SOAP is the same API the zimbra web client uses to communicate with from browser-to-server. So those API interfaces include some advanced functions and are stable. As well, the API has admin commands to act on account/server data.

- You mention that SOAP API being bound to the client. You can call the SOAP API really from any client or technology you require. What might not have been clear, submitting a command to the SOAP API can handle two different formats: XML (in a SOAP envelop) and JSON.

- In the XML case, you do not need to use a client SOAP framework to for the XML, unless you want. You just need to form valid SOAP XML. We've had people even just use curl.

- If you don't want to bother with XML, you can submit in JSON format.

- The SOAP methods are documented in the ZimbraServer/docs/soap.txt and soap*.txt files. We are working to get that information online.
So the SOAP APIs aren't "REST" per se but it's a way of calling into Zimbra via URL and no external libraries required. You submit content to a URL and read a response (in either XML or JSON format).

Return to “Developers”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 3 guests