logo
Video Call
Server API
Stream Mixing and Transcoding APIs
On this page

DeleteMedia

GET

https://rtc-api.zego.im/

When users perform CDN recording, they will store the recorded media files on CDN servers, and users can call this interface to delete the file.

Warning
Before using this interface for the first time, please confirm whether CDN recording service has been activated. If not, please go to the ZEGOCLOUD Console to activate it yourself, for details, please refer to Console - Service Configuration - CDN, or contact ZEGOCLOUD Technical Support to activate it.

Call frequency limit
All rooms under the same AppID are limited to 20 times/second

Request

Query Parameters

    Action stringrequired

    Possible values: [DeleteMedia]

    Interface prototype parameters

    https://rtc-api.zego.im?Action=DeleteMedia

    AppId uint32required

    💡Public parameter. Application ID, assigned by ZEGOCLOUD. Get it from the ZEGOCLOUD Admin Console.

    SignatureNonce stringrequired

    💡Common parameter. A 16-character hexadecimal random string (hex-encoded 8-byte random number). For the generation algorithm, refer to the signature example.

    Timestamp int64required

    💡Common parameter. Current Unix timestamp in seconds. For the generation algorithm, refer to the signature example. A maximum deviation of 10 minutes is allowed.

    Signature stringrequired

    💡Common parameter. Signature used to verify the legitimacy of the request. Please refer to the signature mechanism to generate it.

    SignatureVersion stringrequired

    Possible values: [2.0]

    Default value: 2.0

    💡Public parameter. Signature version number.

    Vendor stringrequired

    Possible values: [Tencent, Ws, Huawei]

    Possible values and corresponding CDN vendors:

    Tencent: Tencent Cloud. Ws: Wangsu. Huawei: Huawei Cloud.
    FileId string[]required

    Possible values: >= 1, <= 100

    Unique file identifier returned in the recording file generation callback , supporting up to 100 media file FileIds.

    Please note that the unique identifiers for recording files are different for each CDN vendor:

    • Tencent Cloud: FileID.
    • Wangsu: PersistentId.
    • Huawei Cloud: ObsObject.

    You can also obtain the unique identifier of the media file through the search media interface, and the parameter names corresponding to the identifiers are different, please pay attention to distinguish them.

    Example: &FileId[]=5285890813221514958&FileId[]=5285890813221513290

    ClearCache boolean

    Whether to delete the cache on CDN nodes when deleting files.

    Note:

    Only supports Wangsu, cache deletion only applies to successfully deleted files, cache will only be deleted after the file deletion is successful.

Responses

Success
Schema
    Code int32

    Return codes.
    Only the return codes related to interface business logic are listed here. For the complete return codes, please refer to Global Return Codes.

    Return CodeDescriptionSolution
    0Request successful.-
    2Input parameter error.-
    3Related permissions not activated.Please contact ZEGOCLOUD Technical Support.
    4CDN type mismatch.Please check the parameters.
    5Configuration error.Please contact ZEGOCLOUD Technical Support.
    6Request too frequent.Please try again later.
    7Authentication failed.Please check if the authentication parameters are correct.
    1000Request failed.Please contact ZEGOCLOUD Technical Support.
    Message string

    Operation result description.

    RequestId string

    Request ID returned by ZEGOCLOUD server.

    Data object
    Response data, generated by JSON serialization of the following parameters.
    Deleted string[]

    List of successfully deleted files.

    Errors object[]
    List of files that failed to be deleted.
  • Array[
  • Code string

    Error code for failed file deletion.

    Message string

    Error message for failed file deletion.

    Key string

    Unique identifier of the file that failed to be deleted.

    RequestId string

    Unique request ID returned by the CDN vendor corresponding to the Vendor parameter value in the request

  • ]
  • WsItemIdReceiverResp object
    Result of file cache deletion.
    Code int32

    Response code.

    • 1: Delete file cache.
    • Not 1: Delete file cache failed.
    Message string

    Response message. Description of the result of file cache deletion.

Previous

SearchMedia

Next

Merge Media Files

On this page

Back to top