In this document:
- MB means decimal megabytes (10^6 bytes)
- Fields are required unless specified otherwise.
JSON-RPC 2.0 over WebSocket at
/api/ws?key=TOKEN, with subprotocol jsonrpc2.0.
The key is provided to the frontend as a query string parameter, and should be at least 32 characters and cryptographically securely generated.
When accepting a connection, missing, empty or incorrect session keys
should be rejected. Reject connections whose remote address or Origin
is not loopback.
JSON-RPC errors should be used for protocol violations (i.e., invalid params, invalid method, unknown edition). Otherwise, error fields should be used as described to enable useful i18n.
Retrieve installer and device information.
Parameters: None.
Result:
| Field | Type | Contents |
|---|---|---|
| version | String | Installer version without “v”, e.g. “0.9.2”. |
| device | DeviceInfo | Device running the installer. |
All fields except productName are optional and may be null.
| Field | Type | Contents |
|---|---|---|
| productName | String | Apple's full product name, e.g. “MacBook Air (13-inch, M3, 2024)”. |
| soc | String | SoC name, e.g. “Apple M3”. |
| osVersion | String | macOS version and build. |
| bootMode | String | Current boot environment, e.g. “macOS”. |
| deviceClass | String | Internal device class, e.g. “j613ap”. |
| productType | String | Model identifier, e.g. “Mac15,12”. |
| boardId | String | Board identifier, e.g. “0x30”. |
| chipId | String | Chip identifier, e.g. “0x8122”. |
| systemFirmware | String | System firmware version. |
| bootUuid | String | Current boot UUID. |
| bootVgid | String | Current boot VGID. |
| defaultBootVgid | String | Default boot VGID. |
| osRestoreVersion | String | OS restore version. |
| mainFirmwareVersion | String | Main firmware version. |
| fallbackSystemFirmware | String | Fallback system firmware version. |
| sfrVersion | String | SFR version. |
| systemRecoveryVersion | String | SystemRecovery version. |
| loginUser | String | Logged-in account name. |
Retrieve an edition's minimum space requirement.
Parameters:
| Field | Type | Contents |
|---|---|---|
| edition | String | Edition identifier, e.g. “kde”. |
Result:
| Field | Type | Contents |
|---|---|---|
| minMB | Integer | Minimum total space required. |
Retrieve the internal disk layout.
Parameters: None.
Result:
| Field | Type | Contents |
|---|---|---|
| sizeMB | Integer | Total disk capacity. |
| partitions | Partition[] | All partitions in disk order, including free space and unsuitable partitions. May be empty. |
| Field | Type | Contents |
|---|---|---|
| id | String | Unique partition identifier, stable for the session. |
| label | String | Display name, e.g. “Macintosh HD”. Required unless labelKey is supplied. |
| labelKey | String | Translation key, e.g. “storage.free”. Required unless label is supplied. Takes precedence over label if both are supplied. |
| kind | String | free (unallocated), apfs (APFS container), or other (unsuitable). |
| sizeMB | Integer | Current partition size. Also the allocation limit for free. |
| maxMB | Integer | Safely reclaimable space, excluding required headroom. Required if kind is apfs, not permitted otherwise. Zero means resizing is unavailable. |
Start an installation.
Parameters:
| Field | Type | Contents |
|---|---|---|
| edition | String | Edition identifier. |
| target | String | Identifier of a usable disk partition. |
| sizeMB | Integer | For free space, the space to allocate to Linux. For APFS, the amount to free by shrinking the container and then allocate to Linux. |
| volumeName | String | Volume name shown in Startup Options. |
Result:
| Field | Type | Contents |
|---|---|---|
| status | String | started if accepted. conflict if an installation is already pending or accepted in this session. rejected if it cannot start. |
| error | String | Translation key explaining rejection. Required only for rejected. |
| vars | String[] | Values for {0}, {1}, etc. in error. Required only for rejected, may be empty. |
Retrieve the current installation state.
After the first Progress object is returned, the server should
send a new Progress update whenever the state changes.
This should be sent as a JSON-RPC notification progress, with the
object in params.
Parameters: None.
Result: Progress.
| Field | Type | Contents |
|---|---|---|
| status | String | waiting_for_request, running, authentication_required, complete or failed. If waiting_for_request, no other fields are to be provided. |
| stage | String | preparing, resizing, installing or finalising. On failure, the stage the failure occurred at. |
| message | String | Translation key for the current operation. |
| vars | String[] | Vars to substitute into the translated message. May be empty. |
| percent | Number or null | Completion of the operation described by message, from 0 to 100; null if unknown. |
| step | Integer | Current stage, from 1 to total. |
| total | Integer | Number of planned stages. |
| authUsers | String[] | If status is authentication_required, a list of eligible macOS admin accounts. Not to be included otherwise. |
If the status is authentication_required, further installation is blocked until
the client sends an authenticate message which is accepted with success
being true.
Retrieve current log lines.
After the first LogUpdate object is returned, the server should
send a new LogUpdate update whenever new log lines are available.
It may batch updates briefly, but on failure or completion all remaining
lines should be flushed.
This should be sent as a JSON-RPC notification logs, with the
object in params.
Parameters:
| Field | Type | Contents |
|---|---|---|
| after | Integer | Number of lines already received. Optional, defaults to 0. |
Result: LogUpdate
| Field | Type | Contents |
|---|---|---|
| from | Integer | Zero-based index of the first line in this update. |
| lines | String[] | New plain-text lines. |
If installation has not yet started, {"from": 0, "lines": []} should be returned.
Submit credentials for a pending authentication prompt.
Parameters:
| Field | Type | Contents |
|---|---|---|
| username | String | Account from the prompt's authUsers. |
| password | String | Password |
Result:
| Field | Type | Contents |
|---|---|---|
| success | Boolean | Did the authentication attempt succeed? |
| error | String | Optional translation key explaining a failed attempt. |
| vars | String[] | Substitutions for error, as above. Required only when error is present. |
Retrieve the anonymous installation statistics that would be shared.
Parameters: None.
Result: JSON object with no fixed fields.
Record the statistics choice and shut down the Mac completely.
Require a completed installation.
Parameters:
| Field | Type | Contents |
|---|---|---|
| shareAnonymousStatistics | Boolean | Did the user grant or decline stats consent? |
Result:
| Field | Type | Contents |
|---|---|---|
| accepted | Boolean | true if the shutdown command was accepted, and the Mac will imminently shut down. false if it was rejected because there was not a completed installation. |