System API
Source: daemon/proto/hostcraft/v1/system.proto
SystemService
Section titled “SystemService”SystemService reports on and manages the host. REST: /api/v1/system.
| Method | REST route | Permission | Streaming |
|---|---|---|---|
GetServerInfo |
GET /api/v1/system/info |
SystemRead |
unary |
GetSystemSettings |
GET /api/v1/system/settings |
SystemRead |
unary |
UpdateSystemSettings |
PATCH /api/v1/system/settings |
SystemAdmin |
unary |
GetSystemHealth |
GET /api/v1/system/health |
SystemRead |
unary |
GetSystemUsage |
GET /api/v1/system/usage |
SystemRead |
unary |
ListServices |
GET /api/v1/system/services |
SystemRead |
unary |
GetService |
GET /api/v1/system/services/{name} |
SystemRead |
unary |
StartService |
POST /api/v1/system/services/{name}/start |
SystemAdmin |
unary |
StopService |
POST /api/v1/system/services/{name}/stop |
SystemAdmin |
unary |
RestartService |
POST /api/v1/system/services/{name}/restart |
SystemAdmin |
unary |
ListPackages |
GET /api/v1/system/packages |
SystemRead |
unary |
ListPackageUpdates |
GET /api/v1/system/packages/updates |
SystemRead |
unary |
ReapplyConfigs |
POST /api/v1/system/reapply-configs |
SystemAdmin |
unary |
GetServerInfo
Section titled “GetServerInfo”/hostcraft.v1.SystemService/GetServerInfo
- Request: GetServerInfoRequest
- Response: ServerInfo
GetSystemSettings
Section titled “GetSystemSettings”/hostcraft.v1.SystemService/GetSystemSettings
- Request: GetSystemSettingsRequest
- Response: SystemSettings
UpdateSystemSettings
Section titled “UpdateSystemSettings”/hostcraft.v1.SystemService/UpdateSystemSettings
- Request: UpdateSystemSettingsRequest
- Response: SystemSettings
GetSystemHealth
Section titled “GetSystemHealth”/hostcraft.v1.SystemService/GetSystemHealth
- Request: GetSystemHealthRequest
- Response: SystemHealth
GetSystemUsage
Section titled “GetSystemUsage”/hostcraft.v1.SystemService/GetSystemUsage
- Request: GetSystemUsageRequest
- Response: SystemUsage
ListServices
Section titled “ListServices”/hostcraft.v1.SystemService/ListServices
- Request: ListServicesRequest
- Response: ListServicesResponse
GetService
Section titled “GetService”/hostcraft.v1.SystemService/GetService
- Request: GetServiceRequest
- Response: ManagedService
StartService
Section titled “StartService”/hostcraft.v1.SystemService/StartService
- Request: ControlServiceRequest
- Response: ControlServiceResponse
StopService
Section titled “StopService”/hostcraft.v1.SystemService/StopService
- Request: ControlServiceRequest
- Response: ControlServiceResponse
RestartService
Section titled “RestartService”/hostcraft.v1.SystemService/RestartService
- Request: ControlServiceRequest
- Response: ControlServiceResponse
ListPackages
Section titled “ListPackages”/hostcraft.v1.SystemService/ListPackages
- Request: ListPackagesRequest
- Response: ListPackagesResponse
ListPackageUpdates
Section titled “ListPackageUpdates”/hostcraft.v1.SystemService/ListPackageUpdates
- Request: ListPackageUpdatesRequest
- Response: ListPackageUpdatesResponse
ReapplyConfigs
Section titled “ReapplyConfigs”ReapplyConfigs re-renders every site's vhost and PHP-FPM pool from the panel database through configwriter.
/hostcraft.v1.SystemService/ReapplyConfigs
- Request: ReapplyConfigsRequest
- Response: ReapplyReport
Messages
Section titled “Messages”AutoSecurityUpdates
Section titled “AutoSecurityUpdates”| Field | Type | Number | Description |
|---|---|---|---|
supported |
bool |
1 | - |
installed |
bool |
2 | - |
enabled |
bool |
3 | - |
tool |
string |
4 | - |
family |
string |
5 | - |
last_run |
google.protobuf.Timestamp |
6 | - |
ControlServiceRequest
Section titled “ControlServiceRequest”| Field | Type | Number | Description |
|---|---|---|---|
name |
string |
1 | - |
ControlServiceResponse
Section titled “ControlServiceResponse”ControlServiceResponse carries the unit status after the action, or status_unknown when the action succeeded but the status read failed.
| Field | Type | Number | Description |
|---|---|---|---|
service |
ManagedService |
1 | - |
status_unknown |
bool |
2 | - |
status_error |
string |
3 | - |
GetServerInfoRequest
Section titled “GetServerInfoRequest”No fields.
GetServiceRequest
Section titled “GetServiceRequest”| Field | Type | Number | Description |
|---|---|---|---|
name |
string |
1 | - |
GetSystemHealthRequest
Section titled “GetSystemHealthRequest”No fields.
GetSystemSettingsRequest
Section titled “GetSystemSettingsRequest”No fields.
GetSystemUsageRequest
Section titled “GetSystemUsageRequest”No fields.
InstalledPackage
Section titled “InstalledPackage”| Field | Type | Number | Description |
|---|---|---|---|
name |
string |
1 | - |
version |
string |
2 | - |
source |
string |
3 | - |
security_update_available |
bool |
4 | - |
available_version |
string |
5 | - |
ListPackageUpdatesRequest
Section titled “ListPackageUpdatesRequest”No fields.
ListPackageUpdatesResponse
Section titled “ListPackageUpdatesResponse”| Field | Type | Number | Description |
|---|---|---|---|
updates |
repeated InstalledPackage |
1 | - |
ListPackagesRequest
Section titled “ListPackagesRequest”| Field | Type | Number | Description |
|---|---|---|---|
security_only |
bool |
1 | - |
ListPackagesResponse
Section titled “ListPackagesResponse”| Field | Type | Number | Description |
|---|---|---|---|
packages |
repeated InstalledPackage |
1 | - |
ListServicesRequest
Section titled “ListServicesRequest”No fields.
ListServicesResponse
Section titled “ListServicesResponse”| Field | Type | Number | Description |
|---|---|---|---|
services |
repeated ManagedService |
1 | - |
ManagedService
Section titled “ManagedService”| Field | Type | Number | Description |
|---|---|---|---|
name |
string |
1 | systemd unit |
module |
string |
2 | - |
state |
string |
3 | - |
detail |
string |
4 | - |
last_change_at |
google.protobuf.Timestamp |
5 | - |
ModuleHealth
Section titled “ModuleHealth”| Field | Type | Number | Description |
|---|---|---|---|
module |
string |
1 | - |
status |
string |
2 | - |
message |
string |
3 | - |
ReapplyConfigsRequest
Section titled “ReapplyConfigsRequest”No fields.
ReapplyFailure
Section titled “ReapplyFailure”| Field | Type | Number | Description |
|---|---|---|---|
site_id |
string |
1 | - |
account_id |
string |
2 | - |
kind |
string |
3 | vhost | pool |
error |
string |
4 | - |
ReapplyReport
Section titled “ReapplyReport”| Field | Type | Number | Description |
|---|---|---|---|
started_at |
google.protobuf.Timestamp |
1 | - |
finished_at |
google.protobuf.Timestamp |
2 | - |
sites |
int64 |
3 | - |
vhosts_changed |
int64 |
4 | - |
vhosts_unchanged |
int64 |
5 | - |
pools_changed |
int64 |
6 | - |
pools_unchanged |
int64 |
7 | - |
failures |
repeated ReapplyFailure |
8 | - |
ServerInfo
Section titled “ServerInfo”| Field | Type | Number | Description |
|---|---|---|---|
hostname |
string |
1 | - |
distro |
string |
2 | - |
distro_id |
string |
3 | - |
distro_version |
string |
4 | - |
kernel |
string |
5 | - |
arch |
string |
6 | - |
cpu_count |
int64 |
7 | - |
memory_total_bytes |
int64 |
8 | - |
disk_total_bytes |
int64 |
9 | - |
boot_id |
string |
10 | - |
booted_at |
google.protobuf.Timestamp |
11 | - |
daemon_version |
string |
12 | - |
daemon_channel |
string |
13 | - |
build_time |
string |
14 | - |
build_git_id |
string |
15 | - |
started_at |
google.protobuf.Timestamp |
16 | - |
mode |
string |
17 | - |
uptime |
string |
18 | - |
timezone |
string |
19 | - |
clustered |
bool |
20 | True when the cluster module runs on this node (a cluster panel). |
SystemHealth
Section titled “SystemHealth”| Field | Type | Number | Description |
|---|---|---|---|
overall |
string |
1 | - |
modules |
repeated ModuleHealth |
2 | - |
SystemSettings
Section titled “SystemSettings”| Field | Type | Number | Description |
|---|---|---|---|
hostname |
string |
1 | - |
timezone |
string |
2 | - |
default_nameservers |
repeated string |
3 | - |
auto_security_updates |
AutoSecurityUpdates |
4 | State of unattended-upgrades (Debian/Ubuntu) or dnf-automatic (RHEL). |
SystemUsage
Section titled “SystemUsage”| Field | Type | Number | Description |
|---|---|---|---|
cpu_percent_5m |
double |
1 | - |
cpu_percent_15m |
double |
2 | - |
memory_used_bytes |
int64 |
3 | - |
memory_total_bytes |
int64 |
4 | - |
swap_used_bytes |
int64 |
5 | - |
swap_total_bytes |
int64 |
6 | - |
disk_used_bytes |
int64 |
7 | - |
disk_total_bytes |
int64 |
8 | - |
network_rx_bytes_per_sec |
int64 |
9 | - |
network_tx_bytes_per_sec |
int64 |
10 | - |
process_count |
int64 |
11 | - |
active_connections |
int64 |
12 | - |
sampled_at |
google.protobuf.Timestamp |
13 | - |
UpdateSystemSettingsRequest
Section titled “UpdateSystemSettingsRequest”| Field | Type | Number | Description |
|---|---|---|---|
hostname |
optional string |
1 | - |
timezone |
optional string |
2 | - |
auto_security_updates |
optional bool |
3 | Turns automatic OS security updates on or off. |