Updated on 2024-08-05 GMT+08:00

Executing a SQL Diagnosis

Function

This API is used to execute a SQL diagnosis.

URI

POST /v3/{project_id}/connections/{connection_id}/tuning/create-tuning

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

To obtain this value, see Obtaining a Project ID.

connection_id

Yes

String

Connection ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

X-Language

No

String

Language.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

database_name

Yes

String

Database name.

schema_name

No

String

Schema name.

sql_script

Yes

String

SQL script.

node_type

No

String

Node type.

node_id

No

String

Node ID.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

message_id

Array of strings

Diagnosis information ID.

status

Boolean

Status.

quota_exceeded

Boolean

Diagnosis quota status.

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

Minimum length: 8

Maximum length: 36

error_msg

String

Error message.

Minimum length: 2

Maximum length: 512

Status code: 500

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

Minimum length: 8

Maximum length: 36

error_msg

String

Error message.

Minimum length: 2

Maximum length: 512

Example Requests

Executing a SQL diagnosis

POST https://{{endpoint}}/v3/{{project_id}}/connections/{connection_id}/tuning/create-tuning 
 
{ 
  "database_name" : "string", 
  "schema_name" : "string", 
  "sql_script" : "string" 
}

Example Responses

{
	"message_id": [
		"6507f5070cf2476b18473d9b"
	],
	"status": true,
	"quota_exceeded": false
}

Status Code

Status Code

Description

200

Success.

400

Bad request.

500

Internal server error.

Error Code

See Error Codes.