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
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| task_id | Yes | String | Definition : Task ID, which is the return value of the API used to create a check task. Each check task, its brach tasks, and incremental tasks created through APIs have a unique task ID. Obtain the ID by calling the API used to query the task list. 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
| Parameter | Type | Description |
|---|---|---|
| data | Array of TaskWebhookInfo objects | Definition: Webhook node list. Range N/A |
| total | Integer | Definition: Total number of webhook node lists. Range 0-2147483647 |
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition 32-character UUID of the primary key or null. 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: |
| type | String | Definition: Third-party notification type. Value range: |
| reviewResultFilter | String | Definition Filter by gate result. Range |
| 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: |
| secret | String | Definition: Key required for webhook signature verification. Value range: N/A |
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
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
A request error occurred.
{
"error_code" : "CC.xxxxxxxx.400",
"error_msg" : "Verify request parameter failed. Check whether the request parameters are correct."
} Status code: 401
The permission is insufficient.
{
"error_code" : "CC.00000003",
"error_msg" : "Authentication information expired."
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Request succeeded. |
| 400 | A request error occurred. |
| 401 | The permission is insufficient. |
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