Path

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


Caution: This documentation is for eZ Publish legacy, from version 3.x to 6.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

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 11:40 am)

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


Comments

There are no comments.