All Products
Search
Document Center

:DescribeLivePullToPush

Last Updated:May 13, 2025

Queries pulled-stream relay tasks.

Operation description

  • You can call this operation to query the information about a pulled-stream relay task.
  • This operation allows you to query the configurations and status of a task with a specified ID.

QPS limit

You can call this operation up to 10 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.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
live:DescribeLivePullToPushget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
TaskIdstringYes

The task ID.

fd245384-4067-4f91-9d75-9666a6bc****
RegionstringYes

The region where the task is started. Valid values:

  • ap-southeast-1: Singapore
  • ap-southeast-5: Indonesia (Jakarta)
  • cn-beijing: China (Beijing)
  • cn-shanghai: China (Shanghai)
Enumeration Value:
  • ap-northeast-1
  • ap-southeast-1
  • ap-southeast-5
  • eu-central-1
  • me-central-1
  • cn-beijing
  • cn-shanghai
  • cn-shenzhen
  • cn-qingdao
  • preregion
cn-shanghai

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

3271ACD2-F143-1204-AFDB-9A87C131****
RetCodeinteger

The code that is returned for the request.

Note
  • 0 is returned if the request is normal.

  • For information about codes that are returned when exceptions occur, see the following Error codes table.

0
Descriptionstring

The error description.

OK
TaskIdstring

The task ID.

fd245384-4067-4f91-9d75-9666a6bc9****
TaskStatusinteger

The current status of the task.

  • 0: not started.
  • 1: running. Stream pulling and stream relay are normal.
  • 2: abnormal.
  • 3: stopped. It may be because exceptions occur during stream pulling or stream relay or you proactively call the StopLivePullToPush operation.
  • -1: exited.
1
TaskInvalidReasonstring

The reason why the task was stopped.

  • PullStreamFailed: An exception occurred while pulling the source stream. A retry is in progress.
  • PushStreamFailed: An exception occurred while ingesting the stream. A retry is in progress.
  • UnknownError: An unknown exception occurred.
Note This parameter is returned only if the task status is stopped.
UnknownError
TaskExitTimeinteger

The time when the task was exited. The value is a Unix timestamp in seconds.

Note This parameter is returned only if the task status is exited.
1724740200
TaskExitReasonstring

The reason why the task is stopped.

  • TriggerByUser: You proactively stopped the task.
  • OverEndTime: The specified end time was exceeded.
Note This parameter is returned only if the task is stopped.
TriggerByUser
CurrentOffsetinteger

The current offset for video playback.

0
CurrentFileIndexinteger

The current file index.

0
TaskInfoobject

The information about the task.

TaskIdstring

The task ID.

fd245384-4067-4f91-9d75-9666a6bc9****
TaskNamestring

The task name.

test
StartTimestring

The start time of the task. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2024-08-26T10:30:00Z
EndTimestring

The end time of the task. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2024-08-27T14:30:00Z
SourceTypestring

The type of the source stream. Valid values:

  • live: a live stream
  • vod: a list of ApsaraVideo VOD resources
  • url: a list of video resources from a third party
live
SourceProtocolstring

The protocol of the source stream.

RTMP
SourceUrlsarray

The source URLs.

SourceUrlsstring

The source URL of the stream.

rtmp://pulltest.****.aliyunlive.com/pulltest493/pulltest-w434
DstUrlstring

The destination URL to which the stream is relayed.

rtmp://pushtest.********.aliyunlive.com/pulltest493/pulltest-w434
CallbackURLstring

The HTTP callback URL.

https://callback*****.com
Offsetinteger

The offset of the position where the system starts to read the video resource. Unit: seconds. Valid values: positive numbers.

Note
  • This parameter indicates an offset from the first frame.

  • This parameter is applicable to only video resources from ApsaraVideo VOD or a third party.

2
FileIndexinteger

The file index, which indicates the sequence of the file where the playback starts.

0
RetryCountinteger

The number of retries allowed.

3
RetryIntervalinteger

The retry interval. Unit: seconds.

60
RepeatNumberinteger

The number of playbacks after the first playback is complete. Valid values:

  • 0 (default): specifies that the video list is played only once.
  • -1: specifies that the video list is played in loop mode.
  • Positive integer: specifies the number of times the video list repeats after the first playback is complete.
Note This parameter is applicable to only video resources from ApsaraVideo VOD or a third party.
0

Examples

Sample success responses

JSONformat

{
  "RequestId": "3271ACD2-F143-1204-AFDB-9A87C131****",
  "RetCode": 0,
  "Description": "OK",
  "TaskId": "fd245384-4067-4f91-9d75-9666a6bc9****",
  "TaskStatus": 1,
  "TaskInvalidReason": "UnknownError",
  "TaskExitTime": 1724740200,
  "TaskExitReason": "TriggerByUser",
  "CurrentOffset": 0,
  "CurrentFileIndex": 0,
  "TaskInfo": {
    "TaskId": "fd245384-4067-4f91-9d75-9666a6bc9****",
    "TaskName": "test",
    "StartTime": "2024-08-26T10:30:00Z",
    "EndTime": "2024-08-27T14:30:00Z",
    "SourceType": "live",
    "SourceProtocol": "RTMP",
    "SourceUrls": [
      "rtmp://pulltest.****.aliyunlive.com/pulltest493/pulltest-w434"
    ],
    "DstUrl": "rtmp://pushtest.********.aliyunlive.com/pulltest493/pulltest-w434",
    "CallbackURL": "https://callback*****.com",
    "Offset": 2,
    "FileIndex": 0,
    "RetryCount": 3,
    "RetryInterval": 60,
    "RepeatNumber": 0
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameter%s.Parameter error
400CodeInvalidAliUidThis aliuid does not have a live domain name.This aluid does not have a live domain name.
500InternalError%s.error on the live liveapi server.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2025-04-01The Error code has changed. The response structure of the API has changedView Change Details