Creates an SQL instance.
Operation description
Method
POST
URI
/openapi/ha3/instances/{instanceId}/sql-studio/databases/{database}/sql-instances
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
searchengine:CreateSqlInstance |
create |
*Instance
|
None | None |
Request syntax
POST /openapi/ha3/instances/{instanceId}/sql-studio/databases/{database}/sql-instances 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 name of the SQL instance. |
test |
| parent |
integer |
Yes |
The unique ID of the parent task. |
-1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| requestId |
string |
The request ID. |
B43CD1BB-ABD7-59C5-B89A-6E5F6FE60A84 |
| result |
object |
The returned result. |
|
| id |
integer |
The primary key ID. |
22 |
| gmtCreate |
string |
The time when the instance was created. |
1719220182844 |
| gmtModified |
string |
The time when the instance was last modified. |
1719220182844 |
| name |
string |
The name of the SQL instance. |
test |
| parent |
integer |
The ID of the parent task. |
-1 |
| isDir |
integer |
Indicates whether the item is a folder. Valid values: -true: Yes -false: No |
true |
| type |
string |
table, instance, template, function |
instance |
| instanceId |
integer |
The instance ID. |
ha-cn-pl32rf0**** |
| templateId |
integer |
The ID of the template to which the instance belongs. |
1 |
Examples
Success response
JSON format
{
"requestId": "B43CD1BB-ABD7-59C5-B89A-6E5F6FE60A84",
"result": {
"id": 22,
"gmtCreate": "1719220182844",
"gmtModified": "1719220182844",
"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.