Adds a configuration of live center stream relay.

QPS limit

You can call this operation up to 100 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 limit on an API operation in ApsaraVideo Live.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes AddLiveCenterTransfer

The operation that you want to perform. Set the value to AddLiveCenterTransfer.

DomainName String Yes example.com

The streaming domain.

AppName String Yes testapp

The name of the application to which the live stream belongs. The value of this parameter must be the same as the application name for the live stream that you want to relay. Otherwise, the configuration does not take effect.

StreamName String Yes teststream

The name of the live stream.

DstUrl String Yes rtmp://push.example2.aliyunlive.com/testapp1/teststream2

The third-party URL to which the live stream is relayed. You can add only one URL.

Note The protocol that the URL uses must be the same as the protocol of the live stream. Only URLs over RTMP and SRT are supported.
TransferArgs String Yes always

The validity period of stream relay. Valid values:

  • always: The stream can always be relayed.
  • time: The stream can be relayed in a specified time period.
Note If the value is time, StartTime and EndTime are required.
StartTime String No 2017-12-21T10:00:00Z

The start time of stream relay.

Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

EndTime String No 2017-12-22T08:00:00Z

The end time of stream relay. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

Note The end time must be later than the start time.

Response parameters

Parameter Type Example Description
RequestId String 7908F2FF-44F8-120F-9FD6-85AE4B6C19EC

The ID of the request.

Examples

Sample request

http(s)://live.aliyuncs.com/?Action=AddLiveCenterTransfer
&DomainName=example.com
&AppName=testapp
&StreamName=teststream
&DstUrl=rtmp://push.example2.aliyunlive.com/testapp1/teststream2
&TransferArgs=always
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<AddLiveCenterTransferResponse>
    <RequestId>7908F2FF-44F8-120F-9FD6-85AE4B6C19EC</RequestId>
</AddLiveCenterTransferResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "7908F2FF-44F8-120F-9FD6-85AE4B6C19EC"
}

Error codes

HttpCode Error code Error message Description
400 ConfigAlreadyExists Config has already exist. The error message returned because the configuration already exists.

For a list of error codes, visit the API Error Center.