Path

ez.no / documentation / ez publish / technical manual / 4.6 / features / rest api / extension functionality / steps / step 1: understanding the r...


This is the old documentation center for eZ Publish 4. We are currently migrating the eZ Publish documentation to http://confluence.ez.no the eZ Publish 5 documentation platform. Documentation for the eZ Publish legacy components are still located on this site, as well as all documentation for earlier releases.

Step 1: Understanding the REST URI pattern

After going through the installation process, please continue with the REST API functionality below:

The resource URIs provided by default by the eZ Publish REST extension support the following convention:

/<prefix>/ + <provider>/<version> + /<function>/<params>

For the built-in REST API, the default provider name is “ezp”. The version token is build as “v + integer” for example v1 for REST API version one. The global prefix (first URI part) can be defined in the REST configuration as settings/rest.ini.[System].ApiPrefix.

The RegExp based URI filtering is handled by a default “ezpRestDefaultRegexpPrefixFilter” class implementation where <provider> and <version> data are used for routs filtering. Developers can implement custom filters by implementing the “ezpRestPrefixFilterInterface” in first place and then updating the “rest.ini.[System].PrefixFilterClass” accordingly.

Getting implementation ideas out of the “ezpRestDefaultRegexpPrefixFilter” can be a good start.

Geir Arne Waaler (19/01/2011 12:40 pm)

Geir Arne Waaler (21/01/2011 10:34 am)


Comments

There are no comments.