最近更新时间:2026-11-03 19:52:57
删除向量索引中的指定向量数据。使用此接口,您必须是这个 Bucket 的 Owner 或拥有 ks3:DeleteVectors 权限。
POST /DeleteVectors HTTP/1.1
Host: ks3vectors-cn-beijing.ksyuncs.com
Authorization: authorization string
Date: Mon, 10 Dec 2025 12:49:14 GMT方式一:使用索引资源标识 indexKrn 指定目标索引。
{
"indexKrn": "string",
"keys": […]
}方式二:使用 indexName + vectorBucketName 组合指定目标索引。
{
"indexName": "string",
"vectorBucketName": "string",
"keys": […]
}该接口不使用请求参数。
该接口仅使用公共请求头。
请求体为一段删除向量的JSON,请求体内相关元素的具体描述如下:
参数 | 是否必填 | 类型 | 说明 |
indexKrn | 否(与 | String | 向量索引资源名,格式为 |
indexName | 否(与 | String | 向量索引名称。长度为 3~63 字符,仅允许小写字母和数字,首字符必须是字母。 |
vectorBucketName | 否(与 | String | 向量存储桶名称。长度为 3~63 字符,允许小写字母、数字和 |
keys | 是 | Array | 目标向量的主键列表,数组长度为 1~500,单个 |
segmentCount 与 segmentIndex 必须同时提供或同时省略:只提供其中一个返回 400 SegmentParamsIncomplete;segmentIndex 大于 segmentCount 返回 400 InvalidSegmentIndex。
该接口仅返回公共响应头。
该接口不返回响应体。
POST /DeleteVectors HTTP/1.1
Host: ks3vectors-cn-beijing.ksyuncs.com
Date: Tue, 30 Dec 2025 08:46:33 GMT
Content-Type: application/json
Content-Length: 45
Content-MD5: 1B2M2Y8AsgTpgAmY7PhCfg==
Authorization: q-sign-algorithm=sha1&q-ak=************************************&q-sign-time=1558882298;1558889498&q-key-time=1558882298;1558889498&q-header-list=content-length;date;host&q-url-param-list=&q-signature=****************************************
{
"indexName": "exampleindex",
"vectorBucketName": "example-bucket",
"keys": ["doc-001", "doc-002", "doc-003"]
}HTTP/1.1 200 OK
Content-Length: 0
Connection: keep-alive
Date: Tue, 30 Dec 2025 08:46:33 GMT
Server: KS3
x-kss-request-id: 54a47bda18ac4e6e91de369add54218***HTTP 状态码 | 错误码 | 描述 | 典型触发场景 |
400 | ValidationException | 请求不合法 |
|
403 | AccessDeniedException | 访问被拒绝 | 无 |
404 | NotFoundException | 资源不存在 | 指定的向量桶或向量索引不存在。 |
500 | InternalServerException | 服务内部错误 | 服务内部异常。 |
具体错误码通过响应头 x-kss-error-code 返回。
错误响应体格式如下,fieldList 仅校验类错误携带;非校验类错误只返回 message:
{"message": "The indexName is invalid.", "fieldList": [{"path": "/indexName", "message": "indexName must be 3-63 characters, only lowercase letters and digits, starting with a lowercase letter."}]}
纯净模式
