API reference
FTP
FTP accounts and sessions.
#List FTP accounts
GET/api/v1/accounts/{id}/ftp
- Who
- root, reseller (ACL: create-user-session); customer
- API tokens
- admin token area: accounts; account token area: ftp
- Feature
ftp_accounts- Operation
ftpList · ky call ftpList
Parameters
Responses
- 200 OK
Body
| Field | Type |
|---|
items | array of FtpItem |
limit | integer |
server | object| Field | Type |
|---|
host | string | passive_ports | string | port | integer | tls | string |
|
used | integer |
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 409 Conflict: not-ready
- 500 Internal Server Error: internal
#Create an FTP account
POST/api/v1/accounts/{id}/ftp
- Who
- root, reseller (ACL: create-user-session); customer
- API tokens
- admin token area: accounts; account token area: ftp
- Feature
ftp_accounts- Operation
ftpCreate · ky call ftpCreate
Parameters
Request body
| Field | Type |
|---|
domain_id | string |
home_dir | string |
login | string |
password | string |
quota_mb | integer |
Responses
- 201 Created
Body
| Field | Type |
|---|
account_id always | string |
created_at always | integer |
domain | string |
domain_id | string |
full_login always | string |
has_password always | boolean |
home_dir always | string |
id always | string |
kind always | string |
login always | string |
quota_mb | integer |
updated_at always | integer |
- 400 Bad Request: validation
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 409 Conflict: limit-reached, not-ready, validation
- 500 Internal Server Error: internal
#List FTP sessions
GET/api/v1/accounts/{id}/ftp-sessions
- Who
- root, reseller (ACL: create-user-session); customer
- API tokens
- admin token area: accounts; account token area: ftp-sessions
- Feature
ftp_accounts- Operation
ftpSessions · ky call ftpSessions
Parameters
Responses
- 200 OK
Body
- 400 Bad Request: rejected
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 409 Conflict: not-ready
- 500 Internal Server Error: internal
#Disconnect an FTP session
POST/api/v1/accounts/{id}/ftp-sessions/{pid}/kill
- Who
- root, reseller (ACL: create-user-session); customer
- API tokens
- admin token area: accounts; account token area: ftp-sessions
- Feature
ftp_accounts- Operation
ftpKill · ky call ftpKill
Parameters
Request body
Responses
- 204 Done, no content
- 400 Bad Request: rejected, validation
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 409 Conflict: not-ready
- 500 Internal Server Error: internal
#Delete an FTP account
DELETE/api/v1/accounts/{id}/ftp/{fid}
- Who
- root, reseller (ACL: create-user-session); customer
- API tokens
- admin token area: accounts; account token area: ftp
- Feature
ftp_accounts- Operation
ftpDelete · ky call ftpDelete
Parameters
Responses
- 204 Done, no content
- 400 Bad Request: primary-ftp
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 409 Conflict: not-ready
- 500 Internal Server Error: internal
#Update an FTP account
PUT/api/v1/accounts/{id}/ftp/{fid}
- Who
- root, reseller (ACL: create-user-session); customer
- API tokens
- admin token area: accounts; account token area: ftp
- Feature
ftp_accounts- Operation
ftpUpdate · ky call ftpUpdate
Parameters
Request body
| Field | Type |
|---|
home_dir | string |
quota_mb | integer |
Responses
- 200 OK
Body
| Field | Type |
|---|
account_id always | string |
created_at always | integer |
domain | string |
domain_id | string |
full_login always | string |
has_password always | boolean |
home_dir always | string |
id always | string |
kind always | string |
login always | string |
quota_mb | integer |
updated_at always | integer |
- 400 Bad Request: primary-ftp, validation
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 409 Conflict: not-ready
- 500 Internal Server Error: internal
#Change an FTP account's password
PUT/api/v1/accounts/{id}/ftp/{fid}/password
- Who
- root, reseller (ACL: create-user-session); customer
- API tokens
- admin token area: accounts; account token area: ftp
- Feature
ftp_accounts- Operation
ftpPassword · ky call ftpPassword
Parameters
Request body
Responses
- 204 Done, no content
- 400 Bad Request: validation
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 409 Conflict: not-ready
- 500 Internal Server Error: internal