System Updates
Endpoints for managing OS-level package updates.
All endpoints on this page require an admin account.
Get Update State
GET /api/v1/system/updates
Scope: read:system (admin only)
Returns the current state: OS and kernel versions, pending packages, and any running job.
Response
{
"data": {
"os": "Ubuntu 26.04 LTS",
"kernel_running": "7.0.0-38-generic",
"kernel_installed": "linux-image-7.0.0-14-generic",
"last_checked": "2026-10-27T16:49:20+05:00",
"reboot_required": false,
"apt_locked": false,
"total_packages": 90,
"security_packages": 3,
"regular_packages": 87,
"recommended_action": "security",
"packages": [
{
"name": "alsa-ucm-conf",
"current": "1.2.15.3-1ubuntu1.5",
"available": "1.2.15.3-1ubuntu1.7",
"source": "resolute-updates",
"is_security": false
}
],
"active_job": null,
"download_size": "240 MB",
"disk_size": "+13.8 MB"
}
}
| Field | Type | Description |
|---|---|---|
os |
string | Operating system name and version |
kernel_running |
string | Currently running kernel version |
kernel_installed |
string | Installed kernel version. May differ from kernel_running after an update until reboot |
last_checked |
string (RFC 3339) or null | When package lists were last refreshed, null if never |
reboot_required |
boolean | true if a reboot is needed to complete pending updates |
apt_locked |
boolean | true if another process holds the apt/dpkg lock. Do not call /check or /apply while true |
total_packages |
integer | Total packages with updates available |
security_packages |
integer | Packages that are security updates |
regular_packages |
integer | Packages that are regular updates |
recommended_action |
string | security if security updates are pending, all if only regular updates, none if up to date |
packages |
array | List of updatable packages. See below |
active_job |
object or null | Running or recent update job, null if none. See below |
download_size |
string | Total download size for all pending updates (not just security), formatted as apt reports it (e.g. 240 MB). Empty string if no updates |
disk_size |
string | Change in disk usage after installing updates, prefixed with + if disk grows or - if space is freed (e.g. -13.8 MB). Empty string if no updates |
packages
| Field | Type | Description |
|---|---|---|
name |
string | Package name |
current |
string | Currently installed version |
available |
string | Version available in the repository |
source |
string | Repository the update comes from |
is_security |
boolean | true if this is a security update |
active_job
null if no job exists. Otherwise:
| Field | Type | Description |
|---|---|---|
id |
string | Job ID |
mode |
string | security or all |
status |
string | running, success, or failed |
started_at |
string (RFC 3339) | When the job started |
ended_at |
string (RFC 3339) | When the job finished. Empty string while running |
error |
string | Failure message. Empty string when status is not failed |
Example
curl -H "Authorization: Bearer $TOKEN" \
https://panel.example.com/api/v1/system/updates
Refresh Package Lists
POST /api/v1/system/updates/check
Scope: write:system (admin only)
Runs apt-get update synchronously. Blocks until apt finishes, usually 3 to 10 seconds.
Response
Same shape as GET /system/updates.
{
"data": {
"os": "Ubuntu 26.04 LTS",
"kernel_running": "7.0.0-38-generic",
"kernel_installed": "linux-image-7.0.0-14-generic",
"last_checked": "2026-10-27T16:52:11+05:00",
"reboot_required": false,
"apt_locked": false,
"total_packages": 90,
"security_packages": 3,
"regular_packages": 87,
"recommended_action": "security",
"packages": [ ... ],
"active_job": null,
"download_size": "240 MB",
"disk_size": "+13.8 MB"
}
}
Errors
| Code | Status | Condition |
|---|---|---|
apt_locked |
409 | Another apt process is running |
internal_error |
500 | apt-get update failed |
Example
curl -X POST -H "Authorization: Bearer $TOKEN" \
https://panel.example.com/api/v1/system/updates/check
Start Update Job
POST /api/v1/system/updates/apply
Scope: write:system (admin only)
Starts apt-get upgrade in the background and returns immediately. The client must poll the job endpoint to know when it finishes.
Request Body
{
"mode": "security"
}
| Field | Type | Default | Description |
|---|---|---|---|
mode |
string | security |
security installs only security patches. all upgrades every updatable package |
security is recommended. It is safer and covers the cases that matter most. all updates everything at once, which can pull in larger or riskier changes.
Response
202 Accepted:
{
"data": {
"job": {
"id": "job-1730000000123456789",
"mode": "security",
"status": "running",
"started_at": "2026-10-27T14:00:00Z",
"ended_at": "",
"error": ""
},
"message": "Update started in the background. Poll GET /api/v1/system/updates/jobs/job-1730000000123456789 to check progress.",
"warning": ""
}
}
warning contains a message when mode: "all" is used while security updates are pending. Empty string otherwise.
Errors
| Code | Status | Condition |
|---|---|---|
apt_locked |
409 | An update is already in progress, or another apt process holds the lock |
invalid_request |
400 | mode is not security or all |
Example
curl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"mode": "security"}' \
https://panel.example.com/api/v1/system/updates/apply
Get Update Job
GET /api/v1/system/updates/jobs/{id}
Scope: read:system (admin only)
Returns the status of a specific update job. Use this to poll after starting an update.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id |
string | Job ID returned by POST /system/updates/apply |
Response
{
"data": {
"job": {
"id": "job-1730000000123456789",
"mode": "security",
"status": "success",
"started_at": "2026-10-27T14:00:00Z",
"ended_at": "2026-10-27T14:00:45Z",
"error": ""
}
}
}
The job object has the same shape as active_job in GET /system/updates.
Status Values
| Value | Meaning |
|---|---|
running |
Job is in progress |
success |
Job completed without errors |
failed |
Job finished with an error. The error field contains the reason |
Errors
| Code | Status | Condition |
|---|---|---|
not_found |
404 | Job ID does not exist |
Example
curl -H "Authorization: Bearer $TOKEN" \
https://panel.example.com/api/v1/system/updates/jobs/job-1730000000123456789
Reboot
POST /api/v1/system/updates/reboot
Scope: write:system (admin only)
Schedules a reboot in 1 minute. The delay gives the HTTP response time to reach the client before the server goes down.
Response
{
"data": {
"message": "Reboot scheduled in 1 minute.",
"eta": "2026-10-27T14:01:45Z"
}
}
| Field | Type | Description |
|---|---|---|
message |
string | Human readable confirmation |
eta |
string (RFC 3339) | Time the reboot is expected to occur |
All active connections, including the HTTP request that triggered the reboot, are dropped at eta.
Errors
| Code | Status | Condition |
|---|---|---|
apt_locked |
409 | An update is in progress, or apt is locked by another process |
forbidden |
403 | API is running in demo mode |
internal_error |
500 | Reboot scheduling failed |
Example
curl -X POST -H "Authorization: Bearer $TOKEN" \
https://panel.example.com/api/v1/system/updates/reboot
Related
- Authentication - token format and auth failures
- Responses - success response shape
- Errors - error codes