Create a space.
Operation description
Before creating a space, ensure that the corresponding user or team has not been assigned a space.
Try it now
Test
RAM authorization
Request syntax
POST /v2/drive/create HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request parameters. |
|
| drive_name |
string |
Yes |
The name of the drive. The name can be up to 128 characters in length. |
My personal space |
| owner |
string |
Yes |
The owner of the drive. |
3b3d7245c159488da17d081ad6c64687 |
| owner_type |
string |
Yes |
The type of the owner. Valid values: user and group. Valid values:
|
user |
| description |
string |
No |
The description of the drive. The description can be up to 1,024 characters in length. |
VIP space |
| drive_type |
string |
No |
The type of the drive. Set the value to normal. Valid values:
|
normal |
| status |
string |
No |
The state of the drive. Valid values: enabled and disabled. Default value: enabled. Valid values:
|
enabled |
| total_size |
integer |
No |
The total size of the drive. Unit: bytes. By default, the size is unlimited. |
1024 |
| default |
boolean |
No |
Specifies whether the drive is the default drive. Default value: false. |
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| domain_id |
string |
The domain ID. |
bj1 |
| drive_id |
string |
The drive ID. |
1 |
| drive_name |
string |
Space name |
My personal space |
| description |
string |
Description |
VIP space |
| owner |
string |
Owner ID |
3b3d7245c159488da17d081ad6c64687 |
| owner_type |
string |
Owner type |
user |
| drive_type |
string |
Space type |
normal |
| used_size |
integer |
Used space size, in bytes |
1024 |
| total_size |
integer |
Total space size, in bytes |
1024 |
| creator |
string |
Creator ID. |
c9b7a5aa04d14ae3867fdc886fa01da4 |
| created_at |
string |
Creation Time |
2024-08-14T03:14:28.109Z |
| status |
string |
Status |
enabled |
Examples
Success response
JSON format
{
"domain_id": "bj1",
"drive_id": "1",
"drive_name": "My personal space\n",
"description": "VIP space\n",
"owner": "3b3d7245c159488da17d081ad6c64687\n",
"owner_type": "user",
"drive_type": "normal",
"used_size": 1024,
"total_size": 1024,
"creator": "c9b7a5aa04d14ae3867fdc886fa01da4",
"created_at": "2024-08-14T03:14:28.109Z",
"status": "enabled"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.