Copied to clipboard

Flag this post as spam?

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


  • Andreas Jacobsen 2 posts 22 karma points
    7 days ago
    Andreas Jacobsen
    0

    Get all ancestors with Umbraco Heartcore

    I have a site with a bunch of nested data that I need to display on a single page. To do this I need to call many "pages" from one page. But trying using the REST API and Node client I can only get a max of 10 array results back. When querying "Inklud" shown in the image bellow I expect allot more than 10 results.

    Multiple levels of nested data structured after WCAG My query over REST is like this

    https://cdn.umbraco.io/content/<contentId>/descendants
    

    With Node client

    const audit= await client.delivery.content.ancestors.(<contentId>)
    

    Does anyone know how I can get all my results? I don't mind sharing login with Umbraco employees, but appreciate answers from everyone :)

  • Lindow 127 posts 1103 karma points admin hq
    7 days ago
    Lindow
    0

    Hi Andreas

    I recommend reaching out to the support team as it looks like something that would require backoffice access to investigate properly.

    You should in fact get all of the screenshotted nodes returned in the API response.

    It's a good idea to check if an API client like Postman gets the same result.

    That way we can exclude this from being a mysterious issue with the SDK and rather one on your project or even a general one.

  • Lindow 127 posts 1103 karma points admin hq
    7 days ago
    Lindow
    0

    Wait a sec. Just had a look at the docs and it looks like we have pagination for descendants. See here https://our.umbraco.com/Documentation/Umbraco-Heartcore/API-Documentation/Content-Delivery/content/#get-descendants

    Try with the params and see if you get more than 10 :)

Please Sign in or register to post replies

Write your reply to:

Draft