Create a folder or initiate a file upload task in the cloud disk.
Operation description
Call this API to create a folder directly in the enterprise cloud disk. To upload a file, call this API to obtain an upload URL. Then use that URL with the CompleteCdsFile API to complete the upload.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
Region ID. Call DescribeRegions to list regions supported by WUYING Workspace. |
cn-hangzhou |
| EndUserId |
string |
No |
User ID. |
test1 |
| CdsId |
string |
Yes |
Enterprise cloud disk ID. |
cn-hangzhou+cds-82414***** |
| FileName |
string |
Yes |
File name. |
testFile.txt |
| FileType |
string |
Yes |
File type. Valid values:
|
file |
| ParentFileId |
string |
No |
Parent file ID. Get this from the |
637c9163b453b1a384874264ba79f3f9eab9**** |
| FileLength |
integer |
Yes |
File size. Unit: Byte. |
1048576 |
| FileHash |
string |
No |
SHA-1 hash value of the file. |
7C4A8D09CA3762AF61E59520943DC26494F8**** |
| ConflictPolicy |
string |
No |
How to handle files with the same name. Valid values:
|
ignore |
| GroupId |
string |
No |
Team space ID. |
cg-i1ruuudp92qpj**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Response object. |
||
| RequestId |
string |
Request ID. |
2BAFE05D-FFB9-5938-96D0-08017DB9**** |
| FileModel |
object |
File upload response object. |
|
| UploadUrl |
string |
File upload URL. Valid for 15 minutes by default. |
https://data.aliyunpds.com/xxx/xxx?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx&partNumber=1&uploadId=0CC175B9C0F1B6A831C399E26977**** |
| FileId |
string |
File ID. |
646ec2f662b1e08f7a2b4d648982f906**** |
| UploadId |
string |
File upload task ID. |
20BE155AC20943BE9D405B0997A9**** |
Examples
Success response
JSON format
{
"RequestId": "2BAFE05D-FFB9-5938-96D0-08017DB9****",
"FileModel": {
"UploadUrl": "https://data.aliyunpds.com/xxx/xxx?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx&partNumber=1&uploadId=0CC175B9C0F1B6A831C399E26977****",
"FileId": "646ec2f662b1e08f7a2b4d648982f906****",
"UploadId": "20BE155AC20943BE9D405B0997A9****"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.