このページは、お客様の言語ではご利用いただけません。Huawei Cloudは、より多くの言語バージョンを追加するために懸命に取り組んでいます。ご協力ありがとうございました。

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 List Query/ Listing Files in the Individual Space

Listing Files in the Individual Space

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

Function

List files in the individual space.

URI

POST /koodrive/ose/v1/files/{type}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

type

Yes

String

  • 0: individual space.

  • 1: individual recycle bin.

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

language

No

String

Language code, which complies with the internationalization specifications. For example, en-US indicates English (United States). English (United States) is used by default.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

pageInfo

No

PageInfo object

Pagination information.

sortInfo

No

FileSortInfo object

Classification information.

containerId

Yes

String

Space ID.

parentFileId

Yes

String

Parent directory of the file.

  • root: root directory of the common file system.

  • sbox: root directory of the safe file system.

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.

hidden

No

Boolean

Whether hidden files are queried. (This function is available only to whitelisted users.)

Table 4 PageInfo

Parameter

Mandatory

Type

Description

pageSize

No

Integer

Number of files on each page. Default value: 100.

pageCursor

No

String

Pagination start cursor.

Table 5 FileSortInfo

Parameter

Mandatory

Type

Description

sortType

No

Integer

Sorting field.

  • 1: by file name.

  • 2: by file size.

  • 3: by creation time.

  • 4: by modification time.

  • 5: by recycling time (only for recycled files).

  • 6: by file format.

sortDirection

No

Integer

Sorting order.

  • 1: ascending.

  • 2: descending.

Response Parameters

Status code: 200

Table 6 Response body parameters

Parameter

Type

Description

category

String

Resource type. The value is fixed to drive#fileList.

nextCursor

String

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

searchCompleted

Boolean

Whether the search is complete.

files

Array of FileListMetadata objects

File list.

code

String

Response code.

msg

String

Response information.

Table 7 FileListMetadata

Parameter

Type

Description

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.

recycledTime

String

Time when the file is moved to the recycle bin. This parameter is returned when the file is recycled.

parentFolder

Array of strings

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

containers

Array of strings

Space ID.

createdTime

String

UTC time when the file is created.

editedTime

String

UTC time when the file is modified.

owners

Array of User objects

Owner.

lastEditor

User object

Last editor.

fileSuffix

String

File name extension, which is the last character string of fullFileExtension.

size

Integer

File size.

attachments

Array of FileListAttachment objects

Attachment.

downloadLinks

Array of downLoadLinks objects

Link for downloading FileProxy files.

userProperties

Array of PrivateProperties objects

User attributes.

sha256

String

SHA256 value of the file.

userCapabilities

userCapabilities object

User permissions.

hidden

Boolean

Whether it is hidden.

directlyRecycled

Boolean

Whether it is directly deleted.

idPath

String

ID path of the file or folder.

Table 8 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 9 FileListAttachment

Parameter

Type

Description

usage

String

Default usage: content or thumbnail. This parameter is customizable.

hash

String

Hash of the resource associated with the asset.

sha256

String

SHA256 of the resource associated with the asset.

asset

FileListAsset object

Asset.

Table 10 FileListAsset

Parameter

Type

Description

resource

FileListResource object

Resource.

mimeType

String

MIME type

Table 11 FileListResource

Parameter

Type

Description

object

FileListSliceObject object

Part object, which is applicable when type is set to 0 or 3.

Table 12 FileListSliceObject

Parameter

Type

Description

id

String

Part ID.

start

Long

Start position of a part, which is not applicable when type is set to 12.

downloadUrl

EndpointURLMetadata object

Download URL.

image

Array of Images objects

Thumbnail information.

Table 13 Images

Parameter

Type

Description

process

String

File resource name.

downloadUrl

EndpointURLMetadata object

URL structure for file upload or download.

Table 14 EndpointURLMetadata

Parameter

Type

Description

url

String

URL

method

String

http method

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.

Status code: 400

Table 18 Response body parameters

Parameter

Type

Description

error

Error object

Error message.

Table 19 Error

Parameter

Type

Description

errorData

errorData object

Extended data returned to visitors when an exception occurs.

errorDetail

Array of ErrorMsg objects

Error chain.

code

Integer

HTTP status code.

description

String

HTTP status information.

Table 20 errorData

Parameter

Type

Description

conflictFileId

String

Conflicting file ID.

Table 21 ErrorMsg

Parameter

Type

Description

domain

String

Domain.

reason

String

Error cause.

errorCode

String

Internal system error code. For details, see the error code specifications.

description

String

Error message.

errorPos

String

Error position type.

errorParam

String

Error position.

Example Requests

Lists files in the root directory of individual space IAADfsBFCO6WtAtuAb7e92cde625843cfb7f4ceba802e0b.

POST /koodrive/ose/v1/files/0

Authorization:Bearer+10f88*********4791e9ff

{
  "pageInfo": {
    "pageSize": "10",
    "pageCursor": ""
  },
  "sortInfo": {
    "sortType": "",
    "sortDirection": ""
  },
  "containerId": "IAADfsBFCO6WtAtuAb7e92cde625843cfb7f4ceba802e0b",
  "parentFileId": "root",
  "fileType": "",
  "fileName": ""
}

Example Responses

Status code: 200

Returns the file list.

{
  "category" : "drive#fileList",
  "nextCursor" : "0|[9-1-0,11-0-1][JzIwMjMtMTItMTNUMDM6MzA6NTkuNTU4Wic=,J0ZpQk02VHhsS2JiSEx4LW54X3FaT2M1bFJBZXEwU0xZeCc=]",
  "searchCompleted" : false,
  "files" : [ {
    "id" : "Fk0n_I_3nVynIIlxGSUdLkYILxIZQ5Yyp",
    "fileName" : "AI Test",
    "mimeType" : "application/vnd.huawei-apps.folder",
    "fileSuffix" : "",
    "recycled" : false,
    "parentFolder" : [ "DEUI7pa0C24ArootIAADfsBFCO6WtAtuAb7e92cde625843cfb7f4ceba802e0b" ],
    "containers" : [ "IAADfsBFCO6WtAtuAb7e92cde625843cfb7f4ceba802e0b" ],
    "properties" : {
      "srcFileId" : "Fuyt9uELO9mny6vLWnWpIDqppRh3vzC3p",
      "createUser" : "369528171409614001",
      "lastEditUser" : "369528171409614001"
    },
    "owners" : [ {
      "category" : "drive#user",
      "me" : true,
      "permissionId" : "1243622029865966464",
      "userId" : "NDEzMDA4NjAwMDAwMjc0MTY2NS00MDA4NjAwMDAwNDg3MTY2Ng",
      "displayName" : "Tenant Administrator"
    } ],
    "lastEditor" : {
      "category" : "drive#user",
      "me" : true,
      "permissionId" : "1243622029865966464",
      "userId" : "NDEzMDA4NjAwMDAwMjc0MTY2NS00MDA4NjAwMDAwNDg3MTY2Ng",
      "displayName" : "Tenant Administrator"
    },
    "fileType" : "10",
    "createdTime" : "2023-12-11T09:17:25.529Z",
    "editedTime" : "2023-12-11T09:17:25.529Z",
    "favorite" : false
  } ],
  "code" : 0,
  "msg" : "OK"
}

Status Codes

Status Code

Description

200

Returns the file list.

400

Bad request

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback