Skip to main content
These endpoints provide system-level operations such as retrieving logs, restarting Sunshine, and managing drivers.

GET /api/logs

Retrieve the Sunshine log file contents.

Authentication

Required

Response

Returns the raw log file contents as plain text with Content-Type: text/plain.

Example Request

Example Response

Notes

  • Returns the entire log file content
  • Log location is platform-specific and configurable
  • Use this endpoint to troubleshoot issues or monitor activity
  • Large log files may take time to transfer

POST /api/restart

Restart the Sunshine service.

Authentication

Required

Request Headers

Response

The server may not send a response as it restarts during the request.

Example Request

Notes

  • This endpoint triggers a complete Sunshine restart
  • Any active streaming sessions will be terminated
  • The API will be unavailable briefly during restart
  • The request may timeout or disconnect as the server restarts
  • The request body can be empty JSON {} but the Content-Type header is required
  • Wait a few seconds before making subsequent API calls

POST /api/reset-display-device-persistence

Reset display device persistence settings.

Authentication

Required

Request Headers

Response

boolean
Whether the reset operation was successful

Example Request

Example Response

Notes

  • This endpoint resets saved display device settings
  • Useful when display configuration issues occur
  • The request body can be empty JSON {} but the Content-Type header is required
  • Platform-specific functionality

GET /api/vigembus/status

Get ViGEmBus driver version and installation status (Windows only).

Authentication

Required

Response

boolean
Whether ViGEmBus driver is installed
string
Installed driver version (e.g., “1.17.0.0”)
boolean
Whether the installed version is compatible (>= 1.17.0.0)
string
Version of ViGEmBus packaged with Sunshine
string
Error message if not on Windows

Example Request

Example Response (Windows)

Example Response (Non-Windows)

Notes

  • ViGEmBus is a Windows driver for virtual gamepad support
  • Required for proper gamepad emulation on Windows
  • Compatible versions are 1.17.0.0 and higher
  • Driver file is checked at: %SystemRoot%\System32\drivers\ViGEmBus.sys

POST /api/vigembus/install

Install the ViGEmBus driver (Windows only).

Authentication

Required

Request Headers

Response

boolean
Whether the installation was successful
integer
Installer exit code (0 for success)
string
Error message if installation failed

Example Request

Example Response (Success)

Example Response (Failure)

Error Responses

If installer not found:
If not on Windows:

Notes

  • Runs the ViGEmBus installer with elevated privileges
  • Installation is performed silently (/quiet flag)
  • The installer is located at <appdata>/../scripts/vigembus_installer.exe
  • Installation may take several seconds to complete
  • The request body can be empty JSON {} but the Content-Type header is required
  • A system restart may be required after installation

Example: System Monitoring Script

Python Example: Log Monitoring