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
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| instanceId |
string |
Yes |
The instance ID. |
ha-cn-pl32rf0**** |
| database |
string |
Yes |
The database name. |
general |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body parameters. |
|
| name |
string |
Yes |
The folder name. |
gist_qc |
| parent |
integer |
Yes |
The parent category ID (required). If left empty, the default value is 1. |
1 |
| type |
string |
Yes |
table, instance, template, function |
instance |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| requestId |
string |
The request ID. |
E7B7D598-B080-5C8E-AA35-D43EC0D5F886 |
| result |
object |
The returned result. |
|
| id |
integer |
The folder ID. |
25030 |
| gmtCreate |
string |
The creation time. |
1719221186114 |
| gmtModified |
string |
The update time. |
1719221186114 |
| name |
string |
The name. |
test |
| parent |
integer |
The parent level ID. |
-1 |
| isDir |
integer |
Indicates whether the entry is a folder. Valid values:
|
True |
| type |
string |
table, instance, template, 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.