列出路由
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必填 | 示例值 | 描述 |
|---|---|---|---|---|
Action | String | 是 | ListRoutes | 要执行的操作,取值:ListRoutes。 |
Version | String | 是 | 2025-10-30 | API的版本,取值:2025-10-30。 |
ServiceName | String | 是 | my-vikingdb-service | 服务名称 @example:my-vikingdb-service |
Keyword | String | 否 | search | 关键词搜索 @example:search |
Method | String | 否 | POST | HTTP方法过滤 @example:POST |
Status | String | 否 | Active | 状态过滤:Active, Inactive @example:Active |
SortBy | String | 否 | Priority | 排序字段:CreatedAt, UpdatedAt, RouteName, Priority @example:Priority |
SortOrder | String | 否 | Asc | 排序方向:Asc, Desc @example:Asc |
PageNumber | Integer | 否 | 1 | 页码,从1开始 @example:1 |
PageSize | Integer | 否 | 10 | 每页条数,默认10,最大100 @example:10 |
下表仅列出本接口特有的返回参数。更多信息请参见返回结构。
参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
Items | Array of Object | example | 路由列表 |
PageInfo | Object | example | 分页信息 |
POST { "ServiceName": "my-vikingdb-service", "Keyword": "search", "Method": "POST", "Status": "Active", "SortBy": "Priority", "SortOrder": "Asc", "PageNumber": 1, "PageSize": 10 }
{ "ResponseMetadata": { "Action": "ListRoutes", "Region": "cn-north-1", "Service": "***", "Version": "2025-10-30", "RequestId": "20230604110420****100232280022D31" }, "Result": { "Items": [ { "Path": "/api/v1/collection/:collection_name/search", "Method": "POST", "Status": null, "ApiSpec": { "ActionType": "READ", "Extractors": [ { "Path": "/collection_name", "IsAuth": false, "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" } ], "PageInfo": { "PageSize": 10, "PageNumber": 1, "TotalCount": 100 } } }
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。
状态码 | 错误码 | 说明 |
|---|---|---|
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 不可达 |