Creates a recording callback configuration for a streaming domain.

Usage note

Check the live recording callback configuration before calling this interface to add the domain-level recording callback configuration. To query live recording callback configuration, see DescribeLiveRecordNotifyConfig

QPS limit

A single user can perform a maximum of 30 queries per second (QPS). Throttling is triggered when the number of calls per second exceeds the QPS limit. The throttling may affect your business. Thus, we recommend that you observe the QPS limit on this operation. For more information about what a single user means and the QPS details, 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

ParameterTypeRequiredExampleDescription
ActionStringYesAddLiveRecordNotifyConfig

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

DomainNameStringYesexample.com

The main streaming domain.

NotifyUrlStringYeshttp://demo.aliyundoc.com/examplecallback.action

The callback URL that is used to receive notifications about recording events and status.

Note The URL must start with http:// or https://. For more information, see Recording event callbacks
OnDemandUrlStringNohttp://learn.aliyundoc.com/ondemandcallback.action

The callback URL for on-demand recordings.

Note The callback URL for on-demand recordings. The URL must start with http:// or https://. For more information, see On-demand recording callbacks
NeedStatusNotifyBooleanNofalse

Specifies whether to enable callbacks for recording status. Valid values:

  • true: enables callbacks for recording status.
  • false: disables callbacks for recording status. This is the default value.

Response parameters

ParameterTypeExampleDescription
RequestIdString16A96B9A-F203-4EC5-8E43-CB92E68F4CD8

The ID of the request.

Examples

Sample requests

https://live.aliyuncs.com/?Action=AddLiveRecordNotifyConfig
&DomainName=example.com
&NotifyUrl=http://demo.aliyundoc.com/examplecallback.action
&<Common request parameters>

Sample success responses

XML format

<AddLiveRecordNotifyConfigResponse>
      <RequestId>394966CA-5940-44D7-A1C5-24211C7B07A9</RequestId>
</AddLiveRecordNotifyConfigResponse>

JSON format

{
    "RequestId": "394966CA-5940-44D7-A1C5-24211C7B07A9"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidNotifyUrl.MalformedSpecified NotifyUrl is invalid.The error message returned because the format of the callback URL is invalid. Check whether the value of the NotifyUrl parameter is correct.
400InvalidNotifyUrl.UnsafeSpecified NotifyUrl is not safe.The error message returned because the callback URL is unsafe. Check whether the value of the NotifyUrl parameter is correct.
400ConfigAlreadyExistsConfig has already exist.The error message returned because the URL that is used to receive callback notifications is added.

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