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

Set the Historical Version to the Latest Version

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-01-07 14:28:03

Description

Set the historical version to the latest version.
Note:
Required permissions: admin, space_admin, or set_history_latest. For details on permissions, see generate access token interface.

Request

Request Example

POST /api/v1/directory-history/{LibraryId}/{SpaceId}/latest-version/{HistoryId}?access_token={AccessToken}

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 a hyphen (-); if the media library is in multi-tenant mode, you must specify this parameter.
String
Yes
HistoryId
Historical version ID. See Query historical version list
String
Yes
AccessToken
Access token. See Generate access token
String
Yes

Request Body

This request does not have a request body.

Response

Response code

Setting is successful. Return HTTP 200 OK.

Response Body

application/json
{
"name": "file1.jpg",
"type": "file",
"creationTime": "2020-09-22T07:44:45.000Z",
"modificationTime": "2020-09-22T07:44:45.000Z",
"setLatestTime": "2020-09-22T07:44:45.000Z",
"contentType": "image/jpg",
"size": 1048576,
"eTag": "xxx",
"crc64": "xxx",
"previewByDoc": true,
"previewByCI": true,
"previewAsIcon":true,
"fileType": "powerpoint",
"authorityList": {
"canView": true,
"canPreview": true,
"canDownload": true,
"canPrint": true,
"canUpload": true,
"canDelete": true,
"canModify": true,
"canAuthorize": true,
"canShare": true,
"canPreviewSelf": true,
"canDownloadSelf": true
},
"authorityButtonList": {
"showViewButton": true,
"showPreviewButton": true,
"showDownloadButton": true,
"showUploadButton": true,
"showDeleteButton": true,
"showAuthorizeButton": true,
"showShareButton": true,
"showModifyButton": true,
"showMoveButton": true,
"showRenameButton": true,
"showCopyButton": true,
"showRestoreButton": true
}
}
Response body field description:
Response Parameters
Description
Type
name
File Name
String
type
File type
String
creationTime
ISO 8601 formatted date and time string indicating the creation time of the latest version file, such as 2020-10-14T10:17:57953Z
String
modificationTime
ISO 8601 formatted date and time string indicating the modification time of the latest version file, such as 2020-10-14T10:17:57953Z
String
setLatestTime
ISO 8601 formatted date and time string indicating when the file was set to the latest version, such as 2020-10-14T10:17:57953Z
String
contentType
media type
String
size
File size of the latest version
Int
eTag
eTag of the file
String
crc64
CRC64-ECMA182 check value of the file, to avoid digit accuracy issues, here in string format
String
previewByDoc
whether the file can be previewed in WPS
Boolean
previewByCI
whether the file can be previewed in Wanxiang
Boolean
previewAsIcon
whether the preview image can be used as an icon
Boolean
fileType
File type, such as Excel, PowerPoint
String
authorityList
Permission list
Array
authorityButtonList
Permission list for buttons
Array
authorityList contains the following parameters:
Response Parameters
Description
Type
canView
Whether it can be viewed
Boolean
canPreview
previewable
Boolean
canDownload
downloadable
Boolean
canPrint
printable
Boolean
canUpload
uploadable
Boolean
canDelete
Deletable or Not
Boolean
canModify
Editable
Boolean
canAuthorize
Authorizable
Boolean
canShare
shareable
Boolean
canPreviewSelf
previewable
Boolean
canDownloadSelf
downloadable
Boolean
authorityButtonList contains the following parameters:
Response Parameters
Description
Type
showViewButton
Display and view button
Boolean
showPreviewButton
Display preview button
Boolean
showDownloadButton
Display download button
Boolean
showUploadButton
Display upload button
Boolean
showDeleteButton
Display delete button
Boolean
showAuthorizeButton
Display authorization button
Boolean
showShareButton
Display share button
Boolean
showModifyButton
Display edit button
Boolean
showMoveButton
Display mobile button
Boolean
showRenameButton
Display rename button
Boolean
showCopyButton
Display copy button
Boolean
showRestoreButton
Display recovery button
Boolean

Error Codes

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

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan