供命令行、扣子编程、OpenClaw 等工具自动化创建与查看数据任务,无需打开网页。
https://quickform.cn(若自建部署,请替换为您自己的站点根地址)Content-Type: application/json)或 表单(application/x-www-form-urlencoded)POST /cli/add创建一条新的数据任务,并返回用于提交数据的 apiid。
| 参数 | 必填 | 说明 |
|---|---|---|
| username | 是 | 用户名 |
| password | 是 | 密码 |
| task_name | 是 | 任务名称 |
| task_intro | 否 | 任务介绍/描述 |
(兼容字段:title 等同 task_name,description 等同 task_intro。)
{
"success": true,
"apiid": "a1b2c3d4ef"
}
apiid 即该任务的 API 标识,后续提交数据、拉取数据都使用此 id。
400:缺少必填参数 → { "success": false, "message": "缺少 username 或 password" } 等401:用户名或密码错误 → { "success": false, "message": "用户名或密码错误" }403:已达任务数量上限 → { "success": false, "message": "已达任务数量上限(当前 N 个)..." }500:服务器异常 → { "success": false, "message": "..." }# JSON
curl -X POST "https://quickform.cn/cli/add" \
-H "Content-Type: application/json" \
-d '{"username":"teacher1","password":"your_password","task_name":"课堂签到表","task_intro":"本周签到"}'
# 表单
curl -X POST "https://quickform.cn/cli/add" \
-d "username=teacher1&password=your_password&task_name=课堂签到表&task_intro=本周签到"
POST /cli/list获取当前账号下所有数据任务及其 apiid 与名称。
| 参数 | 必填 | 说明 |
|---|---|---|
| username | 是 | 用户名 |
| password | 是 | 密码 |
{
"success": true,
"tasks": [
{ "apiid": "a1b2c3d4ef", "name": "课堂签到表" },
{ "apiid": "x9y8z7w6vu", "name": "问卷回收" }
]
}
400:缺少 username 或 password401:用户名或密码错误curl -X POST "https://quickform.cn/cli/list" \
-H "Content-Type: application/json" \
-d '{"username":"teacher1","password":"your_password"}'
POST /cli/upload上传单个 HTML/HTM 文件,返回上传结果与文件的公网访问地址(可用于扣子/OpenClaw 等场景下直接引用页面链接)。
multipart/form-datausername、password(表单字段),file(文件字段,仅支持 .html / .htm,单文件最大 4MB){
"success": true,
"url": "https://quickform.cn/static/uploads/xxxxxxxx.html",
"filename": "xxxxxxxx.html"
}
url:该文件的公网访问地址,可直接在浏览器或前端 iframe 中打开。filename:服务器保存后的文件名(随机命名,避免冲突)。400:缺少参数、未选择文件、或文件格式/大小不符合(仅允许 .html/.htm,单文件 ≤ 4MB)→ { "success": false, "message": "..." }401:用户名或密码错误500:服务器保存失败curl -X POST "https://quickform.cn/cli/upload" \
-F "username=teacher1" \
-F "password=your_password" \
-F "file=@/path/to/your/page.html"
拿到 apiid 后,与网页端一致:
POST /api/<apiid> {"name":"张三","score":85} 成功:{ "message": "提交成功", "status": "success" }
获取全部提交数据:GET /api/<apiid>/all
返回:{ "submissions": [ ... ], "total_submissions": N }
简要查询(最新 3 条):GET /api/<apiid>
submissions、total_submissions、task_id、task_title 等完整提交地址示例:https://quickform.cn/api/a1b2c3d4ef
POST /cli/add,传入用户名、密码、任务名称(及可选介绍),得到 apiid。https://quickform.cn/api/<apiid>https://quickform.cn/api/a1b2c3d4efPOST /cli/list 获取当前用户下所有 apiid 与名称。这样即可在不打开 QuickForm 网页的情况下,完成任务的创建、列表查看与数据提交地址的配置。
| 接口 | 成功时返回字段 | 说明 |
|---|---|---|
| POST /cli/add | success: true, apiid |
新任务的 API 标识 |
| POST /cli/list | success: true, tasks |
tasks 为 [{ apiid, name }, ...] |
| POST /cli/upload | success: true, url, filename |
上传文件的公网地址与保存文件名 |
所有错误均为 success: false 且带 message 字段,便于 CLI 或技能内统一处理。