tencent cloud

Smart Media Hosting

Product Introduction
Product Overview
Feature Description
Product Strengths
Use Cases
Basic Concept
Purchase Guide
Quick Start
Create Media Library
Initiate request
Service Level API Document
History
Introduction
API Category
Making API Requests
PaaS Service APIs
Official Cloud Disk APIs
Data Types
Error Codes
Business Level API Document
Introduction
Access Token Operation API
Tenant Space Operation API
File Operation API
Directory or Album Operation API
Recycle Bin Operation API
Quota Operation API
Query Task Operation API
Search Operation API
Historical Version Operations API
Directory and File Batch Operation API
Collection Operation API
Error Codes
SDK Documentation
Android SDK
iOS SDK
HarmonyOS SDK
FAQs
Enterprise Network Disk
Product Introduction
Purchase Guide
Quick Start
FAQs
Service Level Agreement
Glossary

Restoring Files From Recycle Bin

PDF
フォーカスモード
フォントサイズ
最終更新日: 2026-01-07 11:03:11

Introduction

This document provides an API overview about recycle bin item deletion and SDK sample code.
API
Operation Description
Restore recycle bin item
Batch recover recycle bin items

Restoring a Project From Recycle Bin

Feature Overview

Restore recycle bin items.

Example Code

try {
//final file path
val path: String? = smh.restoreRecycledItem(
// Recycle bin file ID
itemId = 123456
)
} catch (e: Exception) {
e.printStackTrace()
}

Batch Recovering Projects From Recycle Bin

Feature Overview

For batch recovery of recycle bin items.
Execution successful When replicating projects asynchronously, return HTTP 202 Accepted; When replicating projects synchronously, return HTTP 200 OK (all execution successful) or HTTP 207 Multi-Status (part or all execution failed);

Example Code

Batch recovery starts
try {
// Return batch operation result
//If it is immediate return: just obtain the result content directly from batchResponse.result
//If it is asynchronous return: need to call the Query Task API to obtain the result content (generally poll the query task until the task result is queried)
val batchResponse: BatchResponse = smh.restoreRecycledItems(
// Recycle bin file id list
itemIds = listOf(123456, 123459)
)
} catch (e: Exception) {
e.printStackTrace()
}
Query job Refer to asynchronous processing for detailed usage.

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック