import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
const deleteKnowledgeBaseResponse = await client.knowledgeBases.delete('knowledge_base_id');
console.log(deleteKnowledgeBaseResponse.knowledge_base_id);
{
"deleted": true,
"knowledge_base_id": "<string>"
}
Deletes a knowledge base.
This API can be used to delete a knowledge base by ID. To use this API, pass in the knowledge_base_id
that was returned from your Create Knowledge Base API call as a path parameter.
V2 and V1 Knowledge Bases are entirely separate and not backwards compatible. Users who have existing V1 knowledge bases will need to migrate their data to V2 knowledge bases.
import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
const deleteKnowledgeBaseResponse = await client.knowledgeBases.delete('knowledge_base_id');
console.log(deleteKnowledgeBaseResponse.knowledge_base_id);
{
"deleted": true,
"knowledge_base_id": "<string>"
}
Successful Response
The response is of type object
.