All Products
Search
Document Center

Drive and Photo Service:RestoreRevision

Last Updated:May 26, 2026

Restores a historical revision of a file, making it the latest revision. This action creates a new revision, and the original historical revision remains unchanged. You cannot restore the latest revision.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST /v2/file/revision/restore HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

domain_id

string

Yes

The ID of the domain.

body

object

No

The request body.

drive_id

string

Yes

The ID of the drive.

1

file_id

string

Yes

The ID of the file.

9520943DC264

revision_id

string

Yes

The ID of the revision.

40CB7794C929

Response elements

Element

Type

Description

Example

Revision

The revision information.

Examples

Success response

JSON format

{
  "domain_id": "bj1",
  "drive_id": "1",
  "file_id": "9520943DC264",
  "revision_id": "40CB7794C929",
  "revision_name": "1.mov",
  "revision_version": 1,
  "size": 1024,
  "file_extension": "mov",
  "created_at": "2019-08-20T06:51:27.292Z",
  "updated_at": "2019-08-20T06:51:27.292Z",
  "keep_forever": false,
  "revision_description": "aaa",
  "is_latest_version": false,
  "crc64_hash": "3574582125365864471",
  "content_hash": "EA4942AA8761213890A5C386F88E6464D2C31CA3",
  "content_hash_name": "sha1",
  "thumbnail": "https://data.aliyunpds.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx\n",
  "url": "https://data.aliyunpds.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx\n",
  "download_url": "https://data.aliyunpds.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx\n"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.