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

Restore a Designated Recycle Bin Project

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2026-01-07 14:27:56

Description

Restore designated recycle bin items.
Note:
Required permissions: admin, space_admin, or restore_recycled. For details about permissions, refer to the Generate Access Token API.
Ensure the directory where the item is located exists before restoring it.

Request

Request Example

POST /api/v1/recycled/{LibraryId}/{SpaceId}/{RecycledItemId}?restore&conflict_resolution_strategy={ConflictResolutionStrategy}&access_token={AccessToken}&user_id={UserId}&restore_path_strategy={RestorePathStrategy}

Request Parameter

Request parameters.
Description
Type
Required or Not
LibraryId
Media Library ID, obtained after creating a media library in the media hosting console. See Create Media Library
String
Yes
SpaceId
Space ID. If the media library is in single-tenant mode, this parameter is fixed as hyphen (`-`); if the media library is in multi-tenant mode, you must specify this parameter. For retrieval, see Create Tenant Space
String
No
RecycledItemId
Recycle bin project ID. For retrieval, see List Recycle Bin Projects
String
Yes
ConflictResolutionStrategy
Handling method for filename conflict, defaults to rename
ask: Returns HTTP 409 Conflict and SameNameDirectoryOrFileExists error code when conflicts with
rename: Automatically rename file when conflicts with
overwrite:
If the target is a directory or album, it defaults to ask and does not support overwrite
If the target is a file, overwrite the existing file
When a file exists in the target space with an earlier version, moving to overwrite is not supported.
String
No
AccessToken
Access token, see Generate Access Token
String
Yes
UserId
User identity recognition, when the access token has admin privileges and the user identity recognition during token application is empty, is used to temporarily specify user identity. For details, see Generate Access Token API
String
No
RestorePathStrategy
Restoration project source path processing method
originalPath: Restore to original path, error will be reported if original path does not exist
fallbackToRoot: Restore to original path, restore to root directory if original path does not exist
By default: originalPath
String
No

Request Body

This request does not have a request body.

Response

Response code

Recovery successful, return HTTP 200 OK.

Response Body

application/json
Response body example:
{ "path": [ "foo", "bar", "file (1).docx" ] }
Response body field description:
Response Parameters
Description
Type
path
The final file path
String Array

Error Codes

This request operation has no special error messages. For common error messages, see Error Codes.

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백