Updating a SQL template
Function
This API is used to update an SQL template.
URI
- URI format
- Parameter description
Table 1 URI parameters Parameter
Mandatory
Type
Description
project_id
Yes
String
Project ID, which is used for resource isolation. For details about how to obtain its value, see Obtaining a Project ID.
sql_id
Yes
String
SQL template ID
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
sql |
No |
String |
Updated SQL template text. |
sql_name |
No |
String |
Name of the updated SQL template. The name must be unique in the current project. |
description |
No |
String |
Description of an SQL template. This parameter can be left blank. |
group |
No |
String |
SQL template group information. |
Response
Parameter |
Type |
Description |
---|---|---|
is_success |
Boolean |
Whether the request is successful. |
message |
String |
System prompt. If execution succeeds, the message may be left blank. If the execution fails, the value will be the cause of the failure. |
Example Request
Update information about the SQL template, including the SQL statements, template name, template description, and template group information.
{ "sql": "select * from t1", "sql_name": "sql1", "description": "use to select t1", "group": "" }
Example Response
{ "is_success": true, "message": "" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.