跳转到主要内容
POST
/
base
/
{baseId}
/
sql-query
cURL
curl --request POST \
  --url https://app.teable.ai/api/base/%7BbaseId%7D/sql-query \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
  --header 'content-type: application/json' \
  --data '{"sql":"SELECT * FROM table_name LIMIT 10"}'
{
  "rows": [
    {}
  ]
}

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

路径参数

baseId
string
必填

The base ID to execute query on

请求体

application/json
sql
string
必填

The SQL query to execute

Minimum string length: 1
示例:

"SELECT * FROM table_name LIMIT 10"

响应

200 - application/json

Query executed successfully

rows
object[]
必填

The query result rows

Last modified on March 5, 2026