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)