Update API
Table of Contents
Section titled “Table of Contents”Services
Section titled “Services”Update
Section titled “Update”| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| ListGenerations | Empty | ListGenerationsResponse | List installed generations (updates) |
| Discover | RegistryDiscoverRequest | RegistryDiscoverResponse | Discover available OTA updates in an OCI repository |
| Changelog | RegistryChangelogRequest | RegistryChangelogResponse | Fetch changelog text for a specific registry tag |
| Pull | RegistryPullRequest | RegistryPullResponse | Pull OTA update artifacts from an OCI repository |
| ImageInstall | ImageInstallRequest | ImageInstallResponse | Install image on ghaf-host from a manifest path |
| InstallCachix | Cachix | SetGenerationResponse | Install a pinned release from Cachix |
Messages
Section titled “Messages”AvailableUpdate
Section titled “AvailableUpdate”| Field | Type | Label | Description |
|---|---|---|---|
| Repository | string | OCI repository name | |
| Tag | string | Update tag | |
| Version | string | Update version | |
| Hash | string | Artifact hash |
Cachix
Section titled “Cachix”| Field | Type | Label | Description |
|---|---|---|---|
| Pin | string | Pinned release name | |
| CachixHost | string | optional | API url for cachix |
| Cache | string | Cachix cache name | |
| Token | string | optional | Optional API token |
Generation
Section titled “Generation”| Field | Type | Label | Description |
|---|---|---|---|
| Generation | int32 | Numeric generation identifier | |
| Date | string | Build or activation date | |
| NixosVersion | string | NixOS release version | |
| KernelVersion | string | Kernel version string | |
| ConfigurationRevision | string | Configuration revision hash | |
| Specialisations | string | repeated | Enabled specialisations |
| Current | bool | True if this is the active generation | |
| StorePath | string | Nix store path for the generation |
ImageInstallRequest
Section titled “ImageInstallRequest”| Field | Type | Label | Description |
|---|---|---|---|
| Manifest | string | Manifest path |
ImageInstallResponse
Section titled “ImageInstallResponse”| Field | Type | Label | Description |
|---|---|---|---|
| Finished | bool | True when the command completed | |
| Output | string | optional | Standard output from the command |
| Error | string | optional | Standard error from the command |
ListGenerationsResponse
Section titled “ListGenerationsResponse”| Field | Type | Label | Description |
|---|---|---|---|
| List | Generation | repeated | List of installed generations |
RegistryBasicAuth
Section titled “RegistryBasicAuth”| Field | Type | Label | Description |
|---|---|---|---|
| Username | string | Registry username | |
| Password | string | Registry password |
RegistryBearerAuth
Section titled “RegistryBearerAuth”| Field | Type | Label | Description |
|---|---|---|---|
| Token | string | Registry bearer token |
RegistryBlobDownloading
Section titled “RegistryBlobDownloading”| Field | Type | Label | Description |
|---|---|---|---|
| Digest | string | Blob digest | |
| Downloaded | uint64 | Downloaded byte count | |
| Total | uint64 | optional | Total byte count, if known |
RegistryChangelogRequest
Section titled “RegistryChangelogRequest”| Field | Type | Label | Description |
|---|---|---|---|
| Reference | string | OCI reference to inspect | |
| Insecure | bool | Use HTTP instead of HTTPS | |
| Credentials | RegistryCredentials | optional | Optional registry credentials |
RegistryChangelogResponse
Section titled “RegistryChangelogResponse”| Field | Type | Label | Description |
|---|---|---|---|
| Changelog | string | Changelog text |
RegistryCredentials
Section titled “RegistryCredentials”| Field | Type | Label | Description |
|---|---|---|---|
| Basic | RegistryBasicAuth | Basic auth credentials | |
| Bearer | RegistryBearerAuth | Bearer auth credentials |
RegistryDiscoverRequest
Section titled “RegistryDiscoverRequest”| Field | Type | Label | Description |
|---|---|---|---|
| Reference | string | OCI reference to search | |
| Insecure | bool | Use HTTP instead of HTTPS | |
| Credentials | RegistryCredentials | optional | Optional registry credentials |
RegistryDiscoverResponse
Section titled “RegistryDiscoverResponse”| Field | Type | Label | Description |
|---|---|---|---|
| List | AvailableUpdate | repeated | Matching update entries |
RegistryPullProgress
Section titled “RegistryPullProgress”| Field | Type | Label | Description |
|---|---|---|---|
| PullStarted | RegistryPullStarted | Pull started | |
| BlobDownloading | RegistryBlobDownloading | Blob download progress | |
| BlobVerified | string | Verified blob digest | |
| ManifestWritten | string | Manifest file path | |
| Cancelled | string | Cancellation reason | |
| Done | bool | True when finished |
RegistryPullRequest
Section titled “RegistryPullRequest”| Field | Type | Label | Description |
|---|---|---|---|
| Reference | string | OCI tag reference to pull | |
| Destination | string | Destination directory | |
| Insecure | bool | Use HTTP instead of HTTPS | |
| Credentials | RegistryCredentials | optional | Optional registry credentials |
RegistryPullResponse
Section titled “RegistryPullResponse”| Field | Type | Label | Description |
|---|---|---|---|
| Progress | RegistryPullProgress | Progress event | |
| Result | RegistryPullResult | Final result |
RegistryPullResult
Section titled “RegistryPullResult”| Field | Type | Label | Description |
|---|---|---|---|
| OutputDir | string | Output directory | |
| ManifestPath | string | Written manifest path |
RegistryPullStarted
Section titled “RegistryPullStarted”| Field | Type | Label | Description |
|---|---|---|---|
| Reference | string | OCI reference being pulled | |
| Destination | string | Destination directory |
SetGenerationRequest
Section titled “SetGenerationRequest”| Field | Type | Label | Description |
|---|---|---|---|
| Cachix | Cachix | Cachix-based update payload |
SetGenerationResponse
Section titled “SetGenerationResponse”| Field | Type | Label | Description |
|---|---|---|---|
| Finished | bool | True when the command completed | |
| Output | string | optional | Standard output from the command |
| Error | string | optional | Standard error from the command |