Performing a Full Check
Function
This API is used to perform a version-level check on the branch of the task based on the task ID. The task ID, execution record ID, and executor are 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:execute |
Write |
task * |
- |
- |
- |
|
- |
codeartscheck:ProjectId |
URI
POST /v1/jobs
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
operator |
No |
String |
Definition: Username of the person who performs the task execution. Constraints: N/A Value range: 1 to 255 characters. Default value: N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
taskId |
Yes |
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 |
|
executor |
No |
String |
Definition: User who executes the code check task. Constraints: N/A Value range: 1 to 255 characters. Default value: N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
httpStatus |
String |
Definition: HTTP response status. Value range: |
|
result |
CreateJobResult object |
Definition: Information returned after a full check is performed. |
|
status |
String |
Definition: API response status. Value range: |
|
Parameter |
Type |
Description |
|---|---|---|
|
finishTime |
String |
Definition: Check completion time in yyyy-MM-dd HH:mm:ss. Range: N/A |
|
hwCloudRegion |
String |
Definition: Huawei Cloud region. Range: N/A |
|
id |
String |
Definition: Execution ID, which is returned by the API of code check task execution. Each code check task has a unique execution ID. Value range: N/A |
|
process |
JobProcess object |
Definition: Progress of a code check task. Range: N/A |
|
ruleSets |
Array of ConfigTemplateRuleSetInfo objects |
Definition: Rule set configurations. Range: N/A |
|
source |
String |
Definition: Trigger source. Value range: |
|
startTime |
String |
Definition: Check task start time (UTC). Format: yyyy-MM-ddTHH:mm:ssZ. Range: N/A |
|
status |
String |
Definition: Task execution status. Range: |
|
subJobIds |
Array of strings |
Definition: Sub-task ID. Generally, an empty array [] is returned. |
|
subJobStatuses |
Array of strings |
Definition: Sub-task status. Generally, an empty array [] is returned. |
|
taskGroupId |
String |
Definition: Task group ID. Value range: 1 to 128 characters. |
|
taskId |
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 |
|
tenantId |
String |
Definition: Tenant ID of the task. The ID is obtained from IAM. Value range: N/A |
|
tokenUser |
String |
Definition: ID of the user who executed the code check task. The user ID is from IAM. Value range: 1 to 64 characters. |
|
version |
String |
Definition: Version of a code check task. Value range: 1 to 64 characters. |
|
Parameter |
Type |
Description |
|---|---|---|
|
message |
String |
Definition: Progress of a code check task. Value range: 1 to 65,535 characters. |
|
process |
String |
Definition: Task execution progress, in percentage. Value range: 0/ %to 100%. |
|
rate |
String |
Definition: Task execution progress, in percentage. Value range: 0/ %to 100%. |
|
stageStatuses |
Array of StageStatus objects |
Definition: Stage status of a code check task. |
|
status |
String |
Definition: Task execution status. Range: |
|
subJobIds |
Array of strings |
Definition: Subtask ID. Value range: N/A |
|
subJobStatuses |
Array of strings |
Definition: Subtask status. Range: N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
executeTime |
String |
Definition: Code check task duration. Range: N/A |
|
message |
String |
Definition: Progress of a code check task. Range: N/A |
|
stageName |
String |
Definition: Stage name of a code check task. Range: N/A |
|
status |
String |
Definition: Task execution status. Range: |
|
Parameter |
Type |
Description |
|---|---|---|
|
language |
String |
Definition: Language type. Value range: Custom language or system language. The following system languages are supported: |
|
ruleSetId |
String |
Definition: Rule set ID. Value range: 1 to 32 characters. |
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
Perform a full check on the task whose ID is 1015xxxxxxx6702d. The task is executed by codecheck_test.
POST https://{endpoint}/v1/jobs
{
"taskId" : "1015xxxxxxx6702d",
"executor" : "codecheck_test"
}
Example Responses
Status code: 200
Task executed.
{
"httpStatus" : "OK",
"result" : {
"finishTime" : "2025-09-23 09:24:54",
"hwCloudRegion" : "region-example",
"id" : "b9a249a06xxxxx14a9c59",
"process" : {
"message" : "Initializing...",
"process" : "0%",
"rate" : "0%",
"stageStatuses" : [ {
"executeTime" : "<5s",
"message" : "Initializing...",
"stageName" : "init",
"status" : "running"
} ],
"status" : "pending",
"subJobIds" : [ ],
"subJobStatuses" : [ ]
},
"ruleSets" : [ ],
"source" : "customer",
"startTime" : "2025-09-23T01:24:54Z",
"status" : "quering",
"subJobIds" : [ ],
"subJobStatuses" : [ ],
"taskGroupId" : "4bbeb9xxxxbba18c8",
"taskId" : "6309exxxxxc8d2ad",
"tenantId" : "389efb7xxxxxc895e4",
"tokenUser" : "405054xxxxxx0a09",
"version" : 2
},
"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 |
Task executed. |
|
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