Skip to content

查询面板 SQLite 数据表(sites、databases、ftps、domain 等)

查询面板 SQLite 数据库中的任意表,支持搜索、分页、排序。这是获取各类资源 ID 的核心接口。

POST
https://your-panel.example.com:8888/data
查看 Markdown

Request bodyX-WWW-FORM-URLENCODEDrequired

  • request_timestringrequired

    Unix 时间戳;与接口密钥一起生成 request_token。

  • request_tokenstringrequired

    按 API 概览中的双重 MD5 签名算法生成。

  • actionstringrequired

    固定值 getData

  • tablestringrequired

    表名:sites、databases、ftps、domain、crontab、backup、config

  • typeoptionalstring

    筛选类型,-1 表示全部

  • searchoptionalstring

    搜索关键词

  • poptionalinteger

    页码

  • limitoptionalinteger

    每页数量

  • listoptionalstring

    true 返回数组格式

Returns

default

接口响应,业务状态见下方详细说明。

JSON
  • dataoptionalarray ofunknown

    数据记录列表

  • pageoptionalstring

    分页 HTML

  • whereoptionalstring

    查询条件

各操作详细说明

getDataaction=getData查询面板 SQLite 数据表(sites、databases、ftps、domain 等)

查询面板 SQLite 数据库中的任意表,支持搜索、分页、排序。这是获取各类资源 ID 的核心接口。

  • 路由:POST /data
  • action:getData

输入参数

参数名称 必选 类型 描述
action 是 String 固定值 getData
table 是 String 表名:sites、databases、ftps、domain、crontab、backup、config
type 否 String 筛选类型,-1 表示全部
search 否 String 搜索关键词
p 否 Integer 页码
limit 否 Integer 每页数量
list 否 String true 返回数组格式

输出参数

参数名称 类型 描述
data Array 数据记录列表
page String 分页 HTML
where String 查询条件

常用示例

查网站列表

action=getData&table=sites&type=-1
{"data": [{"id": 1, "name": "testapi.bt.local", "path": "/www/wwwroot/testapi.bt.local", "status": "1"}]}

查数据库列表

action=getData&table=databases&type=-1

查FTP用户列表

action=getData&table=ftps&type=-1

查域名列表

action=getData&table=domain&search=1&list=true
Navigation

Type to search…

↑↓ navigate↵ selectEsc close