Applications
API routes to create and manage applications, with domains and SSL, files, logs, PHP, environment, deployment, staging, workers, security, containers and settings.
These routes are the API side of the application screens: create and list applications, domains and SSL, files, logs, PHP, environment, deployment, staging and clone, workers, security, containers and settings.
Backups of an application are on Backups. WordPress tools (WP Toolkit and blueprints), Log Monitoring and proactive monitoring are on Billing and add-ons. The databases of an application are the server's databases: see Server panel. The application activity is part of the server activity log: GET /activities on the Server panel page.
Before you start
- Base path. Every route here starts with
/organizations/{organization}/servers/{server}/applications. Most routes work on one application and start with/{application}. In the tables the path of such a route is shown without that start, soGET /domainsmeansGET /organizations/{organization}/servers/{server}/applications/{application}/domains. The first group also has routes that show their full path from/applicationsor/organizations.{application}is an application id from the list. - Tokens. Both the login token and the personal API token can call these routes, except the ones marked Login token only. See Authentication.
- The server must be ready. A server that is still installing or has failed answers
409with the codeserver_not_ready. - Most answers come from the panel on the server. Central passes your request to the panel on the server and returns its answer in
data. The shapes, the dates (for example25-11-2026 01:24:25) and the page information (ametaobject, nolinks) follow that panel, not the rest of this API. The examples on this page are real answers from a demo server. - Permissions. The Permission column names the role permission you need and whether it is view (read) or manage (change; manage includes view). People a server is shared with, and Control Panel customers, have only what the share or the grant gives them. See Roles and permissions.
- Jobs that take time. A route marked
202starts the work and answers at once. Read the item again to follow it, or callGET /operationson the server page. - Signed links. A download is two steps: a
POST .../linkroute makes a one-time link, then you open the link with a plainGET. The second step needs no token.
Make a first call
List the applications on a server:
curl https://<api-address>/api/v1/organizations/590/servers/145/applications \
-H "Accept: application/json" \
-H "Authorization: Bearer <token>"The answer has a data list. Each item has id, name, domain, url, site_type, status and status_title (for example Running), document_root and the state of the web firewall, bot blocker and Fail2ban. A shortened item:
{
"data": [
{
"id": 4,
"name": "acme-site",
"domain": "acme-site.23-172-120-68.nip.io",
"url": "https://acme-site.23-172-120-68.nip.io",
"document_root": "/home/acme/acme-site/public_html",
"site_type": "git",
"site_type_title": "From Git repo",
"status": "active",
"status_title": "Running",
"deployed": true,
"is_disabled": false,
"waf_enabled": false,
"fail2ban_enabled": false
}
]
}Applications: list, create, overview and actions
| Route | Permission | Purpose |
|---|---|---|
GET /organizations/{organization}/applications | Application (view) | Every application on every ready server of the organization, each with its server. It takes search and filter[server_id]. page, per_page and sort are accepted but ignored: the list is sorted by name. |
GET /applications | Application (view) | List the applications on the server. |
POST /applications | Application (manage) | Create an application. Answers 201. |
GET /organizations/{organization}/servers/{server}/site-types | Application (view) | The application types this server can create. It fills the type list of Create application. |
GET /applications/port-check | Application (view) | Check that a port is free for a new container application. |
GET / | Application (view) | One application (same as GET .../applications/{application}). |
DELETE / | Application (manage) | Delete the application. |
POST /directory-size | Application (view) | Measure and store the size of the application's directory. |
POST /disable | Application (manage) | Turn the application off. Its site stops answering. |
POST /enable | Application (manage) | Turn the application on again. |
GET /issues | Application (view) | The health issues of the application, and whether it is healthy. |
GET /menu | Application (view) | The sidebar items you may see for this application. |
POST /process/{action} | Application (manage) | Start, stop or restart a Node.js application's process. {action} is start, stop or restart. |
POST /provision | Application (manage) | Run a failed setup again. Answers 202. |
GET /sftp | Application (view) | The application's SFTP login details (no password). |
POST /sftp/email | Application (manage) | Email the SFTP details to yourself. Answers 202. Limit: 3 a minute. |
POST /sftp/password | Application (manage) | Set a new SFTP password. Limit: 10 a minute. |
GET /update | Application (view) | Whether an update of the application's own software is available, and the progress of a run. |
POST /update | Application (manage) | Update the application's software in one click (a background job). Answers 202. |
GET /organizations/{organization}/applications
Query string:
| Field | Type | Required | Rules |
|---|---|---|---|
filter | string | no | keys status, site_type, server_id |
filter.server_id | integer | no | |
filter | string | no | keys status, site_type, server_id |
filter.server_id | integer | no |
GET /applications
Query string:
| Field | Type | Required | Rules |
|---|---|---|---|
page | integer | no | at least 1 |
per_page | integer | no | 1 to 100 |
search | string | no | at most 255 characters |
filter | string | no | keys status, site_type |
filter.status | string | no | one of pending, provisioning, active, failed, paused |
filter.site_type | string | no | at most 64 characters; pattern ^[a-z][a-z0-9_]*$ |
sort | string | no | Rule::in($sorts) |
POST /applications
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
name | string | yes | at most 255 characters |
domain | string | yes | at most 253 characters; pattern ^[A-Za-z0-9.-]+$ |
domain_type | string | yes | one of custom, temp |
site_type | string | yes | pattern ^[a-z][a-z0-9_]{0,63}$ |
system_user_id | integer | no | at least 1 |
generate_system_user | boolean | no | |
system_user | array | no | |
system_user.username | string | no | at most 32 characters |
system_user.password | string | no | at most 255 characters |
env | array | no | at most 100 items |
env.* | array | no | |
env.*.key | string | yes | at most 255 characters |
env.*.value | string | no | at most 65535 characters; can be null |
volume_mounts | array | no | at most 20 items |
volume_mounts.* | array | no | |
volume_mounts.*.volume | string | yes | at most 128 characters |
volume_mounts.*.path | string | yes | at most 4096 characters |
wordpress_blueprint_id | integer | no | at least 1; can be null |
install_log_monitoring | boolean | no | |
proactive_monitoring | boolean | no | |
git_source | string | no | one of account, public_url |
git_account_id | integer | no | at least 1; can be null |
oss_git_account_id | integer | no | at least 1; can be null |
repository_url | string | no | at most 255 characters; can be null |
GET /applications/port-check
Query string:
| Field | Type | Required | Rules |
|---|---|---|---|
port | integer | yes | 1 to 65535 |
application_id | integer | no | at least 1 |
DELETE /
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
remove_files | boolean | no | |
remove_databases | boolean | no | |
remove_system_user | boolean | no |
Domains and SSL
| Route | Permission | Purpose |
|---|---|---|
GET /certificate | Domains & SSL (view) | The SSL certificate. |
POST /certificate | Domains & SSL (manage) | Issue a certificate (Let's Encrypt, or your own). |
DELETE /certificate | Domains & SSL (manage) | Remove the certificate. Answers 204. |
POST /certificate/dry-run | Domains & SSL (manage) | Start a test that checks a certificate could be issued. Answers 202. |
GET /certificate/dry-run | Domains & SSL (view) | The result of that test. |
PUT /certificate/force-https | Domains & SSL (manage) | Turn "Force HTTPS" on or off. |
GET /domains | Domains & SSL (view) | List the domains. |
POST /domains | Domains & SSL (manage) | Add a domain. Answers 201. |
PUT /domains/{domain} | Domains & SSL (manage) | Change a domain. |
DELETE /domains/{domain} | Domains & SSL (manage) | Remove a domain. Answers 204. |
POST /domains/{domain}/primary | Domains & SSL (manage) | Make the domain the primary one. |
POST /domains/{domain}/verify | Domains & SSL (view) | Check that the domain's DNS points to the server. |
POST /certificate
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
type | string | yes | one of letsencrypt, self_signed, custom |
force | boolean | no | |
certificate | string | yes | at most 65535 characters; exclude_unless:type,custom |
private_key | string | yes | at most 65535 characters; exclude_unless:type,custom |
chain | string | no | at most 65535 characters; exclude_unless:type,custom; can be null |
PUT /certificate/force-https
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
force_https | boolean | yes |
POST /domains
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
domain | string | yes | at most 253 characters; pattern ^[A-Za-z0-9.*-]+$ |
type | string | no | one of alias, redirect |
redirect_to | string | no | at most 2048 characters |
redirect_status | integer | no | one of 301, 302 |
PUT /domains/{domain}
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
type | string | no | required_without_all:redirect_to,redirect_status; one of alias, redirect |
redirect_to | string | no | at most 2048 characters |
redirect_status | integer | no | one of 301, 302 |
Files
| Route | Permission | Purpose |
|---|---|---|
GET /files | File Manager (view) | List a folder. |
DELETE /files | File Manager (manage) | Delete files or folders (they go to the trash). |
GET /files/archive-jobs | File Manager (view) | Running and finished compress or extract jobs. |
GET /files/breakdown | File Manager (view) | Disk use by folder, for a chart. |
POST /files/compress | File Manager (manage) | Compress files into an archive. Answers 202. |
GET /files/content | File Manager (manage) | Read a file. |
PUT /files/content | File Manager (manage) | Save a file. |
POST /files/content/restore | File Manager (manage) | Restore an earlier version of a file. |
POST /files/copy | File Manager (manage) | Copy files or folders. |
POST /files/directories | File Manager (manage) | Create a folder. |
POST /files/extract | File Manager (manage) | Extract an archive. Answers 202. |
POST /files/link | File Manager (manage) | Make a signed download link for a file. |
PUT /files/permissions | File Manager (manage) | Change file permissions. |
PUT /files/rename | File Manager (manage) | Rename or move a file or folder. |
GET /files/search | File Manager (view) | Search files by name. |
GET /files/size | File Manager (view) | The size of one folder. |
GET /files/sizes | File Manager (view) | The sizes of several folders. |
GET /files/stream | Signed link | Download a file through a signed link. No token needed; the link is the proof. Limit: 60 a minute. |
GET /files/trash | File Manager (view) | List the trash. |
DELETE /files/trash | File Manager (manage) | Empty the trash. |
POST /files/trash/restore | File Manager (manage) | Restore items from the trash. |
POST /files/upload | File Manager (manage) | Upload a small file in one request. Limit: 10 a minute. |
POST /files/uploads | File Manager (manage) | Start a chunked upload. |
GET /files/uploads/space | File Manager (view) | The free space and the largest file you can upload. |
PUT /files/uploads/{upload} | File Manager (manage) | Send one chunk. Limit: 1,200 a minute. |
GET /files/uploads/{upload} | File Manager (view) | The state of a chunked upload. |
DELETE /files/uploads/{upload} | File Manager (manage) | Cancel an upload. |
POST /files/uploads/{upload}/finalize | File Manager (manage) | Finish the upload and put the file in place. |
GET /files
Query string:
| Field | Type | Required | Rules |
|---|---|---|---|
path | string | no | can be null; a path inside the application's folder: no leading /, no .. |
refresh | boolean | no |
DELETE /files
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
path | string | without paths | prohibits:paths,count; a path inside the application's folder: no leading /, no .. |
paths | array | without path | at least 1 items; at most '.self::MAX_PATHS items |
paths.* | string | yes | a path inside the application's folder: no leading /, no .. |
count | integer | with paths | |
confirm | string | yes | accepted |
permanent | boolean | no |
GET /files/breakdown
Takes the same fields as GET /files.
POST /files/compress
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
path | string | without paths | prohibits:paths; a path inside the application's folder: no leading /, no .. |
paths | array | without path | at least 1 items; at most '.RenameFilesRequest::MAX_PATHS items |
paths.* | string | yes | a path inside the application's folder: no leading /, no .. |
target | string | yes | a path inside the application's folder: no leading /, no .. |
GET /files/content
Query string:
| Field | Type | Required | Rules |
|---|---|---|---|
path | string | yes | a path inside the application's folder: no leading /, no .. |
PUT /files/content
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
path | string | yes | a path inside the application's folder: no leading /, no .. |
content | string | no | present; can be null |
version | string | no | at most 64 characters; can be null |
POST /files/content/restore
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
path | string | yes | a path inside the application's folder: no leading /, no .. |
backup | string | yes | at most 255 characters |
POST /files/copy
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
path | string | without paths | prohibits:paths,target_directory; a path inside the application's folder: no leading /, no .. |
target | string | with path | prohibits:paths,target_directory; a path inside the application's folder: no leading /, no .. |
paths | array | without path | at least 1 items; at most '.RenameFilesRequest::MAX_PATHS items |
paths.* | string | yes | a path inside the application's folder: no leading /, no .. |
target_directory | string | no | present_with:paths; can be null; a path inside the application's folder: no leading /, no .. |
POST /files/directories
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
path | string | yes | a path inside the application's folder: no leading /, no .. |
POST /files/extract
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
path | string | yes | a path inside the application's folder: no leading /, no .. |
target | string | no | present; can be null; a path inside the application's folder: no leading /, no .. |
POST /files/link
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
path | string | yes | a path inside the application's folder: no leading /, no .. |
mode | string | yes | one of download, preview |
PUT /files/permissions
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
path | string | without paths | prohibits:paths; a path inside the application's folder: no leading /, no .. |
paths | array | without path | at least 1 items; at most '.RenameFilesRequest::MAX_PATHS items |
paths.* | string | yes | a path inside the application's folder: no leading /, no .. |
mode | string | yes | pattern ^[0-3]?[0-7]{3}$ |
PUT /files/rename
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
path | string | without paths | prohibits:paths,target_directory; a path inside the application's folder: no leading /, no .. |
target | string | with path | prohibits:paths,target_directory; a path inside the application's folder: no leading /, no .. |
paths | array | without path | at least 1 items; at most '.self::MAX_PATHS items |
paths.* | string | yes | a path inside the application's folder: no leading /, no .. |
target_directory | string | no | present_with:paths; can be null; a path inside the application's folder: no leading /, no .. |
GET /files/search
Query string:
| Field | Type | Required | Rules |
|---|---|---|---|
q | string | yes | 1 to 255 characters |
path | string | no | can be null; a path inside the application's folder: no leading /, no .. |
GET /files/size
Takes the same fields as GET /files.
GET /files/sizes
Takes the same fields as GET /files.
DELETE /files/trash
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
confirm | string | yes | accepted |
batch | string | no | can be null; pattern ^\d{8}-\d{6}$ |
POST /files/trash/restore
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
batch | string | yes | pattern ^\d{8}-\d{6}$ |
path | string | no | can be null; a path inside the application's folder: no leading /, no .. |
POST /files/upload
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
path | string | yes | a path inside the application's folder: no leading /, no .. |
file | file | yes |
POST /files/uploads
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
path | string | yes | a path inside the application's folder: no leading /, no .. |
size | integer | no | at least 0; can be null |
PUT /files/uploads/{upload}
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
size | integer | yes | 1 to '.(int) config('oss.upload_max_bytes') |
POST /files/uploads/{upload}/finalize
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
path | string | yes | a path inside the application's folder: no leading /, no .. |
Logs
| Route | Permission | Purpose |
|---|---|---|
GET /logs | Logs (view) | List the application's log files. |
GET /logs/{key} | Logs (view) | Read the end of a log. |
DELETE /logs/{key} | Logs (manage) | Clear a log. |
POST /logs/{key}/link | Logs (view) | Make a signed download link for a log. Limit: 6 a minute. |
GET /logs/{key}/stream | Signed link | Download a log through a signed link. No token needed. Limit: 60 a minute. |
GET /logs/{key}
Query string:
| Field | Type | Required | Rules |
|---|---|---|---|
lines | integer | no | 1 to 5000 |
grep | string | no | at most 255 characters |
from | integer | no | at least 1 |
ip | string | no | an IP address |
status | string | no | pattern ^([1-5][0-9]{2}|[1-5]xx)$ |
method | string | no | pattern ^[A-Za-z]{3,10}$ |
url | string | no | at most 255 characters |
PHP
| Route | Permission | Purpose |
|---|---|---|
POST /cronjobs/switch-php | PHP Settings (view) and Cron Jobs (manage) on the server | Move the application's cron jobs to its PHP version. Limit: 10 a minute. |
GET /php | PHP Settings (view) | The application's PHP version and settings. |
PUT /php | PHP Settings (manage) | Change the PHP version and settings. |
POST /php/isolate | PHP Settings (manage) | Give the application its own PHP-FPM pool. |
POST /php/v7-extra-conf | PHP Settings (manage) | Translate extra web server configuration from ServerAvatar v7. Limit: 30 a minute. |
POST /cronjobs/switch-php
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
version | string | yes | pattern ^\d+\.\d+$ |
cronjob_ids | array | yes | at least 1 items; at most 100 items |
cronjob_ids.* | integer | yes | at least 1; no duplicates |
POST /php/v7-extra-conf
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
extra_conf | string | no | at most 20000 characters; present; can be null |
Environment
| Route | Permission | Purpose |
|---|---|---|
GET /environment | Environment (manage) | Read the .env file. |
PUT /environment | Environment (manage) | Save the .env file. |
POST /environment/check | Environment (manage) | Check the file before you save it. |
GET /environment/history | Environment (manage) | Earlier versions of the file. |
GET /environment/history/{log}/diff | Environment (manage) | What changed in one earlier version. |
POST /environment/restore | Environment (manage) | Restore an earlier version. |
PUT /environment
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
raw | string | no | at most 262144 characters; present; can be null |
restart | boolean | no |
POST /environment/check
Takes the same fields as PUT /environment.
GET /environment/history
Query string:
| Field | Type | Required | Rules |
|---|---|---|---|
page | integer | no | at least 1 |
per_page | integer | no | 1 to 100 |
POST /environment/restore
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
backup | string | yes | pattern ^\.env\.bak-\d{8}-\d{6}$ |
restart | boolean | no |
Deployment
| Route | Permission | Purpose |
|---|---|---|
GET /deployment | Deployment (view) | The Git deployment settings and state. |
PUT /deployment-settings | Deployment (manage) | Change deploy settings: auto deploy, scripts and so on. |
POST /deployments | Deployment (manage) | Deploy now. Answers 202. |
GET /deployments/latest | Deployment (view) | The latest deployment. |
GET /deployments/{deployment} | Deployment (view) | One deployment and its log. |
POST /deployments/{deployment}/redeploy | Deployment (manage) | Deploy that version again. Answers 202. |
PUT /git-source | Deployment (manage) | Connect or change the Git repository and branch. |
PUT /webhook | Deployment (manage) | Turn the deploy webhook on or off. |
GET /webhook-providers | Deployment (view) | The Git hosts the webhook supports. |
PUT /deployment-settings
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
branch | string | no | at most 255 characters; pattern ^[A-Za-z0-9._\/-]+$ |
deploy_script | string | no | at most 65535 characters; can be null |
PUT /git-source
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
git_source | string | yes | one of account, public_url |
git_account_id | integer | no | at least 1; can be null |
oss_git_account_id | integer | no | at least 1; can be null |
repository | string | yes | at most 255 characters; pattern ^[A-Za-z0-9._-]+(\/[A-Za-z0-9._-]+)+$; not_regex:/(^|\/)\.{1,2}(\/|$)/ |
repository_url | string | yes | at most 255 characters |
branch | string | no | at most 255 characters; pattern ^[A-Za-z0-9._\/-]+$ |
PUT /webhook
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
enabled | boolean | yes | |
provider | string | when enabled=true | at most 30 characters; can be null; pattern ^[a-z0-9_-]+$ |
secret | string | no | 16 to 255 characters; can be null |
rotate | boolean | no |
Staging and clone
| Route | Permission | Purpose |
|---|---|---|
POST /clone | Clone (manage) | Clone the application to a new application. Answers 202. |
GET /clones/{clone} | Clone (view) | The state of a clone job. |
GET /staging | Staging Area (view) | The staging copy of the application, if there is one. |
POST /staging | Staging Area (manage) | Create a staging copy. Answers 201. |
POST /staging/pull | Staging Area (manage) | Pull the live site into staging. Answers 202. |
POST /staging/push | Staging Area (manage) | Push staging to the live site. Answers 202. |
GET /staging/runs/{run} | Staging Area (view) | The state of a staging job. |
GET /staging/safety-copies | Staging Area (view) | The database copies made before a push. |
POST /staging/safety-copies/{name}/restore | Staging Area (manage) | Restore one safety copy. |
POST /clone
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
domain | string | yes | at most 253 characters; pattern '.CreateStagingRequest::DOMAIN |
name | string | no | at most 255 characters |
POST /staging
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
domain | string | yes | at most 253 characters; pattern '.self::DOMAIN |
POST /staging/pull
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
mode | string | yes | one of files, database, full |
safety_copy | boolean | no | |
backup | string | no |
POST /staging/push
Takes the same fields as POST /staging/pull.
Workers
| Route | Permission | Purpose |
|---|---|---|
POST /supervisor/convert | Application (manage) | Convert the workers to Supervisor. |
GET /workers | Workers (view) | List the workers. |
POST /workers | Workers (manage) | Create a worker. Answers 201. |
POST /workers/install-supervisor | Workers (manage) | Install Supervisor. |
PUT /workers/{worker} | Workers (manage) | Change a worker. |
DELETE /workers/{worker} | Workers (manage) | Delete a worker. Answers 204. |
POST /workers/{worker}/{action} | Workers (manage) | Start, stop or restart a worker. {action} is start, stop or restart. |
POST /workers
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
name | string | yes | at most 60 characters |
command | string | yes | at most 500 characters |
kind | string | no | one of queue, horizon, custom |
directory | string | no | at most 255 characters; can be null |
processes | integer | no | 1 to 16 |
stop_wait_seconds | integer | no | 1 to 600 |
auto_restart | boolean | no | |
restart_on_deploy | boolean | no | |
enabled | boolean | no | |
auto_start | boolean | no | |
user | string | no | at most 32 characters; can be null; pattern ^[a-z_][a-z0-9_-]*$; not root or www-data on a managed server |
log_file | string | no | at most 255 characters; can be null |
log_level | string | no | can be null; one of critical, error, warn, info, debug, trace, blather |
extra_config | string | no | at most 2000 characters; can be null |
PUT /workers/{worker}
Takes the same fields as POST /workers.
Password protection, web firewall, bot blocker and Fail2ban
| Route | Permission | Purpose |
|---|---|---|
GET /ai-bot-policies | AI Bot Blocker (view) | The AI bots you can allow or block. |
PUT /bot-blocker | AI Bot Blocker (manage) | Change the AI bot blocker. |
GET /bot-traffic | Logs (view) | Recent bot traffic. |
GET /fail2ban | Fail2ban (view) | The application's Fail2ban jail. |
POST /fail2ban | Fail2ban (manage) | Create or change the jail. |
DELETE /fail2ban | Fail2ban (manage) | Remove the jail. |
GET /fail2ban/bans | Fail2ban (view) | Current bans. |
POST /fail2ban/bans | Fail2ban (manage) | Ban an IP address. |
DELETE /fail2ban/bans/{ip} | Fail2ban (manage) | Lift a ban. |
PUT /security | Password Protection (manage) | Turn password protection on or off and set its users. |
GET /waf | Web Firewall (view) | The web firewall settings and rules. |
PUT /waf | Web Firewall (manage) | Change the web firewall. |
GET /waf-options | Web Firewall (view) | The rule sets and modes you can choose. |
PUT /bot-blocker
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
policy | string | yes | one of allow_all, block_training, block_agents, block_all, legacy_v7 |
blocked | array | no | at most 50 items |
blocked.* | string | no | 1 to 255 characters |
allowed | array | no | at most 50 items |
allowed.* | string | no | 1 to 255 characters |
GET /bot-traffic
Query string:
| Field | Type | Required | Rules |
|---|---|---|---|
days | integer | no | 1 to 30 |
POST /fail2ban
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
jail_config_content | string | yes | at most 65535 characters |
filter_config_content | string | yes | at most 65535 characters |
POST /fail2ban/bans
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
ip | string | yes | an IP address |
PUT /security
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
enabled | boolean | yes | |
username | string | yes | at most 255 characters; pattern ^[\x21-\x39\x3B-\x7E]+$ |
password | string | yes | at least 8 characters; at most 72 bytes |
PUT /waf
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
enabled | boolean | yes | |
mode | string | yes | one of detect, enforce |
categories | array | no | |
categories.* | string | no | no duplicates; one of query_string, request_uri, user_agent, referrer, cookie, method |
exceptions | array | no | at most 50 items |
exceptions.* | string | no | 1 to 255 characters |
custom_rules | array | no | at most 50 items |
custom_rules.* | string | no | 1 to 255 characters |
Containers and Compose
| Route | Permission | Purpose |
|---|---|---|
PUT /container | Container (manage) | Change the container: image, ports, environment, volumes and so on. |
GET /container/access | Compose File (view) | The shell access to the container. |
POST /container/access | System Users (manage) | Turn on shell access. |
DELETE /container/access | System Users (manage) | Turn it off. |
GET /container/compose | Compose File (view) | The Compose file. |
PUT /container/compose | Compose File (manage) | Save the Compose file. |
POST /container/pull | Container (manage) | Pull the image again and recreate the container. Answers 202. |
GET /container/secrets | Container (manage) | The container's generated secrets. |
POST /container/secrets/acknowledge | Container (manage) | Confirm you saved the secrets. |
PUT /container
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
container_port | integer | yes | 1 to 65535 |
memory_limit | string | no | at most 20 characters; can be null; no control characters |
cpu_limit | string | no | at most 16 characters; can be null; no control characters |
docker_network | string | no | at most 255 characters; can be null; no control characters |
remove_previous_network | boolean | no | |
registry_id | integer | no | at least 1; can be null |
volume_mounts | array | no | at most 20 items; can be null |
volume_mounts.* | string | no | keys volume, path |
volume_mounts.*.volume | string | yes | at most 255 characters; no control characters |
volume_mounts.*.path | string | yes | at most 255 characters; pattern ^\; no control characters; not_regex:/(^|\/)\.\.(\/|$)/ |
POST /container/access
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
ssh_key | string | no | at most 16384 characters; can be null; one line; a complete OpenSSH public key |
password | string | no | 8 to 255 characters; can be null; no control characters |
confirm_container_only | boolean | no |
PUT /container/compose
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
compose | string | yes | at most '.self::MAX_BYTES characters |
Settings
| Route | Permission | Purpose |
|---|---|---|
POST /detect-type | General (manage) | Detect the application type from its files. |
POST /fix-permissions | General (manage) | Fix file ownership and permissions. |
GET /magic-login | Magic Login (manage) | Recent magic login links. |
POST /magic-login | Magic Login (manage) | Make a one-time WordPress sign-in link. Answers 201. |
GET /node-version | General (view) | The application's Node.js version. |
PUT /node-version | General (manage) | Change it. Answers 202. |
GET /root-lock | General (view) | Whether the application's root is locked. |
POST /root-lock | General (manage) | Lock the application's root. |
PUT /site-type | General (manage) | Change the application type. |
PUT /web-root | General (manage) | Change the web root folder. |
POST /wp-cli/install | General (manage) | Install WP-CLI for the application. Answers 202. |
POST /magic-login
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
wp_user_id | integer | yes | at least 1 |
PUT /node-version
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
node_version | string | yes | at most 20 characters; pattern ^\d+\.\d+\.\d+$ |
PUT /site-type
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
site_type | string | yes | at most 64 characters; pattern ^[a-z][a-z0-9_]*$ |
PUT /web-root
JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
web_root | string | no | at most 255 characters; present; can be null; pattern ^[A-Za-z0-9._\-\/]+$; not_regex:/(^|\/)\.\.(\/|$)/ |
Limits
- File upload in one request: 10 a minute. Chunks of a chunked upload: 1,200 a minute. Log link requests: 6 a minute. SFTP password: 10 a minute. SFTP email: 3 a minute. Moving cron jobs to another PHP version: 10 a minute. The v7 extra configuration translator: 30 a minute.
- A file link is valid for 60 seconds and works once.
- A file you edit through
PUT /files/contentcan be at most 2 MB (2,097,152 bytes). - A path in a file route has no leading
/and no.., and is at most 4,096 bytes.
Who can do this
- Each route needs the application permission in the table. Application (view) opens the list and the overview; Application (manage) creates and deletes. The other permissions follow the screens: Domains & SSL, File Manager, Logs, PHP Settings, Environment, Deployment, Staging Area, Clone, Workers, Password Protection, Web Firewall, AI Bot Blocker, Fail2ban, Container, Compose File, General and Magic Login.
- Reading the
.envfile and reading a file's content need manage, because they can show secrets. - Container shell access is turned on and off with System Users (manage).
Common errors
- This server is not ready yet. Wait until it is connected and try again. (
server_not_ready, 409) The server is still installing, or its install failed. - The server panel could not be reached. Check that the server is online and the API address is correct. (
oss_unreachable, 502) The server is offline. Try again when it is back. - The server is busy with another task. Nothing was changed. Try again in a moment. (
server_busy, 503) Another job, such as a deploy or a certificate request, is running. - This item was not found on the server. It may have been removed. Refresh and try again. (
oss_not_found, 404) The item was removed on the server. - The server panel returned an error. Please try again. (
oss_error, 502) The panel on the server refused the change. When the panel gave a reason, the answer holds it inoss_message. - You do not have permission to do this in this organization. (403) Your role lacks the permission in the table. A person a server is shared with, or a Control Panel customer, may have fewer permissions than a member.
- The name field is required. (422) A field failed validation. The
errorsobject names it.
Related
Server panel
API routes for the server screens, from the dashboard, settings and system users to the firewall, Fail2ban, cron jobs, services, PHP, Node.js, Docker, logs, sync, alerts and databases.
Backups
API routes for the server's backup list, restores and downloads, and for the backup plans of applications and databases.