Appearance
Web hosting
Web hosting packages and what is in them: databases, domains, e-mail addresses and accounts, FTP accounts (product family hosting, scope console-hosting beta, or user / user:read / products:read).
| Method | Path | |
|---|---|---|
| GET | /hostings | your hosting packages |
| GET | /hostings/locations | hosting locations |
| GET | /hostings/{hosting} | one package with its usage and limits |
| DELETE | /hostings/{hosting} | delete; body name = the package's name |
| GET, POST | /hostings/{hosting}/databases | list, create |
| GET, PUT, DELETE | /hostings/{hosting}/databases/{database} | read, change, delete |
| GET, POST | /hostings/{hosting}/domains | list, add |
| GET, PUT, DELETE | /hostings/{hosting}/domains/{domain} | read, change, remove |
| GET, POST | /hostings/{hosting}/emails | list, create addresses |
| GET, PUT, DELETE | /hostings/{hosting}/emails/{email} | read, change, delete an address |
| POST, DELETE | /hostings/{hosting}/emails/{email}/email-account | create, delete the mailbox of an address |
| PUT | /hostings/{hosting}/emails/{email}/email-account/update | change the mailbox password |
| GET, POST | /hostings/{hosting}/ftp-accounts | list, create |
| GET, PUT, DELETE | /hostings/{hosting}/ftp-accounts/{ftp_account} | read, change, delete |
{hosting} is the package's id. Databases, domains, e-mail addresses and FTP accounts inside a package are addressed by their numeric id from the lists.
New packages are ordered through orders (family hosting, see Order attributes).
Packages
GET /hostings (paginated, sorted by name) and GET /hostings/{hosting} return the package with attributes: its usage and limits - disk space, traffic, databases, subdomains, e-mail addresses, accounts and forwarders, FTP accounts (each as limit and …_used). A reseller's end customer gets only usage and limits, not the reseller's subscription or price.
Every package carries provisioning_status beta: provisioning while its account is being created (then attributes is null and every other request on it - databases, domains, e-mail, FTP, delete - answers 409, error: provisioning), null when ready - see Products being set up.
GET /hostings/locations lists the locations: [{id, name, active}].
Delete a package
http
DELETE /v1/hostings/{hosting}
{"name": "<package name>"}→ 204; a wrong name answers 422.
Databases
| Field | Create | Change |
|---|---|---|
password | required | optional |
description | optional | optional |
bash
curl -X POST https://console.anikeen.com/api/v1/hostings/01JC…/databases \
-H "Authorization: Bearer $ANIKEEN_TOKEN" -H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"password":"a-long-random-password","description":"shop"}'Lists and reads show at least id, databasename, description, size (see below). PUT returns the changed database, DELETE answers 204.
Domains
| Field | Create | Change | |
|---|---|---|---|
domain | required | - | the domain; its DNS records must point to the package |
description | optional | optional | |
letsencrypt | optional | optional | true for a Let's Encrypt certificate (the DNS records must allow it) |
selectserveralias | optional | optional | 0, 1 or 2 |
documentroot | - | optional | the document root, relative to the package's web directory |
openbasedir_path | - | optional | 0, 1 or 2 |
ssl_redirect | - | optional | redirect HTTP to HTTPS |
email_only | - | optional | use the domain for e-mail only |
Lists and reads show at least id, domain, description, letsencrypt. When the hosting panel rejects a request, the API answers 422 with its message.
E-mail addresses
| Field | Create | Change | |
|---|---|---|---|
email_part | required | - | the part before the @, max. 64 |
domain | required | - | a domain of the package, max. 64 |
description | optional | optional | |
destination | - | optional | forwarding destination(s) |
iscatchall | - | optional | catch-all address for the domain |
Lists and reads show at least id, email, description, iscatchall, imap, quota.
Mailbox (e-mail account)
An address becomes a mailbox when it has an e-mail account:
| Request | Body |
|---|---|
POST …/emails/{email}/email-account | {"password": "…"} (required) |
PUT …/emails/{email}/email-account/update | {"password": "…"} (required) → 204 |
DELETE …/emails/{email}/email-account | → 204 |
FTP accounts
| Field | Create | Change |
|---|---|---|
path | required | required |
password | required | optional |
description | optional | optional |
Lists and reads show at least id, username, homedir, description, quota_size.
Fields shown
Members of the package's team get the full records of the hosting panel. A reseller's end customer gets only the fields listed in each section above (and, for the package, its usage and limits).