BatchSetUserPassword
批量修改多个 FTP 用户的密码。需同时传入用户 ID 和用户名。
- 路由:
POST /ftp - action:
BatchSetUserPassword
输入参数
| 参数名称 | 必选 | 类型 | 描述 |
|---|---|---|---|
| action | 是 | String | 固定值 BatchSetUserPassword |
| data | 是 | String | JSON 数组,每项格式 {"id":1,"ftp_username":"user1","new_password":"newpass"} |
注意:
new_password长度不能少于 6 位。
输出参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| - | Array<Object> | 操作结果,每项含 ftp_username 和 status |
示例
请求
POST /ftp HTTP/1.1
Host: 192.168.168.213:8888
Content-Type: application/x-www-form-urlencoded
action=BatchSetUserPassword&data=[{"id":5,"ftp_username":"batch_test1","new_password":"NewPass1@"},{"id":6,"ftp_username":"batch_test2","new_password":"NewPass2@"}]
响应
[{"ftp_username": "batch_test1", "status": true}, {"ftp_username": "batch_test2", "status": true}]