Newer Version Available
Search Suggested Article Title Matches
Syntax
- URI
- /services/data/vXX.X/search/suggestTitleMatches?q=searchString&language=articleLanguage&publishStatus=articlePublicationStatus
- Available since release
- 30.0
- Formats
- JSON, XML
- HTTP methods
- GET
- Authentication
- Authorization: Bearer token
- Request body
- None required
- Request parameters
-
Example for getting suggested articles with matching titles
1curl https://MyDomainName.my.salesforce.com/services/data/v56.0/search/suggestTitleMatches?
2q=orange+banana&language=en_US&publishStatus=Online -H "Authorization: Bearer token"Example JSON response body
1{
2 "autoSuggestResults" : [ {
3 "attributes" : {
4 "type" : "KnowledgeArticleVersion",
5 "url" : "/services/data/v56.0/sobjects/KnowledgeArticleVersion/ka0D00000004CcQ"
6 },
7 "Id" : "ka0D00000004CcQ",
8 "UrlName" : "orange-banana",
9 "Title" : "orange banana",
10 "KnowledgeArticleId" : "kA0D00000004Cfz"
11 } ],
12 "hasMoreResults" : false
13}Usage
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.
The Suggest Article Title Matches resource is designed to return display-ready data about likely relevant articles. Articles are suggested if their titles contain the entire query string, except stopwords, such as “a,” “for,” and “the.”
If the number of suggestions returned exceeds the limit specified in the request, the end of the response contains a field called hasMoreResults. Its value is true if the suggestions returned are only a subset of the suggestions available, and false otherwise.