Creates a folder.
Operation description
Method
POST
URI
/openapi/ha3/instances/{instanceId}/sql-studio/databases/{database}/folders
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
searchengine:CreateFolder |
create |
*Folder
|
None | None |
Request syntax
POST /openapi/ha3/instances/{instanceId}/sql-studio/databases/{database}/folders HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| instanceId |
string |
Yes |
The instance ID. |
ha-cn-pl32rf0**** |
| database |
string |
Yes |
The database name. |
general |
| body |
object |
No |
The request body. |
|
| name |
string |
Yes |
The folder name. |
gist_qc |
| parent |
integer |
Yes |
The ID of the parent category. This parameter is required. The default value is 1. |
1 |
| type |
string |
Yes |
The type. Valid values: `table`, `instance`, `template`, and `function`. |
instance |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| requestId |
string |
The request ID. |
E7B7D598-B080-5C8E-AA35-D43EC0D5F886 |
| result |
object |
The returned data. |
|
| id |
integer |
The folder ID. |
25030 |
| gmtCreate |
string |
The time when the folder was created. |
1719221186114 |
| gmtModified |
string |
The time when the folder was last updated. |
1719221186114 |
| name |
string |
The name. |
test |
| parent |
integer |
The ID of the parent level. |
-1 |
| isDir |
integer |
Indicates whether the item is a folder. Valid values: `true` (yes) and `false` (no). |
True |
| type |
string |
The type. Valid values: `table`, `instance`, `template`, and `function`. |
instance |
| instanceId |
integer |
The instance ID. |
ha-cn-pl32rf0**** |
| templateId |
integer |
The template ID. |
1 |
Examples
Success response
JSON format
{
"requestId": "E7B7D598-B080-5C8E-AA35-D43EC0D5F886",
"result": {
"id": 25030,
"gmtCreate": "1719221186114",
"gmtModified": "1719221186114",
"name": "test",
"parent": -1,
"isDir": 0,
"type": "instance",
"instanceId": 0,
"templateId": 1
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.