Hermes 0.7.0
Linux game streaming host
Loading...
Searching...
No Matches
HTTP endpoint implementation reference

These endpoints are documented alongside their handlers in the Hermes host. See the HTTP API guide for authentication and client requirements.

POST /api/login

Login the user.

Parameters
responseThe HTTP response object.
requestThe HTTP request object.

The body for the POST request should be JSON serialized in the following format:

{
"username": "<username>",
"password": "<password>"
}

POST /api/otp

Get a one-time password (OTP).

Parameters
responseThe HTTP response object.
requestThe HTTP request object.

@api_examples{/api/otp| GET| null}

POST /api/pin

Send a PIN code to the host.

Parameters
responseThe HTTP response object.
requestThe HTTP request object.

The body for the POST request should be JSON serialized in the following format:

{
"pin": "<pin>",
"name": "Friendly Client Name"
}

@api_examples{/api/pin| POST| {"pin":"1234","name":"My PC"}}

GET /api/apps

Get the list of available applications.

Parameters
responseThe HTTP response object.
requestThe HTTP request object.
HTTP request
GET /api/apps
Request body: null

POST /api/apps

Save an application. To save a new application the UUID must be empty. To update an existing application, you must provide the current UUID of the application.

Parameters
responseThe HTTP response object.
requestThe HTTP request object. The body for the post request should be JSON serialized in the following format:
{
"name": "Application Name",
"output": "Log Output Path",
"cmd": "Command to run the application",
"exclude-global-prep-cmd": false,
"elevated": false,
"auto-detach": true,
"wait-all": true,
"exit-timeout": 5,
"prep-cmd": [
{
"do": "Command to prepare",
"undo": "Command to undo preparation",
"elevated": false
}
],
"detached": [
"Detached command"
],
"image-path": "Full path to the application image. Must be a png file.",
"uuid": "aaaa-bbbb"
}
HTTP request
POST /api/apps
Request body: {"name":"Hello, World!","uuid": "aaaa-bbbb"}

POST /api/apps/delete

Delete an application.

Parameters
responseThe HTTP response object.
requestThe HTTP request object.
HTTP request
POST /api/apps/delete
Request body: { uuid: 'aaaa-bbbb' }

POST /api/apps/reorder

Reorder applications.

Parameters
responseThe HTTP response object.
requestThe HTTP request object.
HTTP request
POST /api/apps/reorder
Request body: {"order": ["aaaa-bbbb", "cccc-dddd"]}

POST /api/apps/launch

Launch an application.

Parameters
responseThe HTTP response object.
requestThe HTTP request object.

POST /api/apps/close

Close the currently running application.

Parameters
responseThe HTTP response object.
requestThe HTTP request object.
HTTP request
POST /api/apps/close
Request body: null

GET /api/library

List the games installed in Steam and Lutris, to add as apps.

Reads native Steam (~/.local/share/Steam, ~/.steam/steam) and Flatpak Steam, and asks Lutris (native or Flatpak) for its installed games. Each game comes with the command that starts it; nothing is added here.

Parameters
responseThe HTTP response object.
requestThe HTTP request object.
HTTP request
GET /api/library
Request body: null

POST /api/covers/upload

Upload a cover image.

Parameters
responseThe HTTP response object.
requestThe HTTP request object.

@api_examples{/api/covers/upload| POST| {"key":"igdb_1234","url":"https://images.igdb.com/igdb/image/upload/t_cover_big_2x/abc123.png"}}

GET /api/clients/list

Get the list of paired clients.

Parameters
responseThe HTTP response object.
requestThe HTTP request object.
HTTP request
GET /api/clients/list
Request body: null

POST /api/clients/update

Update client information.

Parameters
responseThe HTTP response object.
requestThe HTTP request object.

The body for the POST request should be JSON serialized in the following format:

{
"uuid": "<uuid>",
"name": "<Friendly Name>",
"display_mode": "1920x1080x59.94",
"do": [ { "cmd": "<command>", "elevated": false }, ... ],
"undo": [ { "cmd": "<command>", "elevated": false }, ... ],
"perm": <uint32_t>
}

POST /api/clients/disconnect

Disconnect a client.

Parameters
responseThe HTTP response object.
requestThe HTTP request object.

POST /api/clients/unpair

Unpair a client.

Parameters
responseThe HTTP response object.
requestThe HTTP request object.

The body for the POST request should be JSON serialized in the following format:

{
"uuid": "<uuid>"
}
HTTP request
POST /api/clients/unpair
Request body: {"uuid":"1234"}

POST /api/clients/unpair-all

Unpair all clients.

Parameters
responseThe HTTP response object.
requestThe HTTP request object.
HTTP request
POST /api/clients/unpair-all
Request body: null

GET /api/config

Get the current configuration: the computed values Hermes is running with, overlaid with what the configuration file sets explicitly.

Parameters
responseThe HTTP response object.
requestThe HTTP request object.
HTTP request
GET /api/config
Request body: null

GET /api/configLocale

Get the locale setting.

Parameters
responseThe HTTP response object.
requestThe HTTP request object.
HTTP request
GET /api/configLocale
Request body: null

POST /api/config

Save the configuration settings.

Parameters
responseThe HTTP response object.
requestThe HTTP request object. The body for the post request should be JSON serialized in the following format:
{
"key": "value"
}
Attention
It is recommended to ONLY save the config settings that differ from the default behavior.
HTTP request
POST /api/config
Request body: {"key":"value"}

POST /api/password

Update existing credentials.

Parameters
responseThe HTTP response object.
requestThe HTTP request object.

The body for the POST request should be JSON serialized in the following format:

{
"currentUsername": "Current Username",
"currentPassword": "Current Password",
"newUsername": "New Username",
"newPassword": "New Password",
"confirmNewPassword": "Confirm New Password"
}

@api_examples{/api/password| POST| {"currentUsername":"admin","currentPassword":"admin","newUsername":"admin","newPassword":"admin","confirmNewPassword":"admin"}}

GET /api/logs

Get the logs from the log file.

Parameters
responseThe HTTP response object.
requestThe HTTP request object.

@api_examples{/api/logs| GET| null}

GET /api/metrics

Get the live runtime status: encoder, session, and pipeline counters. The same view the Hestia diagnostics return, behind the normal Web UI session auth so the dashboard can poll it.

Parameters
responseThe HTTP response object.
requestThe HTTP request object.
HTTP request
GET /api/metrics
Request body: null

GET /api/gamemode/status

Everything the Game Mode console shows on one screen, in one call.

Parameters
responseThe HTTP response object.
requestThe HTTP request object.

A console driven with a thumbstick polls; three round trips per poll to assemble one screen is three times the work and three chances to render a half-updated view. What it needs is small and fits in one object: is Hermes up, does anybody need a PIN typed right now, how many devices are paired, and is anything streaming.

pending_pair is the field the console exists for. It is true only while a client's request is parked waiting for four digits, so the console can put the pairing screen in front of the user at the moment it is useful instead of asking them to go looking for it.

GET /api/sessions/list

List the isolated sessions this server is holding.

Parameters
responseThe HTTP response object.
requestThe HTTP request object.

Not the same list as /api/clients/list, which is who may connect, nor the same as who is streaming: an isolated session outlives the stream that started it, so that a client can come back to the desktop it left. That is also how one can be left running with nobody attached, which is the case this list exists to make visible.

POST /api/sessions/terminate

End one isolated session.

Parameters
responseThe HTTP response object.
requestThe HTTP request object.

The body for the POST request should be JSON serialized in the following format:

{
"uuid": "<client uuid>"
}

The stream is stopped first where there is one, so the client is told the session ended rather than being left holding a stream into a desktop that is being torn down underneath it. Ending a session does not unpair the client and does not remove its account or its files: it may connect again and get the same session back.

POST /api/reset-display-device-persistence

Reset the display device persistence.

Parameters
responseThe HTTP response object.
requestThe HTTP request object.

@api_examples{/api/reset-display-device-persistence| POST| null}

POST /api/restart

Restart Hermes.

Parameters
responseThe HTTP response object.
requestThe HTTP request object.

@api_examples{/api/restart| POST| null}

POST /api/quit

Quit Hermes.

Parameters
responseThe HTTP response object.
requestThe HTTP request object.

GET /api/evdi/status

Return the current EVDI runtime and DKMS status for the Audio/Video UI.

POST /api/evdi/install

Start EVDI installation only after the user explicitly confirms it in the UI. pkexec owns the privilege prompt, so Hermes never handles an admin password.

GET /api/evdi/install/status

Return the state of the EVDI installation started by this Web UI.

GET /api/hermes-kms/status

Return the current Hermes-KMS driver and DKMS status for the Audio/Video UI.

GET /api/hestia/v1/capabilities

Return the static Hestia extension capabilities.

This endpoint is deliberately read-only and unauthenticated so clients can detect Hermes before an extension authentication flow is available. It does not expose host state or permit any host-control operation.

POST /api/hestia/v1/session/prepare

Store settings for a paired Hestia client's next stream launch.

The normal GameStream launch path consumes the short-lived settings and creates a virtual display only when the stream actually begins.

The response's settings says what that launch will apply for the requested app, so the client can show where a host setting overrides its own: for virtual_display and scale_factor, the requested and effective values and the source that decided (client, app_forced for an app that forces its setting, app or host_default when the client's value is not used, headless, or isolated_session for an app that always runs on a display of its own). It is null when no app has the requested id.