Halaman ini belum tersedia dalam bahasa lokal Anda. Kami berusaha keras untuk menambahkan lebih banyak versi bahasa. Terima kasih atas dukungan Anda.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ KooDrive/ API Reference/ API/ File Favorites/ Listing Files in Favorites

Listing Files in Favorites

Updated on 2025-03-07 GMT+08:00

Function

List files in favorites. Up to 100 files are supported each time.

URI

GET /koodrive/ose/v1/star/files

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

pageSize

No

Integer

Number of records to be returned on each page. Default and maximum value: 100. It is possible that partial or empty result pages are returned before the end of the result list has been reached.

pageCursor

No

String

Current page cursor, which is obtained from nextCursor of the previous response.

sortType

No

Integer

Sorting type. 1: by the time when a file is added to favorites (default).

sortDirection

No

Integer

Sorting order. 1: ascending; 2: descending (default).

fileType

No

String

File type.

  • 10: folder.

  • 11: smart folder (available only to whitelisted users).

  • 15: image.

  • 20: video.

  • 26: Word file.

  • 27: Excel file.

  • 28: PowerPoint file.

  • 30: audio.

  • 35: compressed file.

  • 40: application.

  • 45: other.

imageProcess

No

String

Image operation, which can be used to specify the thumbnail size.

Request Parameters

Table 2 Request header 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-Traceid

No

String

Message log trace ID. The value contains 58 bits.

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.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

nextCursor

String

Pagination cursor. If the cursor does not exist, the last record has been returned.

autoDeleted

Integer

Number of automatically deleted files (original files have been physically deleted).

starFiles

Array of StarFileInfo objects

Favorite file information.

code

String

Response code.

msg

String

Response information.

Table 4 StarFileInfo

Parameter

Type

Description

category

String

Type. The value is drive#file.

id

String

File ID.

fileName

String

File name, which contains up to 250 characters.

fileType

String

File type, which is input externally.

mimeType

String

Content type.

favorite

Boolean

Whether the file is added to favorites.

recycled

Boolean

Whether the file is moved to the recycle bin.

parentFolder

Array of strings

List of 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.

containers

Array of strings

Space ID.

createdTime

String

File creation time.

editedTime

String

File modification time.

editedByMe

Boolean

Whether the file is modified by you.

owners

Array of User objects

Owner.

lastEditor

User object

Last editor.

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.

sha256

String

SHA256 of the file.

attachments

Array of Attachment objects

Attachment (purpose and attachment). Only the app ID of the risk control service is returned.

downloadLinks

Array of DownloadLink objects

Link for downloading FileProxy files.

userProperties

PrivateProperties object

User attributes.

starredTime

String

Time when the file is added to favorites.

filePath

String

File location, specific to the team name.

spaceType

String

Space type.

  • 1: individual space.

  • 2: team space.

  • 3: recycle bin.

  • 4: space without access permission.

invalid

Integer

Whether the file has expired. *0: normal; 1: expired.

hidden

Boolean

Whether the file is hidden.

userCapabilities

userCapabilities object

User permissions.

Table 5 User

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.

Table 6 Attachment

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.

Table 7 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.

  • 0: automatic clearance. Two versions are retained. The earliest version is deleted when the third version is added. (This prevents obtaining failures in concurrent scenarios.)

  • 1: permanent storage.

state

Integer

Data status.

  • 0: available.

  • 1: unavailable.

  • 2: temporary.

  • 3: retained (flash upload unsupported).

  • 4: to be cut over.

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:

  • pictureMetadata: image attribute data. For details, see the definition of PictureMetadata.

  • videoMetadata: video attribute data. For details, see the definition of VideoMetadata.

  • audioMetadata: audio attribute data. For details, see the definition of AudioMetadata.

  • contentDisposition: used when response-content-disposition is not specified for the downloaded attachment (valid when resource.type is set to 12).

properties

Map<String,String>

Extended attributes.

Table 8 Resource

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.

  • 0: ciphertext multipart file.

  • 3: plaintext multipart file.

  • 12: plaintext single-part file.

state

Integer

Data status.

  • 0: available.

  • 1: unavailable.

  • 2: temporary.

  • 3: retained (flash upload unsupported).

  • 4: to be cut over.

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.

Table 9 SliceObject

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.

Table 10 EndpointURL

Parameter

Type

Description

url

String

URL

method

String

http method

headers

Map<String,String>

http headers

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.

Table 11 Images

Parameter

Type

Description

process

String

File resource name.

downloadUrl

EndpointURLMetadata object

URL structure for file upload or download.

Table 12 EndpointURLMetadata

Parameter

Type

Description

url

String

URL

method

String

http method

Table 13 Cipher

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.

  • 11: sync drive.

keychains

Array of Keychain objects

Keychain.

Table 14 Keychain

Parameter

Type

Description

id

String

Key UUID.

type

Integer

Key type.

  • 1: efek.

  • 2: zfek.

  • 3: sfek.

algorithm

String

Encryption algorithm.

ekey

String

Encrypted key.

Table 16 PrivateProperties

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.)

Table 17 userCapabilities

Parameter

Type

Description

addChildNodePermission

Boolean

Whether the user can add sub-directories or sub-files.

copyPermission

Boolean

Whether the user can copy files.

deletePermission

Boolean

Whether the user can delete files.

downloadPermission

Boolean

Whether the use can download content.

editPermission

Boolean

Whether the user can edit files.

listChildNodePermission

Boolean

Whether the user can list sub-directories or sub-files.

removeChildNodePermission

Boolean

Whether the user can move sub-directories.

renameFilePermission

Boolean

Whether the user can rename files.

shareFilePermission

Boolean

Whether the user can share files.

uploadPermission

Boolean

Whether the user can upload files.

viewPermission

Boolean

Whether the user can preview files.

Example Requests

None

Example Responses

None

Status Codes

Status Code

Description

200

OK

Kami menggunakan cookie untuk meningkatkan kualitas situs kami dan pengalaman Anda. Dengan melanjutkan penelusuran di situs kami berarti Anda menerima kebijakan cookie kami. Cari tahu selengkapnya

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback