Updated on 2026-09-24 GMT+08:00

Updating Pipelines in Batches

Function

This API is used to update pipeline notifications in batches.

Calling Method

For details, see Calling APIs.

URI

PUT /v5/{project_id}/api/pipelines/batch-update/notice

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

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

pipeline_ids

Yes

Array of strings

Definition

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

Constraints

N/A

Range

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

Default Value

N/A

notice_events

Yes

Array of notice_events objects

Definition

Notification configuration list details.

Constraints

N/A

Range

N/A

Default Value

N/A

Table 3 notice_events

Parameter

Mandatory

Type

Description

type

No

Integer

Definition

Notification event type.

Range

  • 1: System messages.

  • 2: Email notifications.

  • 3: WeChat.

  • 4: DingTalk.

  • 5: Lark.

events

No

Array of events objects

Definition

Notification event list details.

Constraints

N/A

Range

N/A

Default Value

N/A

webhook_config

No

webhook_config object

Definition

Webhook notification event configuration.

Constraints

N/A

Range

N/A

Default Value

N/A

switch_enable

No

Boolean

Definition

Whether to enable message notification.

Constraints

N/A

Range

N/A

Default Value

N/A

enable

No

Boolean

Definition

Whether to follow the project notification setting.

Constraints

N/A

Range

N/A

Default Value

N/A

Table 4 events

Parameter

Mandatory

Type

Description

id

No

String

Definition

Event ID.

Constraints

N/A

Range

N/A

Default Value

N/A

selected

No

Boolean

Definition

Selected or not.

Constraints

N/A

Range

N/A

Default Value

N/A

notice_roles

No

Array of strings

Definition

List of roles to be notified.

Constraints

N/A

Range

N/A

Default Value

N/A

receivers

No

Array of strings

Definition

Custom member.

Constraints

N/A

Range

N/A

Default Value

N/A

Table 5 webhook_config

Parameter

Mandatory

Type

Description

notice_id

No

String

Definition

Notification ID.

Constraints

N/A

Range

N/A

Default Value

N/A

url

No

String

Definition

Webhook URL.

Constraints

N/A

Range

N/A

Default Value

N/A

events

No

Array of strings

Definition

Event list.

Constraints

N/A

Range

N/A

Default Value

N/A

options

No

Array of strings

Definition

List of notification options.

Constraints

N/A

Range

N/A

Default Value

N/A

mentioned_list

No

Array of strings

Definition

List of mentioned users in the notification.

Constraints

N/A

Range

N/A

Default Value

N/A

mentioned_mobile_list

No

Array of strings

Definition

List of mentioned mobile numbers.

Constraints

N/A

Range

N/A

Default Value

N/A

secret_info

No

String

Definition

Key information.

Constraints

N/A

Range

N/A

Default Value

N/A

sort_index

No

Integer

Definition

Sorting and indexing.

Constraints

N/A

Range

N/A

Default Value

N/A

Response Parameters

Status code: 200

Table 6 Response body parameters

Parameter

Type

Description

result

Array of result objects

Definition

Response body for batch operations on pipelines.

Range

N/A

Table 7 result

Parameter

Type

Description

pipeline_id

String

Definition

Pipeline ID.

Range

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

pipeline_name

String

Definition

Pipeline name.

Range

Enter 1 to 128 characters, including only letters, digits, hyphens (-), and underscores (_).

status

String

Definition

Operation status. DELETE_FAILED indicates that the deletion fails. DELETE_SUCCESS indicates that the deletion is successful. SUCCESS indicates that the operation is successful. FAILED indicates that the operation fails.

Range

DELETE_FAILED, DELETE_SUCCESS, SUCCESS, and FAILED.

reason

String

Definition

Operation failure cause.

Range

N/A

Example Requests

POST https://{endpoint}/v5/d80a8a6530324b7bac972cbb8a9f28ec/api/pipelines/batch-update/notice

{
  "pipeline_ids" : [ "fe2cee7c8d2f4059a9b3b52ec0b94d11", "cbe95455be034fdb8064ede2d6b63cfd" ],
  "notice_events" : [ {
    "type" : 1,
    "enable" : false,
    "switch_enable" : true,
    "events" : [ {
      "id" : "pipelineRun.succeed",
      "selected" : true,
      "notice_roles" : [ "CREATOR", "EXECUTOR", "COLLECTOR" ],
      "receivers" : [ "c5d7272cfff4b4495b338934fa34a345e" ]
    }, {
      "id" : "pipelineRun.failed",
      "selected" : true,
      "notice_roles" : [ "CREATOR", "EXECUTOR", "COLLECTOR" ],
      "receivers" : [ "c5d7272cfff4b4495b338934fa34a345e" ]
    }, {
      "id" : "pipeline.deleted",
      "selected" : true,
      "notice_roles" : [ "CREATOR", "EXECUTOR", "COLLECTOR" ],
      "receivers" : [ "c5d7272cfff4b4495b338934fa34a345e" ]
    }, {
      "id" : "pipeline.updated",
      "selected" : true,
      "notice_roles" : [ "CREATOR", "EXECUTOR", "COLLECTOR" ],
      "receivers" : [ "c5d7272cfff4b4495b338934fa34a345e" ]
    } ]
  }, {
    "type" : 2,
    "enable" : false,
    "switch_enable" : true,
    "events" : [ {
      "id" : "pipelineRun.succeed",
      "selected" : true,
      "notice_roles" : [ "CREATOR", "EXECUTOR", "COLLECTOR" ],
      "receivers" : [ "c5d7272cfff4b4495b338934fa34a345e" ]
    }, {
      "id" : "pipelineRun.failed",
      "selected" : true,
      "notice_roles" : [ "CREATOR", "EXECUTOR", "COLLECTOR" ],
      "receivers" : [ "c5d7272cfff4b4495b338934fa34a345e" ]
    }, {
      "id" : "pipeline.deleted",
      "selected" : true,
      "notice_roles" : [ "CREATOR", "EXECUTOR", "COLLECTOR" ],
      "receivers" : [ "c5d7272cfff4b4495b338934fa34a345e" ]
    }, {
      "id" : "pipeline.updated",
      "selected" : true,
      "notice_roles" : [ "CREATOR", "EXECUTOR", "COLLECTOR" ],
      "receivers" : [ "c5d7272cfff4b4495b338934fa34a345e" ]
    } ]
  } ]
}

Example Responses

Status code: 200

{
  "result" : [ {
    "pipeline_id" : "fe2cee7c8d2f4059a9b3b52ec0b94d11",
    "pipeline_name" : "NewPipeline-20251229203112",
    "status" : "SUCCESS",
    "reason" : null
  }, {
    "pipeline_id" : "cbe95455be034fdb8064ede2d6b63cfd",
    "pipeline_name" : "NewPipeline-20251226154524",
    "status" : "SUCCESS",
    "reason" : null
  } ]
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.