Update API
Source: daemon/proto/hostcraft/v1/update.proto
UpdateService
Section titled “UpdateService”UpdateService checks for, installs and rolls back hostcraftd releases from updates.hostcraft.io. REST: /api/v1/update.
| Method | REST route | Permission | Streaming |
|---|---|---|---|
GetCurrentVersion |
GET /api/v1/update/current |
UpdateRead |
unary |
CheckForUpdate |
POST /api/v1/update/check |
UpdateRead |
unary |
InstallUpdate |
POST /api/v1/update/install |
UpdateInstall |
unary |
CancelInstall |
POST /api/v1/update/cancel |
UpdateInstall |
unary |
Rollback |
POST /api/v1/update/rollback |
UpdateRollback |
unary |
GetUpdateConfig |
GET /api/v1/update/config |
UpdateConfigRead |
unary |
SetUpdateConfig |
PUT /api/v1/update/config |
UpdateConfigWrite |
unary |
ListUpdateHistory |
GET /api/v1/update/history |
UpdateRead |
unary |
GetCurrentVersion
Section titled “GetCurrentVersion”/hostcraft.v1.UpdateService/GetCurrentVersion
- Request: GetCurrentVersionRequest
- Response: CurrentVersion
CheckForUpdate
Section titled “CheckForUpdate”/hostcraft.v1.UpdateService/CheckForUpdate
- Request: CheckForUpdateRequest
- Response: UpdateCheck
InstallUpdate
Section titled “InstallUpdate”/hostcraft.v1.UpdateService/InstallUpdate
- Request: InstallUpdateRequest
- Response: WorkflowAccepted
CancelInstall
Section titled “CancelInstall”/hostcraft.v1.UpdateService/CancelInstall
- Request: CancelInstallRequest
- Response: Empty
Rollback
Section titled “Rollback”/hostcraft.v1.UpdateService/Rollback
- Request: RollbackRequest
- Response: WorkflowAccepted
GetUpdateConfig
Section titled “GetUpdateConfig”/hostcraft.v1.UpdateService/GetUpdateConfig
- Request: GetUpdateConfigRequest
- Response: UpdateConfig
SetUpdateConfig
Section titled “SetUpdateConfig”SetUpdateConfig replaces the whole update configuration.
/hostcraft.v1.UpdateService/SetUpdateConfig
- Request: UpdateConfig
- Response: UpdateConfig
ListUpdateHistory
Section titled “ListUpdateHistory”/hostcraft.v1.UpdateService/ListUpdateHistory
- Request: ListUpdateHistoryRequest
- Response: ListUpdateHistoryResponse
Messages
Section titled “Messages”CancelInstallRequest
Section titled “CancelInstallRequest”| Field | Type | Number | Description |
|---|---|---|---|
workflow_id |
string |
1 | - |
CheckForUpdateRequest
Section titled “CheckForUpdateRequest”No fields.
CurrentVersion
Section titled “CurrentVersion”| Field | Type | Number | Description |
|---|---|---|---|
version |
string |
1 | - |
channel |
string |
2 | - |
installed_at |
google.protobuf.Timestamp |
3 | - |
previous_version |
string |
4 | - |
build_commit |
string |
5 | - |
awaiting_confirmation |
bool |
6 | True while the running release has not yet passed its post-update health check (it is rolled back automatically if it fails). |
Empty is returned by RPCs whose REST route answers with an empty object or 204 No Content.
No fields.
GetCurrentVersionRequest
Section titled “GetCurrentVersionRequest”No fields.
GetUpdateConfigRequest
Section titled “GetUpdateConfigRequest”No fields.
InstallUpdateRequest
Section titled “InstallUpdateRequest”| Field | Type | Number | Description |
|---|---|---|---|
version |
string |
1 | - |
force_data_loss_migrations |
bool |
2 | - |
ListUpdateHistoryRequest
Section titled “ListUpdateHistoryRequest”| Field | Type | Number | Description |
|---|---|---|---|
limit |
int64 |
1 | - |
ListUpdateHistoryResponse
Section titled “ListUpdateHistoryResponse”| Field | Type | Number | Description |
|---|---|---|---|
entries |
repeated UpdateHistoryEntry |
1 | - |
RollbackRequest
Section titled “RollbackRequest”| Field | Type | Number | Description |
|---|---|---|---|
target_version |
string |
1 | - |
force_data_loss_migrations |
bool |
2 | - |
skip_state_restore |
bool |
3 | Swap the binary only and keep the current databases and config. Requires force_data_loss_migrations. |
UpdateCheck
Section titled “UpdateCheck”| Field | Type | Number | Description |
|---|---|---|---|
update_available |
bool |
1 | - |
current_version |
string |
2 | - |
available_version |
string |
3 | - |
channel |
string |
4 | - |
changelog_url |
string |
5 | - |
min_from_version |
string |
6 | - |
security_critical |
bool |
7 | - |
released_at |
google.protobuf.Timestamp |
8 | - |
killswitch_active |
bool |
9 | - |
migration_count |
int64 |
10 | - |
UpdateConfig
Section titled “UpdateConfig”| Field | Type | Number | Description |
|---|---|---|---|
channel |
string |
1 | stable | beta | dev |
auto_apply_patch |
bool |
2 | - |
auto_apply_minor |
bool |
3 | - |
auto_apply_major |
bool |
4 | - |
security_overrides_window |
bool |
5 | - |
telemetry_enabled |
bool |
6 | - |
window_timezone |
string |
7 | - |
window_days |
repeated string |
8 | - |
window_start_local |
string |
9 | - |
window_end_local |
string |
10 | - |
UpdateHistoryEntry
Section titled “UpdateHistoryEntry”| Field | Type | Number | Description |
|---|---|---|---|
id |
string |
1 | - |
from_version |
string |
2 | - |
to_version |
string |
3 | - |
outcome |
int64 |
4 | - |
error |
string |
5 | - |
started_at |
google.protobuf.Timestamp |
6 | - |
finished_at |
google.protobuf.Timestamp |
7 | - |
was_rollback |
bool |
8 | - |
actor |
string |
9 | - |
WorkflowAccepted
Section titled “WorkflowAccepted”WorkflowAccepted is the body of every 202 response that only starts a workflow saga. Follow progress with WorkflowService.StreamWorkflow.
| Field | Type | Number | Description |
|---|---|---|---|
workflow_id |
string |
1 | - |