Ftp¶
The FTP API allow you to control the Freebox ftp server settings
Ftp Errors¶
When attempting to access the FTP API, you may encounter the following errors:
| error_code | Description |
|---|---|
| internal_error | Internal error |
| weak_password | Password is too weak for remote access |
Ftp Config¶
FtpConfig has the following attributes:
-
FtpConfig¶ -
enabledbool¶ is the FTP server enabled
-
allow_anonymousbool¶ can anonymous user log in
-
allow_anonymous_writebool¶ can anonymous user write data
-
passwordstring Write-only¶ user password
-
allow_remote_accessbool¶ enable ftp server remote access
NOTE: to be able to enable the remote access the password must be strong enough
-
weak_passwordbool Read-only¶ is the ftp password weak (in this case remote access is disabled)
-
port_ctrlint¶ ftp control port to use for remote access
-
port_dataint¶ ftp data port to use for remote access
-
remote_domainstring¶ domain name to use for remote access
-
Ftp config API¶
Get the current Ftp configuration¶
-
GET/api/v4/ftp/config/¶ Get the
FtpConfigExample request:
GET /api/v4/ftp/config/ HTTP/1.1 Host: mafreebox.freebox.fr
Example response:
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8
{ "success": true, "result": { "enabled": false, "allow_anonymous": false, "allow_remote_access": false, "port_ctrl": 3615, "port_data": 1337, "weak_password": true, "allow_anonymous_write": false } }
Update the FTP configuration¶
-
PUT/api/v4/ftp/config/¶ Update the
FtpConfigExample request:
PUT /api/v4/ftp/config/ HTTP/1.1 Host: mafreebox.freebox.fr
{ "enabled": true }
Example response:
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8
{ "success": true, "result": { "enabled": true, "allow_anonymous": false, "allow_anonymous_write": false } }