[GH-ISSUE #1895] [FEAT]: Improve API remove documents /v1/system/remove-documents #1232

Open
opened 2026-02-22 18:23:51 -05:00 by yindo · 1 comment
Owner

Originally created by @byzheng on GitHub (Jul 18, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1895

Originally assigned to: @timothycarambat on GitHub.

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

This is a following question (https://github.com/Mintplex-Labs/anything-llm/issues/1894). But I think it would be better to separately report.

After adding a new document with document/raw-text API, I want to remove this document with /system/remove-documents. There is some trouble to remove this document with names property in the DELETE request.

If id is used (i.e. 99502983-20fa-4cd1-bef5-e17cd0c56dae, I get an success response, but the document is still in the workspace.

Then I test the name retrieved from document api, i.e. raw-title-99502983-20fa-4cd1-bef5-e17cd0c56dae.json or ``

Are there known steps to reproduce?

No response

Originally created by @byzheng on GitHub (Jul 18, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1895 Originally assigned to: @timothycarambat on GitHub. ### How are you running AnythingLLM? AnythingLLM desktop app ### What happened? This is a following question (https://github.com/Mintplex-Labs/anything-llm/issues/1894). But I think it would be better to separately report. After adding a new document with `document/raw-text` API, I want to remove this document with `/system/remove-documents`. There is some trouble to remove this document with `names` property in the DELETE request. If id is used (i.e. `99502983-20fa-4cd1-bef5-e17cd0c56dae`, I get an `success` response, but the document is still in the workspace. Then I test the name retrieved from `document` api, i.e. `raw-title-99502983-20fa-4cd1-bef5-e17cd0c56dae.json` or `` ### Are there known steps to reproduce? _No response_
yindo added the enhancement label 2026-02-22 18:23:51 -05:00
Author
Owner

@timothycarambat commented on GitHub (Jul 22, 2024):

You will always get a 200 unless there is a server error:
ref: https://github.com/Mintplex-Labs/anything-llm/blob/7b42a67acf9df03cc9ff780beaf43ef4d5bf2e67/server/endpoints/system.js#L323

However, the correct path to put in is the folder + filename - the 200 will return even if the document is not found or deleted to prevent people trying to traverse or remove all documents.

In this case the document should be something like custom-documents/raw-title-99502983-20fa-4cd1-bef5-e17cd0c56dae - however this kind of nature for deletion should be revisited to be more trivial since it is indeed quite unclear.

@timothycarambat commented on GitHub (Jul 22, 2024): You will always get a 200 unless there is a server error: ref: https://github.com/Mintplex-Labs/anything-llm/blob/7b42a67acf9df03cc9ff780beaf43ef4d5bf2e67/server/endpoints/system.js#L323 However, the correct path to put in is the `folder` + `filename` - the 200 will return even if the document is not found or deleted to prevent people trying to traverse or remove all documents. In this case the document should be something like `custom-documents/raw-title-99502983-20fa-4cd1-bef5-e17cd0c56dae` - however this kind of nature for deletion should be revisited to be more trivial since it is indeed quite unclear.
yindo changed title from [FEAT]: Improve API remove documents /v1/system/remove-documents to [GH-ISSUE #1895] [FEAT]: Improve API remove documents /v1/system/remove-documents 2026-06-05 14:39:39 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#1232