sync: auto-sync from HOWARD-HOME at 2026-06-21 20:36:14

Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-21 20:36:14
This commit is contained in:
2026-06-21 20:36:41 -07:00
parent 231fcb6d6f
commit 87688b65da
6 changed files with 349 additions and 14 deletions

View File

@@ -16,12 +16,13 @@ application/json and the body is the method's parameters (object or array).
Credentials: never hardcoded. api_secret loaded at runtime from the SOPS vault,
or the SCREENCONNECT_API_SECRET env var (testing override).
NOTE (instance state, 2026-06-21): the installed RESTful API Manager extension is
LIMITED — only `GetSessionsByName` exists; other methods 500 "Web method does not
exist". Full control (SendCommandToSession, GetSessions, UpdateSessionCustom-
Properties, ...) requires updating the extension on the instance. The client is
built to expose those methods as soon as the extension is unlocked; `raw()` probes
arbitrary methods in the meantime.
INSTANCE METHOD SURFACE (probed live 2026-06-22): control IS available -
GetSessionsByName, GetSessionDetailsBySessionID, GetSessionBySessionID (reads,
JSON-object params); SendCommandToSession, SendMessageToSession,
UpdateSessionCustomProperties, CreateSession (writes, POSITIONAL-ARRAY params).
MISSING on this extension version: GetSessions/GetAllSessions/GetSessionGroups
(full-fleet inventory) - "web method does not exist"; pending an admin update of
the RESTful API Manager extension. `raw()` probes arbitrary methods.
"""
from __future__ import annotations
@@ -205,23 +206,24 @@ class ScreenConnectClient:
return self.call("GetSessionsByName", {"sessionName": session_name})
# ======================================================================
# Methods pending the extension unlock (currently 500 "web method does not
# exist"). Exposed here so the CLI is ready; verify each once unlocked.
# Shapes are best-effort from the RESTful API Manager docs and MUST be
# confirmed by live probing before relying on them.
# Control + detail methods (all VERIFIED LIVE 2026-06-22 on the ACG instance).
# Reads take a JSON object {sessionID:...}; the POST/write methods take a
# POSITIONAL ARRAY. NOTE: full-fleet inventory (GetSessions) is NOT exposed by
# this extension version (returns "web method does not exist") - pending an
# admin update of the RESTful API Manager extension (see SKILL.md).
# ======================================================================
def get_session_details(self, session_id: str) -> Any:
"""GetSessionDetailsBySessionID full detail for one session. PENDING UNLOCK."""
"""GetSessionDetailsBySessionID - full detail for one session. VERIFIED."""
return self.call("GetSessionDetailsBySessionID", {"sessionID": session_id})
def send_command_to_session(self, session_id: str, command: str) -> Any:
"""SendCommandToSession run a backstage command on a guest. EXISTS on this
"""SendCommandToSession - run a backstage command on a guest. EXISTS on this
instance. POST body is a POSITIONAL ARRAY [sessionID, command]
(e.g. ["<uuid>", "ipconfig"]). STATE-CHANGING (gate behind --confirm)."""
return self.call("SendCommandToSession", [session_id, command])
def send_message_to_session(self, session_id: str, message: str) -> Any:
"""SendMessageToSession send a chat message to a guest. EXISTS.
"""SendMessageToSession - send a chat message to a guest. EXISTS.
POST body positional array [sessionID, message]. STATE-CHANGING."""
return self.call("SendMessageToSession", [session_id, message])
@@ -236,7 +238,7 @@ class ScreenConnectClient:
return self.call(method, body, http_method=http_method)
# ======================================================================
# INSTALLER BUILDER (no API call constructs the parameterized access
# INSTALLER BUILDER (no API call - constructs the parameterized access
# installer URL so a device self-tags into the right Company/Site/Tag).
# ======================================================================
def build_installer_url(