Search the docs or ask a question...

Streaming Management

Update time: 2021/11/01 06:53:48

Create a channel

The API is used to create a live streaming channel.

URL

POST https://vcloud.163.com/app/channel/create HTTP/1.1
Content-Type: application/json;charset=utf-8

Request parameters

Parameter Type Required Description
name String Yes The channel name. The name must be 1 to 64 characters in length and can contain Chinese characters, letters, digits, and underscores(_).
type int Optional The channel type. 0: RTMP

Response parameters

Parameter Type Description
code int The status code.
cid String The channel ID that contains 32 characters in length.
ctime Long The time when the channel was created.
name String The channel name.
pushUrl String URL of the stream push input.
httpPullUrl String URL for HTTP streaming pull output.
hlsPullUrl String URL for HLS streaming pull output.
rtmpPullUrl String URL for RTMP streaming pull output.
rtsPullUrl String URL for NERTC streaming pull output. The URL is returned after the low-latency live streaming service is activated.
msg String The error message.

Example

curl request example

curl -X POST -H "Content-Type: application/json" -H "AppKey: 29781bbc4db54742a3ebcxxxxxxxxxxx" -H "Nonce: 12345" -H "CurTime: 1469171950571" -H "CheckSum: 4ba6ca70c685eb900917e423eadaxxxxxxxxxxxxx" -d '{"name":"channel_name", "type":0}' https://vcloud.163.com/app/channel/create

Example of API call using JAVA

You can see the following example for the API calls using HttpClient.

import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import org.apache.http.Consts;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class Test {
    public static void main(String[] args) throws Exception{
        DefaultHttpClient httpClient = new DefaultHttpClient();
        String url = "https://vcloud.163.com/app/channel/create";
        HttpPost httpPost = new HttpPost(url);

        String appKey = "94kid09c9ig9k1loimjg012345123456";
        String appSecret = "123456789012";
        String nonce =  "1";
        String curTime = String.valueOf((new Date()).getTime() / 1000L);
        String checkSum = CheckSumBuilder.getCheckSum(appSecret, nonce ,curTime);//See the JAVA code used to calculate CheckSum.

        // Specify the request header.
        httpPost.addHeader("AppKey", appKey);
        httpPost.addHeader("Nonce", nonce);
        httpPost.addHeader("CurTime", curTime);
        httpPost.addHeader("CheckSum", checkSum);
        httpPost.addHeader("Content-Type", "application/json;charset=utf-8");

        // Set the request parameters.
        StringEntity params = new StringEntity("{\"name\":\"netease_vcloud\", \"type\":0}",Consts.UTF_8);
        httpPost.setEntity(params);

        // Run the request.
        HttpResponse response = httpClient.execute(httpPost);

        // Print out the execution result.
        System.out.println(EntityUtils.toString(response.getEntity(), "utf-8"));
    }
}

Sample response

//Response format.
"Content-Type": "application/json; charset=utf-8"
{
    "code" : XXX,
    "msg" : XXX,
    "ret" : {
        "cid" : XXX,
        "ctime" : XXX,
        "pushurl" : XXX,
        "httpPullUrl" : XXX,
        "hlsPullUrl" : XXX,
        "rtmpPullUrl" : XXX,
        "rtsPullUrl" : XXX
    }
}

//Success sample response.
"Content-Type": "application/json; charset=utf-8"
{
    "ret":{
        "httpPullUrl":"http://v1.live.126.net/live/cidxxxxxxxxx.flv",
        "hlsPullUrl":"http://pullhls1.live.126.net/live/cidxxxxxxxxx/playlist.m3u8",
        "rtmpPullUrl":"rtmp://v1.live.126.net/live/cidxxxxxxxxx",
        "rtsPullUrl":"nertc://v1.live.126.net/live/cidxxxxxxxxx",
        "name":"channel_name",
        "pushUrl":"rtmp://p1.live.126.net/live/cidxxxxxxxxx?wsSecret=312e11af6136a77b46afd0ebbb3102af&wsTime=1469411599",
        "ctime":1469411598850,
        "cid":"cidxxxxxxxxx"
    },
    "code":200
}

//Sample error response.
{
    "code":611,
    "msg":"The channel name already exists"
}

Response status codes

Status code Description
200 The operation was successful.
409 Authentication failed.
604 Failed to add the channel.
607 The user does not exist.
610 The channel name is empty.
611 The channel name already exists.
612 The channel type is invalid.
613 CheckSum was unspecified.
614 AppKey is empty.
615 CurTime is empty.
635 The service has not been activated. You can contact the business manager for help.
638 The API throttling exceeds the upper limit. A specific API of each application can be called 80 times per second.

Modify the live channel information

The API is used to modify the live channel information.

After you create a live channel, you can call this API to modify information such as the name of the live channel.

URL

POST https://vcloud.163.com/app/channel/update HTTP/1.1
Content-Type: application/json;charset=utf-8

Request parameters

Parameter Type Required Description
name String Yes The channel name. The name must be 0 to 64 characters in length.
cid String Yes The channel ID that contains 32 characters in length.
type int Optional The channel type. 0: RTMP

Response parameters

Parameter Type Description
code int The status code.
msg String The error message.

Example

curl request example

curl -X POST -H "Content-Type: application/json" -H "AppKey: 29781bbc4db54742a3ebcxxxxxxxxxxx" -H "Nonce: 12345" -H "CurTime: 1469171950571" -H "CheckSum: 4ba6ca70c685eb900917e423eadaxxxxxxxxxxxxx" -d '{"name":"channel_name", "cid":"cidxxxxxxxxx", "type":0}' https://vcloud.163.com/app/channel/update

Sample response

//Response format
"Content-Type": "application/json; charset=utf-8"
{
    "code" : XXX,
    "msg" : XXX,
    "ret" : {

    }
}

// Sample error response
"Content-Type": "application/json; charset=utf-8"
{
    "code":609,
    "msg": "The channel ID is empty"
}

Response status codes

Status code Description
200 The operation was successful.
409 Authentication failed.
605 Channel update failed.
607 The user does not exist.
609 The channel ID is empty.
610 The channel name is empty.
611 The channel name already exists.
612 The channel type is invalid.
613 CheckSum was unspecified.
614 AppKey is empty.
615 CurTime is empty.
638 The API throttling exceeds the upper limit. A specific API of each application can be called 80 times per second.

Delete a channel

The API is used to delete a live streaming channel.

URL

Request parameters

POST https://vcloud.163.com/app/channel/delete HTTP/1.1
Content-Type: application/json;charset=utf-8

Request parameters

Parameter Type Required Description
cid String Yes The channel ID that contains 32 characters in length. The ID must belong to a live channel that was created.

Response parameters

Parameter Type Description
code int The status code.
msg String The error message.

Example

curl request example

curl -X POST -H "Content-Type: application/json" -H "AppKey: 29781bbc4db54742a3ebcxxxxxxxxxxx" -H "Nonce: 12345" -H "CurTime: 1469171950571" -H "CheckSum: 4ba6ca70c685eb900917e423eadaxxxxxxxxxxxxx" -d '{"cid":"1452b15e9b6941a384a6a5688d478620"}' https://vcloud.163.com/app/channel/delete

Sample response

//Response format.
"Content-Type": "application/json; charset=utf-8"
{
    "code" : XXX,
    "msg" : XXX,
    "ret" : {

    }
}

//Success sample response.
"Content-Type": "application/json; charset=utf-8"
{
    "code" : 200,
    "ret" : {}
}

Response status codes

Status code Description
200 The operation was successful
409 Authentication failed
603 Channel deleted failed
607 The user does not exist
609 The channel ID is empty
613 CheckSum was unspecified
614 AppKey is empty
615 CurTime is empty
638 The API throttling exceeds the upper limit. A specific API of each application can be called 80 times per second.

Suspend a channel

The API is used to suspend a channel that is streaming.

URL

POST https://vcloud.163.com/app/channel/pause HTTP/1.1
Content-Type: application/json;charset=utf-8

Request parameters

Parameter Type Required Description
cid String Yes The channel ID that contains 32 characters in length.

Response parameters

Parameter Type Description
code int The status code.
msg String The error message.

Example

curl request example

curl -X POST -H "Content-Type: application/json" -H "AppKey: 29781bbc4db54742a3ebcxxxxxxxxxxx" -H "Nonce: 12345" -H "CurTime: 1469171950571" -H "CheckSum: 4ba6ca70c685eb900917e423eadaxxxxxxxxxxxxx" -d '{"cid":"cidxxxxxxxxx"}' https://vcloud.163.com/app/channel/pause

Sample response

//Response format.
"Content-Type": "application/json; charset=utf-8"
{
    "code" : XXX,
    "msg" : XXX
}

//Success sample response.
"Content-Type": "application/json; charset=utf-8"
{
    "code" : 200
}

Response status codes

Status code Description
200 The operation was successful.
409 Authentication failed.
501 Internal error.
613 CheckSum was unspecified.
614 AppKey is empty.
615 CurTime is empty.
617 The channel information does not match the current user.
618 The data information does not exist.
629 Failed to suspend the channel.
631 Invalid request parameter.
638 The API throttling exceeds the upper call. The API of each application can be called up to 400 times per second. Single and multiple API calls are calculated using the same rule. API calls that operate multiple channels are counted based on one call per channel per operation.

Suspend multiple channels

The API is used to suspend multiple channels that are streaming.

The total number of calls to suspend and restore channels per application per day is 400 times. Single and multiple API calls are calculated using the same rule. API calls that operate multiple channels are counted based on one call per channel per operation. If the upper limit is reached, the API call to suspend or restore multiple channels may partially fail. The result is subject to the data returned in successList.

Request parameters

POST https://vcloud.163.com/app/channellist/pause HTTP/1.1
Content-Type: application/json;charset=utf-8

Request parameters

Parameter Type Required Description
cidList JsonArray Yes The channel ID list

Response parameters

Parameter Type Description
code int The status code.
msg String The error message.
successList JsonArray The cid list that contains suspended channels.

Example

curl request example

curl -X POST -H "Content-Type: application/json" -H "AppKey: 29781bbc4db54742a3ebcxxxxxxxxxxx" -H "Nonce: 12345" -H "CurTime: 1469171950571" -H "CheckSum: 4ba6ca70c685eb900917e423eadaxxxxxxxxxxxxx" -d '{"cidList": ["cidxxxxxxxxx", "cidxxxxxxxxx1", "cidxxxxxxxxx2"]}' https://vcloud.163.com/app/channellist/pause

Sample response

//Response format.
"Content-Type": "application/json; charset=utf-8"
{
    "code" : XXX,
    "msg" : XXX,
    "ret" : {
        "successList" : [
                XXX,
                XXX,
                XXX,
                ...
            ]
    }
}

//Success sample response.
"Content-Type": "application/json; charset=utf-8"
{
    "ret":{
        "successList":[
            "cidxxxxxxxxx",
            "cidxxxxxxxxx1",
            "cidxxxxxxxxx2"
        ]
    },
    "code":200
}

Response status codes

Status code Description
200 The operation was successful.
409 Authentication failed.
501 Internal error.
613 CheckSum was unspecified.
614 AppKey is empty.
615 CurTime is empty.
631 Invalid request parameter.

Restore a channel

The API is used to restore a channel suspended by a user.

URL

POST https://vcloud.163.com/app/channel/resume HTTP/1.1
Content-Type: application/json;charset=utf-8

Request parameters

Parameter Type Required Description
cid String Yes The channel ID that contains 32 characters in length.

Response parameters

Parameter Type Description
code int The status code.
msg String The error message.

Example

curl request example

curl -X POST -H "Content-Type: application/json" -H "AppKey: 29781bbc4db54742a3ebcxxxxxxxxxxx" -H "Nonce: 12345" -H "CurTime: 1469171950571" -H "CheckSum: 4ba6ca70c685eb900917e423eadaxxxxxxxxxxxxx" -d '{"cid":"cidxxxxxxxxx"}' https://vcloud.163.com/app/channel/resume

Sample response

//Response format.
"Content-Type": "application/json; charset=utf-8"
{
    "code" : XXX,
    "msg" : XXX
}

//Success sample response.
"Content-Type": "application/json; charset=utf-8"
{
    "code" : 200
}

Response status codes

Status code Description
200 The operation was successful.
409 Authentication failed.
501 Internal error.
613 CheckSum was unspecified.
614 AppKey is empty.
615 CurTime is empty.
617 The channel information does not match the current user.
618 The data information does not exist.
630 Failed to restore the channel.
631 Invalid request parameter.
638 The API throttling exceeds the upper call. The API of each application can be called up to 400 times per second. Single and multiple API calls are calculated using the same rule. API calls that operate multiple channels are counted based on one call per channel per operation.

Restore multiple channels

The API is used to restore multiple channels in which the user is streaming.

The total number of calls to suspend and restore channels per application per day is 400 times. Single and multiple API calls are calculated using the same rule. API calls that operate multiple channels are counted based on one call per channel per operation. If the upper limit is reached, the API call to suspend or restore multiple channels may partially fail. The result is subject to the data returned in successList.

URL

POST https://vcloud.163.com/app/channellist/resume HTTP/1.1
Content-Type: application/json;charset=utf-8

Request parameters

Parameter Type Required Description
cidList JsonArray Yes The channel ID list

Response parameters

Parameter Type Description
code int The status code.
msg String The error message.
successList JsonArray The cid list that contains suspended channels.

Example

curl request example

    curl -X POST -H "Content-Type: application/json" -H "AppKey: 29781bbc4db54742a3ebcxxxxxxxxxxx" -H "Nonce: 12345" -H "CurTime: 1469171950571" -H "CheckSum: 4ba6ca70c685eb900917e423eadaxxxxxxxxxxxxx" -d '{"cidList": ["cidxxxxxxxxx", "cidxxxxxxxxx1", "cidxxxxxxxxx2"]}' https://vcloud.163.com/app/channellist/resume

Sample response

//Response format.
"Content-Type": "application/json; charset=utf-8"
{
    "code" : XXX,
    "msg" : XXX,
    "ret" : {
        "successList" : [
                XXX,
                XXX,
                XXX,
                ...
            ]
    }
}

### Sample success response.
"Content-Type": "application/json; charset=utf-8"
{
    "ret":{
        "successList":[
            "cidxxxxxxxxx",
            "cidxxxxxxxxx1",
            "cidxxxxxxxxx2"
        ]
    },
    "code":200
}

Response status codes

Status code Description
200 The operation was successful.
409 Authentication failed.
501 Internal error.
613 CheckSum was unspecified.
614 AppKey is empty.
615 CurTime is empty.
631 Invalid request parameter.
638 The API throttling exceeds the upper call. The API of each application can be called up to 400 times per second. Single and multiple API calls are calculated using the same rule. API calls that operate multiple channels are counted based on one call per channel per operation.

Get the list of recorded video files

The API is used to get the list of recorded video files in a channel. The video files are displayed by time from the most recent to the earliest time on each page.

URL


POST https://vcloud.163.com/app/videolist HTTP/1.1
Content-Type: application/json;charset=utf-8

Request parameters

Parameter Type Required Description
cid String Yes The channel ID that contains 32 characters in length.
records int Optional The number of records per page. The default value is 10, and the maximum is 1000.
pnum int Optional The page number that you want to select. The default value is 1.

Response parameters

Parameter Type Description
code int The status code.
msg String The error message.
videoList JsonArray The list of recorded videos.
video_name String The file name of the recorded file. The format follows filename_YYYYMMDD-HHmmss_YYYYMMDD-HHmmss, file name_start time to record (year, month, day, hour, minute, and second)-end time to stop recording (year, month, day, hour, minute, and second).
orig_video_key String The storage path of the video file in the VOD bucket.
uid Long Invalid field. Ignore the parameter.
vid Long The ID of a video file.
pnum Long The current page.
totalRecords Long The total number of video files.
totalPnum Long The total number of pages.
records Long The number of video files per page.

Example

curl request example

    curl -X POST -H "Content-Type: application/json" -H "AppKey: 29781bbc4db54742a3ebcxxxxxxxxxxx" -H "Nonce: 12345" -H "CurTime: 1469171950571" -H "CheckSum: 4ba6ca70c685eb900917e423eadaxxxxxxxxxxxxx" -d '{"cid":"cidxxxxxxxxx","records":xx, "pnum":xx}' https://vcloud.163.com/app/videolist
    curl -X POST -H "Content-Type: application/json" -H "AppKey: 027338bf05cc4a65b5d98bc9d6af80b3" -H "Nonce: 12345" -H "CurTime: 1469427735815" -H "CheckSum: 86d9602149544997a86769a8d6088cabb12b212b" -d '{"cid":"c82a2b4afe124f53b41b30296768103b","records":10, "pnum":1}' https://vcloud.163.com/app/videolist

Sample response

//Response format.
"Content-Type": "application/json; charset=utf-8"
{
    "code" : XXX,
    "msg" : XXX,
        "ret" : {
        "pnum" : XXX,
        "totalRecords" : XXX,
        "totalPnum" : XXX,
        "records" : XXX,
        "videoList" : [
            {
                "video_name" : XXX,
                "orig_video_key" : XXX,
                "uid" : XXX,
                "vid" : XXX
            },

            {
                "video_name" : XXX,
                "orig_video_key" : XXX,
                "uid" : XXX,
                "vid" : XXX
            },

            ...

        ]
    }
}

//Success sample response.
"Content-Type": "application/json; charset=utf-8"
{
    "ret":{
        "pnum" : 1,
        "totalRecords" : 69,
        "totalPnum" : 7,
        "records" : 10,
        "videoList":[
            {
                "video_name":"new_20160628-113352_20160628-133351",
                "orig_video_key":"1_291e3a9d662c4cfaa672bad689f0750b_1467084832593_1467092031353_1312-00001.flv",
                "uid":24133,
                "vid":42
            },
            {
                "video_name":"new_20160628-093349_20160628-113352",
                "orig_video_key":"1_291e3a9d662c4cfaa672bad689f0750b_1467077629013_1467084832593_1312-00000.flv",
                "uid":24133,
                "vid":41
            },
            ...
        ]
    },
    "code":200
}

Response status codes

Status code Description
200 The operation was successful.
409 Authentication failed.
501 Internal error.
613 CheckSum was unspecified.
614 AppKey is empty.
615 CurTime is empty.
617 The channel information does not match the current user.
618 The channel does not exist.
631 Invalid request parameter.
638 The API throttling exceeds the upper limit. A specific API of each application can be called 80 times per second.

Get the channel status

The API is used to get channel information, such as the status of a live channel.

URL

POST https://vcloud.163.com/app/channelstats HTTP/1.1
Content-Type: application/json;charset=utf-8

Request parameters

Parameter Type Required Description
cid String Yes The channel ID that contains 32 characters in length.

Response parameters

Parameter Type Description
ctime Long The time when the channel was created.
cid String The channel ID that contains 32 characters in length.
name String The channel name.
status int Channel status (0: Idle. 1: Streaming. 2: Banned. 3: Recording).
type int The Channel type. 0: RTMP, 1: HLS, and 2: HTTP.
uid Long Invalid field. Ignore the parameter.
needRecord int Turn on or off recording. 0: off, 1: on.
format int 1: FLV, 0: MP4.
duration int The length of recording segments in minutes. The default value is 120.
filename String The file name of video segments.
recordStatus String Invalid field. Ignore the parameter.
msg String The error message.

Example

curl request example

curl -X POST -H "Content-Type: application/json" -H "AppKey: 29781bbc4db54742a3ebcxxxxxxxxxxx" -H "Nonce: 12345" -H "CurTime: 1469171950571" -H "CheckSum: 4ba6ca70c685eb900917e423eadaxxxxxxxxxxxxx" -d '{"cid":"cidxxxxxxxxx"}' https://vcloud.163.com/app/channelstats

Sample response

//Response format.
"Content-Type": "application/json; charset=utf-8"
{
    "code" : XXX,
    "msg" : XXX,
    "ret" : {
        "ctime" : XXX,
        "cid" : XXX,
        "name" : XXX,
        "status" : XXX,
        "uid" : XXX,
        "needRecord" : XXX,
        "format" : XXX,
        "duration" : XXX,
        "filename" : XXX
    }
}

//Success sample response.
"Content-Type": "application/json; charset=utf-8"
{
    "ret":{
        "needRecord":0,
        "uid":10001,
        "duration":120,
        "status":0,
        "name":"channel_name",
        "filename":"channel_name",
        "format":1,
        "type":0,
        "ctime":1469411598850,
        "cid":"cidxxxxxxxxx"
    },
    "code":200
}

Response status codes

Status code Description
200 The operation was successful.
409 Authentication failed.
602 The query failed.
607 The user does not exist.
609 The channel ID is empty.
613 CheckSum was unspecified.
614 AppKey is empty.
615 CurTime is empty.
617 The channel information does not match the current user.
638 The API throttling exceeds the upper limit. A specific API of each application can be called 80 times per second.

Get the channel list

The API is used to get the channel list.

URL

POST https://vcloud.163.com/app/channellist HTTP/1.1
Content-Type: application/json;charset=utf-8

Request parameters

Parameter Type Required Description
records int Optional The number of records per page. The default value is 10, and the maximum is 1000.
pnum int Optional The page number that you want to select. The default value is 1.
ofield String Optional The sorting condition. the supported sorting condition is ctime by default.
sort int Optional The sorting condition. 1: ascending and 0: descending. The default value is 0. status Optional The channel status. 0: Idle. 1: Streaming. 2: Banned. 3: Recording).

Response parameters

Parameter Type Description
ctime Long The time when the channel was created.
cid String The channel ID that contains 32 characters in length.
name String The channel name.
status int Channel status (0: Idle. 1: Streaming. 2: Banned. 3: Recording).
type int The Channel type. 0: RTMP, 1: HLS, and 2: HTTP.
uid Long Invalid field. Ignore the parameter.
needRecord int Turn on or off recording. 0: off, 1: on.
format int 1: FLV, 0: MP4.
duration int The length of recording segments in minutes. The default value is 120.
filename String The file name of video segments.
msg String The error message.

Example

curl request example

curl -X POST -H "Content-Type: application/json" -H "AppKey: 29781bbc4db54742a3ebcxxxxxxxxxxx" -H "Nonce: 12345" -H "CurTime: 1469171950571" -H "CheckSum: 4ba6ca70c685eb900917e423eadaxxxxxxxxxxxxx" -d '{"records":10, "pnum":1, "ofield": "ctime", "sort": 0}' https://vcloud.163.com/app/channellist

Sample response

//Response format.
"Content-Type": "application/json; charset=utf-8"
{
    "code" : XXX,
    "msg" : XXX,
    "ret" : {
        "list" : [
            {
                "ctime" : XXX,
                "cid" : XXX,
                "name" : XXX,
                "status" : XXX,
                "uid" : XXX,
                "needRecord" : XXX,
                "format" : XXX,
                "duration" : XXX,
                "filename" : XXX
            },

            {
                "ctime" : XXX,
                "cid" : XXX,
                "name" : XXX,
                "status" : XXX,
                "uid" : XXX,
                "needRecord" : XXX,
                "format" : XXX,
                "duration" : XXX,
                "filename" : XXX
            },

            ...

        ]
    }
}

//Success sample response.
"Content-Type": "application/json; charset=utf-8"        
{
    "ret":{
        "pnum":1,
        "list":[
            {
                "needRecord":0,
                "uid":10001,
                "duration":120,
                "status":0,
                "name":"channel_name",
                "filename":"channel_name",
                "format":1,
                "type":0,
                "ctime":1469411598850,
                "cid":"cidxxxxxxxxx"
            },
            {
                "needRecord":0,
                "uid":10001,
                "duration":120,
                "status":0,
                "name":"11111",
                "filename":"11111",
                "format":1,
                "type":0,
                "ctime":1458701553160,
                "cid":"614a2eb9741f46658f400e681e9bdee0"
            }
        ],
        ...
    },
    "code":200
}

Response status codes

Status code Description
200 The operation was successful.
409 Authentication failed.
602 The query failed.
607 The user does not exist.
613 CheckSum was unspecified.
614 AppKey is empty.
615 CurTime is empty.
618 The data information does not exist.
631 Invalid request parameter.
638 The API throttling exceeds the upper limit. The API of each application can be called up to 500 times per second.

Retrieve the URLs for stream push and stream pull

The API is used to retrieve the URLs for stream push and stream pull when the URLs becomes invalid.

URL

POST https://vcloud.163.com/app/address HTTP/1.1
Content-Type: application/json;charset=utf-8

Request parameters

Parameter Type Required Description
cid String Yes The channel ID that contains 32 characters in length.

Response parameters

Parameter Type Description
code int The status code.
pushUrl String URL of the stream push input.
httpPullUrl String URL for HTTP streaming pull output.
hlsPullUrl String URL for HLS streaming pull output.
rtmpPullUrl String URL for RTMP streaming pull output.
rtsPullUrl String URL for NERTC streaming pull output. The URL is returned after the low-latency live streaming service is activated.
msg String The error message

Example

curl request example

curl -X POST -H "Content-Type: application/json" -H "AppKey: 29781bbc4db54742a3ebcxxxxxxxxxxx" -H "Nonce: 12345" -H "CurTime: 1469171950571" -H "CheckSum: 4ba6ca70c685eb900917e423eadaxxxxxxxxxxxxx" -d '{"cid":"cidxxxxxxxxx"}' https://vcloud.163.com/app/address

Sample response

//Response format.
"Content-Type": "application/json; charset=utf-8"
{
    "code" : XXX,
    "msg" : XXX,
    "ret" : {
        "pushUrl" : XXX,
        "httpPullUrl" : XXX,
        "hlsPullUrl" : XXX,
        "rtmpPullUrl" : XXX,
        "rtsPullUrl" : XXX
    }
}

//Success sample response.
"Content-Type": "application/json; charset=utf-8"
{
    "ret":{
        "httpPullUrl":"http://v1.live.126.net/live/cidxxxxxxxxx.flv",
        "hlsPullUrl":"http://pullhls1.live.126.net/live/cidxxxxxxxxx/playlist.m3u8",
        "rtmpPullUrl":"rtmp://v1.live.126.net/live/cidxxxxxxxxx",
        "rtsPullUrl":"nertc://v1.live.126.net/live/cidxxxxxxxxx",
        "name":"channel_name",
        "pushUrl":"rtmp://p1.live.126.net/live/cidxxxxxxxxx?wsSecret=582e02209271e6bf7fc762e68a7c51cc&wsTime=1469416637"
    },
    "code":200
}

Response status codes

Status code Description
200 The operation was successful.
409 Authentication failed.
602 Query failed: Failed to get the streaming URLs.
607 The user does not exist.
609 The channel ID is empty.
613 CheckSum was unspecified.
614 AppKey is empty.
615 CurTime is empty.
617 The channel information does not match the current user.
638 The API throttling exceeds the upper limit. A specific API of each application can be called 80 times per second.
Was this page helpful?
Yes
No
  • Create a channel
  • URL
  • Request parameters
  • Response parameters
  • Example
  • curl request example
  • Example of API call using JAVA
  • Sample response
  • Response status codes
  • Modify the live channel information
  • URL
  • Request parameters
  • Response parameters
  • Example
  • curl request example
  • Sample response
  • Response status codes
  • Delete a channel
  • URL
  • Request parameters
  • Request parameters
  • Response parameters
  • Example
  • curl request example
  • Sample response
  • Response status codes
  • Suspend a channel
  • URL
  • Request parameters
  • Response parameters
  • Example
  • curl request example
  • Sample response
  • Response status codes
  • Suspend multiple channels
  • Request parameters
  • Request parameters
  • Response parameters
  • Example
  • curl request example
  • Sample response
  • Response status codes
  • Restore a channel
  • URL
  • Request parameters
  • Response parameters
  • Example
  • curl request example
  • Sample response
  • Response status codes
  • Restore multiple channels
  • URL
  • Request parameters
  • Response parameters
  • Example
  • curl request example
  • Sample response
  • Response status codes
  • Get the list of recorded video files
  • URL
  • Request parameters
  • Response parameters
  • Example
  • curl request example
  • Sample response
  • Response status codes
  • Get the channel status
  • URL
  • Request parameters
  • Response parameters
  • Example
  • curl request example
  • Sample response
  • Response status codes
  • Get the channel list
  • URL
  • Request parameters
  • Response parameters
  • Example
  • curl request example
  • Sample response
  • Response status codes
  • Retrieve the URLs for stream push and stream pull
  • URL
  • Request parameters
  • Response parameters
  • Example
  • curl request example
  • Sample response
  • Response status codes