Deletes snapshot files.

Usage note

You can delete only snapshots that are captured within one year.

QPS limit

You can call this operation up to 30 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. This may affect your business. We recommend that you take note of the limit when you call this operation. For more information, 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

Parameter Type Required Example Description
Action String Yes DeleteSnapshotFiles

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

RegionId String No cn-shanghai

The region where the domain resides.

CreateTimestampList.N Long Yes 1653641526637

The timestamps when the snapshots to be deleted were created. Unit: milliseconds.

You can obtain the timestamp of a snapshot from the CreateTimestamp parameter in the response of the DescribeLiveStreamSnapshotInfo operation.

DomainName String Yes example.com

The name of the main streaming domain.

AppName String Yes liveApp****

The name of the application to which the live stream belongs.

StreamName String Yes liveStream****

The name of the live stream.

RemoveFile Boolean Yes true

Specifies whether to delete the corresponding file in Object Storage Service (OSS) synchronously. Value values:

  • true: The corresponding file in OSS is deleted.
  • false: The corresponding file in OSS is not deleted.

Response parameters

Parameter Type Example Description
FailureCount Integer 1

The number of snapshots that failed to be deleted.

RequestId String 90F60327-ABEC-5A93-BF1F-****

The ID of the request.

SuccessCount Integer 1

The number of snapshots that have been deleted.

SnapshotDeleteInfoList Array of SnapshotDeleteInfo
SnapshotDeleteInfo
Message String OK

The processing result of a screenshot. Valid values:

  • OK: The snapshot has been deleted.
  • FileNotFound: The snapshot file failed to be found.
CreateTimestamp Long 1653641526637

The timestamp when the snapshot to be deleted was created. Unit: milliseconds.

Examples

Sample requests

http(s)://live.aliyuncs.com/?Action=DeleteSnapshotFiles
&AppName=liveApp****
&CreateTimestampList.1=1653641526637
&DomainName=example.com
&RemoveFile=true
&StreamName=liveStream****
&<Common request parameters>

Sample responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DeleteSnapshotFilesResponse>
<FailureCount>1</FailureCount>
<SnapshotDeleteInfoList>
    <SnapshotDeleteInfo>
        <Message>OK</Message>
        <CreateTimestamp>1653641526637</CreateTimestamp>
    </SnapshotDeleteInfo>
    <SnapshotDeleteInfo>
        <Message>Not Found</Message>
        <CreateTimestamp>1656936778524</CreateTimestamp>
    </SnapshotDeleteInfo>
</SnapshotDeleteInfoList>
<RequestId>90F60327-ABEC-5A93-BF1F-****</RequestId>
<SuccessCount>1</SuccessCount>
</DeleteSnapshotFilesResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "FailureCount" : 1,
  "SnapshotDeleteInfoList" : {
    "SnapshotDeleteInfo" : [ {
      "Message" : "OK",
      "CreateTimestamp" : 1653641526637
    }, {
      "Message" : "Not Found",
      "CreateTimestamp" : 1656936778524
    } ]
  },
  "RequestId" : "90F60327-ABEC-5A93-BF1F-****",
  "SuccessCount" : 1
}

Error codes

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

HttpCode

Error code

Error message

Description

400

InvalidParams

invalid JSON

The request failed to be parsed.

400

Cannot find task

Stream not found

Check the snapshot configurations about the domain name, application, stream, and stream ingestion.

400

InvalidParams

Invalid request: missing

The required parameters are missing.

403

OSSAccessDenied

OSS bucket not authorised

You do not have the permission on the OSS bucket where the snapshot file is stored.

500

InternalError

Server internal error

Check the snapshot configurations about the domain name, application, stream, and stream ingestion.