## kb
Get articles and categories for the root of the Knowledge Base.
### kb.getArticlesAndCategories
Get articles and categories whose parent is categoryId
Search for articles and categories
### kb.getArticle
Get article.
### kb.getCategory
Get category.
### kb.update
The Knowledge Base is stored entirely in a local data store. The first time you make a request for KB data, the local data store is populated.
Manually populates the Knowledge Base.
### kb.clearLocalDataStore()
Manually clears the Knowledge Base.
### kb.hasNeverUpdated
Info about the local data store. See [kb.lastUpdateAt](🔗).
### kb.lastUpdateAt
Info about the local data store.
If the data store has been loaded at least once, you must manage updating it periodically on your own.
### completeObject()
Extended KB article properties and category properties
There are many extended attributes for articles and categories. the `completeObject()
` method on [KUSKBArticle](🔗) and [KUSKBCategory](🔗) objects lets you access this. The `rawJSON
` property is the same, but not parsed into a dictionary.
Article properties: [https://apidocs.kustomer.com/?version=latest#959b0560-da94-41bc-965f-234d0025c5aa](🔗)
Category properties: [https://apidocs.kustomer.com/?version=latest#0f9a0b2d-9d26-4f7d-abd1-1f3f0102958b](🔗)
### shared
The central object for managing Kustomer Knowledge Base-related activities.
## Getting Knowledge Base data
### getArticlesAndCategories(parentCategoryId:searchText:completion:)
Searches for articles and categories with the parent category id passed. If the parent category id is nil, searches for articles and categories belonging to the root category. To filter by a search string, pass a `searchText
` parameter.
See also [KUSKBItemBase](🔗).
### getArticle(id:completion:)
Gets a KUSKBArticle from the local database.
See also [KUSKBArticle](🔗).
### getCategory(id:completion:)
Gets a KUSKBCategory from the local database.
See also [KUSKBCategory](🔗).
## Updating
### lastUpdateAt
Last time the local Knowledge Base data store was completely refreshed
### hasNeverUpdated
If true, the Knowledge Base data store is empty and you’ve never asked the server for the data
### update(_:)
Updates the local Knowledge Base data store
### clearLocalDataStore()
Clears entire local data store