Multisite and Content Delivery API
a
When using the Content Delivery API in a multi site setup whats the best way to filter just one sites nodes? Using decendants? but then doing a single call for the home node? http://localhost:59503/umbraco/delivery/api/v2/content?fetch=descendants:fe081cf5-376e-4aad-9f69-a0b627a3b660 Or have I missed a better option?
m
Personally I would try to avoid fetching descendants from the root node as that could potentially be a resource-demanding operation if the site structure is large. I guess it kind of comes down to how you've structured the multi-site solution. Personally I always use separate Document Types for each site/client and separate Indexes to ensure that one site/client's content never gets mixed in with another. If your site share the same types then I suppose you could look into extending the API with a custom selector that would filter the results based on the root node: https://docs.umbraco.com/umbraco-cms/v/13.latest-lts/reference/content-delivery-api/extension-api-for-querying
14 Views