API reference
Databases
MariaDB/MySQL databases, users, privileges, remote hosts, phpMyAdmin.
# Databases, users and privileges
GET /api/v1/accounts/{id}/mysql
Who root, reseller (ACL: create-user-session); customer
API tokens admin token area: accounts; account token area: mysql
Feature mysql
Operation mysqlOverview · ky call mysqlOverviewParameters Responses 200 OKBody Field Type databasesarray of StoreDatabase hoststring limitinteger max_name_lengthinteger max_user_lengthinteger prefixstring privilegesarray of string remoteboolean used_bytesinteger usersarray of StoreDBUser
401 Unauthorized: no session, or an invalid or expired token403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)404 Not Found: not-found500 Internal Server Error: internal
# Create a database
POST /api/v1/accounts/{id}/mysql/databases
Who root, reseller (ACL: create-user-session); customer
API tokens admin token area: accounts; account token area: mysql
Feature mysql
Operation mysqlCreateDB · ky call mysqlCreateDBParameters Request body Responses 201 CreatedBody Field Type account_id always string created_at always integer id always string name always string size_bytes always integer size_updated_atinteger users always array of StoreDatabaseGrant
400 Bad Request: rejected, validation401 Unauthorized: no session, or an invalid or expired token403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)404 Not Found: not-found409 Conflict: limit-reached, validation500 Internal Server Error: internal
# Delete a database
DELETE /api/v1/accounts/{id}/mysql/databases/{did}
Who root, reseller (ACL: create-user-session); customer
API tokens admin token area: accounts; account token area: mysql
Feature mysql
Operation mysqlDeleteDB · ky call mysqlDeleteDBParameters Name In idpath didpath confirmquery
Responses 204 Done, no content400 Bad Request: confirmation-required, rejected401 Unauthorized: no session, or an invalid or expired token403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)404 Not Found: not-found500 Internal Server Error: internal
# List remote database hosts
GET /api/v1/accounts/{id}/mysql/remote-hosts
Who root, reseller (ACL: create-user-session); customer
API tokens admin token area: accounts; account token area: mysql
Feature remote_mysql
Operation mysqlHosts · ky call mysqlHostsParameters Responses 200 OKBody 401 Unauthorized: no session, or an invalid or expired token403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)500 Internal Server Error: internal
# Allow a remote database host
POST /api/v1/accounts/{id}/mysql/remote-hosts
Who root, reseller (ACL: create-user-session); customer
API tokens admin token area: accounts; account token area: mysql
Feature remote_mysql
Operation mysqlAddHost · ky call mysqlAddHostParameters Request body Field Type commentstring hoststring
Responses 201 CreatedBody Field Type comment always string created_at always integer host always string id always string
400 Bad Request: rejected, validation401 Unauthorized: no session, or an invalid or expired token403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)404 Not Found: not-found409 Conflict: limit-reached, validation500 Internal Server Error: internal
# Remove a remote database host
DELETE /api/v1/accounts/{id}/mysql/remote-hosts/{hid}
Who root, reseller (ACL: create-user-session); customer
API tokens admin token area: accounts; account token area: mysql
Feature remote_mysql
Operation mysqlDeleteHost · ky call mysqlDeleteHostParameters Responses 204 Done, no content400 Bad Request: rejected401 Unauthorized: no session, or an invalid or expired token403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)404 Not Found: not-found500 Internal Server Error: internal
# Create a database user
POST /api/v1/accounts/{id}/mysql/users
Who root, reseller (ACL: create-user-session); customer
API tokens admin token area: accounts; account token area: mysql
Feature mysql
Operation mysqlCreateUser · ky call mysqlCreateUserParameters Request body Field Type namestring passwordstring
Responses 201 CreatedBody Field Type account_id always string auth_plugin always string created_at always integer grants always array of StoreDatabaseGrant id always string name always string updated_at always integer
400 Bad Request: rejected, validation401 Unauthorized: no session, or an invalid or expired token403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)404 Not Found: not-found409 Conflict: validation500 Internal Server Error: internal
# Delete a database user
DELETE /api/v1/accounts/{id}/mysql/users/{uid}
Who root, reseller (ACL: create-user-session); customer
API tokens admin token area: accounts; account token area: mysql
Feature mysql
Operation mysqlDeleteUser · ky call mysqlDeleteUserParameters Responses 204 Done, no content400 Bad Request: rejected401 Unauthorized: no session, or an invalid or expired token403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)404 Not Found: not-found500 Internal Server Error: internal
# Remove a user's privileges on a database
DELETE /api/v1/accounts/{id}/mysql/users/{uid}/grants/{did}
Who root, reseller (ACL: create-user-session); customer
API tokens admin token area: accounts; account token area: mysql
Feature mysql
Operation mysqlRevoke · ky call mysqlRevokeParameters Name In idpath uidpath didpath
Responses 204 Done, no content400 Bad Request: rejected401 Unauthorized: no session, or an invalid or expired token403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)404 Not Found: not-found500 Internal Server Error: internal
# Set a user's privileges on a database
PUT /api/v1/accounts/{id}/mysql/users/{uid}/grants/{did}
Who root, reseller (ACL: create-user-session); customer
API tokens admin token area: accounts; account token area: mysql
Feature mysql
Operation mysqlSetGrant · ky call mysqlSetGrantParameters Name In idpath uidpath didpath
Request body Field Type privilegesarray of string
Responses 200 OKBody Field Type account_id always string auth_plugin always string created_at always integer grants always array of StoreDatabaseGrant id always string name always string updated_at always integer
400 Bad Request: rejected, validation401 Unauthorized: no session, or an invalid or expired token403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)404 Not Found: not-found500 Internal Server Error: internal
# Rename a database user
PUT /api/v1/accounts/{id}/mysql/users/{uid}/name
Who root, reseller (ACL: create-user-session); customer
API tokens admin token area: accounts; account token area: mysql
Feature mysql
Operation mysqlRenameUser · ky call mysqlRenameUserParameters Request body Responses 200 OKBody Field Type account_id always string auth_plugin always string created_at always integer grants always array of StoreDatabaseGrant id always string name always string updated_at always integer
400 Bad Request: rejected, validation401 Unauthorized: no session, or an invalid or expired token403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)404 Not Found: not-found409 Conflict: validation500 Internal Server Error: internal
# Change a database user's password
PUT /api/v1/accounts/{id}/mysql/users/{uid}/password
Who root, reseller (ACL: create-user-session); customer
API tokens admin token area: accounts; account token area: mysql
Feature mysql
Operation mysqlUserPassword · ky call mysqlUserPasswordParameters Request body Responses 204 Done, no content400 Bad Request: rejected, validation401 Unauthorized: no session, or an invalid or expired token403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)404 Not Found: not-found500 Internal Server Error: internal
# Create a database, a user and its privileges in one step
POST /api/v1/accounts/{id}/mysql/wizard
Creates a database, a user and the user's privileges on it in one step. Each part is undone if a later one fails, so the customer never ends up with half of it.
Who root, reseller (ACL: create-user-session); customer
API tokens admin token area: accounts; account token area: mysql
Feature mysql
Operation mysqlWizard · ky call mysqlWizardParameters Request body Field Type databasestring passwordstring privilegesarray of string userstring
Responses 201 CreatedBody 400 Bad Request: rejected, validation401 Unauthorized: no session, or an invalid or expired token403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)404 Not Found: not-found409 Conflict: limit-reached, validation500 Internal Server Error: internal
# Open phpMyAdmin signed in
POST /api/v1/accounts/{id}/phpmyadmin
Creates a direct sign-in link to phpMyAdmin (single use, 60 s).
Who root, reseller (ACL: create-user-session); customer
API tokens API tokens can't use this endpoint
Operation phpMyAdminSSO · ky call phpMyAdminSSOParameters Responses 200 OKBody Field Type expires_instring urlstring
401 Unauthorized: no session, or an invalid or expired token403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)404 Not Found: not-found409 Conflict: account-inactive500 Internal Server Error: internal
On this page