sObjects Suggested Articles
Returns results on suggested articles for a Case, Work Order, or Work Order Line. These
suggestions are based on common keywords in the title, description, and other information that’s
entered before the record has been saved and assigned an ID. This resource is available in REST
API version 30.0 and later.
Salesforce Knowledge must be enabled in your organization. The user must have the “View Articles” permission enabled. The articles suggested include only the articles the user can access, based on the data categories and article types the user has permissions to view.
Articles are suggested based on a relevance algorithm. The suggestedArticles resource is designed to get the IDs of articles relevant to a case, work order, or work order line item. It’s intended to be used with other services that than use the IDs to get article data for display.
Syntax
- URI
- /services/data/vXX.X/sobjects/sObject/suggestedArticles?language=articleLanguage&subject=subject&description=description.
- Formats
- JSON, XML
- HTTP methods
- GET
- Authentication
- Authorization: Bearer token
- Request body
- None required
- Request parameters
-
Example
- Example Request
-
curl https://MyDomainName.my.salesforce.com/services/data/v64.0/sobjects/Case/suggestedArticles? language=en_US&subject=orange+banana&articleTypes=ka0&articleTypes=ka1 -H "Authorization: Bearer token"
- Example Response Body
-
[ { "attributes" : { "type" : "KnowledgeArticleVersion", "url" : "/services/data/v64.0/sobjects/KnowledgeArticleVersion/ka0D00000004CcQ" "Id" : "ka0D00000004CcQ" }, { "attributes" : { "type" : "KnowledgeArticleVersion", "url" : "/services/data/v64.0/sobjects/KnowledgeArticleVersion/ka0D00000004CXo" }, "Id" : "ka0D00000004CXo" } ]