Querying the Latest Check Report and Refreshing the Check Report
Function
If task_id in the request is not empty, the check report of the latest successful version-level task is updated and the update result is returned.
If task_id in the request is empty, the check report of the execution record corresponding to job_id is updated and the update result is returned.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account root user has all the permissions required to call all APIs, but IAM users must be assigned the following required identity policy-based permissions. For details about the required permissions, see Permissions Policies and Supported Actions.
|
Action |
Access Level |
Resource Type (*: required) |
Condition Key |
Alias |
Dependencies |
|---|---|---|---|---|---|
|
codeartscheck:task:getReport |
Read |
task * |
- |
- |
- |
|
- |
codeartscheck:ProjectId |
URI
PUT /v1/jobs/{job_id}/result/refresh
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
job_id |
Yes |
String |
Definition Execution record ID, that is, the unique ID of each version or quality gate scan. The ID is used to query quality gate tasks. Constraints N/A Range N/A Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
task_id |
No |
String |
Definition : Task ID, returned by the API for creating a check task. Each code check task, branch task, or incremental task generated through an API has a unique ID. Obtain the ID by calling the API used to . id indicates the task ID. Constraints: N/A Value range: 1 to 32 characters. Default value: N/A |
|
async |
No |
String |
Definition: Whether to perform synchronous update. During synchronous update, the updated result is returned. During asynchronous update, the update is performed in the background and the update result is not returned. Constraints: true or false Value range: true: During asynchronous update, the update is performed in the background and the update result is not returned. false: During synchronous update, the updated result is returned. Default value: true. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition : User token. Obtain one by calling the IAM API Obtaining a User Token. The value of X-Subject-Token in the response header is a token. Constraints: N/A Value range: 1–100,000 characters. Default value: N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
status |
String |
Definition: Response status. Range: success: successful. failed: failed. |
|
httpStatus |
Integer |
Definition: Response status code. Range: N/A |
|
result |
JobReportInfo object |
Definition: Latest check report. Range: N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
CODE_SIZE |
Integer |
Definition: Lines of code. Value range: ≥0 |
|
COMFIRM |
Integer |
Definition: Number of confirmed issues. Value range: ≥0 |
|
CRITICAL |
Integer |
Definition: Number of major issues. Value range: ≥0 |
|
DELAYSTATUS_COUNT |
Integer |
Definition: Number of deferred issues. Value range: ≥0 |
|
FATAL |
Integer |
Definition: Number of critical issues. Value range: ≥0 |
|
FILE_TOTAL |
Integer |
Definition: Number of files. Value range: ≥0 |
|
FIX |
Integer |
Definition: Number of resolved issues. Value range: ≥0 |
|
GENERAL |
Integer |
Definition: Number of minor issues. Value range: ≥0 |
|
IGNORE |
Integer |
Definition: Number of ignored issues. Value range: ≥0 |
|
NEW |
Integer |
Definition: Number of new issues. Value range: ≥0 |
|
PROMPT |
Integer |
Definition: Number of suggestions. Value range: ≥0 |
|
REPORT_URL |
String |
Definition: Report link. Range: N/A |
|
RESOLVED |
Integer |
Definition: Number of resolved issues. Value range: ≥0 |
|
STANDARD_DISMISSED |
Integer |
Definition: Number of ignored issues (official version). Value range: ≥0 |
|
STANDARD_FIXED |
Integer |
Definition: Number of resolved issues (official version). Value range: ≥0 |
|
STANDARD_NEW |
Integer |
Definition: Number of immediate (official version) issues. Value range: ≥0 |
|
TOOL_LIST |
Array of strings |
Definition: List of tools used. Range: N/A |
|
UCC_NBNC |
Integer |
Definition: NBNC code lines. Value range: ≥0 |
|
UNRESOLVED |
Integer |
Definition: Number of unresolved issues. Value range: ≥0 |
|
UNRESOLVED_ADD |
Integer |
Definition: Number of new unresolved issues. Value range: ≥0 |
|
critical |
Integer |
Definition: Number of critical issues. Value range: ≥0 |
|
major |
Integer |
Definition: Number of major issues. Value range: ≥0 |
|
minor |
Integer |
Definition: Number of minor issues. Value range: ≥0 |
|
suggestion |
Integer |
Definition: Number of suggestions. Value range: ≥0 |
|
delay_critical |
Integer |
Definition: Number of deferred critical issues. Value range: ≥0 |
|
delay_major |
Integer |
Definition: Number of deferred major issues. Value range: ≥0 |
|
delay_minor |
Integer |
Definition: Number of deferred minor issues. Value range: ≥0 |
|
delay_suggestion |
Integer |
Definition: Number of deferred suggestions. Value range: ≥0 |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Definition: Error code. Value range: N/A |
|
error_msg |
String |
Definition: Error message. Value range: N/A |
Status code: 401
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Definition: Error code. Value range: N/A |
|
error_msg |
String |
Definition: Error message. Value range: N/A |
Example Requests
This API is used to query the latest check report and refresh the check report.
PUT https://{endpoint}/v1/jobs/e5470ceb4d0440f198b56974xxxxxxxx/result/refresh?task_id=&async=false
Example Responses
Status code: 200
Request succeeded!
{
"httpStatus" : "OK",
"result" : {
"CODE_SIZE" : 991,
"COMFIRM" : 0,
"CRITICAL" : 4,
"DELAYSTATUS_COUNT" : 0,
"FATAL" : 0,
"FILE_TOTAL" : 3,
"FIX" : 0,
"GENERAL" : 108,
"IGNORE" : 0,
"NEW" : 122,
"PROMPT" : 10,
"REPORT_URL" : "https://devcloud.example.com/codechecknew/project/40a381e7abf944bdbc5d6865xxxxxxxx/codecheck/task/green/e2acda04fab44eb991b9f28cxxxxxxxx/detail",
"RESOLVED" : 0,
"STANDARD_DISMISSED" : 0,
"STANDARD_FIXED" : 0,
"STANDARD_NEW" : 122,
"TOOL_LIST" : [ "fixbotengine-cxx", "clangtidy", "codemars" ],
"UCC_NBNC" : 991,
"UNRESOLVED" : 122,
"UNRESOLVED_ADD" : 122,
"critical" : 0,
"delay_critical" : 0,
"delay_major" : 0,
"delay_minor" : 0,
"delay_suggestion" : 0,
"major" : 4,
"minor" : 108,
"suggestion" : 10
},
"status" : "success"
}
Status code: 400
Bad Request
{
"error_code" : "CC.xxxxxxxx.400",
"error_msg" : "Verify request parameter failed. Check whether the request parameters are correct."
}
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