function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MoreThanWYSIWYGMoreThanWYSIWYG 

SF Knowledge - Query public articles through API

Is it possible to query all knowledge articles through the rest API without needing an ID, versionid, FIND, or anything like that? I am setting up a site that needs to pull in all online public articles within a specific data category.

This SOSL query works, but it needs a "Find":
FIND {"faq"} IN ALL FIELDS 
RETURNING Support_Article__kav(id, articlenumber, Title, Summary, Full_Description__c, FirstPublishedDate,LastPublishedDate, VersionNumber,IsDeleted, IsVisibleInPkb
 where PublishStatus='Online' and Language='en_US' )
WITH Data Category Savant_Knowledge__c below Savant_Consumers__c
I also got this working, but still, it needs a search term:
/services/data/v34.0/search/?q=FIND+%7B%22faq%22%7D+IN+ALL+FIELDS+RETURNING+Support_Article__kav%28id%2carticlenumber%2cTitle%2cSummary%2cFull_Description__c%2cFirstPublishedDate,LastPublishedDate%2cVersionNumber,IsDeleted%2cIsVisibleInPkb+where+isVisibleinPKB+%3D+True+and+PublishStatus%3D%27ONLINE%27+and+Language%3D%27en_US%27%29+WITH+Data+Category+Savant_Knowledge__c+below+Savant_Consumers__c


I need to be able to run an API call that just returns all articles that meet the specific criteria. Is it possible?
 
logontokartiklogontokartik
Unfortunately, there is no straightforward way you can get the list of articles via API. The attached link will provide all info about Knowledge and there is a section REST API which is wnat you might be looking at.

https://resources.docs.salesforce.com/sfdc/pdf/salesforce_knowledge_dev_guide.pdf

Thank you