/api/settings/set
Use this interface to set parameters for Control Hub.
System configuration editing permissions are required.
Prototype
Protocol |
HTTP/HTTPS POST |
URL |
ip[:port]/api/settings/set |
Content-Type |
Request: Content-Type: application/json Response: Content-Type: application/json |
Request Cookies
Parameter |
Description |
mwcloud-sid |
A string that is used to identify current logged-in user. |
mwcloud-uid |
Current logged-in username. |
Request Body
Only one of the following configuration fields can be configured for a single call:
Parameter |
Description |
security |
Security configurations, refer to Security Configurations |
channel |
Default value for channel NDI switch, see Default Channel NDI Switch |
ndi-discovery |
NDI-related configuration, see NDI-related Configuration Note: Original anchor text appears incorrect |
hub-ndi-server |
NDI local discovery service configuration, see NDI Local Discovery Service Configuration |
web |
Web service configurations, refer to Web Service Configurations |
rtmp |
RTMP service configurations, refer to RTMP Configurations |
srt |
SRT service configurations, refer to SRT configurations |
pwd-rule |
Password configurations |
expired-time |
User login session timeout in minutes, ranging from -1 to 1440. Set to -1 to never expire. |
Web Service Configurations
Parameter |
Description |
http-port |
Http port |
enable-https |
HTTPS enable status |
https-port |
Https port |
cert-filename |
CA certificate name, obtained from the upload interface, if not available, do not provide the field. |
cert-key-filename |
Whether the CA private key is valid, obtained using the upload interface. If not, do not provide the field. |
SRT Configurations
Caution!!! Any configuration changes to srt will cause the system to restart, please warn the user.
Parameter |
Description |
port |
SRT port |
pb-key-len |
Encryption Options, if encryption is already enabled, you don't need to fill in the passphrase again, leaving the passphrase field blank means the password remains unchanged. |
passphrase |
Key |
Encryption
Parameter |
Description |
chk-name |
Check if the password and username are consistent, field does not exist or is 0 means do not check, 1 means check the password cannot be consistent with the username. |
length |
The minimum password length, if the field does not exist or is 0, represents no requirement. |
number |
The number of digits required, if the field does not exist or is 0, it represents that there is no requirement. |
special |
The number of special characters required to be included, with no field or 0 representing no requirement, and the special character set refers to Special Character Set. |
uppercase |
The number of uppercase letters required. Field does not exist or is 0 represents no requirement. |
lowercase |
The number of lowercase letters required. Field does not exist or is 0 represents no requirement. |
Special Character Set
~!@#$%^&*_-+=
Request Example
POST /api/settings/set HTTP/1.1
Accept: application/json, text/plain, */*
Content-Type: application/json;charset=utf-8
Content-Length: xx
Cookie: mwcloud-sid=OCXWUMGEYPGIAWWOETYXPNMVHDZIAZJP; mwcloud-uid=Admin;
{
"security": {
"enable-code" : 1,
"code-value" : "1111",
},
"channel":{
"def-ndi-enable":true
},
"ndi-discovery":{
"enable":true,
"machine-name":"control-hub",
"addr":"10.10.14.211"
},
"hub-ndi-server":{
"enable":true
}
}
Response Parameters
Parameter |
Description |
Content-Type |
Value: 'application/json; charset=UTF-8' |
Response Body
Response Example
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
content-length: xx
{
"result": 0
}