Newer Version Available
Articles List
Syntax
- Available since release
- 38.0
- Method
- GET
- Formats
- JSON, XML
- Authentication
- OAuth accesstoken
- Endpoint
- [prefix]/support/knowledgeArticles
- HTTP headers
-
Accept: Optional. Can be either application/json or application/xml.Accept-language: Required. The article must be an active language in the user’s organization
- If the language code isn’t valid, an error message is returned: “The language code is not valid or not supported by Knowledge.”
- If the language code is valid, but not supported by Knowledge, then an error message is returned: “Invalid language code. Check that the language is included in your Knowledge language settings."
- Input:
-
string q: Optional, Performs an SOSL search. If the query string is null, empty, or not given, an SOQL query runs.
-
string channel: Optional, defaults to user’s context. For information on channel values, see Valid channel values.
- App: Visible in the internal Salesforce Knowledge application
- Pkb: Visible in the public knowledge base
- Csp: Visible in the Customer Portal
- Prm: Visible in the Partner Portal
-
string categories in map json format {“group1”:”category1”,”group2”:”category2”,...} )
Optional, defaults to None. Category group must be unique in each group:category pair, otherwise you get ARGUMENT_OBJECT_PARSE_ERROR.
-
string queryMethod values are: AT, BELOW, ABOVE, ABOVE_OR_BELOW. Only valid when categories are specified, defaults to ABOVE_OR_BELOW.
-
string sort: Optional, a sortable field name LastPublishedDate, CreatedDate, Title, ViewScore. Defaults to LastPublishedDate for query and relevance for search.
-
string order: Optional, either ASC or DESC, defaults to DESC. Valid only when sort is valid.
-
integer pageSize: Optional, defaults to 20. Valid range 1 to 100.
-
integer pageNumber : Optional, defaults to 1.
- Output:
- A page of online articles in the given language and category visible to the current user.
-
Article Page
A page of articles. The individual entries are article summaries so the size can be kept at a minimum.
-
Article Summary
A summary of an article used in a list of article responses. It shares similar properties to the Article Detail representation, as one is a superset of the other.
The “url” property always points to the Article Details resource endpoint. For information on valid channel values, see the channel parameter description
-
Data Category Group
An individual data category group, its root category, and a list of selected data categories in the group.
-
Data Category Summary
Provides a summary of data category information. The Summary and Detail responses share common properties.
-
Article Page
Example
- Input
-
- Output
-
Usage
Salesforce Knowledge must be enabled in your organization. This resource can be used in API version 38.0 and later. The Custom File Field is not supported because it returns a link to a binary stream. Use the language code format used in Which Languages Does Salesforce Support?.
Valid channel Values
- When using the options string channel, where the matching articles
are visible, the following values are valid.
- App–Visible in the internal Salesforce Knowledge application
- Pkb–Visible in the public knowledge base
- Csp–Visible in the Customer Portal
- Prm–Visible in the Partner Portal
- If channel isn’t specified, the default value is determined
by the type of user.
- Pkb for a guest user
- Csp for a Customer Portal user
- Prm for a Partner Portal user
- App for any other type of user
- If channel is specified, the specified value may be used to
retrieve articles.
- For guest, Customer Portal, and Partner Portal users, if the specified channel is other than the channel accessible to the user, an error is returned.
- For all users other than guest, Customer Portal, and Partner Portal users, the specified channel value is used.