Skip to main content

@wildix/wim-knowledge-base-client > CreateKnowledgeBaseCommand

CreateKnowledgeBaseCommand class

Create a new knowledge base

Signature:

export declare class CreateKnowledgeBaseCommand extends CreateKnowledgeBaseCommand_base 

Extends: CreateKnowledgeBaseCommand_base

Example

Use a bare-bones client and the command you need to make an API call.

import { KnowledgeBaseClient, CreateKnowledgeBaseCommand } from "@wildix/wim-knowledge-base-client"; // ES Modules import
// const { KnowledgeBaseClient, CreateKnowledgeBaseCommand } = require("@wildix/wim-knowledge-base-client"); // CommonJS import
const client = new KnowledgeBaseClient(config);
const input = { // CreateKnowledgeBaseInput
name: "STRING_VALUE", // required
description: "STRING_VALUE",
dataSources: [ // DataSourceIdsList // required
"STRING_VALUE",
],
companyId: "STRING_VALUE",
};
const command = new CreateKnowledgeBaseCommand(input);
const response = await client.send(command);
// { // CreateKnowledgeBaseOutput
// knowledgeBase: { // KnowledgeBaseItem
// name: "STRING_VALUE", // required
// description: "STRING_VALUE",
// dataSources: [ // DataSourceIdsList // required
// "STRING_VALUE",
// ],
// id: "STRING_VALUE", // required
// companyId: "STRING_VALUE", // required
// createdAt: "STRING_VALUE", // required
// updatedAt: "STRING_VALUE", // required
// },
// };