All Products
Search
Document Center

ApsaraVideo Live:CreateLiveStreamMonitor

Last Updated:Jan 20, 2026

Creates a monitoring session.

Operation description

Call this operation to create a monitoring session. Ensure that the required parameters are configured.

QPS limit

The queries per second (QPS) limit for a single user is 10 calls per second. If you exceed the limit, your API calls are throttled. This may affect your business. Plan your API calls accordingly.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

live:CreateLiveStreamMonitor

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID.

cn-shanghai

MonitorName

string

Yes

The name of the monitoring session.

liveMonitor****

OutputTemplate

string

Yes

The output template for the monitoring session. Valid values:

  • lp_ld: low definition.

  • lp_sd: standard definition.

  • lp_hd: high definition.

  • lp_ud: ultra-high definition.

lp_ud

Domain

string

Yes

The domain name to monitor.

demo.aliyundoc.com

App

string

No

The application name for the output stream of the monitoring session. You can specify a custom name. If you do not specify this parameter, monitor is used as the application name.

monitor****

Stream

string

No

The name of the output stream for the monitoring session. If you do not specify this parameter, the system generates a random name.

monitorStream****

InputList

string

Yes

The list of input streams to monitor. For more information, see the InputConfig table below.

InputConfig

MonitorConfig

string

No

The alert threshold settings for monitoring. The value must be a JSON string. For more information, see the MonitorConfig table below.

"{\"fpsLowThres\": 0.6,\"brLowThres\": 1.1,\"eofDurationThresSec\": 10}"

CallbackUrl

string

No

The webhook address. HTTP and HTTPS are supported.

http://guide.aliyundoc.com/notify

DingTalkWebHookUrl

string

No

The webhook URL of the DingTalk chatbot. To receive alert notifications, configure a DingTalk chatbot and enter its webhook URL, which can be in HTTP or HTTPS format. For more information, see Custom robot access.

Note

Set the custom keyword for the DingTalk chatbot to "Alerting". Otherwise, you cannot receive messages.

https://oapi.dingtalk.com/robot/send?access_token=7a7d404056eee1f2fd944ace9bcfc361dc6448583e1d3d3baa****

InputConfig

NameTypeDescriptionExample value
IndexIntegerThe index. This parameter is used by the frontend.1
LayoutIdIntegerThe layout ID. The value must start from 1.1
StreamNameStringThe display name of the monitored stream.monitorStream****
InputUrlStringThe URL of the input stream.demo.aliyundoc.com
LayoutConfigLayoutConfigThe layout settings.See the LayoutConfig table below.
PlayConfigPlayConfigThe playback configuration.See the PlayConfig table below.

LayoutConfig

NameTypeDescriptionExample value
FillModeStringThe fill mode. Set this parameter to `none` for the frontend.none
PositionReferStringThe reference point for the element's position. Valid values: `topLeft` (top-left), `topRight` (top-right), `bottomLeft` (bottom-left), and `bottomRight` (bottom-right).topLeft
PositionNormalizedFloatThe normalized position of the layer's padding area, in the `[x,y]` format. The values of x and y range from 0 to 1. For example, `[0.1,0.1]` indicates a horizontal offset of 10% and a vertical offset of 10% from the top-left corner.[0.1, 0.1]
SizeNormalizedFloatThe normalized size of the layer, in the `[w,h]` format. The values of w and h range from 0 to 1. Both width and height are normalized. For example, `[0.2,0.3]` indicates a width of 20% and a height of 30%.[0.2, 0.3]

PlayConfig

NameTypeDescriptionExample value
VolumeRateFloatThe volume. The value can be from 0 to 1, accurate to two decimal places.0.50

MonitorConfig

NameTypeDescriptionExample value
fpsLowThresFloatThe alert threshold for the video frame rate. This threshold is a coefficient. The value can be from (0.0, 1.0]. The default value is 0.7. An alert is triggered if the video frame rate of the monitored stream is less than (the alert threshold × the original frame rate of the live stream).0.7
brHighThresFloatThe alert threshold for the audio and video bitrate. This threshold is a coefficient. The value can be from (0.0, 100]. The default value is 1.0. An alert is triggered if the audio and video bitrate of the monitored stream is greater than (the alert threshold × the original bitrate of the live stream).1.0
eofDurationThresSecFloatThe threshold for the duration of a stream interruption before an alert is triggered. Unit: seconds. The value can be from (0, 65535]. The default value is 0. - After a stream is interrupted, the connection remains active. The system uses an internal packet-receiving timeout of 5 seconds to detect the interruption. If you set this parameter to a value less than or equal to 5 seconds, the actual detection time is 5 seconds. If you set this parameter to a value greater than 5 seconds, the actual detection time is the value you set. The first 5 seconds of this period are for the internal timeout, and the rest is the time the system waits for the stream to recover. - If the stream recovers before the timeout period ends, no alert is triggered. If you change the monitoring address before the stream times out, the system stops detecting timeouts and triggering alerts for the previous stream.10

Response elements

Element

Type

Description

Example

object

MonitorId

string

The ID of the monitoring session.

445409ec-7eaa-461d-8f29-4bec2eb9****

RequestId

string

The request ID.

5c6a2a0d-f228-4a64-af62-20e91b96****

Examples

Success response

JSON format

{
  "MonitorId": "445409ec-7eaa-461d-8f29-4bec2eb9****",
  "RequestId": "5c6a2a0d-f228-4a64-af62-20e91b96****"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameter.Malformed There are invalid parameters: %s. There are invalid parameters: %s.
400 InvalidUserId.Malformed %s, please check userId. The userId passed in is invalid, please check.
400 MissingParameter %s. Missing parameter
400 StreamMonitorExist %s, please check and try again later. The monitoring room already exists, please check and try again.
401 IllegalOperation %s, please check and try again later. Operation not allowed, please check and try again.
500 InternalError %s, please try again later. Internal error, please try again later.
404 InvalidDomainName.NotFound %s, please check and try again later. Domain name does not exist, please check and try again.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.