Listing All Version Information of a Specified File
Function
List all version information of a specified file.
Authorization Information
No identity policy-based permission required for calling this API.
URI
POST /koodrive/ose/v1/revision/listRevision
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
Authorization |
Yes |
String |
Access token. Token authentication is used to call KooDrive APIs. A token indicates the permission. When an API is called, the token is added to the request header to obtain the operation permission. For details about how to obtain an access token, see the corresponding developer guide. The format is Bearer+{access_token}. |
|
X-User-Id |
Yes |
String |
User ID, which is used for app authentication. |
|
X-Date |
Yes |
String |
Date, which is used for app authentication. |
|
Host |
Yes |
String |
Address, which is used for app authentication. |
|
X-Traceid |
No |
String |
Message log trace ID. The value contains 58 bits. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
pageInfo |
No |
PageInfo object |
Pagination information. |
|
containerId |
Yes |
String |
Space ID. |
|
fileId |
Yes |
String |
File ID. |
|
fields |
No |
String |
Currently, only * is supported. If this parameter is not transferred, * is used by default. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
revisionList |
Array of FileRevisionInfo objects |
File version information is sorted by creation time in descending order by default. Note: downloadUrl is not returned in FileRevisionInfo when versions are listed. |
|
nextPageCursor |
String |
Start cursor of the next page. It is null for the last page. |
|
Parameter |
Type |
Description |
|---|---|---|
|
containerId |
String |
Space ID. |
|
fileId |
String |
File ID. |
|
revisionId |
String |
Version ID (assetId + "." + versionId returned by the cloud space). |
|
revisionVersion |
Long |
Version number, which is unique and increases in ascending order. |
|
keepForever |
Boolean |
Whether it is retained permanently. |
|
latestVersion |
Boolean |
Whether the version is the latest. Check whether the version ID is the same as that of files.get.metadata. |
|
createdAt |
Long |
Creation time (timestamp in milliseconds), which is the createdTime of the cloud space version query API. |
|
createdBy |
String |
createdBy of attributes returned by the query API. |
|
updatedAt |
Long |
Update time (timestamp in milliseconds), which is the editedTime of the cloud space version query API. |
|
updatedBy |
String |
Modifier ID. The third-party ID can be parsed from the userId of lastEditor in the query response. |
|
name |
String |
The file name (including the file name extension) cannot contain the following invalid characters: '', '/', ':', '*', '?', '"', '<', '>', and '|'. |
|
size |
Long |
File size in bytes. |
|
extension |
String |
File name extension, which is case insensitive. |
|
fileType |
Integer |
Check the fileType of the attributes of the API. |
|
description |
String |
Description, which is obtained by files.get.metadat. |
|
sha256 |
String |
Hash value of the file content, which is a hexadecimal string and is case insensitive. |
|
downloadUrl |
String |
Download URL of the file of a specified version. |
|
metadataAuditInfo |
FileAuditInfo object |
File metadata moderation information. |
|
contentAuditInfo |
FileAuditInfo object |
File content moderation information (returned only for common files). |
|
Parameter |
Type |
Description |
|---|---|---|
|
auditLevel |
Integer |
Moderation level. For details, see AuditLevel. |
|
auditResult |
Integer |
Moderation result. For details, see AuditResult. For file metadata moderation results, only 1 and 4 are supported. For file content moderation results, only 1, 2, and 3 are supported. |
|
auditDetail |
String |
Moderation result details. The value is a JSON string and can only be accessed. |
Example Requests
Lists all version information of a specified file.
POST /koodrive/ose/v1/revision/listRevision
Authorization:Bearer+10f88d07fa************44791e9ff
{
"containerId": "IAAAKIRZGifzJgncA1605122035640590977",
"fileId": "FkiferVNK5NwXck7XXBhPLIRhV1GayJPc",
"pageInfo": {
"pageSize": 100,
"pageCursor": null
}
}
Example Responses
Status code: 200
List all version information of a specified file.
"revisionList"
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
List all version information of a specified file. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot