/api/channel/add
Use this interface to add a channel.
Channels editing permissions are required.
Prototype
Protocol |
HTTP/HTTPS POST |
URL |
ip[:port]/api/channel/add |
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
Channel Configurations
Parameter |
Description |
play-key |
Playback key, globally unique, maximum length 256 bytes. |
push-key |
Push stream key, can't be the same as play key, and globally unique, max length 256 bytes |
Request Example
POST /api/channel/add 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;
{
"name":"test",
"config": {
"play-key": "test",
"push-key": "push_test"
}
}
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
}