I’ve seen a few threads about REST API for Kirby. It seems like much work.
Would it not be easier to base it on the functions from the cheatsheet?
This code for example:
echo $page->children()->findByURI(‘some-page’)->title();
As url
Some characters are not allowed in an url so it needs to be changed a little bit but something like this:
http://example.com/api/$page-children()-findByURI('some-page')-title()
The advantage would be that it relies more on Kirby and less of own code. To prevent hacking the API could contain a list of allowed function calls, as well as a token.