Help Center/ CodeArts Check/ API Reference/ APIs/ Task Management/ Obtaining the Webhook URL and Switch Status of a Task Based on the Task ID
Updated on 2026-02-03 GMT+08:00

Obtaining the Webhook URL and Switch Status of a Task Based on the Task ID

Function

This API is used to query the third-party notification configuration of a task based on the task ID. The third-party notification type, webhook URL, key, and switch status 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:get

Read

task *

-

-

-

-

codeartscheck:ProjectId

URI

GET /v4/tasks/{task_id}/task-webhook-info

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

Default value:

N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

data

Array of TaskWebhookInfo objects

Definition:

Webhook node list.

Value range:

N/A

total

Integer

Definition:

Total number.

Range:

0-2147483647

Table 3 TaskWebhookInfo

Parameter

Type

Description

id

String

Definition:

32-character UUID of the primary key.

Value range:

N/A

taskId

String

Definition:

Task ID.

Value range:

N/A

webhookUrl

String

Definition:

URL for the third-party platform to push notifications.

Value range:

N/A

status

String

Definition:

Notification switch.

Value range:

  • on: Enable notifications.

  • off: Disable notifications.

type

String

Definition:

Third-party notification type.

Value range:

  • wecom: WeCom notifications.

  • dingtalk: DingTalk notifications.

  • lark: Feishu notifications.

reviewResultFilter

String

Definition:

Filter by gate result.

Value range:

N/A

now

String

Definition:

Creation time.

Value range:

N/A

userIds

String

Definition:

User ID list.

Value range:

N/A

notificationMenu

String

Definition:

Menu items to be notified.

Value range:

  • jobResult: check result.

  • reviewResult: gate result.

  • issues: number of issues.

  • linkUrl: redirection URL.

  • executor: executor.

  • finishedTime: completion time.

secret

String

Definition:

Key required for webhook signature verification.

Value range:

N/A

Status code: 400

Table 4 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 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

Example Requests

Query the third-party notification configuration of the task whose ID is ac26d65ef4ef45c2986611XXXXXXffa.

GET https://{endpoint}/v4/tasks/ac26d65ef4ef45c2986611XXXXXXffa/task-webhook-info

Example Responses

Status code: 200

Request succeeded!

{
  "data" : [ {
    "id" : "1",
    "notificationMenu" : "",
    "now" : "2025-07-22T03:00:53Z",
    "reviewResultFilter" : "",
    "secret" : "",
    "status" : "off",
    "taskId" : "ac26d65ef4ef45c2986611XXXXXXffa",
    "type" : "wecom",
    "userIds" : "",
    "webhookUrl" : ""
  } ],
  "total" : 1
}

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.