KyPanelDocs

API reference

Files

File manager: list, read, write, upload, move, compress, trash, disk usage; protected folders.

List protected folders

GET/api/v1/accounts/{id}/directory-privacy

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: directory-privacy
Feature
directory_privacy
Operation
privacyList · ky call privacyList

Parameters

NameIn
idpath

Responses

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

Password-protect a folder

POST/api/v1/accounts/{id}/directory-privacy

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: directory-privacy
Feature
directory_privacy
Operation
privacyCreate · ky call privacyCreate

Parameters

NameIn
idpath

Request body

FieldType
pathstring
realmstring

Responses

  • 200 OK
  • 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, validation
  • 500 Internal Server Error: internal

Remove a folder's protection

DELETE/api/v1/accounts/{id}/directory-privacy/{pid}

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: directory-privacy
Feature
directory_privacy
Operation
privacyDelete · ky call privacyDelete

Parameters

NameIn
idpath
pidpath

Responses

  • 200 OK
  • 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 a protected folder

PUT/api/v1/accounts/{id}/directory-privacy/{pid}

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: directory-privacy
Feature
directory_privacy
Operation
privacyUpdate · ky call privacyUpdate

Parameters

NameIn
idpath
pidpath

Request body

FieldType
realmstring

Responses

  • 200 OK
  • 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

Delete a protected folder's user

DELETE/api/v1/accounts/{id}/directory-privacy/{pid}/users/{user}

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: directory-privacy
Feature
directory_privacy
Operation
privacyDeleteUser · ky call privacyDeleteUser

Parameters

NameIn
idpath
pidpath
userpath

Responses

  • 200 OK
  • 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

Add or update a protected folder's user

PUT/api/v1/accounts/{id}/directory-privacy/{pid}/users/{user}

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: directory-privacy
Feature
directory_privacy
Operation
privacySetUser · ky call privacySetUser

Parameters

NameIn
idpath
pidpath
userpath

Request body

FieldType
passwordstring

Responses

  • 200 OK
  • 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
  • 500 Internal Server Error: internal

List a folder

GET/api/v1/accounts/{id}/files

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: files
Feature
file_manager
Operation
filesList · ky call filesList

Parameters

NameIn
idpath
pathquery

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of any
    pathstring
  • 400 Bad Request: file-operation
  • 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 permissions

POST/api/v1/accounts/{id}/files/chmod

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: files
Feature
file_manager
Operation
filesChmod · ky call filesChmod

Parameters

NameIn
idpath

Request body

FieldType
dir_modestring
file_modestring
modestring
pathsarray of string
recursiveboolean

Responses

  • 200 OK
    Body
    FieldType
    countinteger
  • 400 Bad Request: file-operation, 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

Compress files

POST/api/v1/accounts/{id}/files/compress

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: files
Feature
file_manager
Operation
filesCompress · ky call filesCompress

Parameters

NameIn
idpath

Request body

FieldType
deststring
formatstring
pathsarray of string

Responses

  • 202 Accepted (runs in the background)
    Body
    FieldType
    job_idstring
  • 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

Read a file

GET/api/v1/accounts/{id}/files/content

Opens a file in the code editor. The text travels through a staging file (it can be larger than one agent message).

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: files
Feature
file_manager
Operation
filesRead · ky call filesRead

Parameters

NameIn
idpath
pathquery

Responses

  • 200 OK
    Body
    FieldType
    contentstring
    encodingstring
    etagstring
    line_endingstring
    modifiedinteger
    pathstring
    sizeinteger
  • 400 Bad Request: file-operation
  • 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

Write a file

PUT/api/v1/accounts/{id}/files/content

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: files
Feature
file_manager
Operation
filesWrite · ky call filesWrite

Parameters

NameIn
idpath

Request body

FieldType
contentstring
encodingstring
etagstring
line_endingstring
pathstring

Responses

  • 200 OK
    Body
    FieldType
    etagstring
    modifiedinteger
    pathstring
    sizeinteger
  • 400 Bad Request: file-operation, 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

Copy files

POST/api/v1/accounts/{id}/files/copy

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: files
Feature
file_manager
Operation
postAccountsIdFilesCopy · ky call postAccountsIdFilesCopy

Parameters

NameIn
idpath

Request body

FieldType
deststring
overwriteboolean
pathsarray of string

Responses

  • 200 OK
    Body
    FieldType
    countinteger
    pathsarray of string
  • 400 Bad Request: file-operation, 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 files permanently

POST/api/v1/accounts/{id}/files/delete

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: files
Feature
file_manager
Operation
postAccountsIdFilesDelete · ky call postAccountsIdFilesDelete

Parameters

NameIn
idpath

Request body

FieldType
fromstring
pathstring
pathsarray of string
tostring

Responses

  • 200 OK
    Body
    FieldType
    conflictboolean
    conflictsarray of string
    contentstring
    countinteger
    encodingstring
    etagstring
    itemsarray of any
    line_endingstring
    modifiedinteger
    pathstring
    pathsarray of string
    sizeinteger
    trasharray of any
    truncatedboolean
  • 400 Bad Request: file-operation, 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

Download a file

GET/api/v1/accounts/{id}/files/download

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: files
Feature
file_manager
Operation
filesDownload · ky call filesDownload

Parameters

NameIn
idpath
pathquery

Responses

  • 200 OK
  • 400 Bad Request: file-operation
  • 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

Extract an archive

POST/api/v1/accounts/{id}/files/extract

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: files
Feature
file_manager
Operation
filesExtract · ky call filesExtract

Parameters

NameIn
idpath

Request body

FieldType
pathstring

Responses

  • 202 Accepted (runs in the background)
    Body
    FieldType
    job_idstring
  • 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 a folder

POST/api/v1/accounts/{id}/files/mkdir

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: files
Feature
file_manager
Operation
postAccountsIdFilesMkdir · ky call postAccountsIdFilesMkdir

Parameters

NameIn
idpath

Request body

FieldType
fromstring
pathstring
pathsarray of string
tostring

Responses

  • 200 OK
    Body
    FieldType
    conflictboolean
    conflictsarray of string
    contentstring
    countinteger
    encodingstring
    etagstring
    itemsarray of any
    line_endingstring
    modifiedinteger
    pathstring
    pathsarray of string
    sizeinteger
    trasharray of any
    truncatedboolean
  • 400 Bad Request: file-operation, 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

Move files

POST/api/v1/accounts/{id}/files/move

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: files
Feature
file_manager
Operation
postAccountsIdFilesMove · ky call postAccountsIdFilesMove

Parameters

NameIn
idpath

Request body

FieldType
deststring
overwriteboolean
pathsarray of string

Responses

  • 200 OK
    Body
    FieldType
    countinteger
    pathsarray of string
  • 400 Bad Request: file-operation, 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

Rename a file or folder

POST/api/v1/accounts/{id}/files/rename

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: files
Feature
file_manager
Operation
postAccountsIdFilesRename · ky call postAccountsIdFilesRename

Parameters

NameIn
idpath

Request body

FieldType
fromstring
pathstring
pathsarray of string
tostring

Responses

  • 200 OK
    Body
    FieldType
    conflictboolean
    conflictsarray of string
    contentstring
    countinteger
    encodingstring
    etagstring
    itemsarray of any
    line_endingstring
    modifiedinteger
    pathstring
    pathsarray of string
    sizeinteger
    trasharray of any
    truncatedboolean
  • 400 Bad Request: file-operation, 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

Search files

GET/api/v1/accounts/{id}/files/search

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: files
Feature
file_manager
Operation
filesSearch · ky call filesSearch

Parameters

NameIn
idpath
hiddenquery
pathquery
qquery

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of any
    pathstring
    scannedinteger
    truncatedboolean
  • 400 Bad Request: file-operation
  • 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

List the trash

GET/api/v1/accounts/{id}/files/trash

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: files
Feature
file_manager
Operation
trashList · ky call trashList

Parameters

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of any
    retention_daysinteger
  • 400 Bad Request: file-operation
  • 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

Move files to the trash

POST/api/v1/accounts/{id}/files/trash

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: files
Feature
file_manager
Operation
postAccountsIdFilesTrash · ky call postAccountsIdFilesTrash

Parameters

NameIn
idpath

Request body

FieldType
fromstring
pathstring
pathsarray of string
tostring

Responses

  • 200 OK
    Body
    FieldType
    conflictboolean
    conflictsarray of string
    contentstring
    countinteger
    encodingstring
    etagstring
    itemsarray of any
    line_endingstring
    modifiedinteger
    pathstring
    pathsarray of string
    sizeinteger
    trasharray of any
    truncatedboolean
  • 400 Bad Request: file-operation, 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

Empty the trash

POST/api/v1/accounts/{id}/files/trash/empty

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: files
Feature
file_manager
Operation
trashEmpty · ky call trashEmpty

Parameters

NameIn
idpath

Request body

FieldType
idsarray of string

Responses

  • 200 OK
    Body
    FieldType
    countinteger
    sizeinteger
  • 400 Bad Request: file-operation, 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

Restore files from the trash

POST/api/v1/accounts/{id}/files/trash/restore

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: files
Feature
file_manager
Operation
trashRestore · ky call trashRestore

Parameters

NameIn
idpath

Request body

FieldType
idsarray of string

Responses

  • 200 OK
    Body
    FieldType
    countinteger
    pathsarray of string
  • 400 Bad Request: file-operation, 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

Upload files

POST/api/v1/accounts/{id}/files/upload

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: files
Feature
file_manager
Operation
filesUpload · ky call filesUpload

Parameters

NameIn
idpath
pathquery

Responses

  • 200 OK
    Body
    FieldType
    uploadedarray of string
  • 400 Bad Request: file-operation, invalid-body, upload
  • 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

Disk usage of a folder

GET/api/v1/accounts/{id}/files/usage

Returns the cached disk usage report of a folder ("report": null when it was never measured).

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: files
Feature
disk_usage
Operation
filesUsage · ky call filesUsage

Parameters

NameIn
idpath
pathquery

Responses

  • 200 OK
    Body
    FieldType
    computed_atinteger
    pathstring
    reportany
  • 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

Measure a folder's disk usage again

POST/api/v1/accounts/{id}/files/usage

Measures a folder in the background (as the account's user) and caches the report.

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: files
Feature
disk_usage
Operation
filesUsageRefresh · ky call filesUsageRefresh

Parameters

NameIn
idpath

Request body

FieldType
pathstring

Responses

  • 202 Accepted (runs in the background)
    Body
    FieldType
    job_idstring
  • 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

Save a folder's directory index setting

PUT/api/v1/accounts/{id}/indexes

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: indexes
Feature
indexes
Operation
indexSave · ky call indexSave

Parameters

NameIn
idpath

Request body

FieldType
modestring
pathstring

Responses

  • 202 Accepted (runs in the background)
    Body
    FieldType
    job_idstring
    optionsStoreWebOptions
  • 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
  • 500 Internal Server Error: internal