Can we get list of all articles in a collection using the REST API? | Community
Skip to main content
Answered

Can we get list of all articles in a collection using the REST API?

  • May 4, 2021 12:21 AM UTC
  • 6 replies
  • 745 views

Can we get list of all articles in a collection using the REST API?

Best answer by Roy

Hello @shraddha a​ ,

 

You can get list of all articles via API call - https://api.intercom.io/articlesand then filter results by collection ID:

-----------------------------------------------------------------------------

 "id": "5016408",

    "type": "article",

    "workspace_id": " ",

    "title": "Test Article",

    "description": "",

    "body": "<p class=\"no-margin\">Text Article</p>",

    "author_id": 3998818,

    "state": "published",

    "created_at": 1615293528,

    "updated_at": 1620116598,

    "url": " ",

    "parent_id": 2628861, (Collection ID).

    "parent_type": "collection"

-----------------------------------------------------------------------------

 

View original

6 replies

Roy
Top Expert ✨
Forum|alt.badge.img+7
  • Top Expert ✨
  • Answer
  • May 4, 2021 8:31 AM UTC

Hello @shraddha a​ ,

 

You can get list of all articles via API call - https://api.intercom.io/articlesand then filter results by collection ID:

-----------------------------------------------------------------------------

 "id": "5016408",

    "type": "article",

    "workspace_id": " ",

    "title": "Test Article",

    "description": "",

    "body": "<p class=\"no-margin\">Text Article</p>",

    "author_id": 3998818,

    "state": "published",

    "created_at": 1615293528,

    "updated_at": 1620116598,

    "url": " ",

    "parent_id": 2628861, (Collection ID).

    "parent_type": "collection"

-----------------------------------------------------------------------------

 


  • Author
  • New Participant
  • May 13, 2021 10:19 PM UTC

@roy s11​ Suppose we only have 1 collection with 2 sections with 2 articles each. If we call list all articles API will the API return the articles as type "sections" or type "collection" or both? what takes preference?

Thanks in advance!


  • New Participant
  • Aug 1, 2023 1:57 PM UTC

This is horrible, why there is no filter whatsoever on the get calls?


  • New Participant
  • Sep 9, 2024 9:01 AM UTC

Is there any update on this? Fetching all articles and manually filtering them does not seem like a feasible solution when there’s hundreds of articles. Why doesn’t the collections endpoint include article ids OR why can’t we pass a collection id filter to the articles endpoint


I agree with what is being said above. It doesn’t look like a scalable enough solution for a great headless integration. Is there a plan to introduce filtering on top of the pagination feature?


  • Jan 12, 2025 11:32 PM UTC

Hey everyone this is a good shout for a feature request over at our @Product Wishlist​ 🙇🏾