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 the live center of ApsaraVideo Live for content delivery network (CDN) acceleration.
- You can call this operation 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.
Limits on QPS
You can call this operation up to 15 times per second. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. For more information, see QPS limit on an API operation in ApsaraVideo Live.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | AddLivePullStreamInfoConfig |
The operation that you want to perform. Set the value to AddLivePullStreamInfoConfig. |
AppName | String | Yes | liveApp**** |
The name of the application to which the live stream belongs. |
DomainName | String | Yes | example.com |
The domain name used in stream pulling. It is the main streaming domain. |
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 seven 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. |
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 seven days. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. |
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. Separate them with semicolons (;). Note You can pull only live streams in the RTMP, HLS, FLV, and SRT formats.
|
StreamName | String | Yes | liveStream**** |
The name of the live stream. |
RegionId | String | No | cn-shanghai |
The ID of the region. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 16A96B9A-F203-4EC5-8E43-CB92E68F4CF8 |
The ID of the request. |
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
<AddLivePullStreamInfoConfigResponse>
<RequestId>16A96B9A-F203-4EC5-8E43-CB92E68F4CF8</RequestId>
</AddLivePullStreamInfoConfigResponse>
JSON
format
{
"AddLivePullStreamInfoConfigResponse": {
"RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CF8"
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidStartTime.Malformed | Specified StartTime is malformed. | The error message returned because the format of the start time is invalid. Check whether the value of the StartTime parameter is correct. |
400 | InvalidEndTime.Malformed | Specified EndTime is malformed. | The error message returned because the format of the end time is invalid. Check whether the value of the EndTime parameter is correct. |
400 | ConfigAlreadyExists | Config has already exist. | The error message returned because an existing stream pulling configuration is found. |
For a list of error codes, visit the API Error Center.