向量数据库VikingDB
/api/v1/content/overview 接口用于读取 OpenViking 文件系统中目录的 L1 概览,适用于目录。
完成 API 鉴权说明 页面的 API Key 获取后,可调用本接口读取概览。
URI | /api/v1/content/overview | 统一资源标识符 |
|---|---|---|
请求方法 | GET | 客户端请求类型 |
请求头 | Authorization: Bearer | Bearer Token 鉴权 |
参数 | 类型 | 必选 | 默认值 | 备注 |
|---|---|---|---|---|
uri | string | 是 | -- | Viking URI |
字段 | 参数说明 |
|---|---|
status | 请求状态,成功为 |
result | 成功时返回的概览文本(Markdown 格式) |
telemetry | 遥测信息,通常为 |
error | 失败时返回的错误对象 |
error.code | 错误码字符串,常见值见下表 |
error.message | 可读的错误描述 |
常见错误码:
error.code | HTTP 状态码 | 说明 |
|---|---|---|
UNAUTHENTICATED | 401 | 缺少或无效的 API Key |
INVALID_ARGUMENT | 400 | 无效参数,如 uri 不是目录 |
INVALID_URI | 400 | 无效的 Viking URI 格式 |
NOT_FOUND | 404 | 资源未找到 |
curl -X GET "https://xxx/api/v1/content/overview?uri=viking://resources/docs/" \ -H "X-API-Key: your-key"
执行成功返回:
HTTP/1.1 200 OK Content-Type: application/json { "status": "ok", "result": "# 咖啡点单页设计\n\n## Brief Description\nThis repository houses all resources related to the design and development of a coffee ordering page...", "error": null, "telemetry": null }