Fetch content representation (json) not related to regular php template?

Hi there,

I wonder if it’s possible to fetch data from a page.json.php that doesn’t correspond to a page.php ?

Concerning the context, I use Kirby as a headless CMS with Vue and I would like to use the content representations as a custom API for all data reading tasks so as to reserve routes only for data writing tasks, security and other more sensible operations.

I managed to fetch the same data from a virtual page created through a route or from a content representation related to a standard php template but not to an isolated content representation.

Thank you for your help

A content representation always needs an HTML version. But if you don’t need the standard HTML templates, you can use them for your JSON stuff instead (i.e. without the extension).