Creates a stream pulling configuration for a live stream.
Usage notes
- Stream pulling refers to the process of pulling live streams from third-party streaming URLs to a live center of ApsaraVideo Live for CDN acceleration.
- You can call this operation only for regular stream pulling. That is, you can specify the start time and end time to pull live streams.
- Regular stream pulling and triggered stream pulling are supported in the ApsaraVideo Live console. For more information, see Configure stream pulling.
QPS limit
You can call this operation up to 15 times per second per account. Requests that exceed this limit are dropped and you will experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limits.
Debugging
Request parameters
Parameter |
Type |
Required |
Example |
Description |
Action | String | Yes | AddLivePullStreamInfoConfig | The operation that you want to perform. Set the value to AddLivePullStreamInfoConfig. |
DomainName | String | Yes | example.com | The domain name used for stream pulling. It is the main streaming domain. |
AppName | String | Yes | liveApp**** | The custom name of the application to which the live stream belongs. |
StreamName | String | Yes | liveStream**** | The custom name of the live stream. |
SourceUrl | String | Yes | rtmp://guide.aliyundoc.com/liveApp****/liveStream****;rtmp://developer.aliyundoc.com/liveApp****/liveStream**** | The complete URL of the origin server of the live stream. You can specify multiple URLs by separating them with semicolons (;). Note You can pull only live streams in the Real-Time Messaging Protocol (RTMP), Flash Video (FLV), HTTP Live Streaming (HLS), and Secure Reliable Transport (SRT) formats. |
StartTime | String | Yes | 2017-12-21T08:00:00Z | The time when stream pulling starts. The time range specified by the StartTime and EndTime parameters cannot exceed 7 days. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. |
EndTime | String | Yes | 2017-12-22T08:00:00Z | The time when stream pulling ends. The time range specified by the StartTime and EndTime parameters cannot exceed 7 days. The time specified by the EndTime parameter must be later than the current time. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. |
Response parameters
Parameter |
Type |
Example |
Description |
RequestId | String | 16A96B9A-F203-4EC5-8E43-CB92E68F4CF8 | The request ID. |
Examples
Sample requests
http(s)://live.aliyuncs.com/?Action=AddLivePullStreamInfoConfig
&AppName=liveApp****
&DomainName=example.com
&EndTime=2017-12-22T08:00:00Z
&StartTime=2017-12-21T08:00:00Z
&SourceUrl=rtmp://guide.aliyundoc.com/liveApp****/liveStream****;rtmp://developer.aliyundoc.com/liveApp****/liveStream****
&StreamName=liveStream****
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<AddLivePullStreamInfoConfigResponse>
<RequestId>16A96B9A-F203-4EC5-8E43-CB92E68F4CF8</RequestId>
</AddLivePullStreamInfoConfigResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "16A96B9A-F203-4EC5-8E43-CB92E68F4CF8"
}
Error codes
HttpCode |
Error code |
Error message |
Description |
400 | InvalidStartTime.Malformed | Specified StartTime is malformed. | The format of the start time is invalid. Check whether the value of the StartTime parameter is valid. |
400 | InvalidEndTime.Malformed | Specified EndTime is malformed. | The format of the end time is invalid. Check whether the value of the EndTime parameter is valid. |
400 | ConfigAlreadyExists | Config has already exist. | The configuration already exists. |
For a list of error codes, see Service error codes.