Help Center> CodeArts Check> API Reference> APIs> Task Management> Shielding a Directory in Task Configuration
Updated on 2023-11-28 GMT+08:00

Shielding a Directory in Task Configuration

Function

Shielded directory for task configuration.

URI

POST /v2/{project_id}/tasks/{task_id}/config-ignorepath

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

task_id

Yes

String

Task ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Can be obtained by calling the IAM API for obtaining the user token (the value of X-Subject-Token in the response header).

Minimum: 1

Maximum: 100000

Content-Type

Yes

String

Media type and encoding format.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

ignore_path_settings

Yes

Array of IgnorePathSettingItem objects

List of nodes that shield the directory.

Table 4 IgnorePathSettingItem

Parameter

Mandatory

Type

Description

file_path

Yes

String

Directory or file path.

checkbox_status

Yes

String

Shielding status. The value can be unchecked (unshielded), all (all shielded), or half (half shielded).

Response Parameters

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

Description

Status code: 401

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

Description

Example Requests

Task configuration shielding directory: The file path is .LAST_RELEASE, and the check status is all.

POST https://{endpoint}/v2/{project_id}/tasks/{task_id}/config-ignorepath

{
  "ignore_path_settings" : [ {
    "file_path" : ".LAST_RELEASE",
    "checkbox_status" : "all"
  } ]
}

Example Responses

Status code: 200

Request succeeded!

null

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.