Ajax request to a plugin?

First of all you need to change (:any) to (:all) in the pattern like in my example above.

Let’s say you want $page to be the projects page. The URL would then be /projects/gallery.json.