Forums / General / eZ Publish Rest API

eZ Publish Rest API

Author Message

Alexandre Henriet

Tuesday 02 August 2011 6:52:19 am

Hi,I'm trying to use the eZ Publish REST API with eZ Publish version

I don't want to extend the REST API, just to use "the initial set of resources exposed by the eZ Publish REST API "

When I go to http://myhost:myport/api/ezp/v1/content/node/80 (existing node), I get the traditional
"An unexpected error has occurred. Please contact the webmaster."

And in the log files :[ Aug 02 2011 15:38:48 ] Unexpected error, the message was : No routes are defined in the router. in /opt/app/ezpublish/htdocs/lib/ezc/MvcTools/src/router.php on line 77

Here is the related configuration:

[CacheSettings]# Global switch to enable/disable REST application cacheApplicationCache=enabled


[Authentication]RequireAuthentication=enabled# AuthenticationStyle=ezpRestOauthAuthenticationStyleAuthenticationStyle=ezpRestBasicAuthStyleRequireHTTPS=disabled# Default user to authenticate when authentication is disabled or the route used doesn't need authentication# If left empty, site.ini/[UserSettings].AnonymousUserID will be usedDefaultUserID=


[RouteSettings]RouteSettingImpl=ezpRestIniRouteFilter# Pattern for the skip filter# SkipFilter[]=controller_action;version# If the version component is not listed version "1" is assumed.SkipFilter[]SkipFilter[]=ezpRestErrorController_showSkipFilter[]=ezpRestAuthController_basicAuthSkipFilter[]=ezpRestAuthController_oauthRequiredSkipFilter[]=ezpRestOauthTokenController_handleRequest# Skip (auth) filter for every action in 'myController' which is of API version 2#SkipFilter[]=myController_*;2


Am I missing something ?

Thanks in advance,Alex

Alexandre Henriet

Wednesday 03 August 2011 12:54:47 am

Ok, I finally solved my problem thanks to :

As I'm not the first one to meet the problem, it might be useful to mention in the documentation that an extension is still required to use the REST API despite the core functionality is integrated in the kernel.