Get File Info

Last update:2022-10-14 15:24:30

Get File Infomation

Description

This interface is used to obtain the information description of a file on the cloud storage platform, including the file name, file size, ETag information of the file, file upload time , expiration time and other information.

Request Description

GET /stat/{param1}
Host:<MgrDomain>
Authorization:<AccessToken>

{param1}The generation rules refer to the EncodeEntryURI format .

Header Description

Parameter Required Description
Host Yes The management domain name can be obtained on the user management interface.
Authorization Yes Manage credentials .

Response description

If the request is successful, a JSONstring with the following content is returned:

x-wcs-object-type: Appendable
x-wcs-next-append-positon: <Content-Length int64>
{
    "result":  "true",
    "code":  "200",
    "name":  "<fileName string>",
    "message":  "< message string>",
    "fsize":     "<FileSize  int>", 
    "hash":     "<FileETag  string>",
    "mimeType:  "<MimeType  string>",
    "putTime":    "<PutTime   int64>",
    "expirationDate":   "<ExpirationDate string>",
    "storageClass": "<storageClass>"
}
Field name Required Description
x-wcs-object-type no Object Type Condition: The added object will return this header, and the fixed value is Appendable.
x-wcs-next-append-positon no The next time the object position is appended, the object size is returned. Condition: appending the uploaded object will return this header.
code Yes The request returns a status code, see HTTP response status code.
name Yes file name.
message Yes Get the prompt information of successful file information.
fsize Yes File size, unit: Byte.
hash Yes ETag information for the file.
mimeType Yes The file type expressed in MIME information. See MIME Media Types (content maintained by IANA).
putTime Yes The server-side Epoch timestamp when the file is uploaded, in milliseconds. For example, the returned timestamp is 13603956734587420, and the corresponding actual time is 2013-02-09 15:41:13.
expirationDate Yes File expiration time, in the format YYYYMMDDhhmmss. Note: The specific time when the file is cleaned up after expiration is subject to the execution of the server-side task. The time difference within one day is normal.
storageClass Yes File storage types, such as Standard – standard storage, IA – low frequency storage, Archive – archive storage.
result Yes Indicates whether the processing was successful. “true” indicates that the processing was successful.

If the request fails, a Jsonstring with the following content is returned:

{
    "code":     "<code string>",
    "message":  "<ErrMsg string>"
}
Field name Required Description
code Yes For HTTP request response codes, see HTTP Response Status Codes .
message Yes Get the prompt information about the failure to get file information.

Example

curl -v -H "Authorization:86622e227a50d49d858c2494a935bc2e4ac543a7:OGZmYzQ0ZmM2MDU5N2FhZWRhMDhjNWNmZjcxZjE5MmEwNjUxOGU4Nw==" --url "http://mgrDomain/stat/aW1hZ2VzOmFmZGRkLnBuZw=="
Is the content of this document helpful to you?
Yes
I have suggestion
Submitted successfully! Thank you very much for your feedback, we will continue to strive to do better!