Sites
Create, change and remove sites. Everything that touches a container is asynchronous: you get a job back and poll it.
Reading needs Read only and changes need Manage, unless an endpoint says otherwise. How to read this page.
GET /api/sites
Section titled “GET /api/sites”List every site with its status, health probe and WordPress snapshot.
- Level: Read only
- Returns:
{items: SiteSummary[]}
POST /api/sites
Section titled “POST /api/sites”Create a site (dev hostname or a live domain) and install WordPress.
- Level: Manage
- Notes: Job
- Input:
{title, slug?, serverId?, domainMode: "dev"|"custom", domains?, phpVersion?, locale?, adminUser, adminEmail?, adminPassword?, discourageSearchEngines?, plugins?: {catalogIds?, extraWporgSlugs?}} - adminEmail left out uses the defaultAdminEmail setting (400 when that is empty); catalogIds left out installs the catalog's default plugins, [] none of them - Returns:
job.result: {url, adminPassword}
GET /api/sites/:slug
Section titled “GET /api/sites/:slug”One site in full, including its container state and monitoring snapshot.
- Level: Read only
- Returns:
SiteDetail
DELETE /api/sites/:slug
Section titled “DELETE /api/sites/:slug”Delete a site, its database and its files.
- Level: Full. Removes the site itself, with its database and files
- Notes: Job · Destructive
- Input:
?finalBackup=true|false (default true)&deleteBackups=true|false (default false; with a final backup, that one is kept)
POST /api/sites/:slug/start
Section titled “POST /api/sites/:slug/start”Start the container.
- Level: Manage
- Notes: Job
POST /api/sites/:slug/stop
Section titled “POST /api/sites/:slug/stop”Stop the container.
- Level: Manage
- Notes: Job · Destructive
POST /api/sites/:slug/restart
Section titled “POST /api/sites/:slug/restart”Restart the container.
- Level: Manage
- Notes: Job
PUT /api/sites/:slug/php
Section titled “PUT /api/sites/:slug/php”Switch PHP version, rolling back if the site stops answering.
- Level: Manage
- Notes: Job
- Input:
{phpVersion}
POST /api/sites/:slug/go-live
Section titled “POST /api/sites/:slug/go-live”Move a dev site onto its real domains with no downtime.
- Level: Manage
- Notes: Job · Destructive
- Input:
{domains: [primary, ...aliases], keepDevAlias?: true, manageDns?: false (true needs Full)}
PUT /api/sites/:slug/domains
Section titled “PUT /api/sites/:slug/domains”Edit the domains a live site answers on.
- Level: Manage
- Notes: Job · Destructive
- Input:
{domains}
POST /api/sites/:slug/move
Section titled “POST /api/sites/:slug/move”Move the site to another server; the old one forwards until DNS catches up.
- Level: Full. Crosses servers and leaves a parked copy behind
- Notes: Job
- Input:
{targetServerId, quiesce?: "maintenance"|"stop"|"none"}
POST /api/sites/:slug/move/finalize
Section titled “POST /api/sites/:slug/move/finalize”Tear down the parked source copy now instead of waiting for DNS verification.
- Level: Full. Ends a move, which is Full: tears down the parked copy
- Notes: Job · Destructive
POST /api/sites/:slug/reconcile
Section titled “POST /api/sites/:slug/reconcile”Re-apply the isolation policy (network, capabilities, limits, mail credential).
- Level: Manage
- Notes: Job
POST /api/sites/reconcile-all
Section titled “POST /api/sites/reconcile-all”The same for every site, one job each.
- Level: Manage
- Notes: Job
- Returns:
202 {jobs}
PUT /api/sites/:slug/backups-enabled
Section titled “PUT /api/sites/:slug/backups-enabled”Include or exclude this site from the scheduled backup run.
- Level: Full. Switching backups off removes a safety net
- Notes: Destructive
- Input:
{enabled} - Returns:
SiteDetail (sync)
PUT /api/sites/:slug/offsite-enabled
Section titled “PUT /api/sites/:slug/offsite-enabled”Stop or resume copying this site’s backups offsite.
- Level: Full. Switching offsite copies off removes a safety net
- Notes: Destructive
- Input:
{enabled} - Returns:
SiteDetail (sync)
PUT /api/sites/:slug/mail-suspension
Section titled “PUT /api/sites/:slug/mail-suspension”Stop or resume the relay accepting this site’s mail.
- Level: Full. Lifting a suspension undoes the spam guard
- Notes: Destructive
- Input:
{suspended, reason?} - Returns:
SiteDetail (sync)
GET /api/sites/:slug/traffic
Section titled “GET /api/sites/:slug/traffic”Visitor statistics: visitors, page views, top pages, referrers, countries, crawlers.
- Level: Read only
- Input:
?days=1..365 (default 30) - Returns:
SiteTrafficDto