![]() |
Sunshine latest
Self-hosted game stream host for Moonlight.
|
Sunshine has a RESTful API which can be used to interact with the service.
Unless otherwise specified, authentication is required for all API calls. You can authenticate using basic authentication with the admin username and password.
Get the list of available applications.
response | The HTTP response object. |
request | The HTTP request object. |
Get the logs from the log file.
response | The HTTP response object. |
request | The HTTP request object. |
Save an application. To save a new application the index must be -1
. To update an existing application, you must provide the current index of the application.
response | The HTTP response object. |
request | The 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",
"index": -1,
"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."
}
|
Delete an application.
response | The HTTP response object. |
request | The HTTP request object. |
Upload a cover image.
response | The HTTP response object. |
request | The HTTP request object. The body for the post request should be JSON serialized in the following format: {
"key": "igdb_<game_id>",
"url": "https://images.igdb.com/igdb/image/upload/t_cover_big_2x/<slug>.png"
}
|
Get the configuration settings.
response | The HTTP response object. |
request | The HTTP request object. |
Get the locale setting. This endpoint does not require authentication.
response | The HTTP response object. |
request | The HTTP request object. |
Save the configuration settings.
response | The HTTP response object. |
request | The HTTP request object. The body for the post request should be JSON serialized in the following format: {
"key": "value"
}
|
Restart Sunshine.
response | The HTTP response object. |
request | The HTTP request object. |
Reset the display device persistence.
response | The HTTP response object. |
request | The HTTP request object. |
Update existing credentials.
response | The HTTP response object. |
request | The 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"
}
|
Send a pin code to the host. The pin is generated from the Moonlight client during the pairing process.
response | The HTTP response object. |
request | The HTTP request object. The body for the post request should be JSON serialized in the following format: {
"pin": "<pin>",
"name": "Friendly Client Name"
}
|
Unpair all clients.
response | The HTTP response object. |
request | The HTTP request object. |
Unpair a client.
response | The HTTP response object. |
request | The HTTP request object. The body for the post request should be JSON serialized in the following format: {
"uuid": "<uuid>"
}
|
Get the list of paired clients.
response | The HTTP response object. |
request | The HTTP request object. |
Close the currently running application.
response | The HTTP response object. |
request | The HTTP request object. |