Help Center/ CodeArts Pipeline/ API Reference/ API/ Pipeline Management/ Enabling or Disabling the Webhook Function
Updated on 2025-09-08 GMT+08:00

Enabling or Disabling the Webhook Function

Function

This API is used to enable or disable the webhook function.

Calling Method

For details, see Calling APIs.

URI

POST /v5/{project_id}/api/pipelines/{pipeline_id}/webhook/switch

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition:

Project ID. For details, see Obtaining a Project ID.

Constraints:

N/A

Value range:

The value consists of 32 characters, including digits and letters.

Default value:

N/A

pipeline_id

Yes

String

Definition:

Pipeline ID. Obtain the ID by calling the API for querying pipelines. pipelines.pipelineId indicates the pipeline ID.

Constraints:

N/A

Value range:

The value consists of 32 characters, including only digits and letters.

Default value:

N/A

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

webhook_switch

Yes

Boolean

Definition:

Whether to enable the webhook function.

Constraints:

N/A

Value range:

  • true: The webhook function is enabled.

  • false: The webhook function is disabled.

Default value:

N/A

use_iam

Yes

Boolean

Definition:

Whether to use IAM authentication.

Constraints:

N/A

Value range:

  • true: IAM authentication is used.

  • false: IAM authentication is not used.

Default value:

N/A

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

status

String

Definition:

Returned status.

Value range:

N/A

Example Requests

None

Example Responses

None

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.