From 4f507c0058c844f2d596d102be7493abab2a2958 Mon Sep 17 00:00:00 2001 From: writinwaters <93570324+writinwaters@users.noreply.github.com> Date: Mon, 9 Mar 2026 21:14:45 +0800 Subject: [PATCH] Docs: Updated Switch chunk availability (#13482) ### What problem does this PR solve? A quick editorial pass. ### Type of change - [x] Documentation Update --- docs/references/http_api_reference.md | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/docs/references/http_api_reference.md b/docs/references/http_api_reference.md index 907e220230..1f50d5753e 100644 --- a/docs/references/http_api_reference.md +++ b/docs/references/http_api_reference.md @@ -2220,11 +2220,11 @@ Failure: --- -### Switch chunks availability +### Update chunk availability **POST** `/api/v1/datasets/{dataset_id}/documents/{document_id}/chunks/switch` -Switches the availability of specified chunks (enable or disable chunks for retrieval). +Updates or switches the availability status of specified chunks, controlling whether they are available for retrieval. #### Request @@ -2234,9 +2234,9 @@ Switches the availability of specified chunks (enable or disable chunks for retr - `'Content-Type: application/json'` - `'Authorization: Bearer '` - Body: - - `"chunk_ids"`: `list[string]` (*Required*) List of chunk IDs to switch. - - `"available_int"`: `integer` (*Optional*) `1` for available, `0` for unavailable. Mutually exclusive with `"available"`. - - `"available"`: `boolean` (*Optional*) Availability status. Mutually exclusive with `"available_int"`. Must provide either `available_int` or `available`. + - `"chunk_ids"`: `list[string]` (*Required*) + - `"available_int"`: `integer` (*Optional*) + - `"available"`: `boolean` (*Optional*) ##### Request example @@ -2258,12 +2258,16 @@ curl --request POST \ The ID of the dataset. - `document_id`: (*Path parameter*) The ID of the document. -- `"chunk_ids"`: (*Body parameter*), `list[string]`, *Required* - List of chunk IDs whose availability is to be switched. -- `"available_int"`: (*Body parameter*), `integer` - `1` for available (chunk participates in retrieval), `0` for unavailable. Either this or `"available"` must be provided. -- `"available"`: (*Body parameter*), `boolean` - Availability status. `true` for available, `false` for unavailable. Alternative to `"available_int"`. +- `"chunk_ids"`: (*Body parameter*), `list[string]` (*Required*) + IDs of the chunks whose availability status is to be updated. +- `"available_int"`: (*Body parameter*), `integer` (*Optional*) + Availability status for the specified chunks. Mutually exclusive with `"available"`. You must provide either `available_int` or `available`, *not* both. + - `1`: Available, + - `0`: Unavailable. +- `"available"`: (*Body parameter*), `boolean` (*Optional*) + Availability status of the specified chunks. Mutually exclusive with `"available_int"`. You must provide either `available` or `available_int`, *not* both. + - `true`: Available, + - `false`: Unavailable. #### Response