跳到正文
Navigation

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

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

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

Request body application/x-www-form-urlencoded required

  • request_time
    string
    required

    Unix 时间戳。

  • request_token
    string
    required

    按 API 概览生成的签名。

  • action
    getData
    required

    具体操作名称。

  • table
    string
    required

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

  • type
    optional
    string

    筛选类型,-1 表示全部

  • search
    optional
    string

    搜索关键词

  • p
    optional
    integer

    页码

  • limit
    optional
    integer

    每页数量

  • list
    optional
    string

    true 返回数组格式

Returns

default

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

JSON
  • data
    optional
    array of
    unknown

    数据记录列表

  • page
    optional
    string

    分页 HTML

  • where
    optional
    string

    查询条件

各操作详细说明

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

Type to search…

↑↓ navigate↵ selectEsc close