跳到主要内容
版本:latest

BatchSetUserPassword

批量修改多个 FTP 用户的密码。需同时传入用户 ID 和用户名。

  • 路由POST /ftp
  • actionBatchSetUserPassword

输入参数

参数名称必选类型描述
actionString固定值 BatchSetUserPassword
dataStringJSON 数组,每项格式 {"id":1,"ftp_username":"user1","new_password":"newpass"}

注意:new_password 长度不能少于 6 位。

输出参数

参数名称类型描述
-Array<Object>操作结果,每项含 ftp_usernamestatus

示例

请求

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}]