KyPanelDocs

API reference

Server

Server status, services, processes, settings, hostname, updates.

Get the defaults for new accounts

GET/api/v1/server/account-settings

Who
root
API tokens
admin token area: server
Operation
getAccountSettings · ky call getAccountSettings

Responses

  • 200 OK
    Body
    FieldType
    default_bandwidth_pagestring
    default_suspended_pagestring
    settingsHostingAccountSettings
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

Save the defaults for new accounts

PUT/api/v1/server/account-settings

Who
root
API tokens
admin token area: server
Operation
putAccountSettings · ky call putAccountSettings

Request body

FieldType
bandwidth_exceeded_actionstring
bandwidth_page_htmlstring
suspended_page_htmlstring

Responses

  • 200 OK
    Body
    FieldType
    job_idstring
    settingsHostingAccountSettings
  • 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)
  • 500 Internal Server Error: internal

Web server status

GET/api/v1/server/apache

Who
root
API tokens
admin token area: server
Operation
adminApache · ky call adminApache

Responses

  • 200 OK
    Body

    map of any

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

Get the basic setup (contact, nameservers)

GET/api/v1/server/basic

Who
root
API tokens
admin token area: server
Operation
adminBasic · ky call adminBasic

Responses

  • 200 OK
    Body
    FieldType
    contact_emailstring
    contact_email2string
    default_home_rootstring
    hostnamestring
    main_ipv4string
    nameserversarray of string
    shared_ipstring
    shared_ip_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)
  • 500 Internal Server Error: internal

Save the basic setup

PUT/api/v1/server/basic

Who
root
API tokens
admin token area: server
Operation
adminSetBasic · ky call adminSetBasic

Request body

FieldType
contact_emailstring
contact_email2string
default_home_rootstring
nameserversarray of string

Responses

  • 200 OK
    Body
    FieldType
    contact_emailstring
    contact_email2string
    default_home_rootstring
    hostnamestring
    main_ipv4string
    nameserversarray of string
    shared_ipstring
    shared_ip_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)
  • 500 Internal Server Error: internal

Database server overview

GET/api/v1/server/databases

Who
root
API tokens
admin token area: server
Operation
adminDatabases · ky call adminDatabases

Parameters

NameIn
serverquery

Responses

  • 200 OK
    Body
    FieldType
    databasesarray of DbRow
    usersarray of UserRow
    versionstring
  • 400 Bad Request: rejected, wrong-server
  • 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

List database processes

GET/api/v1/server/databases/processes

Who
root
API tokens
admin token area: server
Operation
adminDBProcesses · ky call adminDBProcesses

Parameters

NameIn
serverquery

Responses

  • 200 OK
    Body

    map of any

  • 400 Bad Request: rejected, wrong-server
  • 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

Kill a database process

POST/api/v1/server/databases/processes/{pid}/kill

Who
root
API tokens
admin token area: server
Operation
adminDBKill · ky call adminDBKill

Parameters

NameIn
pidpath
serverquery

Request body

FieldType
query_onlyboolean

Responses

  • 204 Done, no content
  • 400 Bad Request: rejected, validation, wrong-server
  • 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

Database root access status

GET/api/v1/server/databases/root

Who
root
API tokens
admin token area: server
Operation
adminDBRoot · ky call adminDBRoot

Parameters

NameIn
serverquery

Responses

  • 200 OK
    Body

    map of any

  • 400 Bad Request: rejected, wrong-server
  • 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

Repair database root access

POST/api/v1/server/databases/root/repair

Who
root
API tokens
admin token area: server
Operation
adminDBRootRepair · ky call adminDBRootRepair

Parameters

NameIn
serverquery

Responses

  • 200 OK
    Body

    map of any

  • 400 Bad Request: rejected, wrong-server
  • 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

Disk I/O per device

GET/api/v1/server/disk-io

Who
root
API tokens
admin token area: server
Operation
adminDiskIO · ky call adminDiskIO

Parameters

NameIn
serverquery

Responses

  • 200 OK
    Body

    map of any

  • 400 Bad Request: rejected, wrong-server
  • 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

Hardware (CPU, memory, disks)

GET/api/v1/server/hardware

Who
root
API tokens
admin token area: server
Operation
adminHardware · ky call adminHardware

Parameters

NameIn
serverquery

Responses

  • 200 OK
    Body

    map of any

  • 400 Bad Request: rejected, wrong-server
  • 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

Change the server's hostname

PUT/api/v1/server/hostname

Who
root
API tokens
admin token area: server
Operation
setHostname · ky call setHostname

Request body

FieldType
hostnamestring

Responses

  • 200 OK
    Body
    FieldType
    certificate_job_idstring
    hostnamestring
    messagestring
  • 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)
  • 409 Conflict: validation
  • 500 Internal Server Error: internal

Count the recipients of a message to all users

GET/api/v1/server/mass-mail

How many addresses Email All Users (or ?resellers=1) reaches.

Who
root
API tokens
admin token area: server
Operation
massMailCount · ky call massMailCount

Parameters

NameIn
resellersquery

Responses

  • 200 OK
    Body
    FieldType
    default_fromstring
    recipientsinteger
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

Email all users or resellers

POST/api/v1/server/mass-mail

Email All Users / Email All Resellers (a task: one message per address).

Who
root
API tokens
admin token area: server
Operation
massMailSend · ky call massMailSend

Request body

FieldType
bodystring
from_emailstring
from_namestring
hostnamestring
reseller_idstring
resellersboolean
subjectstring

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

List processes

GET/api/v1/server/processes

Who
root
API tokens
admin token area: server
Operation
serverProcesses · ky call serverProcesses

Parameters

NameIn
serverquery

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of AgentprotoProcess
  • 400 Bad Request: rejected, wrong-server
  • 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

Kill a process

POST/api/v1/server/processes/{pid}/kill

Who
root
API tokens
admin token area: server
Operation
killProcess · ky call killProcess

Parameters

NameIn
pidpath
serverquery

Request body

FieldType
signalstring

Responses

  • 204 Done, no content
  • 400 Bad Request: rejected, validation, wrong-server
  • 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

Kill every process of a user

POST/api/v1/server/processes/kill-user

Who
root
API tokens
admin token area: server
Operation
adminKillUser · ky call adminKillUser

Request body

FieldType
signalstring
userstring

Responses

  • 200 OK
    Body

    map of any

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

Reboot the server

POST/api/v1/server/reboot

Who
root
API tokens
admin token area: server
Operation
serverReboot · ky call serverReboot

Parameters

NameIn
serverquery

Request body

FieldType
confirmstring
modestring

Responses

  • 202 Accepted (runs in the background)
    Body
    FieldType
    messagestring
  • 400 Bad Request: confirmation-required, rejected, wrong-server
  • 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

Get the DNS resolvers

GET/api/v1/server/resolvers

Who
root
API tokens
admin token area: server
Operation
getResolvers · ky call getResolvers

Parameters

NameIn
serverquery

Responses

  • 200 OK
    Body

    map of any

  • 400 Bad Request: rejected, wrong-server
  • 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

Save the DNS resolvers

PUT/api/v1/server/resolvers

Who
root
API tokens
admin token area: server
Operation
setResolvers · ky call setResolvers

Parameters

NameIn
serverquery

Request body

FieldType
resolversarray of string

Responses

  • 200 OK
    Body

    map of any

  • 400 Bad Request: rejected, wrong-server
  • 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

Resource usage of every account

GET/api/v1/server/resource-usage

Every account's last-24h use and faults, heaviest CPU first (admin overview).

Who
root, reseller (ACL: list-accts)
API tokens
admin token area: server
Operation
serverResourceUsage · ky call serverResourceUsage

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of map of any
    rangestring
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

Change the system root password

POST/api/v1/server/root-password

Who
root
API tokens
API tokens can't use this endpoint
Operation
adminRootPassword · ky call adminRootPassword

Parameters

NameIn
serverquery

Request body

FieldType
confirmstring
passwordstring

Responses

  • 204 Done, no content
  • 400 Bad Request: rejected, validation, wrong-server
  • 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

List services

GET/api/v1/server/services

Who
root
API tokens
admin token area: server
Operation
serverServices · ky call serverServices

Parameters

NameIn
serverquery

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of ServiceView
    monitorboolean
  • 400 Bad Request: rejected, wrong-server
  • 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

Start, stop or restart a service

POST/api/v1/server/services/{name}/{action}

Who
root
API tokens
admin token area: server
Operation
serviceAction · ky call serviceAction

Parameters

NameIn
namepath
actionpath
serverquery

Responses

  • 200 OK
    Body
    FieldType
    active alwaysstring
    enabled alwaysboolean
    failedarray of string
    groupstring
    installed alwaysboolean
    labelstring
    main_pid alwaysinteger
    memory_bytes alwaysinteger
    namestring
    protectedboolean
    restarts alwaysinteger
    sinceinteger
    sub alwaysstring
    unitstring
  • 400 Bad Request: rejected, wrong-server
  • 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

Monitor a service or stop monitoring it

PUT/api/v1/server/services/{name}/monitor

Who
root
API tokens
admin token area: server
Operation
serviceMonitor · ky call serviceMonitor

Parameters

NameIn
namepath

Request body

FieldType
enabledboolean

Responses

  • 204 Done, no content
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

Get the server settings

GET/api/v1/server/settings

Who
root
API tokens
admin token area: server
Operation
getSettings · ky call getSettings

Responses

  • 200 OK
    Body
    FieldType
    mailGlobalcfgMail
    smarthost_password_set alwaysboolean
    webGlobalcfgWeb
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

Save the server settings

PUT/api/v1/server/settings

Who
root
API tokens
admin token area: server
Operation
putSettings · ky call putSettings

Request body

FieldType
mailGlobalcfgMail
smarthost_passwordstring
smarthost_password_setboolean
webGlobalcfgWeb

Responses

  • 200 OK
    Body
    FieldType
    mailGlobalcfgMail
    smarthost_password_set alwaysboolean
    webGlobalcfgWeb
  • 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)
  • 500 Internal Server Error: internal

Server status (load, memory, disks, services)

GET/api/v1/server/status

Who
root
API tokens
admin token area: server
Operation
serverStatus · ky call serverStatus

Parameters

NameIn
serverquery

Responses

  • 200 OK
    Body
    FieldType
    agent_versionstring
    cgroup_v2boolean
    cpu_model alwaysstring
    cpusinteger
    disks alwaysarray of AgentprotoDiskUsage
    hostnamestring
    kernelstring
    load1 alwaysnumber
    load15 alwaysnumber
    load5 alwaysnumber
    mem_available_bytes alwaysinteger
    mem_total_bytesinteger
    os_idstring
    os_pretty_namestring
    os_versionstring
    selinuxstring
    swap_free_bytes alwaysinteger
    swap_total_bytes alwaysinteger
    uptime_seconds alwaysinteger
    virtualization alwaysstring
  • 400 Bad Request: rejected, wrong-server
  • 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

List tweak settings

GET/api/v1/server/tweak-settings

Who
root
API tokens
admin token area: server
Operation
tweakList · ky call tweakList

Parameters

NameIn
categoryquery
qquery

Responses

  • 200 OK
    Body
    FieldType
    categoriesarray of SettingsCategory
    itemsarray of TweakItem
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

Save tweak settings

PUT/api/v1/server/tweak-settings

Who
root
API tokens
admin token area: server
Operation
tweakPut · ky call tweakPut

Parameters

NameIn
categoryquery
qquery

Request body

FieldType
valuesmap of any

Responses

  • 200 OK
    Body
    FieldType
    categoriesarray of SettingsCategory
    itemsarray of TweakItem
  • 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)
  • 500 Internal Server Error: internal

Reset a tweak setting to its default

DELETE/api/v1/server/tweak-settings/{key}

Who
root
API tokens
admin token area: server
Operation
tweakReset · ky call tweakReset

Parameters

NameIn
keypath

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

Panel update status

GET/api/v1/server/updates

Who
root
API tokens
admin token area: server
Operation
updateStatus · ky call updateStatus

Responses

  • 200 OK
    Body
    FieldType
    applyingstring
    availableboolean
    configUpdateConfig
    current_buildinteger
    current_versionstring
    last_check_atinteger
    last_check_errorstring
    last_resultUpdateResult
    latestUpdateManifest
    nodes alwaysarray of NodeVersion
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 503 Service Unavailable: updates-off

Install the available panel update

POST/api/v1/server/updates/apply

Who
root
API tokens
admin token area: server
Operation
updateApply · ky call updateApply

Responses

  • 202 Accepted (runs in the background)
    Body
    FieldType
    messagestring
    versionstring
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 409 Conflict: up-to-date
  • 502 Bad Gateway: update-failed
  • 503 Service Unavailable: updates-off

Change the update channel

PUT/api/v1/server/updates/channel

Who
root
API tokens
admin token area: server
Operation
updateSetChannel · ky call updateSetChannel

Request body

FieldType
autoboolean
channelstring

Responses

  • 200 OK
    Body
    FieldType
    applyingstring
    availableboolean
    configUpdateConfig
    current_buildinteger
    current_versionstring
    last_check_atinteger
    last_check_errorstring
    last_resultUpdateResult
    latestUpdateManifest
    nodes alwaysarray of NodeVersion
  • 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)
  • 502 Bad Gateway: nodes-unreachable
  • 503 Service Unavailable: updates-off

Check for panel updates now

POST/api/v1/server/updates/check

Who
root
API tokens
admin token area: server
Operation
updateCheck · ky call updateCheck

Responses

  • 200 OK
    Body
    FieldType
    applyingstring
    availableboolean
    configUpdateConfig
    current_buildinteger
    current_versionstring
    last_check_atinteger
    last_check_errorstring
    last_resultUpdateResult
    latestUpdateManifest
    nodes alwaysarray of NodeVersion
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 502 Bad Gateway: update-check-failed
  • 503 Service Unavailable: updates-off

Operating system update settings and status

GET/api/v1/server/updates/os

Who
root
API tokens
admin token area: server
Operation
osUpdateStatus · ky call osUpdateStatus

Responses

  • 200 OK
    Body
    FieldType
    hour alwaysinteger
    running alwaysboolean
    servers alwaysarray of HostingOSUpdateServer
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

Save the operating system update settings

PUT/api/v1/server/updates/os

Who
root
API tokens
admin token area: server
Operation
osUpdateSet · ky call osUpdateSet

Request body

FieldType
enabledboolean

Responses

  • 200 OK
    Body
    FieldType
    hour alwaysinteger
    running alwaysboolean
    servers alwaysarray of HostingOSUpdateServer
  • 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)
  • 500 Internal Server Error: internal
  • 502 Bad Gateway: nodes-unreachable

Update the operating system now

POST/api/v1/server/updates/os/run

Who
root
API tokens
admin token area: server
Operation
osUpdateRun · ky call osUpdateRun

Parameters

NameIn
serverquery

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: already-running
  • 500 Internal Server Error: internal

First-run setup status

GET/api/v1/setup

Who
root
API tokens
admin token area: server
Operation
getSetup · ky call getSetup

Responses

  • 200 OK
    Body
    FieldType
    completed alwaysboolean
    contact_email alwaysstring
    hostname alwaysstring
    license_status alwaysstring
    main_ipv4 alwaysstring
    nameservers alwaysarray of string
    terms_accepted alwaysboolean
    trial_ends_atinteger
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

Finish the first-run setup

POST/api/v1/setup

Who
root
API tokens
admin token area: server
Operation
postSetup · ky call postSetup

Request body

FieldType
accept_termsboolean
contact_emailstring
nameserversarray of string

Responses

  • 200 OK
    Body
    FieldType
    setupStoreSetupState
    warningsmap of string
  • 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)
  • 500 Internal Server Error: internal