Querying the Log Details of a Single Task
Function
This API is used to query all logs of a task.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions Policies and Supported Actions.
URI
GET /v2/{project_id}/fdi/instances/{instance_id}/tasks/{task_id}/monitor-logs
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see "Appendix" > "Obtaining a Project ID" in the API Reference. |
|
instance_id |
Yes |
String |
Instance ID. |
|
task_id |
Yes |
String |
Task ID. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
offset |
No |
Integer |
Offset, where the query starts. The value starts from 1 (the value 0 is treated as 1). |
|
limit |
No |
Integer |
Number of records displayed on each page. The maximum value is 999. Excessive records are not returned. |
|
begin_time |
No |
Integer |
Start time for the logs to be queried. The value is in the format of timestamp(ms) and uses the UTC time zone. |
|
end_time |
No |
Integer |
End time for the logs to be queried. The value is in the format of timestamp(ms) and uses the UTC time zone. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token. The token can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
total |
Integer |
Total number. |
|
size |
Integer |
Number of logs on the current page. |
|
entities |
Array of TaskMonitorLog objects |
Elements on the current page of task monitoring logs. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Trace ID of a single task. |
|
start_time |
Integer |
Start time of the current execution. The value is in the format of timestamp(ms) and uses the UTC time zone. |
|
dispatch_time |
Integer |
Scheduled execution time. The value is in the format of timestamp(ms) and uses the UTC time zone. |
|
end_time |
Integer |
End time of the current execution. The value is in the format of timestamp(ms) and uses the UTC time zone. |
|
execute_status |
String |
Task execution status.
|
|
position |
String |
Phase to which the task is executed.
|
|
position_status |
String |
Status of the current task execution phase.
|
|
status |
Integer |
Detailed task execution status. The status codes are classified as follows: 100 to 499 for the reader side, 500 to 899 for the writer side, and 900 and beyond for others.
|
|
dirty_data_count |
Integer |
Number of abnormal data records. |
|
data_count |
Integer |
Number of successful data records. |
|
data_size |
Number |
Size of success data. The value is a floating-point number. |
|
data_size_unit |
String |
Unit for measuring the size of success data. |
|
spend_time |
Integer |
Execution duration, in milliseconds. |
|
read_spend_time |
Integer |
Read execution duration, in milliseconds. This parameter is available only for scheduled tasks. |
|
write_spend_time |
Integer |
Write execution duration, in milliseconds. |
|
remarks |
String |
Brief information about the execution result. |
|
detail_logs |
Array of TaskMonitorDetailLog objects |
Detailed track information about the current execution. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Unique ID generated each time when a task is executed. |
|
status |
Integer |
Detailed task execution status. The status codes are classified as follows: 100 to 499 for the reader side, 500 to 899 for the writer side, and 900 and beyond for others.
|
|
position |
String |
Phase at which the current step is.
|
|
position_status |
String |
Status of the current step of a task.
|
|
stage |
String |
FDI plug-in to which the current step belongs, for example, adapter, apireader, and rdbwriter. |
|
dirty_data_count |
Integer |
Number of abnormal data records. |
|
data_count |
Integer |
Number of successful data records. |
|
data_size |
Number |
Size of success data. The value is a floating-point number. |
|
data_size_unit |
String |
Unit for measuring the size of success data. |
|
spend_time |
Integer |
Execution duration, in milliseconds. |
|
remarks |
String |
Execution details. |
|
step_begin_time |
Integer |
Start time of this step. The value is in the format of timestamp(ms) and uses the UTC time zone. |
|
step_end_time |
Integer |
End time of this step. The value is in the format of timestamp(ms) and uses the UTC time zone. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
Status code: 404
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
Example Requests
None
Example Responses
Status code: 200
OK
{
"total" : 99999,
"size" : 99999,
"entities" : [ {
"id" : "id123456789",
"start_time" : 1603243428000,
"dispatch_time" : 1603243428000,
"end_time" : 1603243428000,
"execute_status" : "RUNNING",
"position" : "READER",
"position_status" : "NORMAL",
"status" : 504,
"dirty_data_count" : 0,
"data_count" : 100,
"data_size" : 1000,
"data_size_unit" : "B",
"spend_time" : 5000,
"read_spend_time" : 5000,
"write_spend_time" : 5000,
"remarks" : "Task execute success",
"detail_logs" : [ {
"id" : "id123456789",
"status" : 500,
"position" : "READER",
"position_status" : "NORMAL",
"stage" : "adapter",
"dirty_data_count" : 0,
"data_count" : 100,
"data_size" : 1000,
"data_size_unit" : "B",
"spend_time" : 5000,
"remarks" : "task start successfully.",
"step_begin_time" : 1603243428000,
"step_end_time" : 1603243428000
} ]
} ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
|
400 |
Bad Request |
|
404 |
Not Found |
|
500 |
Internal Server Error |
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