Back to Unigetui

UniGetUI background IPC API

docs/IPC.md

2026.1.1017.7 KB
Original Source

UniGetUI background IPC API

This file documents the local automation API used by the UniGetUI CLI.

  • For the public command-line interface built on top of this API, see CLI.md.
  • This API is designed for local automation, not for remote exposure.

Overview

UniGetUI exposes a local HTTP API over one of two transports:

  • Named-pipe transport (default)
    • Windows: Windows named pipe
    • Non-Windows: Unix domain socket
  • TCP transport (optional)
    • Localhost only

All endpoints live under /uniget/v1/....

Transport defaults

SettingValue
Default transportnamed-pipe
Default TCP port7058
Default pipe nameUniGetUI.IPC
Default Unix socket directory/tmp

On non-Windows, a relative named-pipe name such as UniGetUI.IPC resolves to:

text
/tmp/UniGetUI.IPC

An absolute path may also be supplied on non-Windows. On Windows, absolute pipe paths are rejected and UniGetUI falls back to the default pipe name.

Server-side configuration

These options are read when UniGetUI starts its IPC API server.

ArgumentEnvironment variableMeaning
--ipc-api-transport {named-pipe|tcp}UNIGETUI_IPC_API_TRANSPORTSelects the server transport.
--ipc-api-port <port>UNIGETUI_IPC_API_PORTSelects the TCP port when TCP is enabled.
--ipc-api-pipe-name <name-or-path>UNIGETUI_IPC_API_PIPE_NAMESelects the pipe name or Unix socket path when named-pipe transport is enabled.

Client-side configuration

These options are read by the CLI and IpcClient.

ArgumentEnvironment variableMeaning
--transport {named-pipe|tcp}UNIGETUI_IPC_API_TRANSPORTExplicit client-side transport override.
--tcp-port <port>UNIGETUI_IPC_API_PORTExplicit client-side TCP port override.
--pipe-name <name-or-path>UNIGETUI_IPC_API_PIPE_NAMEExplicit client-side pipe name or Unix socket override.

Session discovery

When the client does not receive an explicit transport override:

  1. UniGetUI loads persisted endpoint registrations from the user configuration directory.
  2. Registrations are ordered with this preference:
    1. headless sessions first
    2. newest persisted session first
  3. The client probes for a live session and uses its persisted token automatically.

When the client does receive an explicit override:

  • it connects to that transport choice instead of auto-selecting the newest session
  • it waits up to 5 seconds for a matching persisted token to appear

Authentication

EndpointAuth
GET /uniget/v1/statusNo token required
All other /uniget/v1/* endpointstoken query parameter required

Authentication details:

  • UniGetUI generates a per-session token at API startup.
  • That token is persisted with the endpoint registration metadata.
  • IpcClient automatically appends token=<value> to authenticated requests.

Security notes

  • The default design is local-only automation.
  • TCP mode binds to localhost, not all interfaces.
  • On non-Windows named-pipe transport, UniGetUI applies Unix socket mode:
text
user-read + user-write

That is effectively 0600-style same-user access on the socket file.

  • On Windows named-pipe transport, UniGetUI uses Kestrel named-pipe hosting and does not expose a filesystem socket path.

Error model

ConditionResult
Missing or invalid tokenHTTP 401
Invalid query/body argumentsHTTP 400 with plain-text error message
SuccessJSON response with camelCase property names

Most successful command endpoints return either:

  • a domain object wrapped in a status: "success" envelope, or
  • a command/result JSON envelope, or
  • another typed JSON payload documented by its fields rather than its CLR type name

Request conventions

Query-string endpoints

Most endpoints use query parameters, including:

  • operations
  • app navigation
  • sources
  • settings
  • secure settings
  • shortcuts
  • logs
  • package search/details/versions/installed/updates
  • package actions

JSON-body endpoints

These endpoint families consume JSON bodies:

Endpoint familyRequest shape
manager maintenance actionsmanager maintenance request body
GitHub device-flow startGitHub device-flow start request body
cloud backup download/restorecloud backup request body
bundle importbundle import request body
bundle exportbundle export request body
bundle add/removebundle package request body
bundle installbundle install request body

JSON body field reference

All request bodies use camelCase JSON.

Manager maintenance request body

FieldTypeMeaning
managerNamestringRequired stable manager id
actionstringManager action name for /action
pathstringCustom executable path for /executable/set
confirmbooleanConfirmation flag for destructive actions

GitHub device-flow start request body

FieldTypeMeaning
launchBrowserbooleanWhether UniGetUI should try to open the verification URL automatically

Cloud backup request body

FieldTypeMeaning
keystringBackup identifier
appendbooleanAppend instead of replace when restoring/importing

Bundle import request body

FieldTypeMeaning
pathstringSource file path
contentstringRaw bundle content
formatstringBundle format such as ubundle, json, yaml, or xml
appendbooleanAppend imported items to the current bundle

Bundle export request body

FieldTypeMeaning
pathstringOptional output path

Bundle package request body

FieldTypeMeaning
packageIdstringPackage identifier
managerNamestringStable manager id
packageSourcestringSource/feed name
versionstringRequested version
scopestringRequested scope
preReleasebooleanInclude prerelease package metadata
selectionstringBundle selection mode

Bundle install request body

FieldTypeMeaning
includeInstalledbooleanWhether already-installed packages should still be processed
elevatedbooleanRequest elevated execution
interactivebooleanRequest interactive execution
skipHashbooleanSkip hash validation when supported

Shared parameter sets

Package action query parameters

These keys are used by package-related endpoints such as install, update, uninstall, details, versions, ignored updates, and download.

Query keyMeaning
packageIdPackage identifier
managerStable manager id
packageSourceSource/feed name
versionRequested version
scopeInstall scope
preReleaseBoolean
elevatedBoolean
interactiveBoolean
skipHashBoolean
removeDataBoolean
waitBoolean
architectureArchitecture override
locationInstall location override
outputPathDownload output path

App navigation query parameters

Query keyMeaning
pageTarget page name
managerOptional manager context
helpAttachmentOptional help-page attachment

Operation query parameters

Query keyMeaning
tailLinesUsed by GET /uniget/v1/operations/{operationId}/output
modeRetry mode for POST /uniget/v1/operations/{operationId}/retry
actionQueue action for POST /uniget/v1/operations/{operationId}/reorder

Endpoint reference

Session and app

MethodPathAuthParameters/bodyCLI equivalentNotes
GET/uniget/v1/statusNoNonestatus, versionReturns running, transport, tcpPort, namedPipeName, namedPipePath, baseAddress, version, and buildNumber.
GET/uniget/v1/appYesNoneapp statusReturns app/headless/window state.
POST/uniget/v1/app/showYesNoneapp showUI-only in practice.
POST/uniget/v1/app/navigateYesQuery: page, optional manager, optional helpAttachmentapp navigateUI-only in practice.
POST/uniget/v1/app/quitYesNoneapp quitShuts down the selected session.

Operations

MethodPathAuthParameters/bodyCLI equivalent
GET/uniget/v1/operationsYesNoneoperation list
GET/uniget/v1/operations/{operationId}YesRoute: operationIdoperation get
GET/uniget/v1/operations/{operationId}/outputYesRoute: operationId, optional query tailLinesoperation output
POST/uniget/v1/operations/{operationId}/cancelYesRoute: operationIdoperation cancel
POST/uniget/v1/operations/{operationId}/retryYesRoute: operationId, optional query modeoperation retry
POST/uniget/v1/operations/{operationId}/reorderYesRoute: operationId, query actionoperation reorder
POST/uniget/v1/operations/{operationId}/forgetYesRoute: operationIdoperation forget

Managers

MethodPathAuthParameters/bodyCLI equivalent
GET/uniget/v1/managersYesNonemanager list
GET/uniget/v1/managers/maintenanceYesQuery managermanager maintenance
POST/uniget/v1/managers/maintenance/reloadYesJSON body: manager maintenance request bodymanager reload
POST/uniget/v1/managers/maintenance/executable/setYesJSON body: manager maintenance request bodymanager set-executable
POST/uniget/v1/managers/maintenance/executable/clearYesJSON body: manager maintenance request bodymanager clear-executable
POST/uniget/v1/managers/maintenance/actionYesJSON body: manager maintenance request bodymanager action
POST/uniget/v1/managers/set-enabledYesQuery manager, enabledmanager enable, manager disable
POST/uniget/v1/managers/set-update-notificationsYesQuery manager, enabledmanager notifications enable, manager notifications disable

Sources

MethodPathAuthParameters/bodyCLI equivalent
GET/uniget/v1/sourcesYesOptional query managersource list
POST/uniget/v1/sources/addYesQuery manager, name, optional urlsource add
POST/uniget/v1/sources/removeYesQuery manager, name, optional urlsource remove

Settings

MethodPathAuthParameters/bodyCLI equivalent
GET/uniget/v1/settingsYesNonesettings list
GET/uniget/v1/settings/itemYesQuery keysettings get
POST/uniget/v1/settings/setYesQuery key, optional enabled, optional valuesettings set
POST/uniget/v1/settings/clearYesQuery keysettings clear
POST/uniget/v1/settings/resetYesNonesettings reset

Secure settings

MethodPathAuthParameters/bodyCLI equivalent
GET/uniget/v1/secure-settingsYesOptional query usersettings secure list
GET/uniget/v1/secure-settings/itemYesQuery key, optional usersettings secure get
POST/uniget/v1/secure-settings/setYesQuery key, enabled, optional usersettings secure set

Desktop shortcuts

MethodPathAuthParameters/bodyCLI equivalent
GET/uniget/v1/desktop-shortcutsYesNoneshortcut list
POST/uniget/v1/desktop-shortcuts/setYesQuery path, statusshortcut set
POST/uniget/v1/desktop-shortcuts/resetYesQuery pathshortcut reset
POST/uniget/v1/desktop-shortcuts/reset-allYesNoneshortcut reset-all

Logs

MethodPathAuthParameters/bodyCLI equivalent
GET/uniget/v1/logs/appYesOptional query levellog app
GET/uniget/v1/logs/historyYesNonelog operations
GET/uniget/v1/logs/managerYesOptional query manager, optional query verboselog manager

Backups

MethodPathAuthParameters/bodyCLI equivalentNotes
GET/uniget/v1/backups/statusYesNonebackup statusIncludes local backup settings and GitHub auth state.
POST/uniget/v1/backups/local/createYesNonebackup local createCreates a local backup bundle.
POST/uniget/v1/backups/github/sign-in/startYesJSON body: GitHub device-flow start request bodybackup github login startStarts GitHub device flow.
POST/uniget/v1/backups/github/sign-in/completeYesNonebackup github login completeCompletes device flow.
POST/uniget/v1/backups/github/sign-outYesNonebackup github logoutSigns out of GitHub backup integration.
GET/uniget/v1/backups/cloudYesNonebackup cloud listLists cloud backups.
POST/uniget/v1/backups/cloud/createYesNonebackup cloud createUploads a cloud backup.
POST/uniget/v1/backups/cloud/downloadYesJSON body: cloud backup request bodybackup cloud downloadDownloads backup content.
POST/uniget/v1/backups/cloud/restoreYesJSON body: cloud backup request bodybackup cloud restoreRestores/imports a cloud backup.

Bundles

MethodPathAuthParameters/bodyCLI equivalent
GET/uniget/v1/bundlesYesNonebundle get
POST/uniget/v1/bundles/resetYesNonebundle reset
POST/uniget/v1/bundles/importYesJSON body: bundle import request bodybundle import
POST/uniget/v1/bundles/exportYesJSON body: bundle export request bodybundle export
POST/uniget/v1/bundles/addYesJSON body: bundle package request bodybundle add
POST/uniget/v1/bundles/removeYesJSON body: bundle package request bodybundle remove
POST/uniget/v1/bundles/installYesJSON body: bundle install request bodybundle install

Packages

MethodPathAuthParameters/bodyCLI equivalentNotes
GET/uniget/v1/packages/searchYesQuery query, optional manager, optional maxResultspackage searchSearch endpoint.
GET/uniget/v1/packages/installedYesOptional query managerpackage installedInstalled packages.
GET/uniget/v1/packages/updatesYesOptional query managerpackage updatesUpgradable packages.
GET/uniget/v1/packages/detailsYesPackage action query setpackage detailsDetails payload.
GET/uniget/v1/packages/versionsYesPackage action query setpackage versionsInstallable versions.
GET/uniget/v1/packages/ignoredYesNonepackage ignored listIgnored-update rules.
POST/uniget/v1/packages/ignoreYesPackage action query setpackage ignored addAdds ignored-update rule.
POST/uniget/v1/packages/unignoreYesPackage action query setpackage ignored removeRemoves ignored-update rule.
POST/uniget/v1/packages/downloadYesPackage action query setpackage downloadStarts or performs download.
POST/uniget/v1/packages/installYesPackage action query setpackage installStarts or performs install.
POST/uniget/v1/packages/reinstallYesPackage action query setpackage reinstallReinstalls package.
POST/uniget/v1/packages/updateYesPackage action query setpackage updateUpdates one package.
POST/uniget/v1/packages/uninstallYesPackage action query setpackage uninstallUninstalls package.
POST/uniget/v1/packages/uninstall-then-reinstallYesPackage action query setpackage repairRepair flow.
POST/uniget/v1/packages/showYesQuery packageId, packageSourcepackage showUI-oriented package-details flow.
POST/uniget/v1/packages/update-allYesNonepackage update-allRequires OnUpgradeAll handler to be wired.
POST/uniget/v1/packages/update-managerYesQuery managerpackage update-managerRequires OnUpgradeAllForManager handler to be wired.

Headless-specific limitations

In headless sessions:

  • POST /uniget/v1/app/show fails because there is no window to show.
  • POST /uniget/v1/app/navigate fails because there is no UI page stack to navigate.
  • POST /uniget/v1/packages/update-all fails unless a host wires OnUpgradeAll.
  • POST /uniget/v1/packages/update-manager fails unless a host wires OnUpgradeAllForManager.

These failures are intentional and surfaced as HTTP 400 with a descriptive message.

Practical testing tip

If you want to inspect the IPC API manually with generic tools such as curl, the easiest route is to start UniGetUI in TCP mode:

powershell
UniGetUI.exe --headless --ipc-api-transport tcp --ipc-api-port 7058

Then:

powershell
curl http://localhost:7058/uniget/v1/status

For authenticated endpoints, you must also supply the session token as the token query parameter. The built-in CLI and IpcClient resolve that automatically.