eZ Publish REST API developer preview release
Wednesday 29 September 2010 8:39:27 am
- Currently 5 out of 5 Stars.
- 1
- 2
- 3
- 4
- 5
As announced earlier during the eZ Conference 2010 and the various eZ Publish Fuji events (Oslo, Paris), developer preview releases for the next generation eZ Publish APIs are also be made available.
Note: a newer version of the REST Interface preview is available. See the blog post about REST preview 1.2.
REST API
Heavily requested by both professionals and community users, these new interfaces are being designed in order to make usage of eZ Publish as smooth and flexible as possible: the REST interface aims at giving access to the CMS features over HTTP using JSON or XML output, following the RESTful interface recommendations. Security is provided using an oAuth2 implementation. The whole interface uses the MVC pattern, on top of MvcTools, one of the eZ Components.
PHP API
The second part of this release is the eZ Publish PHP API (very early developer preview). The current state of the eZ Publish API wasn't on par with our objective of making the CMS as open as possible. The lack of documentation didn't expose the public parts of the API, and a new, ambitious implementation of a real API was the only possible choice. You will see by looking at the package examples that the chosen approach uses a fluent interface and establishes clearer terminology on top of the existing system.
HOW-TO
The API packages can be downloaded using the links below:
Of course, since a package without examples & documentation is like a geek without a keyboard, we have prepared some stuff for you.
First, at the root of both packages, you will find an INSTALL doc that will let you install both rest and oauth extensions on your eZ Publish instance. More general info can be found in the README file located inside the same package, in the ezpublish/extension/rest folder.
Icing on the cake, a full featured demonstration of how oAuth and REST can be used using PHP can be found on GIST, the github powered on-steroids pastebin: http://gist.github.com/602862. You can either download the file using the download button at the top, or clone the whole thing using the public clone URL. If you feel like sharing your work based on this, you can even edit it, which basically is a fork, and push your own version for others to see.
Your turn now !
The engineering team is eager to get feedback about the ideas exposed in these preview packages ! Your opinion is crucial at the current steps