Refa: empty ids means no-op operation (#13439)

### What problem does this PR solve?

Empty ids means no-op operation.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
- [x] Documentation Update
- [x] Refactoring

---------

Co-authored-by: writinwaters <cai.keith@gmail.com>
This commit is contained in:
Yongteng Lei
2026-03-06 18:16:42 +08:00
committed by GitHub
parent 7781c51a21
commit 51be1f1442
43 changed files with 446 additions and 190 deletions

View File

@@ -676,9 +676,8 @@ curl --request DELETE \
- `"ids"`: (*Body parameter*), `list[string]` or `null`, *Required*
Specifies the datasets to delete:
- If `null`, all datasets will be deleted.
- If an array of IDs, only the specified datasets will be deleted.
- If an empty array, no datasets will be deleted.
- If omitted, or set to `null` or an empty array, no datasets are deleted.
- If an array of IDs is provided, only the datasets matching those IDs are deleted.
#### Response
@@ -1764,7 +1763,9 @@ curl --request DELETE \
- `dataset_id`: (*Path parameter*)
The associated dataset ID.
- `"ids"`: (*Body parameter*), `list[string]`
The IDs of the documents to delete. If it is not specified, all documents in the specified dataset will be deleted.
The IDs of the documents to delete.
- If omitted, or set to `null` or an empty array, no documents are deleted.
- If an array of IDs is provided, only the documents matching those IDs are deleted.
#### Response
@@ -2124,7 +2125,9 @@ curl --request DELETE \
- `document_ids`: (*Path parameter*)
The associated document ID.
- `"chunk_ids"`: (*Body parameter*), `list[string]`
The IDs of the chunks to delete. If it is not specified, all chunks of the specified document will be deleted.
The IDs of the chunks to delete.
- If omitted, or set to `null` or an empty array, no chunks are deleted.
- If an array of IDs is provided, only the chunks matching those IDs are deleted.
#### Response
@@ -2796,7 +2799,9 @@ curl --request DELETE \
##### Request parameters
- `"ids"`: (*Body parameter*), `list[string]`
The IDs of the chat assistants to delete. If it is not specified, all chat assistants in the system will be deleted.
The IDs of the chat assistants to delete.
- If omitted, or set to `null` or an empty array, no chat assistants are deleted.
- If an array of IDs is provided, only the chat assistants matching those IDs are deleted.
#### Response
@@ -3174,7 +3179,9 @@ curl --request DELETE \
- `chat_id`: (*Path parameter*)
The ID of the associated chat assistant.
- `"ids"`: (*Body Parameter*), `list[string]`
The IDs of the sessions to delete. If it is not specified, all sessions associated with the specified chat assistant will be deleted.
The IDs of the sessions to delete.
- If omitted, or set to `null` or an empty array, no sessions are deleted.
- If an array of IDs is provided, only the sessions matching those IDs are deleted.
#### Response
@@ -4538,7 +4545,9 @@ curl --request DELETE \
- `agent_id`: (*Path parameter*)
The ID of the associated agent.
- `"ids"`: (*Body Parameter*), `list[string]`
The IDs of the sessions to delete. If it is not specified, all sessions associated with the specified agent will be deleted.
The IDs of the sessions to delete.
- If omitted, or set to `null` or an empty array, no sessions are deleted.
- If an array of IDs is provided, only the sessions matching those IDs are deleted.
#### Response