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, PHP release and WordPress snapshot.
- Level: Read only
- Returns:
{items: SiteSummary[]}
POST /api/sites
Section titled “POST /api/sites”Create a site: WordPress, a PHP site with no WordPress in it, or a container app.
- Level: Manage
- Notes: Job
- Input:
{title, slug?, serverId?, domainMode: "dev"|"custom", domains?, phpVersion?, app?: "wordpress"|"php"} and, for WordPress: {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. For a PHP site (app "php"): {database?: true for a database of its own, webRoot?: a folder in the site, such as public}, and none of WordPress's fields (400 naming each). For a container app (app "container"): {image: {reference, registryUser?, registryToken?} or {uploadId}, port?, env?, routes? (left out, its dev hostname over https), mounts? (an app made with mounts is left stopped: fill them, then start it), dataPaths?, extraHosts?, database?, hardening?, health?, updates?}, as PATCH /api/sites/:slug/app takes them; no domains or phpVersion - Returns:
job.result: {url, adminPassword} (WordPress), {url} (PHP, container app); 409 for a PHP site on a server whose image is from before PHP sites; 403 below Full for a container app route on another site's domain
GET /api/sites/:slug
Section titled “GET /api/sites/:slug”One site in full, including its container state, monitoring snapshot and the job it is busy with.
- Level: Read only
- Returns:
SiteDetail; a container app's failed deploys carry their logTail only from Manage up
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}
PUT /api/sites/:slug/web-root
Section titled “PUT /api/sites/:slug/web-root”A PHP site’s web root: the folder visitors reach, in force at once.
- Level: Manage
- Input:
{webRoot} - a folder inside the site's, such as public; '' is the site's folder - Returns:
SiteDetail; 409 for a WordPress site, or with Apache's words when it refuses the file
GET /api/sites/:slug/cron
Section titled “GET /api/sites/:slug/cron”A PHP site’s cron lines, each with its schedule in words and its last run.
- Level: Manage. The lines are commands, and the output of the last runs is shown with them
- Returns:
{lines: SiteCronLineDto[]}; 409 for a WordPress site
PUT /api/sites/:slug/cron
Section titled “PUT /api/sites/:slug/cron”Set a PHP site’s cron lines: up to 10 commands run in its folder on a schedule, outside the job queue.
- Level: Manage
- Notes: Destructive
- Input:
{lines: [{id?, expr: "*/5 * * * *", command, enabled?, timeoutMin?: 1-60, default 5}]} - every line as it is to be: one with an id keeps its last run, one left out is deleted; five fields on the panel's clock, every minute allowed - Returns:
{lines: SiteCronLineDto[]}; 400 for a schedule that would never run: one croner refuses, or that no date matches
POST /api/sites/:slug/cron/:id/run
Section titled “POST /api/sites/:slug/cron/:id/run”Run one cron line now, as the next minute would; its result lands on the line.
- Level: Manage
- Notes: Destructive
- Returns:
{line: SiteCronLineDto}; 409 while it runs, while the site is stopped or busy, or with 2 already running on its server
POST /api/sites/:slug/mail/test
Section titled “POST /api/sites/:slug/mail/test”Send a test message as the site’s own code would: wp_mail(), or PHP’s mail() on a PHP site.
- Level: Manage
- Input:
{to} - Returns:
{accepted, detail}
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, allowSearchEngines?: 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"} - Returns:
The job; 409 for a container app with plain http routes when the target's Traefik is from before them
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); retries a failed PHP-FPM move.
- 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/cache
Section titled “PUT /api/sites/:slug/cache”Set the site’s page cache, how long it keeps pages, its rules, and its object cache.
- Level: Manage
- Notes: Job
- Input:
{page?: default|on|off, object?: boolean, keepSeconds?: number|null, off?: string[], own?: rule[]} - each left out = unchanged. keepSeconds: at most 36000, null follows Settings. off: ids of built-in groups and rules to switch off; the whole list. own: the site's own rules, {kind: skip|copy|keep|ignore, match: path|cookie|query|agent|postType, value, seconds?}; the whole list - Returns:
{site: SiteDetail, job} - job: the site.objectCache when the object cache changes; 200 and null otherwise
POST /api/sites/:slug/cache/clear
Section titled “POST /api/sites/:slug/cache/clear”Empty the site’s page cache, and Redis when it runs.
- Level: Manage
- Returns:
{cleared: boolean}
POST /api/sites/:slug/cache/check
Section titled “POST /api/sites/:slug/cache/check”Ask for a page as a visitor with no cookies would, and say what the page cache did with it.
- Level: Manage
- Input:
{path} - starting with / - Returns:
{state: cached|stale|skipped|not-stored|off, reason, status} - reason: the rule or the page's own words
PUT /api/sites/:slug/limits
Section titled “PUT /api/sites/:slug/limits”Set the site container’s own CPU, memory and process limits, or put them back on the panel’s settings.
- Level: Full. More for one site is less for the other sites on its server
- Notes: Job
- Input:
{cpuLimit?, memoryLimitMb?, pidsLimit?} - each a number, or null for Settings' value; left out = unchanged. CPU in cores; 0 = uncapped, for CPU and processes; a process limit is at least 64 - Returns:
{site: SiteDetail, job} - job: the server.applySiteLimits that changes the container in place (lifting a CPU cap recreates it); 200 and null when nothing it runs with changed
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/backups-keep-days
Section titled “PUT /api/sites/:slug/backups-keep-days”Set after how many days this site’s backups are deleted, or put it back on the panel’s setting.
- Level: Full. A shorter keep period deletes backups, a safety net
- Notes: Destructive
- Input:
{days: number | null} (null = Settings, 0 = never) - Returns:
SiteDetail (sync)
PUT /api/sites/:slug/backup-before-updates
Section titled “PUT /api/sites/:slug/backup-before-updates”Set whether an update backs this site up first, or put it back on the panel’s setting.
- Level: Full. Never backing up before an update removes a safety net
- Notes: Destructive
- Input:
{value: "always" | "ask" | "never" | null} (null = Settings) - 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