getResources()

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

Parameters: 

  • resource* - (articles) The type of the resource.
  • departmentId (Optional) - The department ID to fetch resource categories associated with it.
  • parentCategoryId (Optional) - The category ID to get articles.
  • searchKey (Optional) - A search keyword to further filter the results.
  • page (Optional) - The page number to fetch (Default value is 1).
  • limit (Optional) - The maximum number of articles to be fetched per page (Default & maximum value is 99).
  • completion - The callback to get the resources.

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

Syntax

CopiedZohoSalesIQ.KnowledgeBase.getResources(resource: SIQResourceType, departmentId: String, parentCategoryId: String, searchKey: String, page: Int, limit: Int,  completion: { Bool,  SIQError, [SIQKnowledgeBaseResource], Bool in 

})

Example

CopiedZohoSalesIQ.KnowledgeBase.getResources(.articles, departmentId: "001", parentCategoryId: "002", searchKey: "test", page: 1, limit: 99,  completion: { success, error, resources, moreDataAvailable in 

})