跳到主要内容
版本:latest

getData

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

  • 路由POST /data
  • actiongetData

输入参数

参数名称必选类型描述
actionString固定值 getData
tableString表名:sitesdatabasesftpsdomaincrontabbackupconfig
typeString筛选类型,-1 表示全部
searchString搜索关键词
pInteger页码
limitInteger每页数量
listStringtrue 返回数组格式

输出参数

参数名称类型描述
dataArray数据记录列表
pageString分页 HTML
whereString查询条件

常用示例

查网站列表

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