Updating a Template
Function
This API is used to update existing templates in CS.
URI
- URI format
PATCH /v1.0/{project_id}/job_template
- Parameter description
Table 1 URI parameter description Parameter
Mandatory
Description
project_id
Yes
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.
Request
Submit a request for modifying the SQL job template.
- Example request
{ "id": "10000", "name": "simple_stream_sql", "desc": "Example of quick start", "sql_body": "select * from source_table" } - Parameter description
Table 2 Request parameters Parameter
Mandatory
Type
Description
id
Yes
Int
Template ID.
name
No
String
Template name.
desc
No
String
Template description.
sql_body
No
String
Stream SQL statement, which includes at least the following three parts: source, query, and sink.
Response
- Example response
{ "message_id": "CS.18014", "message": "The template is updated successfully.", "current_time": 1550218438483 } - Parameter description
Table 3 Response parameters Parameter
Mandatory
Type
Description
message_id
No
String
Message type ID.
message
No
String
Message content.
current_time
No
Int
Current time, expressed by milliseconds.
Status Code
Table 4 describes the status code.
Error Code
For details, see Error Codes.
Last Article: Creating a Template
Next Article: Deleting a Template
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.