Full Synchronization
Function
Full synchronization.
Authorization Information
No identity policy-based permission required for calling this API.
URI
POST /koodrive/ose/v1/file/walkFile
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. Note: The value of pageSize is increased to 1000. |
|
sortInfo |
No |
FileSortInfo object |
Sorting information. You can sort files by name, size, creation time, and modification time. |
|
containerId |
Yes |
String |
Space ID. |
|
parentFileId |
Yes |
String |
Parent directory ID. Enter root for the root directory. Note: The parent directory ID is the ID of the root directory to be traversed. The parentFileId of all requests in a traversal process is the same. |
|
type |
No |
String |
File type. For details, see FileType. By default, all files are returned. |
|
includeHidden |
No |
Boolean |
Whether to include hidden files. true: All files are returned. false: Only non-hidden files are returned. Default value: false. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
pageSize |
No |
Integer |
Number of files on each page. Default value: 100. |
|
pageCursor |
No |
String |
Pagination start cursor. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
sortType |
No |
Integer |
Sorting field.
|
|
sortDirection |
No |
Integer |
Sorting order.
|
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
files |
Array of File objects |
File information list. |
|
nextCursor |
String |
Start cursor of the next page. It is null for the last page. |
|
Parameter |
Type |
Description |
|---|---|---|
|
category |
String |
Category. |
|
id |
String |
File ID. |
|
fileName |
String |
File name, which contains up to 160 bytes. |
|
fileType |
String |
File type, which is input externally. |
|
mimeType |
String |
Content type. |
|
description |
String |
File description. The value contains up to 512 characters and cannot contain emojis or invalid characters. |
|
favorite |
Boolean |
Whether the file is added to favorites. |
|
recycled |
Boolean |
Whether the file is moved to the recycle bin. |
|
directlyRecycled |
Boolean |
Whether the file is directly moved to the recycle bin. If the folder containing this file is deleted, the value is false. If the file is directly deleted, the value is true. |
|
recyclingUser |
User object |
User that deletes the file. |
|
recycledTime |
String |
Time when the file is moved to the recycle bin. |
|
parentFolder |
Array of strings |
List of the parent directory IDs. Currently, only the first ID is used. |
|
properties |
Map<String,String> |
Common user-defined attributes of the file. The number of key-value pairs cannot exceed 30. A single key-value pair can contain up to 124 characters. |
|
appSettings |
Map<String,String> |
User-defined app attributes. The number of key-value pairs cannot exceed 30. A single key-value pair can contain up to 124 characters. |
|
containers |
Array of strings |
Space ID. |
|
version |
Integer |
Version number. |
|
createdTime |
String |
File creation time. |
|
editedTime |
String |
File modification time. |
|
editedByMeTime |
String |
Time when you modify the file. |
|
editedByMe |
Boolean |
Whether the file is modified by you. |
|
sharedWithMeTime |
String |
Time when the file is shared to you. |
|
sharer |
User object |
User who shares the file. |
|
owners |
Array of User objects |
Owner. |
|
lastEditor |
User object |
Last editor. |
|
hasShared |
Boolean |
Whether the file is shared. |
|
ownedByMe |
Boolean |
Whether the file is uploaded by you. |
|
capabilities |
Capabilities object |
Capabilities. |
|
viewersHasCopyContentPermission |
Boolean |
Whether a viewer can copy content. |
|
writerHasCopyPermission |
Boolean |
Whether the writer permission is required for replication. |
|
writersHasSharePermission |
Boolean |
Whether a user with the write permission can share the file. |
|
originalFilename |
String |
Original file name, which contains up to 80 characters. The value cannot contain <>|:"*? /\ or emojis. The value cannot be two periods (..), a period (.), or a space. |
|
fullFileSuffix |
String |
Complete file name extension, which is the characters following the first period (.) in the name. |
|
fileSuffix |
String |
File name extension, which is the last character string of fullFileExtension. |
|
size |
Integer |
File size. |
|
pictureMetadata |
PictureMetadata object |
Image metadata. |
|
videoMetadata |
VideoMetadata object |
Video metadata. |
|
audioMetadata |
AudioMetadata object |
Audio metadata. |
|
sha256 |
String |
SHA256 of the file. |
|
lastHistoryVersionId |
String |
ID of the latest historical version. |
|
attachments |
Array of Attachment objects |
Attachment (Usage, Attachment). Only the app ID of the risk control service is returned. |
|
iconDownloadLink |
String |
Icon link. |
|
existThumbnail |
Boolean |
Whether a thumbnail is available. |
|
privateKey |
String |
Special folder ID. The usage rules are as follows:
|
|
signedDownloadLink |
String |
Download link of the FileProxy signature, which is used for online playback. |
|
downloadLinks |
Array of DownloadLink objects |
Link for downloading FileProxy files. |
|
localPath |
String |
ID path of the top-level parent directory during change (the first 10 levels are used). This parameter is returned for change record and file query. |
|
sortName |
String |
Sorting name after filename conversion. |
|
userProperties |
PrivateProperties object |
User attributes. |
|
Parameter |
Type |
Description |
|---|---|---|
|
category |
String |
Type. The value is drive#user. |
|
userId |
String |
Huawei user ID. |
|
displayName |
String |
Display name of the user. |
|
me |
Boolean |
Whether you are the user. |
|
permissionId |
String |
Permission ID. |
|
Parameter |
Type |
Description |
|---|---|---|
|
addChildNodePermission |
Boolean |
Whether a sub-directory or sub-file can be added. |
|
writerHasChangeCopyPermission |
Boolean |
Whether the write permission is required for change and replication. |
|
commentPermission |
Boolean |
Whether comments can be made. |
|
copyPermission |
Boolean |
Whether the file can be copied. |
|
deletePermission |
Boolean |
Whether the file can be deleted. |
|
downloadPermission |
Boolean |
Whether the content can be downloaded. |
|
editPermission |
Boolean |
Whether the file can be edited. |
|
listChildNodePermission |
Boolean |
Whether sub-directories or sub-files can be listed. |
|
editContentPermission |
Boolean |
Whether the content can be modified. |
|
readHistoryVersionPermission |
Boolean |
Whether a backup can be read. |
|
removeChildNodePermission |
Boolean |
Whether a sub-directory can be moved. |
|
renameFilePermission |
Boolean |
Whether the file can be renamed. |
|
shareFilePermission |
Boolean |
Whether the file can be shared. |
|
recyclePermission |
Boolean |
Whether the file can be moved to the recycle bin. |
|
unrecyclePermission |
Boolean |
Whether moving a sub-file to the recycle bin can be withdrawn. |
|
Parameter |
Type |
Description |
|---|---|---|
|
width |
Integer |
Photo width. |
|
height |
Integer |
Photo height. |
|
rotation |
Integer |
Photo rotation angle. This parameter is not available currently. |
|
location |
Location object |
Location information. |
|
exifTime |
String |
Time of the photo. The value is an EXIF DateTime. |
|
cameraMaker |
String |
Camera manufacturer. |
|
cameraModel |
String |
Camera model. |
|
exposureTime |
Float |
Exposure time, in seconds. |
|
aperture |
Float |
Aperture f-number. |
|
flashUsed |
Boolean |
Whether the flash is used. |
|
focalLength |
Float |
Focal length, in millimeters. |
|
isoSpeed |
Integer |
ISO speed. |
|
meteringMode |
String |
Metering mode. |
|
sensor |
String |
Sensor type. |
|
exposureMode |
String |
Exposure mode. |
|
colorSpace |
String |
Color space. |
|
whiteBalance |
String |
White balance mode. |
|
exposureBias |
Float |
Exposure bias. The value is an APEX value. |
|
maxApertureValue |
Float |
Maximum aperture. The value is an APEX value. |
|
subjectDistance |
Integer |
Distance to subject, in meters. This parameter is not available currently. |
|
lens |
String |
Lens. |
|
Parameter |
Type |
Description |
|---|---|---|
|
latitude |
Double |
Latitude. |
|
longitude |
Double |
Longitude. |
|
altitude |
Double |
Altitude. |
|
Parameter |
Type |
Description |
|---|---|---|
|
width |
Integer |
Width. |
|
height |
Integer |
Altitude. |
|
durationTime |
Integer |
Duration, in milliseconds. |
|
position |
String |
Longitude and latitude information. The format is "x":"111","y":"222","z":"2222". |
|
rotation |
Integer |
Rotation angle. Value range: 1 to 8. |
|
format |
String |
Video encoding format, for example, H.264, H.265, VP8, VP9, Ogg, and MPEG-4 AVC. |
|
dynamicRange |
String |
SDR or HDR. |
|
snapshotTime |
String |
Shooting time. |
|
Parameter |
Type |
Description |
|---|---|---|
|
durationTime |
Integer |
Duration, in milliseconds. |
|
sampleRate |
String |
Sampling rate, for example, 16,000 or 48,000. |
|
encoding |
String |
Audio encoding format, for example, PCM, AAC, AMR, or AMR-WB. |
|
codeRate |
Number |
Bit rate, in kbit/s. Example: 12.8. |
|
rateModel |
String |
Bit rate mode, for example, CBR. |
|
languageCode |
String |
Language code, for example, en. |
|
Parameter |
Type |
Description |
|---|---|---|
|
usage |
String |
Default usage: content or thumbnail. This parameter is customizable. |
|
assetId |
String |
Asset ID |
|
length |
Long |
File size. |
|
versionId |
String |
Asset version ID. |
|
mimeType |
String |
MIME type. |
|
hash |
String |
Hash of the resource associated with the asset. |
|
sha256 |
String |
SHA256 of the resource associated with the asset. |
|
createdTime |
String |
Time when the data is created. |
|
modifiedTime |
String |
Time when the data is last modified. |
|
attributes |
Map<String,Object> |
Type attributes. |
|
asset |
Asset object |
Asset. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Asset ID |
|
versionId |
String |
Asset version ID. |
|
version |
Long |
Version number. |
|
mimeType |
String |
MIME type |
|
keepPolicy |
Integer |
Storage policy of historical versions.
|
|
state |
Integer |
Data status.
|
|
createdTime |
String |
Time when the data is created. |
|
modifiedTime |
String |
Time when the data is last modified. |
|
lastModifyingUser |
String |
UPID of the user that last modifies the data. |
|
resource |
Resource object |
Resource. |
|
cipher |
Cipher object |
Cipher. |
|
attributes |
Map<String,Object> |
Type attributes. A key consists of letters and digits and starts with a letter. A value cannot contain emojis. The size of an attribute is not limited, but the total size cannot exceed 16 KB. Attribute options:
|
|
properties |
Map<String,String> |
Extended attributes. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
ID of the file resource. |
|
hash |
String |
Hash of the file resource. |
|
length |
Long |
Size of the file resource. |
|
sha256 |
String |
SHA256 of the file (used for integrity check). |
|
type |
Integer |
Resource type.
|
|
state |
Integer |
Data status.
|
|
sliceSize |
Long |
Part size. |
|
hfek |
String |
Hash of the FEK of the encrypted file. This parameter is applicable when type is set to 0. |
|
iv |
String |
IV of the encrypted file. This parameter is applicable when type is set to 0. |
|
createdTime |
String |
Time when the data is created. |
|
modifiedTime |
String |
Time when the data is last modified. |
|
objects |
Array of SliceObject objects |
Part object, which is applicable when type is set to 0 or 3. |
|
attributes |
Map<String,Object> |
Type attributes. |
|
properties |
Map<String,String> |
Extended attributes. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Part ID. |
|
number |
Integer |
Part No., starting from 0. This parameter is not applicable when type is set to 12. |
|
start |
Long |
Start position of a part, which is not applicable when type is set to 12. |
|
sha256 |
String |
SHA256 of the part (or SHA256 of the ciphertext if the part is encrypted.) |
|
length |
Long |
Part length (or ciphertext length if the part is encrypted). |
|
bucket |
String |
OBS bucket information. |
|
createdTime |
String |
Time when the data is created. |
|
modifiedTime |
String |
Time when the data is last modified. |
|
uploadUrl |
EndpointURL object |
Upload URL. |
|
downloadUrl |
EndpointURL object |
Download URL. |
|
uploadId |
String |
Multipart upload ID. This parameter is applicable when type is set to 12 and uploadMode is set to multipart. |
|
attributes |
Map<String,Object> |
Type attributes. |
|
properties |
Map<String,String> |
Extended attributes. |
|
images |
Array of Images objects |
Thumbnail. |
|
Parameter |
Type |
Description |
|---|---|---|
|
url |
String |
URL. |
|
method |
String |
Request method. |
|
headers |
Map<String,String> |
Request header. |
|
forms |
Map<String,String> |
Form parameter, which is applicable when type is set to 12 and uploadMode is set to post. |
|
partId |
String |
Multipart parameter, which is applicable when type is set to 12 and uploadMode is set to multipart. |
|
Parameter |
Type |
Description |
|---|---|---|
|
process |
String |
File resource name. |
|
downloadUrl |
EndpointURLMetadata object |
URL structure for file upload or download. |
|
Parameter |
Type |
Description |
|---|---|---|
|
url |
String |
URL. |
|
method |
String |
Request method. |
|
Parameter |
Type |
Description |
|---|---|---|
|
algorithm |
String |
Encryption algorithm. |
|
hfek |
String |
Hash of the FEK of the encrypted file. This parameter is applicable when type is set to 0 or 4. |
|
iv |
String |
IV of the encrypted file. This parameter is applicable when type is set to 0 or 4. |
|
dataType |
Integer |
Data type.
|
|
keychains |
Array of Keychain objects |
Keychain. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Key UUID. |
|
type |
Integer |
Key type.
|
|
algorithm |
String |
Encryption algorithm. |
|
ekey |
String |
Encrypted key. |
|
Parameter |
Type |
Description |
|---|---|---|
|
usage |
String |
Default usage: content or thumbnail. This parameter is customizable. |
|
downloadLink |
String |
Attachment download link. |
|
version |
Integer |
Attachment version. |
|
Parameter |
Type |
Description |
|---|---|---|
|
attributes |
Map<String,Object> |
Type attributes (The size of a single attribute is not limited, but the total size cannot exceed 16 KB.) |
|
properties |
Map<String,String> |
Extended attributes (The size of a single attribute is not limited, but the total size cannot exceed 16 KB.) |
Example Requests
Example request for full synchronization.
POST /koodrive/ose/v1/file/walkFile
Authorization:Bearer+10f88*********4791e9ff
{
"pageInfo": {
"pageSize": 1,
"pageCursor": ""
},
"sortInfo": {
"sortType": 1,
"sortDirection": 2
},
"containerId": "IAAFvqhbjJn5lgncA1649204212623716096",
"parentFileId": "FrqKiZrmCqA7_tupuT99JkbhBhBjcAN8O"
}
Example Responses
Status code: 200
Response to the request for traversing files.
{
"files" : [ {
"id" : "Fj96QCEuQ1n7BwjfYZMdBM5k9tnYuEqF-",
"fileName" : "456",
"mimeType" : "application/vnd.huawei-apps.folder",
"fileSuffix" : "",
"recycled" : false,
"hidden" : false,
"parentFolder" : [ "FrqKiZrmCqA7_tupuT99JkbhBhBjcAN8O" ],
"containers" : [ "IAAFvqhbjJn5lgncA1649204212623716096" ],
"properties" : {
"smartFolderAttr" : "null",
"auditResult" : "{\"auditDetail\":\"{}\",\"auditLevel\":10,\"auditResult\":1}"
},
"owners" : [ {
"category" : "drive#user",
"me" : true,
"permissionId" : "1649204212858517248",
"userId" : "YzkzN2ZmOTVlZWI0NDQ5NGE1YTk2N2UyMWQxODUyYWUtMTY0OTIwMTQxNjIyMjQzOTI5Nw"
} ],
"lastEditor" : {
"category" : "drive#user",
"me" : true,
"permissionId" : "1649204212858517248",
"userId" : "YzkzN2ZmOTVlZWI0NDQ5NGE1YTk2N2UyMWQxODUyYWUtMTY0OTIwMTQxNjIyMjQzOTI5Nw"
},
"fileType" : "10",
"createdTime" : "2025-08-26T11:31:31.656Z",
"editedTime" : "2025-08-26T11:31:31.656Z",
"favorite" : false,
"userCapabilities" : {
"addChildNodePermission" : true,
"copyPermission" : true,
"deletePermission" : true,
"downloadPermission" : true,
"editPermission" : true,
"listChildNodePermission" : true,
"removeChildNodePermission" : true,
"renameFilePermission" : true,
"shareFilePermission" : true,
"uploadPermission" : true,
"viewPermission" : true
},
"creatingUser" : "YzkzN2ZmOTVlZWI0NDQ5NGE1YTk2N2UyMWQxODUyYWUtMTY0OTIwMTQxNjIyMjQzOTI5Nw"
} ],
"nextCursor" : "(WzEsIkZycUtpWnJtQ3FBN190dXB1VDk5SmtiaEJoQmpjQU44TyIsIjJvcTEtRkowV0YzME9MT2ItLSIsIkZqOTZRQ0V1UTFuN0J3amZZWk1kQk01azl0bll1RXFGLSJdWyIxNzY1MzE4MjI3NDYzODY3NTIwIiw1MDAwLDEwMCwwLDAsMSwxXQ==)",
"code" : 0,
"msg" : "success"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Response to the request for traversing files. |
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