KyPanelDocs

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

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of FtpItem
    limitinteger
    serverobject
    FieldType
    hoststring
    passive_portsstring
    portinteger
    tlsstring
    usedinteger
  • 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

NameIn
idpath

Request body

FieldType
domain_idstring
home_dirstring
loginstring
passwordstring
quota_mbinteger

Responses

  • 201 Created
    Body
    FieldType
    account_id alwaysstring
    created_at alwaysinteger
    domainstring
    domain_idstring
    full_login alwaysstring
    has_password alwaysboolean
    home_dir alwaysstring
    id alwaysstring
    kind alwaysstring
    login alwaysstring
    quota_mbinteger
    updated_at alwaysinteger
  • 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

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of HostingFTPSession
  • 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

NameIn
idpath
pidpath

Request body

FieldType
loginstring

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

NameIn
idpath
fidpath

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

NameIn
idpath
fidpath

Request body

FieldType
home_dirstring
quota_mbinteger

Responses

  • 200 OK
    Body
    FieldType
    account_id alwaysstring
    created_at alwaysinteger
    domainstring
    domain_idstring
    full_login alwaysstring
    has_password alwaysboolean
    home_dir alwaysstring
    id alwaysstring
    kind alwaysstring
    login alwaysstring
    quota_mbinteger
    updated_at alwaysinteger
  • 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

NameIn
idpath
fidpath

Request body

FieldType
passwordstring

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