set-channel-enable
Use the interface to start/stop stream conversion tasks by turning on/off the input switches.
- The input switch is on by default.
Only available for users with administrative rights.
Prototype
Protocol |
HTTP/HTTPS POST |
URL |
ip[:port]/sc_cloud/channel/set-enable |
Data Format |
Request: Content-Type: application/json Response: Content-Type: application/json |
Request Cookies
Parameter |
Description |
mwcloud-sid |
A string value that is used to uniquely identify user logged-in. |
mwcloud-uid |
Current logged-in username. |
Request Body
Parameter |
Description |
id |
Stream ID. You can add stream tasks by using add-channel and obtain the IDs by using get-channels. |
is-enable |
Whether the stream conversion task is started, namely the input switch is on or not. |
Request Example
POST /sc_cloud/channel/set-enable HTTP/1.1
Accept: application/json, text/plain, */*
Content-Type: application/json;charset=utf-8
Content-Length: 23
Cookie: mwcloud-sid=OCXWUMGEYPGIAWWOETYXPNMVHDZIAZJP; mwcloud-uid=Admin;
{
"id": 13,
"is-enable": 0
}
Response Parameters
Parameter |
Description |
Content-Type |
Value: 'application/json; charset=UTF-8' |
Response Body
Parameter |
Description |
result |
Result code. The options are as follows:- 0: success.
- Other values. For details about the result codes, please refer to API Status.
|
method |
set-channel-enable |
Response Example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 42
Connection: keep-alive
{
"method": "set-channel-enable",
"result": 0
}