lingchu
  1. db
lingchu
  • db
    • 获取模型列表
      GET
    • 创建记录
      POST
    • 查询单条记录
      POST
    • 查询列表
      POST
    • 统计数量
      POST
    • 更新记录
      POST
    • 删除记录
      POST
  • health
    • 数据库健康检查
      GET
  • Onebot V11 Root Http
    POST
  • Onebot V11 Http
    POST
  • Onebot V11 Http Slash
    POST
  • 数据模型
    • APIErrorResponse
    • CreateReq
    • AffectedResponse
    • DeleteReq
    • CountResponse
    • GetOneReq
    • ListReq
    • ErrorDetail
    • UpdateReq
    • HealthResponse
    • ModelsResponse
    • RecordListResponse
    • RecordResponse
  1. db

查询单条记录

POST
/api/db/{model_name}/get_one
按条件查询单条记录(最多返回 1 条)。

请求参数

Path 参数

Body 参数application/json必填

示例
{
    "filters": {
        "id": 1
    }
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://dev-cn.your-api-server.com/api/db/BotConfig/get_one' \
--header 'Content-Type: application/json' \
--data-raw '{
    "filters": {
        "id": 1
    }
}'

返回响应

🟢200
application/json
Successful Response
Body

示例
{
    "status": "success",
    "message": "ok",
    "data": {
        "property1": "string",
        "property2": "string"
    }
}
🟠400
🟠404
🟠409
🟠422
🔴500
修改于 2025-12-27 17:30:02
上一页
创建记录
下一页
查询列表
Built with