This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Extensions » Unable to get REST API working

Unable to get REST API working

Unable to get REST API working

Wednesday 29 May 2013 1:37:56 pm - 2 replies


I am new to Ez Publish, I would like to make the default Rest API working as a first step and next developing my own Rest API extension for mobile communication purpose but I am blocked at the first one.

when I try to get the result from "" I get "{"error_message":"Not Found"}"

configurations are done:




 /* #?ini charset="utf-8"?
[Authentication]RequireAuthentication=disabled*/ ?>


DirectoryIndex index.php
RewriteEngine On
RewriteRule api index_rest.php [L]
RewriteRule ^index_rest\.php - [L]...

I apologize for my English.

Ez Publish version 4.5

Edit3: I tried all rewriterules below, still not working except the last one.

# RewriteRule ^/api/ /index_rest.php [L] 
# RewriteRule ^api/(.*) /index_rest.php/$1 [R=302,NC] 
# RewriteRule ^/api/(.*) /index_rest.php/api/$1 [NC,L] 
RewriteRule api index_rest.php [L] 

But it seems to create conflit when I try to add new extension... I added a new extension and when I try to access to it I got an error on the log file:

Unexpected error, the message was : The API provider 'mobile' could not be found. in\kernel\private\rest\classes\rest_provider.php on line 37

Modified on Thursday 30 May 2013 10:35:45 am by AbdelAli Eramli

Friday 31 May 2013 2:12:40 pm

I think the most simple rewrite rule for your case is:

# RewriteRule ^/api /index_rest.php [L]

it should work, as long as you do not have content names starting with "api..."

As for your own extension adding rest functionality, it should also be registered in rest.ini.append.php

See for an example of an extensions doing that

Friday 31 May 2013 5:44:37 pm

Thank you for your reply, but the RewriteRule did not work for me.I regenerate autoload, It's working know. ( cmd command !! )


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from