Skip to main content

Core endpoints

These endpoints manage the ApexOS Core runtime container. The canonical prefix is /core; every endpoint is also mirrored at the legacy /apexos prefix on the v1 tree (same handlers, same payloads).

Minimum role: apexos (the apexos role grants /core/* and /apexos/*; manager and admin also qualify). GET /core/info is additionally readable by every role via the info-path rule.

MethodPathRoleDescription
GET/core/infodefaultCore runtime information
GET/core/statsapexosContainer resource statistics
POST/core/optionsapexosChange Core settings
POST/core/updateapexosUpdate Core (background-capable)
POST/core/restartapexosRestart Core
POST/core/stopapexosStop Core
POST/core/startapexosStart Core
POST/core/checkapexosValidate Core configuration
POST/core/rebuildapexosRebuild the Core container
GET/core/logsapexosJournal logs (text/plain)
GET/core/logs/followapexosStreamed journal logs
GET/core/logs/latestapexosLogs since last container start, colors stripped
GET/core/logs/boots/{bootid}apexosLogs for a specific boot
GET/core/logs/boots/{bootid}/followapexosStreamed logs for a specific boot

Update, stop, restart, and rebuild are refused while an offline Core database migration is in progress, unless force is set where supported.

GET /core/info

Response data keys: version, version_latest, update_available, machine, ip_address, arch, image, boot, port, ssl, watchdog, audio_input, audio_output, backups_exclude_database, duplicate_log_file.

GET /core/stats

Response data keys: cpu_percent, memory_usage, memory_limit, memory_percent, network_rx, network_tx, blk_read, blk_write.

POST /core/options

All request fields optional:

FieldTypeDescription
bootbooleanStart Core on boot
imagestring | nullOverride container image
portint (port)Core API port
sslbooleanCore API uses SSL
watchdogbooleanEnable watchdog
refresh_tokenstring | nullRefresh token for Core API access
audio_outputstring | nullDefault audio output
audio_inputstring | nullDefault audio input
backups_exclude_databasebooleanExclude Core database from backups by default
duplicate_log_filebooleanDuplicate the log file

POST /core/update

FieldTypeDefaultDescription
versionversion taglatestTarget version
backupbooleanCreate a backup before updating
backgroundbooleanfalseReturn immediately with job_id

Background mode returns {"job_id": "..."}.

POST /core/restart, POST /core/rebuild

FieldTypeDefault
safe_modebooleanfalse
forcebooleanfalse (bypass the DB-migration guard)

POST /core/stop

FieldTypeDefault
forcebooleanfalse

POST /core/check

No body. Runs Core configuration validation; returns an error envelope containing the validation log when the configuration is invalid.

Log query options

All logs endpoints accept:

  • lines query parameter (default 100, minimum effective value 2)
  • verbose query parameter or Accept: text/x-log header for the verbose formatter
  • no_colors query parameter to strip ANSI colors
  • A Range: entries=cursor[[:num_skip]:num_entries] header for cursor-based paging

The response carries X-First-Cursor with the journal cursor of the first returned line.