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.
Parameters
| Name | In |
|---|---|
id | path |
Responses
- 200 OK
Body
Field Type 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
Responses
- 200 OK
Body
Field Type 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
Request body
| Field | Type |
|---|---|
copy_from | string |
name | string |
off | array of string |
Responses
- 201 Created
Body
Field Type accountsalwaysinteger created_atalwaysinteger idalwaysstring kindalwaysstring namealwaysstring offalwaysarray of string owner_idalwaysstring packagesalwaysinteger updated_atalwaysinteger - 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}
Parameters
| Name | In |
|---|---|
id | path |
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}
Parameters
| Name | In |
|---|---|
id | path |
Responses
- 200 OK
Body
Field Type accountsalwaysinteger created_atalwaysinteger idalwaysstring kindalwaysstring namealwaysstring offalwaysarray of string owner_idalwaysstring packagesalwaysinteger updated_atalwaysinteger - 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).
Parameters
| Name | In |
|---|---|
id | path |
Request body
| Field | Type |
|---|---|
off | array of string |
Responses
- 200 OK
Body
Field Type accountsalwaysinteger created_atalwaysinteger idalwaysstring kindalwaysstring namealwaysstring offalwaysarray of string owner_idalwaysstring packagesalwaysinteger updated_atalwaysinteger - 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
Responses
- 200 OK
Body
Field Type 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
Responses
- 200 OK
Body
Field Type 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
Request body
| Field | Type |
|---|---|
bw_limit_mb | integer |
cgi | boolean |
dedicated_ip | boolean |
default_email_quota_mb | integer |
digest_auth | boolean |
disk_quota_mb | integer |
feature_list_id | string |
isolation | StoreIsolation |
locale | string |
max_addon | integer |
max_email | integer |
max_email_per_hour | integer |
max_email_quota_mb | integer |
max_ftp | integer |
max_parked | integer |
max_sql | integer |
max_sub | integer |
name | string |
php_max_children | integer |
shell | string |
theme | string |
Responses
- 201 Created
Body
Field Type account_countalwaysinteger bw_limit_mbinteger cgialwaysboolean created_atalwaysinteger dedicated_ipalwaysboolean default_email_quota_mbinteger digest_authalwaysboolean disk_quota_mbinteger feature_list_idalwaysstring feature_list_namealwaysstring idalwaysstring isolationalwaysStoreIsolation localealwaysstring max_addoninteger max_emailinteger max_email_per_hourinteger max_email_quota_mbinteger max_ftpinteger max_parkedinteger max_sqlinteger max_subinteger namealwaysstring owneralwaysstring owner_idalwaysstring php_max_childreninteger shellalwaysstring themealwaysstring updated_atalwaysinteger - 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.
Responses
- 200 OK
Body
Field Type 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.
Parameters
| Name | In |
|---|---|
id | path |
move_to | query |
Responses
- 200 OK
Body
Field Type 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}
Parameters
| Name | In |
|---|---|
id | path |
Responses
- 200 OK
Body
Field Type account_countalwaysinteger bw_limit_mbinteger cgialwaysboolean created_atalwaysinteger dedicated_ipalwaysboolean default_email_quota_mbinteger digest_authalwaysboolean disk_quota_mbinteger feature_list_idalwaysstring feature_list_namealwaysstring idalwaysstring isolationalwaysStoreIsolation localealwaysstring max_addoninteger max_emailinteger max_email_per_hourinteger max_email_quota_mbinteger max_ftpinteger max_parkedinteger max_sqlinteger max_subinteger namealwaysstring owneralwaysstring owner_idalwaysstring php_max_childreninteger shellalwaysstring themealwaysstring updated_atalwaysinteger - 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.
Parameters
| Name | In |
|---|---|
id | path |
Request body
| Field | Type |
|---|---|
bw_limit_mb | integer |
cgi | boolean |
dedicated_ip | boolean |
default_email_quota_mb | integer |
digest_auth | boolean |
disk_quota_mb | integer |
feature_list_id | string |
isolation | StoreIsolation |
locale | string |
max_addon | integer |
max_email | integer |
max_email_per_hour | integer |
max_email_quota_mb | integer |
max_ftp | integer |
max_parked | integer |
max_sql | integer |
max_sub | integer |
name | string |
php_max_children | integer |
shell | string |
theme | string |
Responses
- 200 OK
Body
Field Type 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