ElementAPI endpoint routing syntax for multi-level structure Would like to be able to handle requests for structured requests so that it may be handled in one endpoint 

    about.json
    about/the-team.json
    about/contact/london.json


Presumably a form of regex would be required for this to work?
Contemplating:

    pages/about.json
    pages/about/the-team.json
    pages/about/contact/london.json


All though how would you prepare a check for 'pages' as your first node?

Currently have this but not fees able. 

   '&lt;slug:{slug}&gt;*.json' =&gt; function($slug) {


thanks
Quite a simple solution set the criteria to uri and you just pass the endpoint as is as a catch all.

$normal =  preg_replace('/.json/', '', craft()-&gt;request-&gt;path);
return [
        'endpoints' =&gt; [
            craft()-&gt;request-&gt;path =&gt; [
                'elementType' =&gt; 'Entry',
                'criteria' =&gt; ['uri' =&gt; $normal],
                'first' =&gt; true,
                'transformer' =&gt; new DetailTransformer(),
            ],
        ]
    ];