Bu sayfa henüz yerel dilinizde mevcut değildir. Daha fazla dil seçeneği eklemek için yoğun bir şekilde çalışıyoruz. Desteğiniz için teşekkür ederiz.

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 Management/ Obtaining File Details

Obtaining File Details

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

Function

Obtain file details, such as the file size, name, and modification time.

URI

POST /koodrive/ose/v1/files/{fileId}/detail

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

fileId

Yes

String

File ID.

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

containerId

Yes

String

Space ID.

imageProcess

No

String

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

Response Parameters

Status code: 200

Table 4 Response body parameters

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.

recycled

Boolean

Whether the file is moved to the recycle bin.

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 AttachmentMetadata objects

Attachment.

userCapabilities

userCapabilities object

User permissions.

code

String

Response code.

msg

String

Response information.

sha256

String

SHA256 value of the file.

downloadLinks

Map<String,downLoadLinks>

Download link.

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 AttachmentMetadata

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

AssetMetadata object

Asset.

Table 7 AssetMetadata

Parameter

Type

Description

id

String

Asset ID

versionId

String

Asset version ID.

version

Long

Version number.

mimeType

String

MIME type

state

Integer

Data status.

  • 0: available.

  • 1: unavailable.

  • 2: temporary.

  • 3: retained (flash upload unsupported).

  • 4: to be cut over.

createdTime

String

UTC time when data is created.

modifiedTime

String

UTC time when data is last modified.

resource

ResourceMetadata object

Resource.

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.

Table 8 ResourceMetadata

Parameter

Type

Description

id

String

ID of the file resource.

length

Long

Size of the file resource.

sha256

String

SHA256 of the file (used for integrity check).

objects

Array of SliceObjectMetadata objects

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

Table 9 SliceObjectMetadata

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.

images

Map<String,Images>

Thumbnail.

Table 10 Images

Parameter

Type

Description

process

String

File resource name.

downloadUrl

EndpointURLMetadata object

URL structure for file upload or download.

Table 11 EndpointURLMetadata

Parameter

Type

Description

url

String

URL

method

String

http method

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

Checks file details.

POST /koodrive/ose/v1/files/FqNZrzGgSKHkfGmwjf7dLgLlGkwrLEU35/detail

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

{
  "containerId": "IAADfsBFCO6WtAtuA315074383680425b8aa9a130cba2d4"
}

Example Responses

Status code: 200

File details.

{
  "id": "FtSCRFXCYtFjo315lPfRHeKRiqrDdmm_Y",
  "fileName": "Download_20231213_160540.png",
  "mimeType": "image/png",
  "fileSuffix": "png",
  "recycled": false,
  "size": 81243,
  "parentFolder": [
    "DEUI7pa0C24ArootIAADfsBFCO6WtAtuA315074383680425b8aa9a130cba2d4"
  ],
  "containers": [
    "IAADfsBFCO6WtAtuA315074383680425b8aa9a130cba2d4"
  ],
  "properties": {
    "localCreatedAt": "",
    "localUpdatedAt": "",
    "createUser": "369528171409614001",
    "lastEditUser": "369528171409614001"
  },
  "attachments": [
    {
      "asset": {
        "id": "1310155787561278720",
        "versionId": "1310155787561278721",
        "version": 612304,
        "mimeType": "image/png",
        "state": 0,
        "createdTime": "2023-12-13T08:05:40.655ZVGltZQ==",
        "modifiedTime": "2023-12-13T08:05:40.655ZVGltZQ==",
        "resource": {
          "id": "1275457496273837312",
          "length": 81243,
          "sha256": "f08b00d63f9109fda252e45cc70e2762347907aba7c5dea4de7eb179ddad1ab2",
          "object": {
            "id": "b91e8df8afba4145a310dde1bfb9f8c5086",
            "start": 0,
            "downloadUrl": {
              "url": "https://b10-obs-ykj-uat-01.obs.cidc-rp-2006.joint.cmecloud.cn/b91e8df8afba4145a310dde1bfb9f8c5086?response-content-disposition=attachment%3B%20filename%3D%22%25E4%25B8%258B%25E8%25BD%25BD_20231213_160540.png%22&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20231227T073619Z&X-Amz-SignedHeaders=host&X-Amz-Expires=10000&X-Amz-Credential=MKRISPBZAJWFHNBJ5WLB%2F20231227%2Fcidc-rp-2006%2Fs3%2Faws4_request&X-Amz-Signature=6fc56f74a9478e088e1e044f453c33f8cc7b403f4478d3aefd923449349373e4",
              "method": "GET"
            }
          }
        },
        "attributes": {
          "fileName": "Download.png",
          "localCreatedAt": "",
          "createdBy": "40086000004871666",
          "resource": {
            "id": "1275457496273837312",
            "object": {
              "bucket": "b10-obs-ykj-uat-01",
              "objectId": "b91e8df8afba4145a310dde1bfb9f8c5086"
            }
          },
          "localUpdatedAt": ""
        }
      },
      "hash": "f08b00d63f9109fda252e45cc70e2762347907aba7c5dea4de7eb179ddad1ab2",
      "usage": "content",
      "sha256": "f08b00d63f9109fda252e45cc70e2762347907aba7c5dea4de7eb179ddad1ab2"
    }
  ],
  "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": "15",
  "createdTime": "2023-12-13T08:05:40.601ZVGltZQ==",
  "editedTime": "2023-12-13T08:05:41.054ZVGltZQ==",
  "userCapabilities": {
                "addChildNodePermission": true,
                "copyPermission": true,
                "deletePermission": false,
                "downloadPermission": true,
                "editPermission": true,
                "listChildNodePermission": true,
                "removeChildNodePermission": true,
                "renameFilePermission": true,
                "shareFilePermission": true,
                "uploadPermission": true,
                "viewPermission": true
            }
  "code": 0,
  "msg": "Success."
}

Status Codes

Status Code

Description

200

File details.

Sitemizi ve deneyiminizi iyileştirmek için çerezleri kullanırız. Sitemizde tarama yapmaya devam ederek çerez politikamızı kabul etmiş olursunuz. Daha fazla bilgi edinin

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback