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
¶ -
enabled
bool¶ is the FTP server enabled
-
allow_anonymous
bool¶ can anonymous user log in
-
allow_anonymous_write
bool¶ can anonymous user write data
-
password
string Write-only¶ user password
-
allow_remote_access
bool¶ enable ftp server remote access
NOTE: to be able to enable the remote access the password must be strong enough
-
weak_password
bool Read-only¶ is the ftp password weak (in this case remote access is disabled)
-
port_ctrl
int¶ ftp control port to use for remote access
-
port_data
int¶ ftp data port to use for remote access
-
remote_domain
string¶ domain name to use for remote access
-
Ftp config API¶
Get the current Ftp configuration¶
-
GET
/api/v4/ftp/config/
¶ Get the
FtpConfig
Example 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
FtpConfig
Example 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 } }