Answered

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


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

Best answer by Roy 4 May 2021, 10:31

View original

3 replies

Badge

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"

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

 

@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!

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

Reply