eZ Community » Forums » Discussions » Extending eZ Publish’s REST API -...
expandshrink

Friday 24 December 2010 3:45:20 pm - 5 replies

» Read full tutorial

Introduction

At the end of this tutorial, you will be able to embed your custom RESTful interface into eZ Publish, to be further consumed by any 3rd party-service :

  • mobile application
  • external business application
  • web service
 

Monday 28 February 2011 7:32:18 pm

Nice intro. Now some questions:

1. Is there any description of how the different components interact (controllers, routers, views and whatnot)?

2. is it possible to have unversioned urls?

3. how to recover data in the controller's actions (get, post et similia?)

Tuesday 01 March 2011 12:25:02 pm

Some tips, for users of the 4.5 beta 1 release:

- to disable auth on your route, you need to use the SkipFilter paratemeter, with the name of the controller class and the actions that do not need to be authentified

- the example given here is not working anymore. the object returned by the action should be an ezpRestMvcResult

- there's a bug if you name your route the same as the provider in rest.ini

Saturday 28 April 2012 7:40:52 pm

Can I determine a specific siteaccess by URI Matching while accessing the rest API? Or does it always take the default siteaccess? Or, if defined, the host matching?

Sunday 29 April 2012 5:54:23 pm

@Jean-François you currently can not use uri-matching with the REST controller. There are a couple of issues already open in the issue tracker about that:

- the call to eZSys::init() in index_rest.php uses 'index.php' instead of 'index_rest.php'

- ezpMvcConfiguration::createRequestParser() has to be patched as well

At least, that's what I had to do to make it work without rewrite rules and match siteaccess based on uri...

Sunday 29 April 2012 6:24:34 pm

Quote from Gaetano Giunta :

@Jean-François you currently can not use uri-matching with the REST controller. There are a couple of issues already open in the issue tracker about that:

- the call to eZSys::init() in index_rest.php uses 'index.php' instead of 'index_rest.php'

- ezpMvcConfiguration::createRequestParser() has to be patched as well

At least, that's what I had to do to make it work without rewrite rules and match siteaccess based on uri...

Thanks for the reply, Gaetano! 

That's what I was assuming... Maybe that should be written into the documentation? 

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from