getResources()

The ZohoSalesIQ.KnowledgeBase.getResources API allows to get a list of resources (articles). To get a specific resource category list, use the below parameters as filters. 

Parameters: 

  • type * - (Article) The type of the resource.
  • departmentId (Optional) - Department ID to fetch resource associated with it.
  • parentCategoryId (Optional) - Category ID to get the articles.
  • searchKey (Optional) - A search keyword to further filter the results.
  • page (Optional) - Specify the number of pages. (Default value is 1)
  • limit (Optional) - Specify the number of articles to be fetched for a page. (Default & maximum value is 99)
  • result - The callback to get the result.
  • error - The callback function to get the error.

Result

  • resources: A list of resources (Articles).
  • moreDataAvailable: A boolean indicating an excess of resources beyond the specified page limit​.

Note:

  • The content in the resource object will be null by default. To get the resource content, use the getSingleResource() API.
  • Fields marked * are mandatory

Error code

CodeMessage
500Mobilisten SDK not initialized
600No network connection
605Mobilisten is disabled

Example

CopiedZohoSalesIQ.KnowledgeBase.getResources(ZohoSalesIQ.Resource.ARTICLES, 'department_id', 'parent_category_id', 'page', 'limit', 'searchKey', function(result) {

}, function(error) {

})