Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Gregor Tušar 7 posts 78 karma points
    Jun 02, 2023 @ 10:20
    Gregor Tušar
    0

    Delivery API - Multi-site setup - return only items under certain domain

    Hi, I set up an Umbraco v12 RC2 with multiple sites. Each of them have it's own domain. But when I try to get the data via Content Delivery API, I get items from all the domains (root or start items), regardles to which domain I call the API.

    For example I have:

    • Site A : site-a.com
    • Site B : site-b.com

    when I make a DeliveryAPI call to: https://site-a.com/umbraco/delivery/api/v1/content

    I get also the items which belong to domain site-b.com

    • How to get the domain(links) information via API call?
    • How to limit the api calls to return only items for a certain domain
    • Is it possible to restrict this somehow with Api-key which will be set up in frontent app?

    Thank you!

  • Simon Dingley 1474 posts 3431 karma points c-trib
    Aug 25, 2023 @ 12:46
    Simon Dingley
    0

    Did you get anywhere with this? I am also working on a multi-site install.

    I'm actually finding the DeliveryApi quite limiting at the moment so I am starting to build out my own controllers but utilise as much of the API inside of those controllers as I can so as not to have to reinvent the wheel.

    I guess you could potentially filter the responses based on the domain but so far I have not seen domains or cultures returned in the API so you would need to do your own content querying first. Everything is there in the API for you to return the results in a way that is consistent with the default API responses.

  • Gregor Tušar 7 posts 78 karma points
    Sep 04, 2023 @ 08:17
    Gregor Tušar
    0

    I think that Umbraco does the work for you already, but only for

    • /umbraco/delivery/api/v1/content/item/{id}

    • /umbraco/delivery/api/v1/content/item/{path}

    but not for:

    • /umbraco/delivery/api/v1/content
Please Sign in or register to post replies

Write your reply to:

Draft