How to delete an uploaded file via Qna Maker API?

Marc Hollyoak 61 Reputation points

Hi team,

I understand that I can add another file to an existing KB via API using Update (Add) KB using 'fileName' and 'fileURI' of FileDTO:

However, after the file is uploaded, is it possible to delete the same file via API (as you can easily do in the QnA Maker portal). The delete function refers to 'sources', but not 'fileName' as in the FileDTO:

1) Do I use this delete function with 'sources' set to the 'fileName(s)' required to be deleted?
2) Is 'fileName' just used as a label 'source' within the KB, thus QnA Maker uses the 'fileURI' only to locate and upload the file?

Many thanks


Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,446 questions
0 comments No comments
{count} vote

Accepted answer
  1. Ramr-msft 17,621 Reputation points

    @Marc Hollyoak Thanks for the question. Yes, you can use the 'sources' set to List of source to be deleted from knowledgebase. Can you please share the sample and any error that you are getting.

    Here is the quickstart sample using preview SDK.

0 additional answers

Sort by: Most helpful