Help Center/ CodeArts Check/ API Reference/ APIs/ Task Management/ Modifying Task Configurations
Updated on 2026-02-03 GMT+08:00

Modifying Task Configurations

Function

This API is used to modify code check task configurations. You can switch a task from a Gitee repository to a GitCode repository and modify the version-level check mode of the task.

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:update

Write

task *

-

-

-

-

codeartscheck:ProjectId

URI

PUT /v2/pipeline-task/{task_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

task_id

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 128 characters.

Default value:

N/A

Request Parameters

Table 2 Request header 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

Content-Type

No

String

Definition:

Media type and encoding format.

Constraints:

N/A

Value range:

N/A

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

repo_url

No

String

Definition:

Code repository address.

Constraints:

N/A

Value range:

1–512 characters.

Default value:

N/A

endpoint_id

No

String

Definition:

Code source endpoint ID.

Constraints:

N/A

Value range:

1 to 255 characters.

Default value:

N/A

repo_type

No

String

Definition:

Code repository type.

Constraints:

The value can be Gitee or GitCode.

Value range:

  • Gitee: Gitee repository.

  • GitCode: GitCode repository.

Default value:

N/A

auth_type

No

String

Definition:

Authorization type.

Constraints:

The value can be Gitee or GitCode.

Value range:

  • Gitee: Gitee repository.

  • GitCode: GitCode repository.

Default value:

N/A

full_check_mode

No

Integer

Definition:

Version-level check mode.

Constraints:

The value can be 0 or 1.

Value range:

  • 0: full check.

  • 1: commit check.

Default value:

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

result

String

Definition:

Successful response.

Value range:

OK

Status code: 400

Table 5 Response body parameters

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

Table 6 Response body parameters

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

Modify RepoUrl and code source endpoint ID of a task.

PUT https://{endpoint}/v2/pipeline-task/{task_id}

{
  "endpoint_id" : "363540xxxxxxxx5105099944xxxxxxxx",
  "repo_url" : "https://xxx.com/***.git",
  "auth_type" : "GitCode",
  "repo_type" : "GitCode"
}

Example Responses

Status code: 200

Request succeeded!

{
  "result" : "Ok"
}

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.