KyPanelDocs

API reference

Packages

Hosting packages and feature lists.

Features the account can use

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

Returns the features the account gets (and the catalog), for the customer panel and admins.

Who
root, reseller (ACL: list-accts); customer
API tokens
admin token area: accounts; account token area: features
Operation
accountFeatures · ky call accountFeatures

Parameters

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    catalogarray of FeaturesFeature
    enabledarray of string
  • 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 feature lists

GET/api/v1/feature-lists

Who
root, reseller (ACL: add-pkg or edit-pkg)
API tokens
admin token area: server
Operation
listFeatureLists · ky call listFeatureLists

Responses

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

Create a feature list

POST/api/v1/feature-lists

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

Request body

FieldType
copy_fromstring
namestring
offarray of string

Responses

  • 201 Created
    Body
    FieldType
    accounts alwaysinteger
    created_at alwaysinteger
    id alwaysstring
    kind alwaysstring
    name alwaysstring
    off alwaysarray of string
    owner_id alwaysstring
    packages alwaysinteger
    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)
  • 409 Conflict: validation
  • 500 Internal Server Error: internal

Delete a feature list

DELETE/api/v1/feature-lists/{id}

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

Parameters

NameIn
idpath

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)
  • 404 Not Found: not-found
  • 409 Conflict: built-in, in-use
  • 500 Internal Server Error: internal

Get a feature list

GET/api/v1/feature-lists/{id}

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

Parameters

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    accounts alwaysinteger
    created_at alwaysinteger
    id alwaysstring
    kind alwaysstring
    name alwaysstring
    off alwaysarray of string
    owner_id alwaysstring
    packages alwaysinteger
    updated_at alwaysinteger
  • 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 a feature list

PUT/api/v1/feature-lists/{id}

Replaces the list's switched-off features. Takes effect on the next customer request (the customer panel re-reads its session within a minute).

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

Parameters

NameIn
idpath

Request body

FieldType
offarray of string

Responses

  • 200 OK
    Body
    FieldType
    accounts alwaysinteger
    created_at alwaysinteger
    id alwaysstring
    kind alwaysstring
    name alwaysstring
    off alwaysarray of string
    owner_id alwaysstring
    packages alwaysinteger
    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
  • 500 Internal Server Error: internal

Feature catalog

GET/api/v1/features

Who
root, reseller (ACL: add-pkg or edit-pkg)
API tokens
admin token area: server
Operation
featureCatalog · ky call featureCatalog

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of FeaturesFeature
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)

List packages

GET/api/v1/packages

Who
root, reseller (ACL: create-acct or upgrade-acct or add-pkg or edit-pkg)
API tokens
admin token area: packages
Operation
listPackages · ky call listPackages

Responses

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

Create a package

POST/api/v1/packages

Who
root, reseller (ACL: add-pkg)
API tokens
admin token area: packages
Operation
createPackage · ky call createPackage

Request body

FieldType
bw_limit_mbinteger
cgiboolean
dedicated_ipboolean
default_email_quota_mbinteger
digest_authboolean
disk_quota_mbinteger
feature_list_idstring
isolationStoreIsolation
localestring
max_addoninteger
max_emailinteger
max_email_per_hourinteger
max_email_quota_mbinteger
max_ftpinteger
max_parkedinteger
max_sqlinteger
max_subinteger
namestring
php_max_childreninteger
shellstring
themestring

Responses

  • 201 Created
    Body
    FieldType
    account_count alwaysinteger
    bw_limit_mbinteger
    cgi alwaysboolean
    created_at alwaysinteger
    dedicated_ip alwaysboolean
    default_email_quota_mbinteger
    digest_auth alwaysboolean
    disk_quota_mbinteger
    feature_list_id alwaysstring
    feature_list_name alwaysstring
    id alwaysstring
    isolation alwaysStoreIsolation
    locale alwaysstring
    max_addoninteger
    max_emailinteger
    max_email_per_hourinteger
    max_email_quota_mbinteger
    max_ftpinteger
    max_parkedinteger
    max_sqlinteger
    max_subinteger
    name alwaysstring
    owner alwaysstring
    owner_id alwaysstring
    php_max_childreninteger
    shell alwaysstring
    theme alwaysstring
    updated_at alwaysinteger
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: package-privileges
  • 409 Conflict: validation
  • 500 Internal Server Error: internal

Options for the package editor

GET/api/v1/packages-options

Returns what the package editor offers: themes, languages, the assignable feature lists, whether CGI can run on this server and whether the signed-in admin may set unlimited values.

Who
root, reseller (ACL: add-pkg or edit-pkg)
API tokens
admin token area: server
Operation
packageOptions · ky call packageOptions

Responses

  • 200 OK
    Body
    FieldType
    can_set_unlimitedmap of boolean
    cgi_availableboolean
    feature_listsarray of map of string
    localesarray of map of string
    shellsarray of map of any
    themesarray of map of string
  • 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

Delete a package

DELETE/api/v1/packages/{id}

Deletes a package. A package in use needs ?move_to=<package id>: its accounts move there first (taking all of that package's settings), in the same request.

Who
root, reseller (ACL: edit-pkg)
API tokens
admin token area: packages
Operation
deletePackage · ky call deletePackage

Parameters

NameIn
idpath
move_toquery

Responses

  • 200 OK
    Body
    FieldType
    job_idsarray of string
    movedarray of string
    over_limitarray of map of any
  • 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: in-use
  • 500 Internal Server Error: internal

Get a package

GET/api/v1/packages/{id}

Who
root, reseller (ACL: create-acct or upgrade-acct or add-pkg or edit-pkg)
API tokens
admin token area: packages
Operation
getPackage · ky call getPackage

Parameters

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    account_count alwaysinteger
    bw_limit_mbinteger
    cgi alwaysboolean
    created_at alwaysinteger
    dedicated_ip alwaysboolean
    default_email_quota_mbinteger
    digest_auth alwaysboolean
    disk_quota_mbinteger
    feature_list_id alwaysstring
    feature_list_name alwaysstring
    id alwaysstring
    isolation alwaysStoreIsolation
    locale alwaysstring
    max_addoninteger
    max_emailinteger
    max_email_per_hourinteger
    max_email_quota_mbinteger
    max_ftpinteger
    max_parkedinteger
    max_sqlinteger
    max_subinteger
    name alwaysstring
    owner alwaysstring
    owner_id alwaysstring
    php_max_childreninteger
    shell alwaysstring
    theme alwaysstring
    updated_at alwaysinteger
  • 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

Update a package and its accounts

PUT/api/v1/packages/{id}

Saves the package, copies what changed to every account on it (same transaction) and queues the job that applies it on the system. The answer lists the accounts now over a lower limit.

Who
root, reseller (ACL: edit-pkg)
API tokens
admin token area: packages
Operation
updatePackage · ky call updatePackage

Parameters

NameIn
idpath

Request body

FieldType
bw_limit_mbinteger
cgiboolean
dedicated_ipboolean
default_email_quota_mbinteger
digest_authboolean
disk_quota_mbinteger
feature_list_idstring
isolationStoreIsolation
localestring
max_addoninteger
max_emailinteger
max_email_per_hourinteger
max_email_quota_mbinteger
max_ftpinteger
max_parkedinteger
max_sqlinteger
max_subinteger
namestring
php_max_childreninteger
shellstring
themestring

Responses

  • 200 OK
    Body
    FieldType
    accountsinteger
    changedarray of string
    job_idstring
    over_limitarray of map of any
    packageStorePackage
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: package-privileges
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal