Updating a Metadata Task
Function
This API is used to update metadata task information. You can update the creator, data source, scan configuration, scheduling switch, scheduling type, and task description of a task to flexibly configure and manage task templates.
Calling Method
For details, see Calling APIs.
URI
PUT /v1/{project_id}/metadata/task-templates/{template_id}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Unique project ID. |
|
template_id |
Yes |
Long |
Task ID, which is used to identify a specific task. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
data_sources |
Yes |
Array of DataSource objects |
Data source list. |
|
delete_failed_meta |
No |
Boolean |
Whether to delete failed metadata. |
|
scan_config |
No |
ScanConfig object |
Scanning configuration information. |
|
schedule_switch |
No |
Boolean |
Scheduling switch. |
|
schedule_type |
Yes |
String |
Scheduling type. |
|
start_now |
No |
Boolean |
Whether to start immediately |
|
start_time |
Yes |
Long |
Start time. |
|
task_description |
Yes |
String |
Task description. |
|
task_name |
Yes |
String |
Task name. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
db_type |
Yes |
String |
Database type. |
|
ins_id |
Yes |
String |
Instance ID. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
scan_column_constraints |
No |
Boolean |
Whether to scan column constraints. |
|
scan_comment |
No |
Boolean |
Whether to scan comments. |
|
scan_privileges |
No |
Boolean |
Whether to scan permissions. |
|
scan_system_db |
No |
Boolean |
Whether to scan system databases. |
|
scan_tables |
No |
Boolean |
Whether to scan tables. |
|
scan_views |
No |
Boolean |
Whether to scan views. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Task ID. |
|
msg |
String |
Operation status message. |
|
status |
String |
Operation status. |
Status code: 201
Resource being created.
Example Requests
PUT /v1/{project_id}/metadata/task-templates/{template_id}
{
"data_sources" : [ {
"db_type" : "MySQL",
"ins_id" : "XXXXX"
} ],
"delete_failed_meta" : true,
"scan_config" : { },
"schedule_switch" : true,
"schedule_type" : "string",
"start_now" : true,
"start_time" : 0,
"task_description" : "string",
"task_name" : "string"
}
Example Responses
None
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Updated. |
|
201 |
Resource being created. |
|
401 |
Unauthorized. The user is not logged in or the token is invalid. |
|
403 |
Unauthorized to access the resource. |
|
404 |
The specified project or template does not exist. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot