logo
On this page

Query the recording task list


Description

Queries the list of ongoing and completed recording tasks.

Request method and endpoint

  • Request method: POST
  • Request URL: https://cloudrecord-api.zego.im/?Action=DescribeTasks
  • Transmission protocol: HTTPS
  • Rate limit: 10 requests/second

Request parameters

Listed below are the parameters specific to this request. For the list of common request parameters, see Accessing Server APIs - Common parameters.

ParameterTypeRequiredDescription
StatusIntYes
  • 2: ongoing recording task
  • 3: completed recording task
RoomIdStringNoID of the room whose recording task needs to be queried. If this parameter is not set, recording tasks of all rooms under the AppId will be queried.
PageOffsetIntNoPage number when the pagination query mode is used. The value starts from 1. If this parameter is not set or set to 0, the value 1 is used by default.
PageSizeIntNoNumber of records on each page when the pagination query mode is used. The value must be greater than 0 and less than or equal to 50. If this parameter is not set, the value 50 is used by default.
StartTimeInt64YesQuery start time, in ms. The value is a Unix timestamp and can't be earlier than 3 days before the current time.
EndTimeInt64YesQuery end time, in ms. The value is a Unix timestamp and must be later than the time specified by StartTime. The query time range can't exceed 3 days and the method will return only the records found within this time range.

Sample request

  • Request URL
    Untitled
    https://cloudrecord-api.zego.im/?Action=DescribeTasks
    &AppId=1234567890
    &SignatureNonce=15215528852396
    &Timestamp=1234567890
    &Signature=7a2c0f11145fb760d607a07b54825013
    &SignatureVersion=2.0
    
    1
    Copied!
  • Request message body
    Untitled
    {
        "Status":2,
        "RoomId":"1230",
        "StartTime": 1628474401000,
        "EndTime": 1628475402000,
        "PageOffset": 1,
        "PageSize": 50
    }
    
    1
    Copied!

Response parameters

ParameterTypeDescription
CodeInt64Return code.
MessageStringDescription of the request execution result.
RequestIdStringRequest ID.
DataObjectResponse object.
└PageOffsetIntPage number when the pagination query mode is used.
└PageSizeIntNumber of records on each page when the pagination query mode is used.
└TotalCountIntTotal number of query results.
└TaskListJSON ArrayFor details, see TaskList member parameters.

TaskList

ParameterTypeDescription
RecordBeginTimestampInt64Recording start timestamp.
TaskIdStringRecording task ID.
RoomIdStringRoom ID.
StatusIntRecording status.
  • 1: initialized
  • 2: ongoing
  • 3: completed
  • 4: ended abnormally
  • 5: paused

Sample response

Untitled
{
    "Code": 0,
    "Message": "succeed",
    "RequestId": "abcd123",
    "Data": {
        "PageOffset": 1,
        "PageSize": 50,
        "TotalCount": 3,
        "TaskidList": [
            {
                "RecordBeginTimestamp": 1628565227899,
                "TaskId": "YRHu6-E4IyvEAAAD",
                "RoomId": "1000",
                "Status": 2
            },
            {
                "RecordBeginTimestamp": 1628565226303,
                "TaskId": "YRHu6uE4IyvEAAAC",
                "RoomId": "1000",
                "Status": 2
            },
            {
                "RecordBeginTimestamp": 1628565222498,
                "TaskId": "YRHu5uE4IyvEAAAB",
                "RoomId": "1000",
                "Status": 2
            }
        ]
    }
}
1
Copied!

Previous

Query recording status

Next

Pause recording