Querying Historical Check Results
Function
This API is used to provide statistics on issues scanned each time.
Calling Method
For details, see Calling APIs.
URI
GET /v2/{project_id}/tasks/{task_id}/checkrecord
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
task_id |
Yes |
String |
Task ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
No |
Integer |
Offset for pagination. |
limit |
No |
Integer |
Number of items displayed on each page. A maximum of 1,000 items are supported. |
start_time |
No |
String |
Start time of task. Filter tasks by start time. |
end_time |
No |
String |
End time of task. Filter tasks by end time. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
data |
Array of CheckRecordDataInfo objects |
Data history. |
total |
Integer |
Total number. |
Parameter |
Type |
Description |
---|---|---|
check_time |
String |
Task execution start time. |
check_end_time |
String |
Task execution end time. |
issue_counts |
CheckRecordIssueCountsInfo object |
Severity. |
Parameter |
Type |
Description |
---|---|---|
critical |
Integer |
Critical issues. |
serious |
Integer |
Major issues. |
normal |
Integer |
Minor issues. |
prompt |
Integer |
Suggestion issues. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Requests
GET https://{endpoint}/v2/{project_id}/tasks/{task_id}/checkrecord
Example Responses
Status code: 200
Request succeeded!
{ "total" : 100, "data" : [ { "check_time" : "2020-02-20 11:37:46", "check_end_time" : "2020-02-20 11:47:46", "issue_counts" : { "critical" : 0, "serious" : 1, "normal" : 2, "prompt" : 3 } }, { "check_time" : "2020-02-20 11:37:46", "check_end_time" : "2020-02-20 11:47:46", "issue_counts" : { "critical" : 0, "serious" : 1, "normal" : 2, "prompt" : 3 } } ] }
Status code: 400
Bad Request
{ "error_code" : "CC.00000000", "error_msg" : "Network busy. Try again later." }
Status code: 401
Unauthorized
{ "error_code" : "CC.00000003", "error_msg" : "Authentication information expired." }
Status Codes
Status Code |
Description |
---|---|
200 |
Request succeeded! |
400 |
Bad Request |
401 |
Unauthorized |
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