Server operations API
Read server metrics and processes, control services, read and clear logs, list background operations, manage cron jobs and the disk cleaner, and read the server activity log through the OSS Panel API.
The day-to-day server screens, as endpoints: the Dashboard (facts, live metrics, processes), Services, Logs, the list of long-running operations, Cron jobs, the Disk cleaner, and the server Activity log.
All paths are relative to https://<your-panel-host>/api. Read
Authentication first. The examples use:
PANEL=https://panel.example.com
TOKEN='1|xcMq8K3vZ2pL…'Permissions
| Key | Title in Roles | Used for |
|---|---|---|
dashboard | Dashboard | /server/facts, /server/metrics/*, /server/processes. |
app_dashboard | Dashboard (application) | /applications/{application}/issues. |
service | Services | /services. |
logs | System Logs | /logs. |
cronjob | Cron Jobs | /cronjobs. |
disk_cleaner | Disk Cleaner | /disk-cleaner. |
activity_log | Activity Log | /server/activity-log. |
Reading needs view; every endpoint marked manage needs manage, which
implies view. GET /operations has no permission of its own: each entry in the
answer is shown only if your role covers its kind.
Unless the table says otherwise, an endpoint draws on the shared budget (see
Rate limits). The endpoints
that screens poll (/server/metrics/live, /services, /operations) sit outside
that budget.
Endpoint index
| Method | Path | Permission | Limit per minute | Purpose |
|---|---|---|---|---|
GET | /server/facts | dashboard | shared | Hostname, OS, CPU, memory, disk, uptime. |
GET | /server/metrics/live | dashboard | polling | Current CPU, memory, disk, load, network. |
GET | /server/metrics/history | dashboard | shared | Samples from the last 24 hours. |
GET | /server/processes | dashboard | shared | The busiest processes. |
DELETE | /server/processes/{pid} | dashboard manage | shared | Stop a process. |
GET | /applications/{application}/issues | app_dashboard | shared | Problems found on one application. |
GET | /services | service | polling | Managed services and their state. |
POST | /services/{service}/config-test | service | shared | Test a service's configuration. |
PUT | /services/{service} | service manage | shared | Start, stop, restart, reload, enable or disable. |
GET | /logs | logs | shared | Available logs. |
GET | /logs/{key} | logs | shared | Read the end of a log. |
GET | /logs/{key}/download | logs | shared | Download a log file. |
DELETE | /logs/{key} | logs manage | shared | Empty a log. |
GET | /operations | any | polling | Recent and running background jobs. |
GET | /cronjobs/schedule-presets | cronjob | shared | Ready-made schedules. |
GET | /cronjobs/command-presets | cronjob | shared | Ready-made commands. |
GET | /cronjobs | cronjob | shared | List cron jobs. |
POST | /cronjobs | cronjob manage | shared | Create a cron job. |
GET | /cronjobs/{cronjob} | cronjob | shared | One cron job. |
PUT | /cronjobs/{cronjob} | cronjob manage | shared | Change a cron job. |
DELETE | /cronjobs/{cronjob} | cronjob manage | shared | Delete a cron job. |
GET | /cronjobs/{cronjob}/runs | cronjob | shared | Run history. |
POST | /cronjobs/{cronjob}/run | cronjob manage | shared | Run it now. |
POST | /applications/{application}/cronjobs/switch-php | cronjob manage + app_php manage (PHP Settings) | 10 | Move cron jobs to another PHP version. |
GET | /disk-cleaner | disk_cleaner | shared | Disk usage and what can be cleaned. |
POST | /disk-cleaner/clean | disk_cleaner manage | shared | Clean the chosen categories. |
GET | /disk-cleaner/schedule | disk_cleaner | shared | The automatic clean-up schedule. |
PUT | /disk-cleaner/schedule | disk_cleaner manage | shared | Set the schedule. |
DELETE | /disk-cleaner/schedule | disk_cleaner manage | shared | Remove the schedule. |
GET | /disk-cleaner/runs | disk_cleaner | shared | History of clean-ups. |
GET | /server/activity-log | activity_log | shared | Server-level activity. |
GET | /server/activity-log/filters | activity_log | shared | Values for the filters. |
Dashboard
GET /server/facts
{
"facts": {
"hostname": "panel.example.com",
"os": "Ubuntu 24.04 LTS",
"kernel": "6.8.0-45-generic",
"arch": "x86_64",
"uptime": 1234567,
"ip": "10.0.0.5",
"public_ip": "203.0.113.10",
"cpu": {"model": "AMD EPYC", "cores": 4},
"memory_total": 8344092672,
"memory_total_human": "7.8 GB",
"disk_total": 84825604096,
"disk_total_human": "79 GB",
"timezone": "UTC",
"reboot_required": false,
"runtimes": { … }
}
}uptime and reboot_required are read fresh on every call. The rest is cached
for a short time.
GET /server/metrics/live
Returns {"metrics": { … }} with cpu (percent, cores), memory, swap
and disk (used, total, percent and _human values), load (keys 1, 5,
15), network (in, out and _human, per second) and disk_io (read,
write, operations, _human). Read straight from the system, so it is cheap to
poll every few seconds.
GET /server/metrics/history
Returns {"metrics": [ … ]}: one sample every 5 minutes for the last 24 hours,
oldest first. Each has sampled_at, cpu, memory, swap and disk (percent),
load_1, load_5, load_15, net_in, net_out, disk_read and disk_write.
GET /server/processes
Returns {"processes": [ … ], "meta": {"total", "limit"}}: the processes using the most CPU, first
up to limit (25 by default). Each process has
pid, user, cpu (percent), memory (percent), command (secrets in the
command line are masked), stoppable and reason (why it is not stoppable).
DELETE /server/processes/{pid}
curl -X DELETE "$PANEL/api/server/processes/4242" \
-H "Authorization: Bearer $TOKEN" -H 'Accept: application/json' \
-H 'Content-Type: application/json' -d '{"signal": "TERM"}'| Field | Rules |
|---|---|
signal | Optional: TERM (default, a polite request) or KILL (force stop). |
Returns {"process": { … }}. Refused with 422 for kernel threads, the panel's
own process, a database server, and processes of protected services. 404 when
the process is gone, 409 when it is still running after the signal.
GET /applications/{application}/issues
Returns {"issues": [ … ], "healthy": true}. Each issue has type, severity
(critical or warning), message and meta. healthy is false when there
is at least one critical or warning issue.
Services
GET /services
Returns {"services": [ … ]}. Each service has key, label, unit, state
(installed, installing or install_failed), status (the systemd state, for
example active), enabled, protected, actions (what you may do now),
testable, usage, log_keys (keys for /logs/{key}), version and
package_version.
POST /services/{service}/config-test
No body. Checks the service's configuration without reloading anything. Returns
{"config_test": { … }} with the result. 404 for a service that is not managed
or not installed, 422 when the service has no configuration test.
PUT /services/{service}
curl -X PUT "$PANEL/api/services/nginx" \
-H "Authorization: Bearer $TOKEN" -H 'Accept: application/json' \
-H 'Content-Type: application/json' -d '{"action": "reload"}'| Field | Rules |
|---|---|
action | Required: start, stop, restart, reload, enable or disable. Must be one of the service's own actions. |
Returns {"service": { … }}. start, restart and reload test the
configuration first; if the test fails nothing is done and you get 422 with
the config_test result. A restart or reload of the service that serves the
panel itself runs after the response and answers 202 with scheduled set.
Protected services cannot be stopped or disabled.
Logs
A log is addressed by its key, never by a path.
GET /logs
Returns {"logs": [ … ]}. Each log has key, label, group, kind (file
or journal), clearable, clear_sensitive (clearing it erases a record of
what happened to the server), size, modified, readable, follow and
downloadable.
GET /logs/{key}
| Query | Rules |
|---|---|
lines | Integer 1 to 5000. Default 200. |
grep | Up to 200 characters. Only matching lines. |
after | Integer 0 or more: the cursor from a previous answer, to fetch only what was added since. |
Returns {"log": {"key", "label", "group", "kind", "lines", "cursor", "truncated", "search_window_capped"}}.
404 for an unknown log, 403 when the file exists but the panel cannot read
it.
GET /logs/{key}/download
Returns the file as <key>.log. Only for file logs; the journal cannot be
downloaded.
DELETE /logs/{key}
Empties the log (the file stays). Returns {"log": {"key", "lines": [], "truncated": false}}.
404 for an unknown log and for the journal, which is not a file.
Operations
GET /operations
The long jobs the panel runs, in one list: backups, restores, clones, staging runs, installs, container redeploys, deployments, database exports and imports, runtime installs, syncs, security updates and panel updates.
| Query | Rules |
|---|---|
active | true for running and waiting jobs only. |
hours | Integer 1 to 168. Default 24: how far back finished jobs are listed. |
finished_after | DD-MM-YYYY HH:mm:ss, not older than one day: with active, also returns jobs that finished after this time. |
Returns {"operations": [ … ], "meta": {"running", "hours"}}, newest first, at
most 100. Each operation has kind, id, state (waiting, running, done
or failed), status, subject (the application, database or server it is
about), step, reference, user_id, created_at, started_at, finished_at
and finished_at_human. Only kinds your role can see are listed.
Cron jobs
A cron job runs a command as a system account on a schedule. Its output goes to
a log you can read through /logs.
GET /cronjobs/schedule-presets and GET /cronjobs/command-presets
schedule-presets returns {"presets": [ … ]}: every minute, every 5, 15 or 30
minutes, hourly, twice daily, daily, weekly, monthly, and custom.
command-presets returns {"presets": [ … ], "placeholder": "{path}", "php_placeholder": "{php}"}:
commands for Laravel, WordPress, Moodle, Joomla, Nextcloud, Craft CMS, a PHP
script and a custom command. The placeholders in a preset must be replaced
before you save it.
GET /cronjobs
| Query | Rules |
|---|---|
filter[system_user_id] | A system account id. |
filter[application_id] | An application id. |
filter[username] | An account name. |
filter[active] | true or false. |
per_page | 10, 20, 50 or 100. Default 10. |
page | Page number. |
Returns {"cronjobs": [ … ], "meta": {"current_page", "per_page", "total", "last_page", "usernames", "cron_running"}}.
cron_running is false when the server's cron service is not running.
{
"cronjob": {
"id": 12,
"name": "Nightly report",
"slug": "nightly-report",
"username": "shop",
"system_user": {"id": 4, "username": "shop"},
"application_id": 3,
"command": "cd /home/shop/app && php artisan report:run",
"php_version": "8.3",
"matches_site_php": true,
"expression": "0 2 * * *",
"active": true,
"timezone": "UTC",
"log_key": "cronjob_nightly-report",
"last_run": null,
"running": false,
"next_run_at": "26-11-2026 02:00:00",
"next_run_at_human": "in 12 hours",
"created_at": "02-11-2026 09:14:03",
"created_at_human": "3 weeks ago"
}
}POST /cronjobs
| Field | Rules |
|---|---|
name | Required, up to 255 characters, one line, unique among cron jobs, not a reserved name. |
system_user_id | Optional: id of a system account. |
username | Required when system_user_id is not sent: 1 to 32 characters, lower case letters, digits, _ and -, starting with a letter or _. Only the panel administrator can use an account that is not one of the panel's system users. |
application_id | Optional: the application the job belongs to. |
command | Required, up to 1000 characters, one line, no shell comment (# at the start of a word), and no leftover {path} or {php} placeholder. |
expression | Required: five fields (minute, hour, day of month, month, day of week) or one of @yearly, @annually, @monthly, @weekly, @daily, @midnight, @hourly. |
active | Optional boolean, default true. |
Answers 201 with {"cronjob": { … }}. The job is written to the server
before the answer; if that fails nothing is kept and you get 500 with a
reference.
GET /cronjobs/{cronjob} and PUT /cronjobs/{cronjob}
GET returns {"cronjob": { … }}. PUT takes any of the POST fields (the
same rules; name may keep its own value) and returns {"cronjob": { … }}.
DELETE /cronjobs/{cronjob}
Answers 204.
GET /cronjobs/{cronjob}/runs
Returns {"runs": [ … ], "timezone": "UTC"}: recent runs read from the job's
log.
POST /cronjobs/{cronjob}/run
Runs the job now. Answers 202 with {"message": "…"} and the result appears
in the run history. A paused job is refused (Turn it on before running it), and
so is a job that is already running from this button.
POST /applications/{application}/cronjobs/switch-php
Moves cron jobs that name a PHP binary to another version. Needs manage on both Cron Jobs and PHP Settings (the application's). Limit: 10 per minute.
| Field | Rules |
|---|---|
version | Required: major.minor, for example 8.3. |
cronjob_ids | Required array of 1 to 100 distinct integers. |
Returns {"switched": [ … ], "unchanged": [ids]}. A job that does not belong
to this application, does not name a PHP the panel can switch, or would exceed
1000 characters with the new path is refused with 422.
Disk cleaner
GET /disk-cleaner
Returns {"disk": { … }, "keep_days": {"choices": [0, 1, 3, 7, 14, 30], "recommended": 7}, "categories": [ … ]}.
Each category has key, label, description, note, group, method,
paths, safe (can run on a schedule), reclaimable and reclaimable_human.
Only categories that exist on this server are listed. The keys are apt_cache,
apt_orphans, docker_images, journal, rotated_logs, service_logs,
site_logs and tmp.
POST /disk-cleaner/clean
curl -X POST "$PANEL/api/disk-cleaner/clean" \
-H "Authorization: Bearer $TOKEN" -H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"categories": ["apt_cache", "rotated_logs"], "keep_days": 7}'| Field | Rules |
|---|---|
categories | Required array, at least one key from GET /disk-cleaner. |
keep_days | Optional: 0 (delete all), 1, 3, 7, 14 or 30. Keep files newer than that many days. |
Returns {"run_id", "disk", "cleaned": [{"key", "freed", "freed_human"}], "freed_total", "freed_total_human"}.
If one category fails, the categories before it stay cleaned, the run is
recorded as failed, and you get 500 with a reference.
GET /disk-cleaner/schedule, PUT …/schedule, DELETE …/schedule
GET returns {"schedule": {"enabled", "frequency", "categories", "threshold_percent", "keep_days", "last_run_at", "next_run_at", "timezone"}}.
PUT sets it and returns the same shape:
| Field | Rules |
|---|---|
enabled | Required boolean. |
frequency | Required: hourly, daily, weekly or monthly. |
categories | Required array, at least one category that is safe and available (apt_orphans cannot be scheduled). |
threshold_percent | Optional integer 1 to 99: clean only when the disk is at least this full. |
keep_days | Optional: 0, 1, 3, 7, 14 or 30. |
DELETE removes the schedule and answers 204.
GET /disk-cleaner/runs
Query per_page (10, 20, 50 or 100, default 20) and page. Returns
{"runs": [ … ], "meta": {"current_page", "per_page", "total", "last_page"}}.
Each run has id, trigger (manual or scheduled), categories,
keep_days, freed, freed_total, freed_total_human, status
(completed or failed), disk_percent and timestamps.
Server activity log
Server-level events: cron jobs, disk cleaner, services, Fail2ban, firewall, Git
accounts, Node.js, settings and panel updates. Events about one application or
database are in that feature's own log. The log of your own actions is
GET /activity-log (see Public and account endpoints).
GET /server/activity-log
| Query | Rules |
|---|---|
search | Up to 255 characters. |
filter[type] | Up to 255 characters, a value from the filters endpoint. |
filter[action] | Up to 255 characters, a value from the filters endpoint. |
filter[kind] | created, changed, removed or failed. |
filter[security] | Boolean: only security-relevant events. |
per_page | 10, 20, 50 or 100. Default 20. |
page | Page number. |
Returns {"activity_log": [ … ], "meta": {"current_page", "per_page", "total", "last_page"}}.
Each entry has id, type, action, scope, description (a sentence),
changes (field, label, before and after; secrets are never shown), user
(id, username, deleted), is_system, kind, is_security, created_at
and created_at_human.
GET /server/activity-log/filters
Returns the type and action values that exist and the kinds, to fill the
filters above.
Common errors
| Status | Message or cause |
|---|---|
403 | Your role does not include management for Cron Jobs. (or the feature you called). A log file the panel cannot read. |
404 | Unknown cron job, log, service or category; a process that is gone. |
409 | A process that is still running after the signal. |
422 | Validation ({"message", "errors": {"field": ["…"]}}); a service whose configuration test fails; a protected service or process. |
429 | Over a limit; wait for Retry-After. |
500 | {"message", "reference"}: a server command failed. Find the reference in the error log. |
Related
- Services, Logs, Cron jobs, Disk cleaner and Server dashboard: the same features in the panel
- Activity log
- Applications API: per-application logs and PHP
PHP, Node.js and build tools API
List, install, remove and set the default PHP and Node.js versions, edit php.ini and extensions, manage ionCube, and install the build tools through the OSS Panel API.
Settings, setup and server sync API
Read and change server settings (hostname, SSH, updates, swap, Redis, reboot), read the setup catalogue, and run, follow and ignore server syncs through the OSS Panel API.