Ideas for Arc XP

Collections API should allow for more than 20 max elements

Currently when querying for Collections, we can only return 20 elements, requiring that we have multiple features with pagination or content sources with multiple calls the collections API when we populate more than 20 items in a collection.

  • Michael Newman
  • Feb 5 2020
  • Future consideration
  • Attach files
  • Michael Newman commented
    March 19, 2021 15:42

    We use pagination right now; we do paginate anytime we use collections in our content sources. We make additional requests because the collection content source doesn't provide all the fields we need, so we pepper these into the content from the Collection API already.

    We frequently have 25-30 stories on a PageBuilder page, and we are then required to make three calls to the API.

    I understand the tradeoffs of size, but the Collection API makes the content sources larger and slower than they need to be and is different from other content source calls. Responsible developers use Arc's APIs, but I think this 20 story limitation is not built this way. If a content source could reasonably have this much content without slowing the page (and I would argue that 25 stories are way lighter than an entire Pagination logic being built into the page), I think the source API should support this.

  • Megan DeLaunay commented
    March 17, 2021 18:59

    Hi! Sorry that my previous comment wasn't clear. The /collections endpoint in Content API does support pagination up to 500 total elements. The pagination specs can be seen in the API docs in ALC, and a comparison of the different Content API endpoints is presented in this document . The 20 element limit is for a single page.

  • Kathleen Buer commented
    March 17, 2021 15:43

    Could it be possible to allow for 20-40, 40-80 and so forth?


  • Megan DeLaunay commented
    March 02, 2020 20:33

    Hi Michael -- The limit of 20 what put in place in order to ensure no responses from Content API were too large. We'll continue to look at the size of responses coming back from Content API and see if it makes sense to up to the limit. Thanks!