1. API Description
This API is used to customize functions for buttons.
Request mode:
- V2.6.0 and above: POST [ip]/mwapi/V2.0/presentation/update-scene-of-button
- V2.5.0 and below: POST [ip]/mwapi/update-scene-of-button
Administrator Rights |
Logged-in |
No |
Yes |
Name |
Required |
Type |
Description |
showId |
Yes |
Int |
Presentation ID, which can be obtained via Get presentation list |
sceneOfButton1 |
No |
Int |
Scene ID (obtained via Get scene list) or Event ID bound to button 1, required, valid only in custom mode |
sceneOfButton2 |
No |
Int |
Scene ID (obtained via Get scene list) or Event ID bound to button 2, required, valid only in custom mode |
sceneOfButton3 |
No |
Int |
Scene ID (obtained via Get scene list) or Event ID bound to button 3, required, valid only in custom mode |
sceneOfButton4 |
No |
Int |
Scene ID (obtained via Get scene list) or Event ID bound to button 4, required, valid only in custom mode |
sceneOfButton5 |
No |
Int |
Scene ID (obtained via Get scene list) or Event ID bound to button 5, required, valid only in custom mode |
Event ID |
Definition |
0 |
Disable |
-10 |
Switch to HDMI 1 |
-11 |
Switch to HDMI 2 |
-12 |
Switch to WEBCAM |
-13 |
Switch to screencast |
-14 |
Switch to PIP/Switch PIP location |
-15 |
Switch sources of PIP |
-16 |
Switch to SBS/Switch SBS location |
-17 |
Switch sources of SBS |
-18 |
Swap sources of PIP or SBS |
-20 |
Switch to the first scene |
-21 |
Switch to the last scene |
-22 |
Switch to the next scene |
-23 |
Switch to the previous scene |
-30 |
Start recording/Stop recording |
-31 |
Screenshot |
-32 |
Play/Pause video (current scene) |
-33 |
Play/Pause BGM (current scene) |
-34 |
Toggle on/off FTB |
-35 |
Mute/Unmute master audio |
-36 |
Mute/Unmute MIC |
-37 |
Freeze/Unfreeze scene |
-38 |
Start/Stop streaming |
-40 |
Go to the first page (current scene) |
-41 |
Go to the last page (current scene) |
-42 |
Page down (current scene) |
-43 |
Page up (current scene) |
-50 |
Wake up |
-51 |
Go to sleep |
-100 |
Start recording |
-101 |
Stop recording |
-102 |
Start streaming |
-103 |
Stop streaming |
-104 |
Play video (current scene) |
-105 |
Pause video (current scene) |
-106 |
Play BGM (current scene) |
-107 |
Pause BGM (current scene) |
-108 |
Toggle on FTB |
-109 |
Toggle off FTB |
-110 |
Mute master audio |
-111 |
Unmute master audio |
-112 |
Mute MIC |
-113 |
Unmute MIC |
-114 |
Freeze scene |
-115 |
Unfreeze scene |
3. Output Parameters
Name |
Type |
Description |
status |
Int |
Status code |
message |
String |
Status description |
4. Example
Setting the function of button 1 in presentation 1 to "Freeze/Unfreeze scene," and set button 2 to "Toggle on FTB."
{
"showId": 1,
"sceneOfButton1": -37,
"sceneOfButton3": -108
}
Output Example
{
"message": "success",
"status": 0
}
5. Error Code
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Status |
Definition |
Description |
7 |
MW_STATUS_INVALID_ARG |
Missing required parameters |
24 |
MW_STATUS_DEVICE_TYPE_ERROR |
Not custom mode |
39 |
MW_STATUS_MISMATCH |
The scene does not exist |