In this example wagtail is deployed to cms.example.com and is managing content for foo.example.com and bar.example.com as a headless CMS.
When accessing the Pages API on cms.example.com/api/pages/ only the pages for the current active site (cms.example.com) are returned.
To get the content for the "foo" and "bar" sites cms.example.com/api/ also needs to be available as foo.example.com/api/ and bar.example.com/api/ (e.g. using a proxy).
Is it possible to query the API for pages from other sites without having to go through some proxy?
Wagtail's API is a fairly thin layer on top of Django Rest Framework, and you should feel encouraged to customise it or roll your own.
Filtering pages by the current site happens in the
PagesAPIEndpoint.get_querysetmethod, and the simplest way of disabling that behaviour would be to subclassPagesAPIEndpointto override that method, and register your custom subclass in urls.py in place of the original.