Knowledge store items
Use these methods to add assets to a knowledge store as items, and to organize those items into named collections.
Knowledge store items
The KnowledgeStoreItems class provides methods to add and manage the items in a knowledge store.
Create a knowledge store item
Description: This method adds an asset to a knowledge store for processing. The operation is asynchronous. The item is created immediately with the queued status and processed in the background.
The asset must not exceed 5 GB.
Function signature and example:
Parameters
Return value
Returns a KnowledgeStoreItem object. The KnowledgeStoreItem object contains the following properties:
API Reference
Create a knowledge store item.
Related guide
Add assets to a knowledge store.
List knowledge store items
Description: This method returns a list of items in the specified knowledge store.
Function signature and example:
Parameters
Return value
Returns a Page<KnowledgeStoreItem> object that allows you to iterate through the paginated list of items. For the properties of each KnowledgeStoreItem object, see Create a knowledge store item.
API Reference
Retrieve a knowledge store item
Description: This method retrieves the details of a specific knowledge store item.
Function signature and example:
Parameters
Return value
Returns a KnowledgeStoreItem object. For its properties, see Create a knowledge store item.
API Reference
Retrieve a knowledge store item.
Delete a knowledge store item
Description: This method deletes the specified knowledge store item.
Function signature and example:
Parameters
Return value
This method does not return a value.
API Reference
Delete a knowledge store item.
Item collections
The KnowledgeStoreItemCollections class provides methods to organize items into named collections that you can reference together.
Create an item collection
Description: This method creates an item collection in the specified knowledge store. An item collection is a named collection of items. Use item collections to organize and reference subsets of items together.
Function signature and example:
Parameters
Return value
Returns a KnowledgeStoreItemCollection object. The KnowledgeStoreItemCollection object contains the following properties:
API Reference
List item collections
Description: This method returns a list of the item collections in the specified knowledge store.
Function signature and example:
Parameters
Return value
Returns a Page<KnowledgeStoreItemCollection> object that allows you to iterate through the paginated list of item collections. For the properties of each KnowledgeStoreItemCollection object, see Create an item collection.
API Reference
Retrieve an item collection
Description: This method retrieves the details of a specific item collection.
Function signature and example:
Parameters
Return value
Returns a KnowledgeStoreItemCollection object. For its properties, see Create an item collection.
API Reference
Update an item collection
Description: This method updates the name, description, and metadata fields of the specified item collection.
Function signature and example:
Parameters
Return value
Returns a KnowledgeStoreItemCollection object. For its properties, see Create an item collection.
API Reference
Delete an item collection
Description: This method deletes the specified item collection. The items themselves remain in the knowledge store.
Function signature and example:
Parameters
Return value
This method does not return a value.
API Reference
List items in an item collection
Description: This method returns a list of the items in the specified item collection.
Function signature and example:
Parameters
Return value
Returns a Page<KnowledgeStoreItem> object that allows you to iterate through the paginated list of items in the collection. For the properties of each KnowledgeStoreItem object, see Create a knowledge store item.
API Reference
List items in an item collection.
Add items to an item collection
Description: This method adds one or more items to the specified item collection. This operation is idempotent — items already in the collection are skipped. Every identifier must reference an existing item in the knowledge store.
Function signature and example:
Parameters
Return value
Returns a KnowledgeStoreItemCollection object. For its properties, see Create an item collection.
API Reference
Add items to an item collection.
Remove items from an item collection
Description: This method removes one or more items from the specified item collection. This operation is idempotent — identifiers that do not match a member of the collection are ignored. The items themselves remain in the knowledge store.
Function signature and example:
Parameters
Return value
This method does not return a value.