获取路由详情
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必填 | 示例值 | 描述 |
|---|---|---|---|---|
Action | String | 是 | GetRoute | 要执行的操作,取值:GetRoute。 |
Version | String | 是 | 2025-10-30 | API的版本,取值:2025-10-30。 |
ServiceName | String | 是 | my-vikingdb-service | 服务名称 @example:my-vikingdb-service |
RouteName | String | 是 | SearchVectors | 路由名称 @example:SearchVectors |
下表仅列出本接口特有的返回参数。更多信息请参见返回结构。
参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
Path | String | /api/v1/collection/:collection_name/search | 请求路径 @example:/api/v1/collection/:collection_name/search |
Method | String | POST | HTTP方法,多个用逗号分隔 @example:POST |
Status | String | active | 路由状态:inactive, active, draft @example:active |
ApiSpec | Object | example | API规范配置,用于提取资源标识和过滤响应 |
Priority | Integer | 100 | 路由优先级,越小越优先,默认100 @example:100 |
CreatedAt | Long | 1701504000000 | 创建时间(Unix时间戳毫秒) @example:1701504000000 |
RouteName | String | SearchVectors | 路由名称,在服务内唯一 @example:SearchVectors |
UpdatedAt | Long | 1701504000000 | 更新时间(Unix时间戳毫秒) @example:1701504000000 |
Description | String | "向量搜索接口" | 路由描述 @example:"向量搜索接口" |
ResourceType | String | Collection | 资源类型 @example:Collection |
PathMatchType | String | EXACT | 路径匹配类型 @example:EXACT |
PermissionPool | String | VikingDB | 权限池名称 @example:VikingDB |
AuthResourceType | String | Collection | 鉴权资源类型,不填则使用ResourceType @example:Collection |
SourceTemplateId | String | rt_vikingdb_search_001 | 来源路由模板ID @example:rt_vikingdb_search_001 |
POST { "ServiceName": "my-vikingdb-service", "RouteName": "SearchVectors" }
{ "ResponseMetadata": { "Action": "GetRoute", "Region": "cn-north-1", "Service": "***", "Version": "2025-10-30", "RequestId": "20230604110420****100232280022D31" }, "Result": { "Path": "/api/v1/collection/:collection_name/search", "Method": "POST", "Status": null, "ApiSpec": { "ActionType": "READ", "Extractors": [ { "Path": "/collection_name", "IsAuth": true, "Source": null, "ResourceType": "Collection" } ], "ActionValue": "search", "IdentifierType": null, "IdentifierValue": "/collection_name", "ResponseFilters": [ { "Mode": null, "IsAuth": true, "IdField": "id", "Attributes": [ { "Field": "/id", "Target": "ResourceId" } ], "FilterPath": "/data/items", "ResourcePath": "/data", "ResourceType": "Collection" } ] }, "Priority": 100, "CreatedAt": 1701504000000, "RouteName": "SearchVectors", "UpdatedAt": 1701504000000, "Description": "\"向量搜索接口\"", "ResourceType": "Collection", "PathMatchType": "EXACT", "PermissionPool": "VikingDB", "AuthResourceType": "Collection", "SourceTemplateId": "rt_vikingdb_search_001" } }
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。
状态码 | 错误码 | 说明 |
|---|---|---|
400 | InvalidParameter | 参数 %s 无效 |
404 | NotFound | 资源 %s 不存在 |
409 | Duplicated | 资源 %s 已存在 |
409 | StatusConflict | 状态冲突: %s |
422 | ParseFailed | 文档解析失败: %s |
429 | QuotaExceeded | 配额 %s 已达上限 |
500 | InternalError | 内部服务错误: %s |
501 | NotImplemented | 功能未实现: %s |
502 | UpstreamUnreachable | 后端服务 %s 不可达 |