Updates the version information. You can call this operation to permanently retain a version or modify the description of a version. You can permanently retain up to 50 versions of a file.
Debugging
Authorization information
Request syntax
POST /v2/file/revision/update HTTP/1.1
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| body | object | No | The request parameters. | |
| drive_id | string | Yes | The drive ID. | 1 |
| file_id | string | Yes | The file ID. | 9520943DC264 |
| revision_id | string | Yes | The version ID. | 40CB7794C929 |
| keep_forever | boolean | No | Specifies whether to permanently retain a version. By default, this parameter is not specified, which indicates that you do not modify the permanent retention configuration of the version. | true |
| revision_description | string | No | The description of the version. The description can be up to 1,024 characters in length. By default, this parameter is not specified, which indicates that you do not modify the description of the version. | aaa |
Response parameters
Examples
Sample success responses
JSONformat
{
"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": 3574582125365864400,
"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",
"creator_type": "",
"creator_id": "",
"creator_name": ""
}Error codes
For a list of error codes, visit the Service error codes.
